Localization & SLAM · Theory · M1
M1-T3 — Why SLAM Is Difficult
Five difficulties that explain nearly every design choice in the rest of the track.
SLAM looks simple on paper: place measurements using the pose. Five things make it hard in practice, and each one comes back in a later module as the reason a technique exists. Learning to name them is the fastest way to diagnose a failing system.
Learning objectives
After this lesson, you should be able to:
- Explain why odometry error is unbounded and quantify how a small heading error becomes a large position error.
- Describe data association and perceptual aliasing and give an example of each.
- Explain why dynamic objects break a static-world assumption.
- Say why computation and memory grow with time and map size, and how systems limit this.
The intuition
Walk across a field with your eyes closed, counting steps and aiming straight. Stop after 100 steps and you will be off by a good distance, even though each step was almost perfect. A tiny angular mistake on step one gets multiplied by every later step. This is the heart of the first difficulty.
The five difficulties
- 1. Coupled errors
- The pose error at time t is copied into everything observed at t. Errors in the map and in the trajectory are correlated, so they cannot be corrected independently.
- 2. Drift
- Dead-reckoning (integrating motion) accumulates error without limit. A heading error is the worst because it grows with every metre travelled.
- 3. Ambiguity
- Deciding which map element a measurement belongs to (data association) is hard. Two corridors that look the same cause perceptual aliasing: a false match that, if accepted, corrupts the map.
- 4. Dynamic world
- People, vehicles, opened doors and moved furniture violate the assumption that the world is still.
- 5. Cost
- The state grows with the number of poses and landmarks, and real-time operation needs bounded computation on small computers.
The mathematics
To see why drift is unbounded, integrate a robot that moves a distance d each step with heading θ. The position after N steps is the sum of the steps. If the heading has a small constant error ε, the position error is the length of the difference between the true and the believed path:
- N
- number of steps.
- d
- distance per step in metres.
- ε
- a heading error in radians that does not average out, such as a wheelbase that is mis-measured.
- σd
- random error per step, which does average partly: its total grows as √N.
If the errors are random instead of systematic, they partially cancel, and the accumulated error grows as
Both grow with N, so there is no steady state. Adding more steps never makes dead-reckoning better. Notice that these formulas describe magnitude only. Direction matters: heading errors turn into position errors perpendicular to travel, and they compound over the whole route.
Coupling: why the errors are not independent
Let a landmark be observed at relative position rt from a pose estimated as x̂t = xt + et. The mapped landmark is x̂t + rt = L + et. So the map error equals the pose error. Two landmarks seen from the same pose share the same et: their positions are correlated. This is a cost, because errors cannot be fixed independently. It is also an opportunity: correcting one landmark, such as when a loop closes, corrects every landmark and pose linked to it.
SLAM is hard because errors accumulate, are shared, and cannot be measured directly. It is tractable because they are shared.
A worked example: a 100 m corridor
A robot drives 100 m along a straight corridor in 1 m steps (N = 100, d = 1). Two things are slightly wrong.
- A heading bias. The robot’s initial heading estimate is off by ε = 0.01 rad (0.57°). After 100 m the sideways error is N · d · ε = 100 × 1 × 0.01 = 1.0 m. This is the straight orange line in the figure.
- Random noise. Each step has σd = 0.02 m of random error. After 100 steps, the expected error is 0.02 × √100 = 0.2 m.
- Compare. The 1.0 m systematic error dominates the 0.2 m random one by a factor of five. This is why calibration matters (the next lab): removing the bias is worth more than reducing the noise.
- Now add a revisit. A doorway mapped at the start is seen again from the end of the corridor. If place recognition matches it, the 1.0 m contradiction becomes a correction for the whole path. If nothing recognises it, the 1.0 m error simply stays.
Ambiguity in the same corridor
Now suppose the corridor has identical doorways every 10 m, and after a long run the pose has drifted by 5 m. The robot sees a door and the map predicts doors at 10 m and 20 m from the believed position. Both candidates are equally far from the believed pose, so a single match cannot tell them apart. Choosing the wrong one shifts the pose by 10 m. This is perceptual aliasing, and why systems keep several hypotheses or demand consistency over several measurements before accepting a match.
Engineering implications and limitations
How each difficulty shapes the design
| Difficulty | Consequence | Answer used in practice |
|---|---|---|
| Drift | Pose diverges from the world over time | Loop closure and graph optimization (Module 4); external references such as GPS |
| Coupled errors | Cannot fix one landmark alone | Joint estimation of all poses and landmarks |
| Ambiguity | False matches corrupt the map | Robust data association, gating, robust loss functions |
| Dynamic scenes | Moving objects become ghost walls | Motion filtering, semantic masks, map clean-up (Module 8) |
| Cost | State grows with time | Sparse formulations, keyframes, submaps, sliding windows |
Limits
No algorithm removes these difficulties; they only manage them. A system that handles 100 m of corridor may fail in 1 km of identical corridor. Always test where the problems peak: long straight runs, symmetry, crowds, and sudden environment change. A failure rarely announces itself. The robot simply goes on believing in a map that has quietly become wrong.
Common misconceptions
“Better sensors remove drift.”
A better sensor reduces the rate of drift, but integration still accumulates error without bound. Only a measurement relative to something previously seen, or an external reference, bounds it.
“Random noise is the main problem.”
Systematic errors (a wrong wheel radius, a tilted sensor) usually dominate because they do not average out. Random noise grows slower than systematic bias.
“Moving objects are rare.”
In offices, streets and homes, people and vehicles are common, and a moving object seen in many scans can be built into the map as a wall.
Engineering takeaways
- Dead-reckoning error grows without bound; heading error is the most damaging.
- Systematic bias grows linearly with distance and usually dominates random error, which grows roughly as the square root.
- Because the pose error is copied into the map, correcting one fixes many: this makes loop closure powerful.
- Data association errors are worse than noise: one false match can break a map.
- Every real SLAM system trades accuracy, robustness and compute; know which difficulty each design choice addresses.
References and further reading
Primary papers and authoritative documentation.
- Cadena, C. et al. (2016). Past, Present, and Future of SLAM. IEEE Transactions on Robotics 32(6): sections on robustness, scalability and the open problems.
- Borenstein, J. and Feng, L. (1996). Measurement and correction of systematic odometry errors in mobile robots. IEEE Transactions on Robotics and Automation 12(6). The UMBmark calibration used in the next lab.
- Durrant-Whyte, H. and Bailey, T. (2006). Simultaneous Localization and Mapping: Part I. IEEE Robotics & Automation Magazine 13(2).
Knowledge check
Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.
Question 1
Two robots drive the same 50 m. One has a wheel radius error of 1%, the other has random noise per step with the same overall magnitude. Which accumulates a larger position error and why?
Explanation
The wheel radius error is systematic: it scales every step in the same direction, so it grows linearly with distance. Random errors partially cancel and grow roughly with the square root of distance, so the systematic error is larger for the same per-step magnitude.
Question 2
A robot builds a map of a long corridor with identical doors. Why can a correct-looking match still be dangerous?
Explanation
Identical features cause perceptual aliasing: a match to the wrong door is geometrically plausible but wrong. Accepting it shifts the pose by the spacing between doors and corrupts the map, and nothing in the single measurement reveals it.
Question 3
Why does the fact that map errors are correlated with pose errors make loop closure so effective?
Explanation
Because all landmarks and poses along the path share and inherit the same accumulated error, one recognised revisit gives a constraint that can be propagated to all of them at once, correcting the whole trajectory and map instead of one point.
What’s next
To fix drift you first need to describe a pose precisely and know in which frame it is expressed. That is next.
Related content
Nothing below is required to finish this lesson.
- BeforeM1-T2: Localization vs Mapping vs SLAM
Tell apart the three estimation problems by what is known and what is estimated, and say when each applies.
- LabM1-L2: Diagnose Drifting Odometry
A robot returns to its start but odometry says it is metres away: find the dominant error source and calibrate it.
Get notified when the next lesson and new labs are released.
One email per new lesson or lab.