What Is SLAM? A Plain-Words Guide to How Robots Map and Find Themselves
SLAM lets a robot build a map while working out where it is on that map. Here is the idea, why it is hard, and where it is used.
Short answer: SLAM stands for Simultaneous Localization And Mapping. A robot dropped in an unknown place builds a map of it while also working out where it is on that map. See SLAM in the Atlas.
Why it is a chicken-and-egg problem
To draw a good map you need to know exactly where you are. To know where you are you need a good map. SLAM solves both together, improving each estimate using the other.
How it works, simply
- The robot moves and estimates how far it went, using wheel counts (odometry). This drifts over time.
- It scans the surroundings, often with lidar or a camera.
- It matches the new scan with the map so far, and corrects its position.
- When it returns to a place it has seen before, it snaps the map shut. That is loop closure.
Everyday example
Walk through a new building with your eyes closed, counting steps. After a while you are unsure where you are. Open your eyes at a landmark and you instantly fix your position. SLAM does the same with sensors.
Where it is used
- Robot vacuums mapping your home.
- Warehouse robots moving between shelves.
- Drones flying indoors without GPS.
- Phone augmented reality apps.
Try it
In ROS 2, navigation packages such as Nav2 work with maps made by SLAM. The lidar SLAM entry shows a typical setup.
FAQ
Does SLAM need GPS? No, which is why it works indoors.
Does it need lidar? No. Camera-based variants exist, called visual SLAM.
Is SLAM solved? It works well in many settings, but crowds, mirrors and changing scenes still cause trouble.
Was this article helpful?
Learn deeper
Master every concept mentioned in this article β for free.
R2BOT's Atlas has 480+ robotics concepts explained in simple language, with sources.
Explore R2BOT Atlas β