Lesson 16 · Book chapter pointer
Localization
Read the chapter source: localization.tex — do not treat this note as the book.
Learning goals
- Write Bayes localization as predict, then correct, in words and in symbols.
- Place Kalman, histogram, and particle filters as different representations of the same belief.
- Explain when a measurement is informative and when it is a wall along the ellipse.
- Distinguish local tracking from global kidnapping.
- Use a map as given — SLAM is next week.
Teaching note
Localization is “where am I on a map I already trust?” That last clause is a gift. You get to use walls as evidence instead of also inventing them. The algorithm is older than any library: start with a belief, push it through the motion model when the wheels turn (predict), then reweight or update when a sensor speaks (correct). Those two verbs are the whole family.
A Kalman filter (and EKF) keeps one Gaussian. It is fast and fails when the truth is two rooms at once. A histogram or grid filter keeps probability mass in bins — honest, expensive in high dimension. A particle filter keeps samples; it can represent “I might be in either corridor” and it can die if every particle is in the wrong hallway. Teach all three as storage formats for \(p(x\mid z_{1:t},u_{1:t})\), not as tribal identities.
Motion models smear the belief; measurements should shrink it. A side-wall range shrinks the direction normal to the wall and does almost nothing along it. That is why a robot in a long corridor knows its lane and not its mile marker until it sees a door. The studio 1D Kalman is this idea with the map hidden: Q smears, R decides how much you trust \(z\).
Kidnapping — picking the robot up — is a different problem from tracking. Trackers assume you were recently about right. Global localizers must be willing to be multimodal and to reseed. If your particle cloud cannot survive a lift-and-drop, do not advertise “Monte Carlo localization” on the demo poster. Say “we track from a known pose,” which is already a real product.
Lab: take the hallway log from the sensors lesson, add a simple wall map, and run a 1D or 3-DoF estimator by hand for five steps. Numbers on paper beat a ROS launch. Then read the book chapter for Markov localization, EKF, and the worked intuition this site will not copy.
Bayes filter: \(\overline{\text{bel}}(x_t)=\int p(x_t\mid u_t,x_{t-1})\,\text{bel}(x_{t-1})\,dx_{t-1}\), then \(\text{bel}(x_t)=\eta\,p(z_t\mid x_t)\,\overline{\text{bel}}(x_t)\).