Introduction to SLAM
What SLAM is, why it matters, and the high-level taxonomy of approaches.
In this lesson we give a short overview of Simultaneous Localization and Mapping (SLAM) — what it is, why we need it, and how it works at a high level. We will also outline the main components, the approaches we'll study, some helpful prerequisites, and provide suggested readings.
What is SLAM?
SLAM is the problem of estimating a robot's pose and a map of the environment at the same time. Formally, given controls and observations , SLAM estimates the joint posterior:
where are the robot poses and is the map.
It is often described as a chicken-and-egg problem:
- Localization: estimating the robot's position and orientation (pose).
- Mapping: building a consistent representation of the world.
- SLAM: solving both simultaneously, where each depends on the other.
This coupling makes SLAM challenging:
- A map helps localization, but
- good localization is required to build a good map.
Typical assumptions:
- Static world during mapping.
- Markovian process/measurement models.
- Conditional independence structure.
Why SLAM?
SLAM is a fundamental capability for autonomous robotics:
- Enables operation in unknown and infrastructure-free environments.
- Underpins most navigation and exploration systems.
- Critical for autonomous driving, search and rescue, inspection, warehouses, planetary exploration, and more.
How does SLAM work?
SLAM combines sensor data with probabilistic estimation to track both the robot's poses and the state of the map.
Common sensors:
- Visual SLAM (vSLAM): monocular, stereo or RGB-D cameras that extract and track image features (lines, edges, etc.) or directly align intensity/depth; great when there are distinct visual cues.
- Range-based SLAM: 2D/3D LiDAR, radar, sonar producing sparse or dense point clouds; robust to lighting and often more geometrically accurate; primarily scan matching.
- Multi-modal fusion: fuses IMU, wheel odometry, GPS (if available), LiDAR or vision to increase robustness and reduce drift (e.g., LiDAR-Visual–Inertial odometry).
Two main components:
- Front-end: acquires raw sensor data, extracts key features, and performs data association. It converts measurements into an intermediate representation — landmark observations or relative-pose constraints — that can be fed to the estimator.
- Back-end: performs estimation and optimization over those inputs to produce a consistent robot trajectory and map. It solves the underlying state-estimation / optimization problem to refine poses and landmarks.
Both front-end and back-end operate in a loop, continuously updating the map and robot pose in real time.
Main SLAM approaches
- Kalman Filter family (EKF / UKF): recursive prediction + correction using Gaussian models. EKF-SLAM was the first practical SLAM algorithm.
- Particle filters (FastSLAM): represent uncertainty with samples (particles). Particle filtering uses a set of particles to represent the posterior distribution of a stochastic process given the noisy and/or partial observations.
- Least squares (graph-based): model SLAM as a graph optimization problem — nodes are robot poses and landmarks, edges are constraints (odometry, observations) — and optimize to find the most consistent solution that minimizes an objective function.
SLAM timeline
A condensed history of the field. Click any era to expand its references.
- 1985–1990Probabilistic foundations; mapping + localization as one estimation problem.Treat mapping and localization jointly, with correlations between landmarks and pose as the essential structure. The estimation structure is recognized — though the term "SLAM" has not yet been coined. Genesis commonly traced to conversations and papers around the 1986 IEEE ICRA.
- 1991–1995Convergence results; the name "SLAM"; early implementations.Proofs and arguments that the joint estimation problem is convergent and that growing correlations are useful; the acronym SLAM appears in mid-1990s surveys; early EKF-based implementations across indoor, outdoor, and underwater domains.
- 1996–2000EKF-SLAM becomes the default; data association emerges as a central issue.EKF-SLAM matures and the community confronts computational complexity (quadratic scaling in map size), nonlinearity, and data association as key roadblocks; occupancy mapping develops in parallel for dense maps.
- 2001–2005Particle-filter era; FastSLAM; scalable mapping with RBPF.Rao–Blackwellized particle filters (FastSLAM) factorize the problem (pose with particles, landmarks analytically), enabling much larger feature maps and grid maps; robustness to some nonlinearities and outliers improves relative to naive EKF.
- 2006–2010Smoothing/optimization renaissance; graph-based SLAM; iSAM.Exploit sparsity (information matrix / factor graphs); re-cast SLAM as nonlinear least squares on a graph of poses and landmarks; incremental smoothing (iSAM) and modern sparse linear algebra make large-scale SLAM practical and accurate.
- 2011–2015Robust, general graph optimization; visual SLAM goes mainstream.General-purpose graph optimizers (e.g., g2o) and mature front-ends drive robust performance; visual SLAM systems achieve high accuracy and reliability. Direct (photometric) and feature-based pipelines both advance.
- 2016–2020Visual–inertial smoothing; robust outlier handling; certifiable methods.Tight visual–inertial smoothing with IMU pre-integration on manifolds; robust back-ends for outliers and loop closures; theory and algorithms for certifiably optimal pose-graph optimization (PGO).
- 2021–2025Differentiable & learned SLAM; neural scene representations; toward Spatial AI.End-to-end differentiable optimization (e.g., differentiable BA) and learned front-ends augment classical SLAM; NeRF and 3D Gaussian Splatting become practical map representations integrated with SLAM. The DARPA Subterranean Challenge accelerated large-scale, multi-robot SLAM under extreme conditions. The field expands toward Spatial AI: metric-semantic mapping and 3D scene graphs that support higher-level reasoning.
Prerequisites (nice to have)
Knowledge of the following will help you understand and derive the main SLAM concepts — you don't need to be an expert.
- Probability / statistics: Bayes rule, Gaussians, MAP / MLE, etc.
- Linear algebra: vectors, matrix multiplication, eigen decomposition, etc.
- Calculus and analysis: Taylor expansion, derivatives, etc.
- Optimization: Gauss–Newton, Levenberg–Marquardt, etc.
- Programming: Python (for the code notebooks).
Reading material
Videos
- If you are serious about SLAM and want an in-depth study, this series is a must:
- A nice tutorial on running SLAM in ROS 2:
Books
- An excellent book on probabilistic robotics with in-depth treatment:
- An introduction to robotics in general that includes localization:
- Pure state estimation for robotics:
- The most recent and complete handbook on SLAM:
- A tutorial approach to SLAM:
Papers
- A brief overview on the history of SLAM and its solutions:
- A tutorial specifically for Graph-based SLAM:
- A tutorial specifically for particle-filter localization:
Other
- A book on Bayesian and Kalman filters with Python implementations — by Roger Labbe:
- Slides giving an overview of SLAM methods — by Marios Xanthidis et al.:
- A GitHub with Python functions for SLAM — by Daniels Kraus:
- A nice blog post on Graph SLAM — by Federico Sarrocco:
- Pose Graph SLAM 2D/3D implementations using GTSAM — by Dhyey Manish Rajani:
- More on Recursive Bayesian Filtering — by Michael Rubinstein:
- Last but not least, the SLAM toolbox for ROS 2 — by Steve Macenski: