Algorithm Search⌘K

Problemintro

Simultaneous localization and mapping

Also called SLAM, concurrent mapping and localization.

Build a map of an unknown environment and locate the robot in it at the same time, from motion and sensor data.

Simultaneous localization and mapping (SLAM) asks a robot that starts in an unknown place to build a map of it and, at the same time, find its own pose in that map, from its controls and its sensor readings only. This page is the general problem. It has two standard probabilistic forms, which have their own pages. Online SLAM asks for the current pose and the map, p(xt,m∣z1:t,u1:t)p(x_t, m \mid z_{1:t}, u_{1:t}), and suits filters that run as the robot moves. Full SLAM asks for the whole path and the map, p(x1:t,m∣z1:t,u1:t)p(x_{1:t}, m \mid z_{1:t}, u_{1:t}), and suits methods that optimize over all the data. The two halves of SLAM are simpler alone: localization with a known map, and mapping with known poses. SLAM is hard because each half needs the answer of the other, and because the errors of the pose and of the map are correlated.

In plain words

A robot is put in a building that it has never seen. It can count its wheel turns and it can see walls or marks around it, but both kinds of data have errors. It must draw a map and also say where it is on that map. If it knew where it was at every moment, drawing the map would be easy. If it had the map, finding itself would be easy. It has neither, so it must guess both together. A mistake in its position makes it draw the walls in the wrong place, and a wrong wall makes it place itself wrongly later. When the robot comes back to a place it has seen before and recognizes it, it can correct the errors that built up along the way.

Definition

Input. A sequence of controls u1:tu_{1:t}, such as odometry readings, and a sequence of sensor readings z1:tz_{1:t}, such as laser scans, camera images or ranges and bearings to landmarks. A motion model p(xk∣xk−1,uk)p(x_k \mid x_{k-1}, u_k) and a measurement model p(zk∣xk,m)p(z_k \mid x_k, m) describe the noise. The pose x0x_0 at the start defines the frame of the map, often x0=0x_0 = 0.

Output. An estimate of the map mm and of the robot pose, with its uncertainty. A planar pose is (x,y,θ)(x, y, \theta). The map can be a list of landmark positions, an occupancy grid, a set of points or a graph of places.

The question. In the probabilistic form, compute the posterior over the pose and the map given all the data. The online form keeps only the current pose, p(xt,m∣z1:t,u1:t)p(x_t, m \mid z_{1:t}, u_{1:t}). The full form keeps the whole path, p(x1:t,m∣z1:t,u1:t)p(x_{1:t}, m \mid z_{1:t}, u_{1:t}). The online posterior is the full posterior with the past poses integrated out.

Correspondence. A reading of a landmark does not always say which landmark it is. Deciding this is data association, a part of SLAM that is often harder than the estimation itself.

Variants

  • Online and full. See online SLAM and full SLAM.
  • Map types. Landmark maps, where the map is a vector of feature positions. Dense maps, such as occupancy grids or point clouds. Topological maps, a graph of places, see topological map.
  • Known or unknown correspondences. With known correspondences each reading comes with the identity of its landmark. Without them, data association is part of the problem.
  • Sensors. Laser or lidar SLAM, visual SLAM with one camera, as in MonoSLAM, or with several cameras, and SLAM with an inertial sensor.
  • Several robots. Multi-robot SLAM adds the unknown relative poses of the robots and the merging of maps.

Examples

A 1D world, by hand. A robot moves on a line. It starts at x0=0x_0 = 0, known exactly. One landmark is at an unknown position mm. The reading is z=m−x+wz = m - x + w with noise variance 1, and the motion is x1=x0+u1+vx_1 = x_0 + u_1 + v with noise variance 1.

  1. At x0x_0 the robot reads z0=5z_0 = 5. So m∼N(5,1)m \sim N(5, 1), and the map does not depend on the pose yet.
  2. It moves with u1=2u_1 = 2, so x1∼N(2,1)x_1 \sim N(2, 1), independent of mm.
  3. It reads z1=3.6z_1 = 3.6. The predicted reading is 5−2=35 - 2 = 3, the innovation is 0.60.6, and its variance is 1+1+1=31 + 1 + 1 = 3. The covariance of the reading with x1x_1 is −1-1 and with mm is +1+1, so the Kalman gains are −1/3-1/3 and +1/3+1/3.
  4. The new estimates are x1=2−0.2=1.8x_1 = 2 - 0.2 = 1.8 and m=5+0.2=5.2m = 5 + 0.2 = 5.2. The variances are 1−1/3=2/31 - 1/3 = 2/3 each, and the covariance of x1x_1 and mm is now +1/3+1/3, a correlation of 0.50.5.

