π Simultaneous Localization and Mapping (SLAM)
Descriptionβ
< What is it? >β
Simultaneous Localization and Mapping (SLAM) is the problem of estimating where a vehicle is while building or updating a map of its surroundings. It combines noisy sensor observations with motion estimates, so the vehicle can maintain a consistent pose even when GPS is weak or unavailable.
In autonomous driving, SLAM is especially useful when creating high-definition maps and when localizing a vehicle against those maps. The output is a vehicle poseβposition and orientationβand, when mapping is active, a geometric or landmark map.
- Example: as a mapping vehicle drives through a city, it uses LiDAR scans, camera images, and IMU motion measurements to estimate its trajectory and align repeated observations of the same buildings, lane markings, and poles into one map.
Key pointsβ
< What is estimated? >β
SLAM estimates a joint probability distribution over the vehicle trajectory and map , given sensor observations and motion inputs :
The vehicle must solve two coupled questions: βWhere am I?β and βWhat does the world around me look like?β A better map improves pose estimates, while better pose estimates let observations be placed correctly in the map.
< Sensors and sensor fusion >β
An autonomous vehicle usually combines several sources because each has different failure modes:
An Inertial Measurement Unit (IMU) contains accelerometers and gyroscopes that measure linear acceleration and angular velocity. By integrating those high-rate measurements, it predicts how the vehicle moved between camera or LiDAR observations. The prediction is useful over short intervals, but noise and sensor bias accumulate into drift without external correction.
| Sensor or signal | What it contributes | Common limitation |
|---|---|---|
| LiDAR | Accurate 3D geometry for scan matching and point-cloud maps | Rain, snow, sparse surfaces, and cost |
| Camera | Visual landmarks, lane markings, signs, and semantic context | Lighting, weather, motion blur, and texture-poor scenes |
| IMU and wheel odometry | Fast short-term motion estimates | Small errors accumulate as drift |
| GNSS | Global position reference | Urban canyons, tunnels, multipath, and outages |
Fusion combines their complementary evidence. For example, an IMU can bridge a brief LiDAR or camera failure, while a mapped LiDAR scan can correct accumulated odometry drift.
< Typical SLAM pipeline >β
- Synchronize and calibrate sensor data so every measurement is expressed in the correct coordinate frame.
- Track motion by matching consecutive scans, images, or features to estimate relative vehicle movement.
- Add map constraints by matching observations to landmarks, a point cloud, or keyframes.
- Optimize the trajectory and map with a filter or factor graph to make all constraints mutually consistent.
- Detect loop closures when the vehicle recognizes a previously visited place; this corrects long-term drift.
Dynamic objects such as cars, cyclists, and pedestrians are usually filtered or down-weighted because they are poor stable landmarks.
< SLAM in a production driving stack >β
Many autonomous-driving systems do not build a new map continuously during normal driving. Instead, they use a prebuilt high-definition map and perform map-based localization:
offline mapping run β high-definition map
β
online LiDAR, camera, GNSS, IMU β localization and sensor fusion β vehicle pose β planning and control
- Example: while driving on a mapped road, the vehicle matches its current LiDAR point cloud to the stored point-cloud map and fuses that result with GNSS and IMU data. The planner then uses the resulting pose to identify the current lane and route position.
This is related to SLAM, but it is primarily localization against an existing map. The map must be refreshed when roads, construction zones, or permanent landmarks change.
< Failure modes and safety >β
- Drift: small relative-motion errors accumulate without a strong global correction.
- Perceptual degradation: darkness, glare, rain, snow, fog, or repetitive scenery can make visual or LiDAR matching unreliable.
- Map mismatch: construction, changed lane layouts, or stale landmarks can make a valid old map misleading.
- Sensor problems: inaccurate calibration, poor time synchronization, occlusion, or a GNSS outage can corrupt the pose estimate.
Driving systems therefore monitor localization confidence, fuse redundant sensors, define an operational design domain, and choose a safe fallback when the pose is unreliable.
Comparisonβ
< SLAM, odometry, and map-based localization >β
| SLAM | Odometry | Map-based localization | |
|---|---|---|---|
| Main goal | Estimate pose while building or updating a map | Estimate relative motion over time | Estimate pose in a prebuilt map |
| Map required at start | No | No | Yes |
| Drift correction | Loop closures and map constraints | Usually none beyond sensor fusion | Matching to known map features or point clouds |
| Typical driving use | Fleet mapping, map updates, unmapped areas | Short-term motion input | Normal operation on mapped roads |
Video Tutorialβ
- How to make an autonomous mapping robot using SLAM
- SLAM
- SLAM & Path Planning
Related ideasβ
- Robotics introduces the broader field that combines sensing, decision-making, and control.
- Localization & Mapping introduces the broader set of related concepts.
- Sensor Fusion explains how motion and sensor measurements are combined into a pose estimate.
- Map-Based Localization and High-Definition (HD) Maps explains localization on pre-mapped roads.
- Isaac Sim can simulate cameras, LiDAR, motion, and driving environments for testing localization software.
- Convolutional Neural Network (CNN) explains a model family often used for visual feature extraction and perception.
- TensorRT helps deploy neural perception components efficiently on NVIDIA hardware.