Synthesis · SLAM → AV Localization → Perception

The same LiDAR sweep answers both questions at once.

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?

First — your mental model, checked

You've got it ~90% right. Here's the one tweak.

Your three intuitions, graded — and the single correction that unlocks the rest of this page.

✓ correct

SLAM leans on loop closure

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.

✓ correct

AV's static world is pre-mapped

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.

⚑ small tweak

Localization & perception aren't sequential

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.

Why the loop matters for SLAM but not for a robotaxi
Robot · unknown environment
SLAM needs to close the loop
No prior map → drift compounds → loop closure rescues it.
The robot has never seen this place. Every step it adds map and adds error. Only by returning to a known spot can it correct the accumulated drift.
Why: the map is the unknown — it's being solved live, so global consistency depends on revisiting.
Robotaxi · pre-mapped city
No loop needed — the map is the truth
HD map already globally consistent → just match to it.
The car already holds a centimetre-accurate, drift-free map built and optimized offline. Each sweep just answers "where on this map am I?" — no exploration, no drift to undo.
Why: mapping was done once, carefully; localization is the only live job.
The centerpiece — follow one sweep through both jobs

One LiDAR sweep → localization and obstacle detection

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.

incoming sweep
HD map (static prior)
live sweep / ego
matched static
dynamic (left over)
spd
The two jobs feed each other

It's a loop, not a one-way street

Localization and perception aren't just "running in parallel" — each makes the other better on every sweep.

localization → perception

The map cleans up detection

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").

perception → localization

Detections protect the pose

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.

Where it all sits in the driving stack

The classic modular pipeline every robotaxi runs. Note the two parallel branches off the same sensors — and how they rejoin.

input
Sensors
LiDAR · cameras · radar · GNSS · IMU — one synchronized sweep
branch A
Localization
Match sweep → HD map (NDT/GICP, particle filter), fused with GNSS+IMU. Output: cm-accurate ego pose.
branch B
Perception
Subtract static prior → cluster leftover points → detect & classify dynamic objects (cars, pedestrians, cyclists).
↓   shared pose + dynamic mask   ↓
combine
Tracking + Prediction
Track each object over time; use the map's lanes to predict where they'll go next.
output
Planning + Control
Given "where I am" + "what's moving & where it's headed," choose a safe trajectory and drive it.

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.

Everything we've covered, in one table

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).

MethodJobMap?Core mechanismWhere it appears

The five sentences to remember

If you keep only this, keep this.

01

SLAM = map + localize, simultaneously

Needed when the world is unknown. Loop closure is its rescue from drift.

02

Robotaxis pre-build the map

The static world rarely changes, so it's captured once. Live job = localize against it.

03

One sweep, two jobs

The same LiDAR/camera data localizes the ego and finds obstacles — at the same time.

04

The map is perception's filter

Align to the map, subtract the known static world, and whatever's left is dynamic.

05

The frontier fuses it all

Occupancy nets & world models do localization + perception in one neural step.