AI Glossary / Reinforcement learning and robotics / Advanced

Simultaneous localization and mapping

Definition

Simultaneous localization and mapping, usually shortened to SLAM, is the problem of estimating a robot's location while building a map of the environment from its observations. The two estimates are linked: the robot needs a location estimate to place observations on the map, and it uses mapped features to improve its location estimate. SLAM addresses this joint uncertainty.

What it means

A robot entering an unfamiliar space may not have a dependable map or an external positioning signal. Its sensors can measure nearby structure and changes in motion, but these measurements are imperfect. SLAM combines them to estimate a consistent spatial description and robot trajectory.
SLAM differs from localization in a fixed known map and from mapping with perfectly known robot positions. It also does not, by itself, choose a destination or ensure collision-free movement. Navigation systems can use SLAM outputs alongside planning and control.

How it works

The system obtains motion information and observations from sensors such as cameras, lidar, or inertial devices. It estimates movement, associates observations with environmental structure, and updates the robot and map estimates. Different methods use different representations, including landmarks, grids, point clouds, or graphs of poses and constraints.
Data association asks whether a new observation corresponds to something seen before. Recognizing a previously visited place can create a loop-closure constraint that helps correct accumulated drift. Incorrect associations can instead distort the map, so apparent visual similarity is not sufficient evidence on its own.
Uncertainty is coupled. If the robot's estimated position shifts, the inferred positions of features observed from it may shift as well. Treating all mapped features as independent, perfectly known references can produce overconfidence.
A map also needs a coordinate convention. Without an external anchor, the entire solution may be translatable or rotatable while preserving its relative geometry. Some sensing setups introduce additional ambiguities, such as scale in monocular vision without other metric information. A consistent relative map is therefore not automatically a globally referenced survey.

Three practical examples

  • Indoor mobile robots: create a map while estimating position in an initially unfamiliar building.
  • Inspection platforms: reconstruct spatial structure while moving through areas with limited external positioning.
  • Augmented-reality research: track a moving camera and surrounding structure so virtual content can remain spatially consistent.

Think of it this way

Think of sketching a building while walking through it with an imperfect estimate of your own movement. When you recognize an earlier doorway, you can revise both the sketch and your estimated route. The challenge is deciding whether it really is the same doorway and how much confidence to place in each measurement.

Worked example

Consider a fictional one-dimensional SLAM example. Fix the robot's starting position at x0 = 0 to choose a coordinate origin. The unknowns are its later position x1 and one landmark position m. Three equally weighted, noisy measurements are available: motion suggests x1 = 2.2 meters; the first landmark observation suggests m = 5.0 meters; and the later observation suggests m - x1 = 3.0 meters.
The measurements are inconsistent if taken as exact: 5.0 - 2.2 = 2.8, not 3.0. Instead of choosing one measurement and discarding the others, minimize the sum of squared residuals: (x1 - 2.2)^2 + (m - 5.0)^2 + (m - x1 - 3.0)^2.
Setting both derivatives to zero gives 2x1 - m + 0.8 = 0 and 2m - x1 - 8.0 = 0. Solving yields x1 = 2.1333 meters and m = 5.0667 meters, rounded to four decimal places. The predicted later landmark displacement is 5.0667 - 2.1333 = 2.9334 meters, approximately 2.9333 before rounding.
The three residuals are approximately -0.0667, +0.0667, and -0.0667 meters. Their squared sum is approximately 0.01333 square meters. Using the unadjusted values x1 = 2.2 and m = 5.0 instead gives residuals 0, 0, and -0.2, with squared sum 0.04. Joint adjustment therefore fits the stated equal-weight objective better.
Both the robot position and the landmark move because both are uncertain. If measurement uncertainties differed, appropriate weights would change the result. If the later observation referred to a different landmark, this optimization would be solving the wrong association problem.
This small example omits rotations, multiple landmarks, covariance calculations, and nonlinear sensor models. It demonstrates the coupling at the heart of SLAM rather than reproducing a complete deployed SLAM system.

Illustrative case study

Fictional case: BeechMapping surveys a corridor with several nearly identical doorways. A prototype mistakenly treats a new doorway as one visited earlier and inserts an incorrect loop closure. The resulting map bends to satisfy a false correspondence.
The team examines association confidence and geometric consistency, then tests the system on repeated visual patterns and changed lighting. It compares estimated trajectories with independent reference measurements where available. This invented case illustrates a failure mode, not an actual benchmark result.

Common misconceptions and mistakes

Common mistakes include calling any map-building process SLAM, assuming loop closure always improves accuracy, and treating a visually smooth map as proof of correct geometry. Dynamic objects can violate assumptions about fixed structure. Poor calibration, timing errors, weak texture, or repetitive scenes can also degrade estimates even when the algorithm is theoretically appropriate.

Business use

Businesses evaluating SLAM should define the required spatial accuracy, operating conditions, map scale, and recovery behavior after tracking loss. Compare performance against independent references and inspect both ordinary and difficult environments. Integration must also specify how map updates affect downstream navigation or inspection records, particularly when estimates change after revisiting an area.

People also ask

Does SLAM require GPS?

No; it is often useful when dependable external positioning is unavailable.

Does it automatically navigate the robot?

No. Mapping and localization support navigation but do not replace planning and control.

Is the resulting map perfectly accurate?

No. Accuracy depends on observations, assumptions, calibration, and estimation quality.

Check your understanding

Why are the three measurements inconsistent?

Answer: The first two imply a later displacement of 2.8 meters, while the third measures 3.0.

Why does the landmark estimate change?

Answer: It is estimated jointly with the uncertain robot position.

What fixes the example's coordinate origin?

Answer: The convention x0 = 0.

Related terms

  • Localization
  • Odometry
  • Landmarks
  • Covariance
  • Robot navigation
  • mapping
  • loop closure
  • data association
  • pose graph
  • sensor fusion
  • landmark
  • visual SLAM

Learn next

Next, extend the one-dimensional example with a second landmark and unequal measurement uncertainties. Then inspect how an incorrect association changes the fitted trajectory and map.

More in Reinforcement learning and robotics

  • Scenario (vehicular automation) - In vehicular automation, a scenario describes how a traffic setting and its participants evolve over time, including relevant actions, events, and...
  • Semi-gradient temporal-difference learning - Semi-gradient temporal-difference learning updates a parameterized value estimate using a bootstrapped target while treating that target as constant during...
  • Sequential decision making - Sequential decision making concerns choosing actions over time when present choices influence future conditions, information, or opportunities.
  • Situated robotics - Situated robotics studies and designs robots as agents whose behavior arises through ongoing interaction with their environment.
  • Smoothed Bellman error embedding - Smoothed Bellman error embedding, or SBEED, is a reinforcement-learning method that combines an entropy-smoothed Bellman equation with a primal-dual...
  • Soft actor-critic - Soft actor-critic, or SAC, is an off-policy actor-critic reinforcement-learning algorithm that optimizes expected reward together with a policy-entropy term.

Sources

Hugh Durrant-Whyte and Tim Bailey, Simultaneous Localisation and Mapping, Part I: https://people.eecs.berkeley.edu/~pabbeel/cs287-fa09/readings/Durrant-Whyte_Bailey_SLAM-tutorial-I.pdf Tim Bailey and Hugh Durrant-Whyte, Simultaneous Localization and Mapping, Part II: https://www.doc.ic.ac.uk/~ajd/Robotics/RoboticsResources/SLAMTutorial2.pdf

Previous: Simultaneous autoregression Next: Sinc

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer