A rover is in the aisle. It has to stop at a shelf, and the only position it can hold is a blend of a prediction and a noisy measurement.
Sensor trust 0.50. Sensor noise 0.50. Estimate 3.35 m.
The amber square is the prediction at 3.50 m, and it does not move. The teal dot is the measurement at 3.21 m, and the cloud around it widens as sensor noise rises. The ink line is the true position at 3.00 m. The rover never gets that number. The open circle is the estimate. It slides from the prediction toward the measurement as sensor trust rises.
| Number | What it is | Can the rover compute it? |
|---|---|---|
| True position | Where the rover physically is, the ink line | No |
| Prediction | Where the motion model says it is, the amber square | Yes |
| Measurement | What the sensor reports, the teal dot | Yes, with noise |
| Estimate | The blend the open circle shows | Yes, and later decisions use this |
The two sliders are one weight. Sensor trust is the share given to the measurement. Sensor noise is one minus that share, so dragging either slider moves the other. The estimate is the prediction plus that weight times the gap:
Set sensor trust to 0.80. The circle sits at 3.27 m, because . Trust 0 leaves the circle on the prediction. Trust 1 puts it on the measurement. Why 0.80 is the right share, and how a shove the motion model never saw shows up in a longer trace, is the next page.
Browser lab: one blend#
The cell computes the same blend the circle shows. Change weight, press Run, and check the printed estimate against the picture.
prediction = 3.50
measurement = 3.21
weight = 0.80
estimate = prediction + weight * (measurement - prediction)
print(f"estimate {estimate:.2f} m")
Knowledge Check#
Five checks against the picture. Drag the sliders, then answer.
Set sensor noise to the high end. Where does the estimate circle sit, compared with a low noise setting?
Move the sensor trust slider toward the sensor. Where does the estimate circle go?
You raise sensor trust. What does the noise slider do?
What happens to the ink line when you drag either slider?
The weight is 1. The estimate equals which number?
Key takeaways#
- The ink line is the truth. The rover does not have it.
- The amber square is the prediction and the teal dot is the measurement.
- One weight blends them. Noise is the complement of trust, so the sliders agree.
- The open circle is the estimate, and it is what later decisions should use.
Further reading#
The derivation of that weight, the gain formula, and the longer tracking lab are in The Position Update.
- Sebastian Thrun, Wolfram Burgard, and Dieter Fox, Probabilistic Robotics (MIT Press, 2005). Chapter 3 is the Kalman filter this picture is a one-number case of.
- Greg Welch and Gary Bishop, An Introduction to the Kalman Filter (University of North Carolina, TR 95-041). The same gain, with the covariance algebra written out.
Reading is free. PDF and ePub unlock with the newsletter. Join once and every lesson opens in this browser.