Algorithm Search⌘K

Problemcore

Online SLAM

Also called filtering SLAM.

SLAM that estimates only the current pose and the map, marginalizing out past poses as it goes.

Online SLAM is the form of the SLAM problem that asks only 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 updates this estimate at every step as new data arrive. It differs from full SLAM, which asks for the whole path, p(x1:t,m∣z1:t,u1:t)p(x_{1:t}, m \mid z_{1:t}, u_{1:t}): online SLAM integrates out each past pose as soon as the robot has moved on, so its state does not grow with time, but it cannot correct the past path later. The general problem, with both forms, is on the SLAM problem page. Online SLAM is a filtering problem, and the classical solutions are filters such as EKF SLAM.

In plain words

The robot keeps a single best guess of where it is now and where everything on the map is, with a measure of how sure it is. After each move and each reading, it updates this guess and forgets the details of where it was before. This keeps the memory small and steady, and it gives an answer at once, which a moving robot needs. The price is that an old mistake cannot be fixed by going back over the old data, because that data is no longer kept. Everything the past taught is folded into the present guess.

Definition

Input. At each step tt, a control utu_t and a reading ztz_t, a motion model p(xt∣xt−1,ut)p(x_t \mid x_{t-1}, u_t) and a measurement model p(zt∣xt,m)p(z_t \mid x_t, m). The map mm does not change.

Output. At each step, the posterior p(xt,m∣z1:t,u1:t)p(x_t, m \mid z_{1:t}, u_{1:t}) over the current pose and the map, or an approximation of it, such as a mean and a covariance.

The recursion. Online SLAM is the Bayes filter on the state (xt,m)(x_t, m), in which only the pose moves:

p(xt,m∣z1:t,u1:t)=η p(zt∣xt,m)∫p(xt∣xt−1,ut) p(xt−1,m∣z1:t−1,u1:t−1) dxt−1.p(x_t, m \mid z_{1:t}, u_{1:t}) = \eta \, p(z_t \mid x_t, m) \int p(x_t \mid x_{t-1}, u_t) \, p(x_{t-1}, m \mid z_{1:t-1}, u_{1:t-1}) \, \mathrm{d}x_{t-1}.

The integral removes the previous pose. Step by step, the online posterior at time tt is thus the full posterior with all the past poses x1:t−1x_{1:t-1} integrated out.

Variants

  • With known or unknown correspondences. Without them, the filter must also solve data association at each step.
  • Gaussian and particle representations. A Gaussian over (xt,m)(x_t, m) in EKF SLAM; its inverse, the information form, in the extended information filter; particles in FastSLAM, which samples whole paths but keeps only what the current step needs.
  • Fixed-lag smoothing. A middle way keeps the last few poses and integrates out only the older ones. This is fixed-lag smoothing.

Examples

Why the past poses make the map dense, by hand. A robot on a line starts at x0=0x_0 = 0, moves to x1x_1 and then to x2x_2, with odometry of variance 1 each time. From x1x_1 it reads landmark aa, and from x2x_2 landmark bb, also with variance 1. In the information form, which is the inverse covariance, each motion step and each reading adds a term that links only the variables it involves. Over (x1,x2,a,b)(x_1, x_2, a, b) the information matrix is

Ω=(3−1−10−120−1−10100−101).\Omega = \begin{pmatrix} 3 & -1 & -1 & 0 \\ -1 & 2 & 0 & -1 \\ -1 & 0 & 1 & 0 \\ 0 & -1 & 0 & 1 \end{pmatrix}.

The entry of x1x_1 is 3: one for the step from x0x_0, one for the step to x2x_2, one for the reading of aa. The entry of (a,b)(a, b) is 0: the two landmarks are linked only through the path. This is the matrix of full SLAM.

Online SLAM integrates out x1x_1. For a Gaussian this is the Schur complement: subtract Ωr1Ω11−1Ω1r\Omega_{r 1} \Omega_{11}^{-1} \Omega_{1 r}, where Ω1r=(−1,−1,0)\Omega_{1 r} = (-1, -1, 0) are the links of x1x_1 to (x2,a,b)(x_2, a, b) and Ω11=3\Omega_{11} = 3. Over (x2,a,b)(x_2, a, b) the result is

