Disclaimer: This tutorial is AI-generated and may contain errors or omissions. Verify important concepts with reliable sources or instructors.

Interactive Guide

How SLAM Works (Without Heavy Math)

SLAM means: build a map while figuring out where you are in that same map. This page focuses on intuition first: prediction, correction, uncertainty, and map-building.

Step 1

The Core Idea

A robot has two imperfect sources of information: motion estimates (how it thinks it moved) and sensor readings (what it thinks it sees). Both are noisy.

SLAM is the process of combining these two streams over time so that both the position estimate and the map estimate improve together.

Mental Model

  • Predict: "Given motion, where should I be now?"
  • Correct: "Given what I just sensed, how should I adjust that?"
  • Repeat: each cycle reduces uncertainty when data is informative.

Color Convention

  • Blue: hidden truth (teaching reference).
  • Orange/Gray: intermediate prediction or uncertainty.
  • Green: corrected belief (what the robot believes now).

Step 2

The SLAM Loop: Predict, Then Correct

Start here. This is a single-cycle bridge demo that shows the core loop in action. Use Next: it alternates automatically between prediction and correction.

How To Use

  • Press Next repeatedly to follow the natural SLAM rhythm.
  • Increase motion noise: prediction gets worse.
  • Increase measurement noise: correction becomes less reliable.
Intuition: new belief = old belief, nudged by new evidence.

Blue = truth, orange = predicted belief, green = corrected belief.

Step 3

Why We Need Beliefs, Not Single Points

If you only predict from motion, errors accumulate (drift). So SLAM tracks a belief: a cloud of possible locations, not just one dot.

In Bayesian language: posterior belief is prior belief combined with current evidence.

This figure isolates prediction drift: no correction, no map update.

Drag truth, prior, landmark, and uncertainty handles. Watch the posterior shift toward plausible locations.

Step 4

Full SLAM: Position and Map Improve Together

Here prediction, correction, and map updates run continuously. The robot uses landmarks to reduce position drift; better position then improves map updates.

Try This

  • Start with low noise and watch estimate and map stabilize.
  • Raise odometry noise and watch error rise.
  • Raise correction gain and see recovery, then test sensor-noise sensitivity.

Keep truth hidden most of the time; reveal it briefly to evaluate estimate quality.

Step 5

Mapping with Occupancy Grids

Not every map is a set of landmarks. In occupancy maps, each cell stores confidence of being free or occupied. As scans accumulate, unknown space shrinks and structure appears.

Frontier idea: explore boundaries between known free space and unknown space.

White = confident free, dark = confident occupied, light gray = still uncertain.

Wrap-Up

Essence of SLAM

Takeaways

  • Prediction alone drifts.
  • Correction alone is noisy.
  • Prediction + correction + consistency over time gives useful maps and trajectories.
  • Good SLAM is uncertainty-aware, not just geometric.