The last line is the heart of SLAM. The reading measures only the difference m−x1m - x_1, so it ties the errors of the pose and the map together: if the robot is in truth further than it thinks, the landmark is too. A method that keeps the pose and the map as two separate estimates, without this correlation, throws away information and becomes overconfident.

Known algorithms

AlgorithmTimeSpacePropertiesCode
FastSLAMO(N k log m) stepO(N m) extrarandomizednot exactonlinerecursive1 language
Grid-based Rao-Blackwellized SLAMO(N G) resamplingO(N G) extrarandomizednot exactonlinerecursive1 language
Lidar odometry and mappingO(n k + n log n) feature_extractionO(m) mapdeterministicnot exactonlinetoy code1 language
ORB-SLAMO(l + c f) loop_queryO(n f) mapdeterministicnot exactonlinetoy code1 language

Bounds

SLAM is an estimation problem, not a decision problem, so the usual bounds are on cost and memory, not on a complexity class.

  • Dense correlations (theorem). In the linear Gaussian case, the EKF SLAM convergence theorem of Dissanayake et al. (2001) shows that the landmark estimates become fully correlated in the limit. So an exact Gaussian over the pose and the map needs Θ(m2)\Theta(m^2) numbers, and EKF SLAM pays O(m2)O(m^2) per update.
  • A floor on the map uncertainty (theorem). In the same setting, the uncertainty of each landmark never drops below the uncertainty of the robot when it first saw a landmark. The data measure only relative positions, so they cannot fix the map in the world better than the start pose does.
  • Sparse structure. In the full form, the information matrix has one nonzero block per motion step and per reading, so it is sparse. The cost of solving it depends on the variable ordering and the fill-in; see elimination ordering.
  • Nonconvexity. With rotations, full SLAM is a nonconvex least squares problem, and local methods can stop in a wrong local minimum.

Reductions

Applications

Indoor service robots and warehouse robots build and use maps with SLAM. Self-driving cars use lidar and visual SLAM to build the maps in which they later localize. Augmented reality on phones and headsets tracks the camera with visual SLAM. Robots for mines, caves, underwater survey and planetary exploration use it where no satellite positioning works.

References

  1. Sebastian Thrun, Wolfram Burgard and Dieter Fox, Probabilistic Robotics, MIT Press, 2005, Chapter 10 (the SLAM problem, its online and full forms, and EKF SLAM), Chapter 11 (GraphSLAM), Chapter 12 (SEIF) and Chapter 13 (FastSLAM)
  2. Hugh Durrant-Whyte and Tim Bailey, Simultaneous localization and mapping, part I, IEEE Robotics and Automation Magazine 13(2), 2006, from page 99, the statement of the problem, its probabilistic form and the history
  3. Tim Bailey and Hugh Durrant-Whyte, Simultaneous localization and mapping (SLAM), part II, IEEE Robotics and Automation Magazine 13(3), 2006, pages 108 to 117, the computational cost, data association and the representation of the environment
  4. Randall C. Smith and Peter Cheeseman, On the representation and estimation of spatial uncertainty, International Journal of Robotics Research 5(4), 1986, the representation of uncertain spatial relations by a mean and a covariance
  5. M. W. M. Gamini Dissanayake, Paul Newman, Steven Clark, Hugh F. Durrant-Whyte and M. Csorba, A solution to the simultaneous localization and map building (SLAM) problem, IEEE Transactions on Robotics and Automation 17(3), 2001, pages 229 to 241, Section III (the convergence of the map in the linear Gaussian case)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a contract.yaml