You've now seen two pieces: how robots build a map while finding themselves (SLAM, and its reliance on loop closure), and how self-driving cars mostly skip live mapping and localize against a known HD map. This final page connects them — and answers the question you actually asked: from one sensor sweep, how does the car figure out where it is and what's moving around it at the same time?
Your three intuitions, graded — and the single correction that unlocks the rest of this page.
Yes. Because the robot maps and localizes at once, it must explore, accumulate drift, then recognize a place it's been to snap the whole map into consistency. Without that loop, the map bends away from reality.
Yes. Lanes, curbs, signs, building walls, tree trunks barely change month to month — so they're captured once in an HD map. The live job becomes mostly localization against that known map, not mapping.
They run at the same time, off the same sweep — and the map helps perception: "everything here is already static, so whatever's left over must be a moving object." That subtraction is the link. That's this page.
This is the whole answer to your question, step by step. Watch a single sweep get used twice: first to pin down the ego pose against the map, then — using that very alignment — to subtract the known static world and reveal what's moving. Press play, or step through.
Localization and perception aren't just "running in parallel" — each makes the other better on every sweep.
Once you know your exact pose, you can overlay the HD map and delete every point that belongs to a known wall, curb or sign. What's left is a fraction of the cloud — cheaper to process and far less likely to throw false alarms. The map also says where the lanes are, so detections get instant context ("that car is in my lane").
Moving objects are poison for scan-matching — if a passing truck's points get matched to the map, the pose estimate is dragged off. So perception's dynamic mask is fed back into localization: "ignore these points when you align." Static landmarks (signs, poles) detected by perception also become extra localization anchors.
The classic modular pipeline every robotaxi runs. Note the two parallel branches off the same sensors — and how they rejoin.
The frontier (Tesla's occupancy network, Waymo's foundation model) collapses branches A and B into one neural net: surround cameras → a shared bird's-eye-view → simultaneously the ego's place, the drivable space, and every occupied/moving voxel. Same two jobs, fused into one learned step instead of two engineered ones.
Each method tagged by which job it serves: localization, perception, or both. The top block is SLAM (page 1), the middle is AV localization (page 2), the bottom is perception & the modern merge (this page).
| Method | Job | Map? | Core mechanism | Where it appears |
|---|
If you keep only this, keep this.
Needed when the world is unknown. Loop closure is its rescue from drift.
The static world rarely changes, so it's captured once. Live job = localize against it.
The same LiDAR/camera data localizes the ego and finds obstacles — at the same time.
Align to the map, subtract the known static world, and whatever's left is dynamic.
Occupancy nets & world models do localization + perception in one neural step.