Ω′=(20−1010−101)−13(110110000)=(5/3−1/3−1−1/32/30−101).\Omega' = \begin{pmatrix} 2 & 0 & -1 \\ 0 & 1 & 0 \\ -1 & 0 & 1 \end{pmatrix} - \frac{1}{3} \begin{pmatrix} 1 & 1 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 0 \end{pmatrix} = \begin{pmatrix} 5/3 & -1/3 & -1 \\ -1/3 & 2/3 & 0 \\ -1 & 0 & 1 \end{pmatrix}.

A new link −1/3-1/3 has appeared between x2x_2 and aa, which no reading made. Each pose that is integrated out links all its neighbours to each other. Over many steps, every landmark seen from the path gets linked to every other, and the online information matrix, like the covariance, becomes dense. The full SLAM matrix stays sparse because it keeps the poses.

Known algorithms

  • EKF SLAM. One Gaussian over the pose and mm landmarks, O(m2)O(m^2) time per update and O(m2)O(m^2) memory.
  • Extended information filter. The same Gaussian in information form. A reading is cheap to add, but the motion step and the recovery of the mean are costly.
  • Sparse extended information filter. It removes weak links of the information matrix to keep it sparse. This sparsification is an approximation, and it makes the estimate overconfident.
  • MonoSLAM. EKF SLAM with one camera as the only sensor.
  • Particle filters. FastSLAM and grid-based RBPF SLAM run online, step by step, but each particle carries a path, so they estimate the full posterior over paths and use it online.
AlgorithmTimeSpacePropertiesCode
EKF SLAMO(k m) associationO(m^2) extradeterministicnot exactonlinerecursive1 language
Extended information filterO(n^3) mean · predictionO(n^2) extradeterministicnot exactonlinerecursive1 language
MonoSLAMO(k m^2) frameO(m^2) extradeterministicnot exactonlinerecursive1 language
Sparse extended information filterO(k^3) mean · motion · sparsificationO(n^2) extradeterministicnot exactonlinerecursive1 language

Bounds

  • Dense state (theorem). In the linear Gaussian case, the landmarks become fully correlated in the limit, by the EKF SLAM convergence theorem. An exact Gaussian online posterior over mm landmarks then needs Θ(m2)\Theta(m^2) numbers, and any exact update that touches all correlations costs Ω(m2)\Omega(m^2). The example above shows the same effect in the information form: integrating out the poses makes it dense.
  • Same answer as full SLAM in the linear Gaussian case (theorem). The marginal of a Gaussian keeps the mean and the covariance of the remaining variables. So when the models are linear and the noise is Gaussian, the online estimate of (xt,m)(x_t, m) equals that part of the full SLAM solution. With nonlinear models the two differ: a filter linearizes each step once and cannot go back, while full SLAM can linearize again at better estimates.

Reductions

  • From full SLAM. Integrate out x1:t−1x_{1:t-1} from the full posterior.
  • To a Bayes filter. Online SLAM is a Bayes filter whose state is the pose and the static map.
  • Localization. If the map is known, the online posterior is the localization posterior p(xt∣z1:t,u1:t,m)p(x_t \mid z_{1:t}, u_{1:t}, m), see mobile robot localization.

Applications

Online SLAM is the form that a robot needs when it must act on its estimate at once and has a fixed budget of memory and time per step: small indoor robots, drones that track their position against a small map, and camera tracking for augmented reality, as in MonoSLAM. Most large systems today solve full SLAM or a fixed-lag form instead, and keep an online estimate only for the newest pose.

References

  1. Sebastian Thrun, Wolfram Burgard and Dieter Fox, Probabilistic Robotics, MIT Press, 2005, Chapter 10 (the online SLAM problem and EKF SLAM) and Chapter 12 (the sparse extended information filter and the effect of marginalizing past poses)
  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 probabilistic form of SLAM as a recursive estimate of the current pose and the map

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