SLAM: how a robot builds a map and finds itself on it

SLAM (Simultaneous Localization and Mapping) is a set of algorithms that let a robot or device build a map of an unknown space and work out its own position on that map at the same time, using cameras, lidars and motion sensors.

SLAM: a robot draws a map and finds itself on it

In plain words

Imagine being led blindfolded into an unfamiliar flat, then having the blindfold removed and being handed only a notebook. You walk around, draw a floor plan and mark an X where you stand. The more you walk, the more accurate the plan and the better you know where you are. That is SLAM - except a robot does it hundreds of times a second.

How it works

  1. Sensors (lidar, camera, ToF) see walls, corners and furniture - the "landmarks".
  2. Wheel encoders and the IMU report how far the robot has moved.
  3. The algorithm adds new landmarks to the map and refines where the robot is relative to them.
  4. When it returns to a familiar spot, the robot "closes the loop" and corrects accumulated errors.
  5. The finished map is saved so it does not have to be built from scratch next time.

How a map of a room is built step by step

Where you'll see it

Robot vacuums with lidar (LDS) or a camera (vSLAM), warehouse robots, drones that fly indoors, AR and VR headsets, augmented reality on smartphones, Mars rovers and self-driving cars.

Does it matter when buying

For a robot vacuum, yes - it is the main difference between "random" and "smart" cleaning. Models with SLAM clean in rows, do not skip rooms and let you set no-go zones in the app. I would not buy a vacuum without mapping if you have more than one room.

Myths

  • Myth: SLAM needs internet or GPS. Reality: No, it works locally using its own sensors - precisely for places where there is no GPS.
  • Myth: The map is built once and for all. Reality: If you move the furniture, the robot updates the map.

FAQ

How is lidar SLAM different from visual SLAM?

Lidar SLAM is more accurate in the dark; visual SLAM (vSLAM) is cheaper but depends on lighting.

Why does a robot sometimes get "lost"?

It was carried somewhere else, the furniture changed or a sensor got dirty.

Does my phone use SLAM?

Yes, in augmented reality apps: the phone figures out where the table and floor are.

Related terms

LiDAR, Autonomous navigation, Robot vacuum navigation, Sensor fusion, Inertial measurement unit (IMU)

← Glossary