EN
SensorsIntermediatelidarSLAModometrydriftscan matchingoccupancy gridloop closure

Lidar and SLAM

In 30 secondsCounting wheel turns accumulates error (drift). A lidar measures distances in many directions at once; SLAM builds the map and locates itself in it by aligning each scan, which corrects the drift.

Also available in: Català · Castellano

The problem: drift

A wheeled robot estimates its position by counting wheel turns (odometry). Every small error adds up: drift.

Intuition: walking with your eyes closed while counting steps sends you off course; with your eyes open you compare and correct yourself.

Lidar

It measures distance with light (time of flight) in many directions at once: a scan. It works at night and is accurate. Example: the Go2 carries an L2 4D lidar (360° × 96°, minimum range 0.05 m).

SLAM

Simultaneous Localization And Mapping: it builds the map and locates itself in it at the same time. Aligning each new scan with the map (scan matching, for example ICP) corrects the drift. It’s a chicken-and-egg problem: to map you need to know where you are, and to know that you need the map.

  • Occupancy grid: a map of free / occupied / unknown cells.
  • Loop closure: recognising a place already visited and correcting the whole map; it’s the moment the map “snaps” into place.
  • Real systems: LIO-SAM, LeGO-LOAM.

In the demo

First with wheels only: the error grows. Then turn on SLAM: the map builds up and the position holds. Drive with the arrow keys.

Interactive demo

Related concepts