Localization · Simulation game
SLAM Explorer
Drive into the unknown. Estimate where you are from your own sensors. Build the map as you go.
Loading…
Missions
1 · Warehouse and robot
Blue ring and path: where the robot thinks it is. Orange path (when shown): where it really is. Dark patches on the floor are slippery. Drag: rotate · Wheel / pinch: zoom · WASD drive · Space stop
2 · Occupancy grid, trajectory and pose graph
estimate odometry only ground truth loop closure live scan. The map is drawn from LiDAR observations only: dark = occupied, light = free, grey = never seen. The map frame starts at the robot's start pose, forward is up.
| Loop-closure attempt | Match error | Matched | Result |
|---|---|---|---|
| None yet. Loop closure looks for a place you have been before. | |||
3 · LiDAR scan and scan matching
Live scan (sensor frame, forward up).
map scan before scan after ICP
- Method
- —
- Result
- —
- Error before → after
- —
- Points matched
- —
- ICP iterations
- —
- Geometry
- —
4 · Metrics measured from the running simulation
- Map coverage (of reachable floor)
- —
- Map accuracy (occupied cells on true walls)
- —
- Trajectory error, RMS (vs ground truth)
- —
- Position error now
- —
- Scan-matching error (last / mean)
- —
- Scans matched / rejected
- —
- Loop closures accepted / rejected
- —
- Processing time per scan (last / avg / max)
- —
- Pose-graph optimisation (total)
- —
- LiDAR observations (returns)
- —
- Keyframes
- —
- Collisions · distance driven
- —
- Sim speed (1 = real time) · render
- —
Trajectory error, position error, accuracy and coverage compare the estimate with the simulator's truth, for scoring only: the estimator never sees it. Processing times are measured in this browser.
5 · Estimator and parameters
6 · Test drive: compare four SLAM methods on identical data
A scripted loop around the corridor partition, run on a separate simulator with a fixed random seed, using the settings in panel 5. The same wheel and LiDAR data go to all four methods, so differences are due to the method, not luck. Same settings always give the same result.
| Method | Trajectory error RMS | Final position error | Map accuracy | Coverage | Loop closures | Rejected scans | ms per scan |
|---|
How it works
The pipeline, step by step
- Odometry. The wheel encoders report how far each wheel turned. A differential-drive model turns that into a pose change. Slip, bumps and calibration error make it wrong, and the error accumulates.
- Prediction. The new pose is predicted from the previous estimate plus the odometry motion since the last scan.
- Scan matching (ICP). The LiDAR scan is moved by the predicted pose and matched to nearby points of the map: pair each point with its nearest neighbour, solve for the small correction that overlays the pairs, repeat. The result replaces the prediction if it passes sanity checks (enough points matched, small enough error, not a wild jump).
- Occupancy grid. Each keyframe's beams lower the log-odds of the cells they pass through and raise the log-odds of the cell where they end.
- Pose graph. Keyframe poses are nodes. Consecutive keyframes are linked by their measured relative motion.
- Loop closure. A new keyframe is matched against old keyframes that the estimate says are nearby. A good match adds a constraint between distant nodes; optimising the graph then distributes the accumulated error along the whole path, and the map is rebuilt from the corrected poses.
The map frame is defined by the robot's start pose: the estimate starts at (0, 0, 0). Nothing from the simulator's truth enters the estimator; it receives only wheel travel and LiDAR ranges.
Educational approximations, not production SLAM
- Point-to-point and point-to-line ICP with a fixed correspondence gate. No correlative or branch-and-bound matching, no multi-resolution search.
- Pose-graph weights are fixed numbers, not covariances estimated from the scans. The graph solver is dense: fine for about 150 keyframes, too slow for thousands.
- Each scan is treated as taken at one instant, although the simulated LiDAR sweeps while the robot moves (no deskewing). Fast turns smear scans.
- Single scan plane at 0.5 m: low obstacles such as the 0.35 m barrier are invisible to the map. The autonomous robot finds them with a bumper.
- No relocalisation after a failed match, no moving objects, no landmark or particle-filter SLAM, no loop-closure outlier rejection beyond a match-error threshold, so a wrong closure can happen in look-alike places.
Real systems (described only; not implemented here)
Gmapping uses a particle filter with a grid map per particle. Cartographer and slam_toolbox match scans against submaps with correlative scan matching and optimise a pose graph with loop closure, in the same spirit as the last method here but much more robust. LOAM-style methods extract edge and plane features from 3D LiDAR. They differ in sensors, robustness and compute; this page does not benchmark them.
Keep learning
Theory and labs: Scan matching, ICP fundamentals, Occupancy grid mapping, Pose graphs, Loop closure, Odometry and motion models. The simulated sensor comes from LiDAR Explorer. All of the Localization & SLAM track.