SLAM (Simultaneous Localization and Mapping)

If you subscribe to a service from a link on this page, we may earn a commission.

Quick answer: SLAM, short for simultaneous localization and mapping, is the technique a machine uses to build a map of a space it has never seen while also working out its own position inside that map, using one stream of sensor data to do both at once. It solves a chicken and egg problem: a device needs a map to know where it is, and it needs to know where it is to build an accurate map. Robot vacuums, delivery drones, self-driving cars, and AR and VR headsets all run some version of it.

This entry covers how that joint estimate gets built, where you run into it day to day, how it differs from the world tracking systems built on top of it, and where it tends to break down.

What Is SLAM?

SLAM is not a single algorithm. It is a category of methods that all solve the same joint problem, estimating a device’s own pose (its position and orientation) and the layout of an unfamiliar environment, at the same time, from the same sensor readings, with neither one known in advance.

That framing matters because it explains why SLAM is hard. A small error in the position estimate throws off the map, and a slightly wrong map then throws off the next position estimate. Every practical SLAM system is really a strategy for keeping that feedback loop from spiraling into nonsense as the device keeps moving.

The idea predates cheap cameras and phone-grade processors by decades. Researchers in robotics were formalizing the mapping-and-localization problem in the 1980s, long before it became something a vacuum or a phone could run in real time. What changed since then is not the core problem, it is the sensors and compute available to solve it cheaply enough to ship in a consumer device.

People sometimes use SLAM as a catchall for any kind of spatial awareness in a robot or app, but the term properly refers to that specific joint estimation problem. A device that only localizes itself against a map someone already gave it, a car following a preloaded street map with GPS, is not doing SLAM. The simultaneous part, building the map and finding yourself in it in one pass, is what earns the name.

How Does SLAM Work?

A SLAM system starts with sensor input. Visual SLAM uses one or more cameras and looks for distinctive features, corners, edges, and textured patches, that it can recognize again in later frames. Lidar SLAM instead fires laser pulses and measures the reflections to build a point cloud of the surroundings.

Many real systems fuse a camera or lidar with an inertial measurement unit, the accelerometer and gyroscope combination that tracks how the device is moving between sensor readings.

From there, the system has to turn a stream of noisy, partial observations into a coherent estimate. Early SLAM implementations leaned heavily on the extended Kalman filter, a statistical method for updating a position estimate as new, imperfect measurements arrive. Particle filter approaches, sometimes called FastSLAM, took a different route, tracking many possible versions of the robot’s path at once and weighting them by how well each matches what the sensors actually saw.

Newer systems favor graph-based SLAM, which represents the robot’s poses and the landmarks it has seen as a network of relationships, then solves that whole network at once for the most consistent overall map. It scales better to large spaces than the older filter-based methods.

Whichever approach is used, one step decides how good the result stays over time: loop closure. That is the moment a system recognizes it has come back to a place it already mapped and uses that match to correct the small errors that built up along the way. Without loop closure, a SLAM system’s sense of position keeps drifting further from reality the longer it runs.

Where Is SLAM Used?

SLAM went mainstream in robotics through autonomous vehicle research. Stanford’s self-driving car Stanley used SLAM-style sensor fusion to win DARPA’s Grand Challenge in 2005, a long desert course driven with nobody aboard, and that project helped pull SLAM out of research labs and into applied robotics.

It is now the reason a robot vacuum can clean a room methodically instead of bumping around at random. The vacuum builds a floor plan as it moves and tracks its own position on that plan well enough to cover the whole space without retracing the same patch twice. The same basic capability lets a warehouse robot or a delivery drone navigate indoors, or anywhere else GPS cannot reach, using only its own sensors.

VR headsets depend on it too. Standalone headsets such as Meta Quest 2 and PICO 4 use markerless, camera-based inside-out tracking, a form of visual SLAM, to follow your head and hands through a room without needing external sensors bolted to the walls. Phone-based augmented reality uses a close relative of the same idea, which is where world tracking comes in.

SLAM vs World Tracking: What’s the Difference?

SLAM is the general technique. World tracking is what a phone or tablet’s AR platform, ARKit on iOS or ARCore on Android, calls its own implementation of that technique, tuned for a single moving camera plus the phone’s motion sensors rather than a robot’s full sensor suite.

Every AR world tracking system is doing SLAM underneath, in other words, but not every SLAM system is doing AR. A vacuum’s stack cares about floor coverage and obstacle avoidance; a phone’s cares about holding a virtual object steady on a real table as you walk around it.

What Are the Limits of SLAM?

SLAM systems still drift. Even with loop closure, small errors accumulate between the moments a device recognizes a familiar spot, and in an environment with few distinctive features, like a long blank hallway, there may not be enough for the system to latch onto at all.

Moving objects cause trouble too. Classic SLAM assumes the world outside the device is mostly static, so a room full of walking people or shifting furniture can confuse a system that is trying to treat everything it sees as a fixed landmark.

There is also a hard computational tradeoff. A more thorough SLAM algorithm produces a more accurate map, but it costs more processing power and battery, and a robot vacuum or a phone cannot spend unlimited compute on mapping when it also has other jobs to do. Every shipped SLAM system, from a warehouse robot to the computer vision pipeline behind a headset, is a compromise between accuracy and what the hardware can actually sustain in real time.

None of that has stopped SLAM from becoming ordinary infrastructure rather than a research curiosity. The same core idea that guided a DARPA prize vehicle across the desert now quietly runs on a device in a kitchen drawer, which says less about the algorithm getting easier and more about how much cheaper cameras, sensors, and processing have become since.