Perception & intelligence · topic C4 · 70 hours
SLAM
The foundation of mobile robotics. Also the most competitive tier — the one where papers and project quality matter most.
What to learn
- The division of labor: front end (feature / direct methods), back end (graph optimization), loop closure
- Lidar SLAM (Cartographer, LOAM family) versus visual SLAM (ORB-SLAM family) trade-offs
- Degenerate scenes: long corridors, white walls, glass, moving crowds — how to detect each
- Localization versus mapping: map-then-localize, localize-while-mapping, or localization only
The lesson · plain words
SLAM answers two questions tied together: where am I (localization) and what does the surroundings look like (mapping). Either one alone is easy; the hard part is the chicken-and-egg — localizing needs a map, mapping needs to know where you are.
The key move is loop closure: come back around to the starting point, «I have seen this corner before» — and use that single moment to spread the accumulated drift over the whole trajectory.
Odometry lies, and the lie grows as you walk
Wheel odometry fears slipping, visual odometry fears scale, the IMU fears drift. Shared property: the error accumulates — walk 100 m at 1% error and you are 1 m off. Look at the gray pure-odometry trace in the figure below: after the full loop, it never returns to the start.
That is why SLAM cannot be odometry alone. Loop closure brings in a third witness: on revisiting old ground, «current observation» is matched against «historical map», and the error is caught on the spot.
Interactive figure · drag it and see
Front end and back end: who does what
The front end (odometry + loop detection) produces «candidate constraints»: frame 37 and frame 3 are the same place, with this pose difference. The back end (graph optimization) produces «final poses»: solve least squares over all constraints together so that each one is satisfied as much as possible.
Think of a tug of war: odometry says each step was this long, the loop says start and end must coincide, and the back end mediates — every segment gives a little so the whole trajectory is globally self-consistent. That is what the yellow arrows in the figure are drawing.
Lidar or vision
Lidar SLAM: accurate ranging, light compute, no texture requirements; weaknesses — degeneracy in geometrically similar scenes (long corridors), no color or semantics. Visual SLAM: rich information, cheap; weaknesses — terrified of lighting changes and weak texture, scale needs an IMU or stereo to fix.
Engineering mainstream: outdoors and structured interiors run lidar-first with visual semantics assisting; consumer products (robot vacuums, AR) are mostly visual/VIO. Choose by working conditions, not by faith.
A realistic path into SLAM
First eat the «basic three» thoroughly: B1's transforms and timestamps, C1's camera model, B7's filtering. Then read the block diagram of ORB-SLAM3 or FAST-LIO (no line-by-line reading), run public datasets, and change one parameter to watch the trajectory move.
Interview favorites: why loop closure gives global consistency, why BA is sparse least squares, the one-sentence version of VIO observability (monocular VIO scale is pinned by the accelerometer's magnitude; pure rotation is unobservable).
Three questions — do you really get it?
1. The essential role of loop closure is?
- AEliminating accumulated drift and keeping global consistency
- BMaking mapping faster
- CRaising the frame rate
Show answer
A. Loop closure supplies the start-equals-end constraint; graph optimization then spreads drift back over the whole trajectory.
2. The main problem of pure odometry?
- AAccumulating error — the longer you go, the bigger it gets
- BInsufficient compute
- CCannot run in real time
Show answer
A. Odometry's tiny per-step errors add up: 1% drift over 100 m is 1 m.
3. Why does lidar SLAM tend to fail in a long corridor?
- ALaser power insufficient
- BThe corridor is too long for the map
- CGeometry is uniform — everywhere looks the same
Show answer
C. Motion along the corridor is unobservable (every wall identical); the degeneracy is a scene disease, not a hardware one.
Keep going deeper
Links without a marker stay on this site; the rest point to the Chinese edition until its translation batch lands.
How it fails in the field
- Only ever run in the lab, never tested in degenerate scenes — drifts the moment it enters a corridor
- The map looks beautiful but localization jumps in some areas, because there is no degeneracy detection or relocalization strategy
You have learned enough when
The Chinese edition carries the full topic page for SLAM, including the complete outline, depth requirements per career track, and further derivations: robotguide.dev/k/C4/.