what is slam in robotics

What Is SLAM in Robotics

A robot vacuum is placed in an unfamiliar room with no map. What is SLAM in robotics? It is the method that lets that robot build a map of the room while tracking its own position on it.

This page covers the definition and building blocks. SLAM is a core capability in indoor autonomous robots, and it relates to the question of how do indoor robots localize without gps.

SLAM in plain terms

SLAM stands for Simultaneous Localization and Mapping. Ouster gives the simplest definition as a method to create a map of the environment while tracking the position of the map creator. Flyability phrases the same idea as letting a robot build a map and localize itself on that map at the same time. Slamcore adds that the aim is to help a robot understand its surroundings by calculating its position and orientation relative to the world.

The most common misreading is that SLAM is only map-making, or only positioning. It is both jobs done together, and the table shows how that differs from the alternatives.

Approach What the robot starts with What it works out Planning use
Localization on a given map A map that already exists Where it is on that map, from sensor inputs Suits a space that has been mapped in advance
SLAM No map of the space The map and its own position on it, at the same time Suits a robot that must work in a space it has not seen
Neither (a cleaning robot without SLAM) No map and no position estimate Nothing; it moves across the floor at random, without obstacle detection or memory of cleaned areas Shows what SLAM adds to a simple household robot

The comparison draws on Ouster’s introduction to SLAM and Flyability’s explanation of SLAM.

Why a robot cannot map first and localize later

A robot has to map and localize together because each job depends on the other. Localization means using sensor inputs to identify where the robot is on a given map, as Ouster explains. That works only once a map exists, yet a map is built from measurements taken at the robot’s own position.

Flyability describes this as a classic chicken-or-the-egg problem. Decades of research produced approximate solutions rather than one clean answer, which is why SLAM today is a set of practical methods rather than a single formula.

Three wheeled delivery robots with orange flags parked in a row outside a brick building. Mobile platforms come in many shapes, which is part of why SLAM is a family of methods rather than one fixed system.
  • A position needs a map. Without a map, the robot has nothing to say its position is relative to.
  • A map needs a position. Each new measurement is only useful if the robot knows where it was standing when it took it.
  • Similar-looking features cause confusion. Some features look very similar and are hard for a robot to tell apart. Ouster notes that localization helps improve the accuracy of the map in that situation.
  • Maps are updated, not redrawn. A robot can update just the places that have changed since the previous scan, so a familiar room does not need to be rebuilt from nothing.

The practical lesson is that SLAM treats the two jobs as one continuous loop of estimating and correcting. That loop is also where the idea of loop closure comes in.

What loop closure does

Loop closure is the correction a SLAM system makes when it recognizes a place it has been before. Slamcore describes it as triggering corrections as locations are revisited, by comparing past measurements with the live view.

As an illustration, a robot that leaves a hallway and later returns to it can compare what it sees now with what it recorded earlier. Any mismatch tells it that its estimate has to be corrected. This is why a robot that revisits places is better placed to keep its map consistent than one that only ever travels forward.

Building blocks of a SLAM system

Flyability says most SLAM systems have at least two major components: hardware that measures range, and software that extracts and uses that data. The sensor decides what the robot can perceive, and the software decides how well it turns that perception into a map and a position.

Range sensing with lidar

Lidar is the sensor most associated with indoor SLAM. It works by shooting a laser at a target and measuring how long the signal takes to return, which gives distance. Foxtech describes lidar as using laser beams to measure the distance to objects in the environment, supporting both 3D mapping and localization.

The corridor floor is tiled and wet-looking, with lanterns hanging from the vaulted ceiling.

Lidar is not the only option. Slamcore’s visual SLAM uses data from a stereo camera and can fuse it with data from other sensors. Camera-based methods have their own trade-offs, covered in visual slam for indoor robots.

Software that fuses the data

The software side takes raw readings and turns them into a position estimate. Foxtech lists sensor fusion techniques such as Kalman filters and particle filters as the way several sensor readings are combined. For a beginner, the useful takeaway is that SLAM software does not trust any single reading. It blends them and keeps correcting the estimate.

SLAM algorithms for indoor robots

SLAM is a concept, not a single product. Flyability says it is not really one technological product or single system, and that many software and algorithm variants exist depending on the environment and use case. Asking which SLAM algorithm is best therefore has no single answer. The better question is which one fits the space and the sensors.

Foxtech sorts SLAM algorithms into two main categories: feature-based methods and occupancy grid-based methods. LidarNews lists the families a beginner is most likely to meet by name:

  • Graph SLAM. The graph-based approach to the problem.
  • EKF SLAM. The extended Kalman filter approach, tied to the Kalman filtering mentioned above.
  • FastSLAM. A named family listed alongside the others.
  • Topological SLAM. Another named family in the same list.
  • Visual SLAM and ORB SLAM. Camera-based approaches, with ORB SLAM named as a specific method.
  • Lidar SLAM. The list also separates 2D and 3D lidar variants.

Flyability notes that 2D lidar SLAM is commonly used in warehouse robots. A robot that moves across a flat floor suits a 2D approach, and a richer 3D variant is something to consider only when the space demands it.

Real examples of SLAM robots

Robot vacuums are the most familiar example. Ouster points out that many households have an autonomous vacuum cleaner with a built-in lidar sensor that uses SLAM to clean floors. The lidar supplies distance readings, and SLAM turns them into a floor plan the vacuum can follow and update.

A compact robot vacuum on a light wood floor. Household cleaners are the everyday case where a robot has to find its way around furniture and shelving.

Warehouse robots are the industrial counterpart, and 2D lidar SLAM is commonly used in them. Between a home and a warehouse, the sensing idea stays the same. What changes is the scale of the space, how much of it changes from day to day, and how reliable the position estimate must be.

Frequently asked questions

Question Answer
Does SLAM always need lidar? No. Lidar is one range sensor, but Slamcore’s visual SLAM works from stereo camera data and can fuse it with other sensors.
Is SLAM ever written with a different expansion? Yes. The usual form is Simultaneous Localization and Mapping, but LidarNews notes it is sometimes written as Synchronized Localization and Mapping.
Why can lidar SLAM struggle in an empty space? When obstacles are few or far away, it can be difficult for a robot to align itself with the lidar’s point cloud, according to Flyability. The robot then risks losing track of where it is.