Engineering mission · M-002
Vision Without Visibility
Your robot's camera keeps going blind. Design how it keeps knowing where it is, and when it should stop trusting itself.
About 2 h · intermediate · 6 steps · Uses Lab 03 · Free
The situation
A small greenhouse robot moves along a rail between rows of plants, stopping at each plant to take a photo and check the soil. It uses its camera to recognise markers on the rail and work out its position. Most of the time this works well.
But greenhouses are hard on cameras. Morning sun shines straight into the lens, misting sprays fog the view, and leaves sometimes hang in front of the markers. For a second or more at a time the camera gives nothing useful, and occasionally it gives a confident but wrong reading.
The robot also has wheel encoders, which count wheel rotation. They never drop out, but a slightly worn wheel makes them report a little more motion than really happened, so a position worked out from them alone drifts further and further from the truth.
Your task is to design the robot's position estimation strategy: how it combines these two imperfect sources, how it notices that the camera has become unreliable, and what it should do when it is no longer confident. You will use the sensor fusion explorer to gather evidence for your design. There are many reasonable strategies; you will be judged on how well yours is reasoned and tested.
You will learn to
- Explain why a sensor that drops out and a sensor that drifts have complementary strengths.
- Calculate how dead-reckoning error grows with time from a known bias.
- Use a simulation to compare estimation strategies with a fair, repeatable method.
- Design plausibility checks and a safe fallback behaviour for an unreliable sensor.
Constraints
- C1The robot needs its position to within 5 cm to stop at a plant.
- C2Assume an encoder bias of 1.5 cm/s for the calculations in this mission (the lab's default).
- C3Camera dropouts may last several seconds; you cannot add a new sensor.
- C4Your strategy must say what the robot does when it is not confident, not only how it estimates.
- C5Evidence from the lab must be reported with the settings used and at least three seeds per setting.
Background
Two kinds of imperfection
The camera gives an absolute position: each reading is noisy, but its errors do not pile up. When it drops out, though, it gives nothing. The encoders give relative motion: they are always available, but any small bias accumulates. This is called dead reckoning, and its error grows with time.
If the encoders over-report speed by a constant bias b, the dead-reckoned position drifts by b × t. With b = 0.8 cm/s, after 5 seconds the drift is 0.8 × 5 = 4 cm, and after a minute it is 48 cm. Noise adds a random wander on top of this.
Fusing them
A fused estimate uses the encoders to predict between camera readings, and each camera reading to correct the prediction. In the lab you can try two methods:
- A complementary filter blends the prediction and the camera reading with a fixed weight α. A higher α trusts the prediction more.
- A Kalman filter works out the blend automatically from how uncertain each source is. It also estimates the encoder bias, and it reports its own uncertainty, which grows during a dropout and shrinks when the camera returns.
Noticing a bad sensor
Dropouts are easy to notice: no reading arrives. Confidently wrong readings are harder. A common defence is a plausibility check: compare each new reading with what you predicted. If the difference is far larger than the combined uncertainty, treat the reading as suspicious. For example, if you predict 120 cm with an uncertainty of about 2 cm and the camera says 160 cm, something is wrong: either the robot was moved, or the camera recognised the wrong marker.
Deciding what to do
An estimate is only useful with an honest sense of how good it is. A well-designed robot changes its behaviour as its confidence falls, for example by slowing down, pausing until the camera recovers, or refusing a task that needs high accuracy. Writing these rules down clearly is part of the design.
About the lab
The fusion explorer simulates a point moving along a line, with a camera that drops out in bursts and odometry with a constant bias. It is a simplified model, not a greenhouse. Its numbers come from one seeded run; regenerate the seed to see how much results vary by chance.
Lab 03 · Sensor fusion
Explorer 03 — Sensor fusion
Two imperfect sensors, one better estimate
- True position
- Camera reading
- Odometry dead-reckoning
- Fused (Kalman)
- ±2σ uncertainty
- Camera dropout
Camera · absolute, drops out
Long-run share of time with no view, in bursts of about 1.2 s (occlusions).
Odometry · relative, drifts
A constant error in measured speed: its position estimate drifts by bias × time.
More controls
The Kalman filter weights each sensor by its stated noise, tracks its own uncertainty, and estimates the odometry bias while the camera can see.
Show
Root-mean-square error vs truth · lower is better
- Camera aloneholds last reading in dropouts7.9 cm
- Odometry alonedead reckoning from start15.1 cm
- Kalman filterfused estimate0.9 cm
- Fused, in dropoutsonly samples with no camera1.1 cm
Camera coverage 60 %. Camera error only over frames it saw: 2.9 cm (≈ its σ).
State
Seed 7. The camera saw the target 60 % of the time in 4 dropouts. Error (RMSE): camera alone 7.9 cm holding its last reading, odometry alone 15.1 cm, kalman filter 0.9 cm (1.1 cm during dropouts). Fusion is 88 % better than the better single sensor. Estimated odometry bias 1.53 cm/s (true 1.50).
Seed 7. The camera saw the target 60 % of the time in 4 dropouts. Error (RMSE): camera alone 7.9 cm holding its last reading, odometry alone 15.1 cm, kalman filter 0.9 cm (1.1 cm during dropouts). Fusion is 88 % better than the better single sensor. Estimated odometry bias 1.53 cm/s (true 1.50).
How to read this
Time runs left to right over 20 seconds. The thin solid line is where the object really is. Crosses are camera readings; hatched columns are dropouts where the camera sees nothing. The dashed line is odometry integrated from the start: smooth, but it wanders away as its bias accumulates. The thick line is the fused estimate, with a shaded ±2σ band showing how uncertain the Kalman filter believes it is. The band widens during each dropout and snaps back when the camera returns.
This mirrors Tactiverge's research question: when vision drops out, can local sensing such as force and joint feedback carry the estimate until it returns?
Assumptions & limitations
- One dimension, a smooth known trajectory and a single object: real tracking is 3-D, with orientation, multiple objects and data association.
- Noise is white Gaussian with the σ you set, and the Kalman filter is told the true σ values. Real filters must be tuned against noise they can only estimate.
- Odometry error is a constant bias plus white noise; real drift also comes from slip, scale-factor error and temperature.
- Dropouts are random bursts, independent of where the object is. Real occlusions often happen exactly when the task gets hard, for example when a gripper covers the object.
- The camera has no latency and runs at the same 20 Hz as odometry; real cameras are slower and delayed, which the filter would have to compensate for.
- Figures are from one seeded run of 401 samples; change the seed to see how much the numbers vary by chance.
How to approach it
- 01
Calculate the drift budget
With a bias of 1.5 cm/s, how far does dead reckoning drift during a 4-second dropout? How long can the camera be gone before the drift alone exceeds the 5 cm tolerance? Work these out on paper first. They tell you how long the robot can safely run blind.
- 02
Get to know the explorer
Open the sensor fusion explorer with its default settings. Turn on the camera readings and odometry traces. Watch what happens during each hatched dropout. Note the Camera alone, Odometry alone and Fused, in dropouts error figures. Change the seed a few times and see how much they move.
- 03
Test the conditions your robot will face
Choose settings that represent a bad greenhouse morning: more camera noise and a higher dropout probability. For each condition, compare the complementary filter at two or three values of α against the Kalman filter, using at least three seeds each. Record every result as a list with its settings.
- 04
Design the plausibility check
Write a rule, in plain words or pseudocode, that decides when to reject a camera reading. Base it on the difference between the reading and your prediction compared with the uncertainty. Explain what would happen if your threshold were much too tight or much too loose.
- 05
Design the confidence-based behaviour
Write a small set of rules for what the robot does as its uncertainty grows: for example, normal speed, slow down, stop and wait. Give the thresholds in centimetres and link them to your drift calculation and the 5 cm requirement.
- 06
Write up your strategy
Bring it together: which fusion method you chose and why, the evidence from the lab, your plausibility check, your behaviour rules and the biggest weakness you know about.
Your work
Everything above is free to read and use. To save drafts, submit versions and get feedback, sign in.
You can also work on paper: the prompts below are what a submission asks for.
- Dead-reckoning drift after a 4 s dropout (cm)
- Longest dropout before drift alone exceeds 5 cm (s)
- Lab evidence
- Plausibility check
- Estimation strategy and fallback behaviour
- Biggest known weakness
How it's judged
There is more than one good answer. This rubric describes what strong work looks like.
Understanding the sensors
- Beginning
- Treats the two sensors as interchangeable or misdescribes their errors.
- Developing
- Describes dropout and drift correctly but does not connect them to the design.
- Proficient
- Explains why the sources are complementary and uses the drift calculation to set limits.
- Exemplary
- As Proficient, plus explains how the Kalman bias estimate changes the drift picture and when it can be trusted.
Evidence from the lab
- Beginning
- No lab evidence, or results without settings.
- Developing
- Results are reported but from a single seed, or methods are compared under different settings.
- Proficient
- Fair comparisons with settings listed and at least three seeds per condition.
- Exemplary
- As Proficient, plus variation between seeds is quantified and used to judge whether a difference is real.
Plausibility check
- Beginning
- No rule, or a rule that would reject almost nothing or almost everything.
- Developing
- A rule with a fixed threshold that is not linked to uncertainty.
- Proficient
- A rule comparing the reading with the prediction relative to uncertainty, with the trade-off of the threshold explained.
- Exemplary
- As Proficient, plus handles the case where the robot really was moved, so the check does not reject the truth forever.
Safe behaviour design
- Beginning
- Behaviour when not confident is not addressed.
- Developing
- Mentions slowing or stopping without thresholds.
- Proficient
- Clear rules with thresholds tied to the 5 cm requirement and the drift calculation.
- Exemplary
- As Proficient, plus considers what a person nearby needs to know and how the robot recovers.
Reflect
- Was there a setting where fusing the sensors was worse than using one alone? What caused it?
- Why is an estimate's reported uncertainty as important as the estimate itself?
- What would you want to test on a real robot that the simulation cannot tell you?
Go further
Suppose the wheel slips on a wet rail now and then, causing sudden jumps in the encoder error rather than steady bias. Describe how you would detect slip, and design a lab experiment (using the odometry noise control as a stand-in) to test your detector's limits.