What SLAM means
SLAM, short for simultaneous localization and mapping, is the way a robot builds a map of a place it has not seen before while working out its own position on that map. The two jobs depend on each other: to know where it is, the robot needs a map, and to build an accurate map it needs to know where it was when each measurement was taken. SLAM solves both together as the robot moves.
That is the short answer to what is SLAM in robotics. The output is a map, such as a 2D floor plan or a 3D point cloud, plus the robot’s path through it.
SLAM matters most where no map exists and satellite positioning is unavailable. A widely cited survey by Cadena and colleagues (IEEE Transactions on Robotics, 2016) notes that a robot with GPS, or with beacons at known positions, may not need it at all. Warehouses, plants, hospitals, mines and tunnels usually have neither.
How SLAM works: front end and back end
Most SLAM systems split the work in two, the structure the same survey describes as the anatomy of a modern SLAM system. The front end deals with raw sensor data and the back end does the estimation.
-
//
Front end: features and matching. Turns each lidar scan or camera frame into something the maths can use, such as distinctive image points or the shape of a scan, and matches it with the previous one. This short-term matching gives odometry: how far the robot has moved.
-
//
Loop closure. The long-term part of the front end: recognizing a place mapped earlier and linking the new measurement to the old one.
-
//
Back end: optimization. Combines every measurement into one consistent estimate of the path and the map, usually as a factor graph or pose graph solved by sparse nonlinear optimization.
-
//
Map and pose output. The corrected map and current pose go to navigation and planning, and back to the front end to help it check loop closures.
Why loop closure matters
Odometry on its own drifts, because each small error is added to the next. Wheel odometry drifts fastest, since wheels slip: the 2016 survey notes it can become unusable after a few meters. Visual-inertial odometry is far better, with drift the survey puts below 0.5% of the distance travelled, but even that adds up. On a 200 m loop it could still leave the robot about 1 m out when it returns to the start.
Loop closure removes that error. Once the robot recognizes a place it has visited, the back end spreads the correction back along the whole path. As the survey puts it, without loop closure SLAM reduces to odometry.
A wrong loop closure is worse than none. Identical racking or repeated corridors can fool the front end into joining two different places, called perceptual aliasing, which bends the map. Good SLAM software checks each candidate against the geometry before accepting it.
Sensors used for SLAM
SLAM can run on almost any sensor that measures the surroundings or the robot’s own motion, and most robots combine several.
| Sensor | What it gives SLAM | Strengths | Limits |
|---|---|---|---|
| 2D lidar | A flat scan of distances | Direct range, works in the dark | Sees one slice, missing overhangs |
| 3D lidar | A layered point cloud | Detailed 3D geometry indoors and out | Higher cost and data load |
| Stereo or depth camera | Images with depth | Lower cost; images AI can also use | Needs light and texture |
| Single camera | Images without direct depth | Cheapest and lightest | No true scale alone; usually paired with an IMU |
| IMU | Acceleration and rotation | Covers fast motion and short gaps | Drifts quickly on its own |
| Wheel odometry | Distance and turn from encoders | Already fitted on wheeled robots | Slips on wet or uneven floors |
Lidar SLAM and visual SLAM are the two main families, named after the sensor that leads. Lidar measures geometry directly and works in darkness, while cameras cost less, give images the robot can also use for recognition and need light and visible texture. Many robots fuse both. An IMU is close to universal, and stereo cameras are a common choice for visual SLAM because they measure depth from two images taken at once.
SLAM software in ROS 2
Few teams write SLAM from scratch. Most robots run an existing package as a set of nodes in ROS 2, feeding it sensor topics and taking the map and pose from it. Widely used open-source options include the following.
-
//
slam_toolbox. 2D lidar SLAM built on pose-graph optimization, with loop closure and a localization mode. Its maintainers call it the currently supported ROS 2 SLAM library.
-
//
Cartographer. Real-time SLAM in 2D and 3D across a range of sensor set-ups.
-
//
ORB-SLAM3. Visual and visual-inertial SLAM for single, stereo and depth cameras.
-
//
cuVSLAM. NVIDIA’s GPU-accelerated visual SLAM in Isaac ROS, for one or more stereo cameras and an optional IMU.
Where SLAM runs on a robot and the processor load
Most deployments map once, save the map and then localise against it in daily work. Both run on the robot’s main computer, alongside perception and planning, not on the motor drives or safety controllers. 2D lidar SLAM suits a modest Arm or x86 processor. 3D point clouds and multi-camera rigs raise the load quickly, and loop closure on a large map adds bursts of optimization. GPU acceleration helps most with cameras: the paper describing NVIDIA’s cuVSLAM reports support for one to 32 cameras, optimized with CUDA for edge hardware such as Jetson.
Timing and calibration matter as much as speed. NVIDIA asks for the two images of a stereo pair to be captured within ±100 µs of each other for cuVSLAM, which usually means hardware-triggered cameras, and every sensor’s position on the robot must be measured and kept fixed.
SLAM also shares the computer with the AI models that detect people and obstacles, so size it for both. Our Performance Finder shows how much AI performance and memory an application needs, our robot computer guide covers I/O, power and safety, and our rugged Jetson computers include models with GMSL camera inputs, PoE and CAN FD.
Quick answers on SLAM
SLAM: common questions
What does SLAM stand for?
Simultaneous localization and mapping. American texts spell it localization. The robot builds a map and works out its own position on it at the same time.
What does SLAM mean in AI?
The same robotics technique. SLAM is an estimation problem rather than a type of AI model. Learned methods increasingly help with parts of it, such as recognizing places for loop closure.
Is SLAM the same as odometry?
No. Odometry estimates motion step by step and drifts. SLAM adds a map and loop closure, so the robot can correct its position when it recognizes a place.
Does SLAM need lidar?
No. SLAM runs on cameras, lidar or both, usually with an IMU. Lidar is common on industrial robots because it measures distance directly and works in the dark.
Does a robot need SLAM if it has GPS?
Not always. Outdoors under open sky, satellite positioning with an IMU may be enough. Indoors or underground the signals fail, and SLAM provides the position.
We supply the robot and edge AI computers that run SLAM with the cameras, sensor interfaces and operating system integrated as standard.