Mapping the Environment
Imagine being dropped into an unfamiliar building with no floor plan and asked to find the exit. You would do two things simultaneously: explore the space to build a mental map, and keep track of where you are within that growing map. This is precisely the challenge every autonomous robot faces when it enters an unknown environment. The technical name for solving both problems at the same time is Simultaneous Localization and Mapping, universally abbreviated as SLAM.
Types of Maps Robots Build
Different robot tasks call for different map representations. An occupancy grid map divides the environment into a regular grid of cells. Each cell stores a probability — either occupied (wall, furniture, obstacle), free (empty space the robot can drive through), or unknown (not yet observed). As the robot moves and its sensors sweep the space, it updates each cell's probability based on the evidence gathered. A topological map takes a higher-level view, representing the environment as a graph of nodes (significant locations like rooms, intersections, and doorways) connected by edges (navigable paths between them). Topological maps are compact and support reasoning about routes, but they lack the precise spatial detail needed for obstacle avoidance. Point cloud maps, produced directly by lidar sensors, store raw 3D geometry. They are extremely detailed but very memory-hungry, and they require additional processing to extract navigable free space.
An occupancy grid is a 2D or 3D array of cells, each holding a probability of being occupied. The robot updates these probabilities as it observes the space, gradually building a reliable map from uncertain sensor data.
The SLAM Problem
SLAM is famous among roboticists for being a chicken-and-egg problem: to build an accurate map you need to know where you are, but to know where you are you need an accurate map. The insight that makes SLAM solvable is that the robot does not need a perfect map — it needs a map and a position estimate that are consistent with each other and consistent with the sensor observations collected so far. Modern SLAM systems maintain a set of constraints: 'At time 5, the robot was here and saw that landmark.' As more observations accumulate, the system solves a large optimization problem that finds the map and trajectory that best satisfy all the constraints simultaneously. When the robot closes a loop — revisiting a previously mapped area — it gains new constraints that dramatically tighten the entire solution.
Loop closure is one of the most powerful events in SLAM. When the robot recognizes that it has returned to a previously visited location, it knows that two points in its trajectory were actually the same place. This allows the system to retroactively correct the accumulated drift across the entire map, pulling everything into better alignment. Without loop closure, SLAM maps drift like odometry; with it, they can be highly accurate over large areas.
Match each mapping concept to its description.
Terms
Definitions
Drag terms onto their definitions, or click a term then click a definition to match.
Visual SLAM
Early SLAM systems relied on lidar. Modern systems increasingly use cameras for visual SLAM (sometimes called V-SLAM or VSLAM). A camera-based SLAM system tracks distinctive visual features — corners, blobs, textured regions — across successive frames. By observing how these features move in the image as the robot moves, it estimates both the camera's motion and the 3D position of the features. Visual SLAM is appealing because cameras are cheap, lightweight, and energy-efficient compared to lidar. Smartphones and augmented-reality headsets use visual SLAM to understand their position in real time. The main limitation is that visual SLAM fails in low light, in featureless environments (blank white corridors), and when the camera moves too fast and blurs the image.
Why is SLAM called a chicken-and-egg problem?
What benefit does loop closure provide in a SLAM system?
Flashcards — click each card to reveal the answer
Map an Unknown Room
- Step 1: Stand in one room of your home or school with a blank sheet of paper. You are the robot — you start with no map.
- Step 2: Take five 'steps' in one direction, sketching walls and obstacles you can observe. Mark your starting position and your current position.
- Step 3: Turn and take five more steps, again sketching what you see.
- Step 4: Continue until you have circumnavigated the room and returned near your start. Notice: did your sketch close cleanly back to the start, or is there a gap?
- Step 5: The gap represents odometric drift. Describe how recognizing your starting position (loop closure) would let you correct the entire sketch retrospectively.