The Problem of Navigation
Imagine you've been dropped into an unfamiliar building with no map and no GPS. To get from where you are to where you need to be, you'd need to answer three questions: Where am I? Where do I need to go? How do I get there without walking into walls or people?
Autonomous mobile robots face exactly the same problem, and they solve it using the same basic logic — just with sensors and algorithms instead of eyes and a brain. Understanding how they do it requires understanding each piece of the puzzle: how the robot perceives its environment, how it builds and uses a map, how it plans a route, and how it avoids things that get in the way.
Localization: Where Am I?
Localization is the process of determining the robot's position and orientation within its environment. It is the foundation of everything else — a robot that doesn't know where it is cannot plan a route or navigate reliably.
Localization is harder than it sounds. The robot can't use GPS indoors (the signal doesn't penetrate buildings reliably enough for precise positioning). It can't simply count its wheel rotations from a known starting point, because wheels slip, surfaces are uneven, and small errors accumulate over time. Instead, it must continuously estimate its position by combining multiple sources of information.
Wheel Encoders and Odometry
The simplest localization approach is odometry — tracking position by measuring how far each wheel has turned. Wheel encoders are sensors attached to the drive wheels that count rotations. If you know the wheel's circumference and how many times it has rotated, you can calculate how far the robot has traveled. Combine that with the difference in rotation between the left and right wheels, and you can estimate how much the robot has turned.
Odometry is fast and requires no external reference — the robot only needs to track its own wheels. But it accumulates error. Wheel slip, uneven floors, and tiny measurement inaccuracies compound over distance. A robot relying only on odometry will gradually drift away from its true position. Over a short distance this is manageable; over a long journey it becomes a serious problem.
IMUs: Measuring Motion Directly
An Inertial Measurement Unit (IMU) combines a gyroscope and an accelerometer. The gyroscope measures rotational rate — how fast the robot is turning. The accelerometer measures linear acceleration — how fast the robot is speeding up or slowing down.
IMUs are fast and accurate over short time periods. They're particularly useful for detecting turns and sudden movements. But like odometry, they accumulate error over time — a phenomenon called drift. An IMU alone cannot tell you where you are; it can only tell you how you've been moving since the last known position.
LiDAR: Seeing the World in Laser Pulses
LiDAR — Light Detection and Ranging — is the most important sensor in most modern autonomous mobile robots. A LiDAR unit emits laser pulses in a rotating pattern, typically scanning a full 360 degrees around the robot. Each pulse travels outward until it hits a surface and reflects back. By measuring the time between emission and return, the sensor calculates the distance to that surface with millimeter-level precision.
The result is a point cloud — a dense set of distance measurements in every direction. From this, the robot can see the geometry of its surroundings: where the walls are, where furniture and equipment are, where doorways open up. LiDAR works in complete darkness (it provides its own light source), is unaffected by ambient lighting conditions, and produces highly accurate, consistent measurements.
The rotating LiDAR unit — visible as a small cylindrical bump on top of many AMRs — typically produces thousands of measurements per second, giving the robot a continuously updated picture of its immediate environment.
Cameras and Computer Vision
Cameras provide a different kind of information than LiDAR. Where LiDAR gives precise distance measurements, cameras give rich visual information: color, texture, shape, and the ability to recognize specific objects or landmarks.
In mobile robotics, cameras are used in several ways. Upward-facing cameras identify ceiling features — light fixtures, structural elements, ceiling tiles — as visual landmarks for localization. Forward-facing cameras detect obstacles, recognize people, and read visual markers. Depth cameras (which combine a standard camera with an infrared depth sensor) provide both visual information and distance measurements, similar to LiDAR but at shorter range and lower precision.
Computer vision algorithms process camera images to extract useful information: identifying landmarks, detecting edges and surfaces, recognizing objects, and estimating distances. This processing is computationally intensive but has become practical on modern embedded hardware.
Sensor Fusion: Combining Everything
No single sensor is sufficient for reliable localization. Each has strengths and weaknesses, and the errors of one can be compensated by the strengths of another. Sensor fusion is the process of combining data from multiple sensors to produce a more accurate and reliable estimate than any single sensor could provide alone.
A typical AMR fuses data from wheel encoders, an IMU, and LiDAR (and sometimes cameras) using a mathematical framework called a Kalman filter or one of its variants. The filter maintains a probabilistic estimate of the robot's position — not just a single point, but a distribution that represents the robot's uncertainty about where it is. As new sensor data arrives, the filter updates this estimate, weighting each sensor's contribution according to its reliability.
The result is a localization system that is more accurate than odometry alone, more stable than LiDAR alone, and more robust than any single sensor. When one sensor produces a bad reading — a wheel slips, a LiDAR pulse reflects off a shiny surface — the other sensors keep the estimate on track.
Maps and Occupancy Grids
To navigate, a robot needs a map. But what does a robot's map actually look like?
The most common representation is an occupancy grid — a two-dimensional grid where each cell represents a small area of the floor (typically a few centimeters square). Each cell has a value representing the probability that it is occupied by an obstacle. Cells with high occupancy probability are walls, furniture, or equipment. Cells with low occupancy probability are open space the robot can drive through. Cells with intermediate values represent uncertainty — areas the robot hasn't observed clearly.
An occupancy grid is built from sensor data. As the robot moves through an environment and takes LiDAR measurements, it updates the grid: cells where the laser hit something become more likely to be occupied; cells the laser passed through without hitting anything become more likely to be free. Over time, with enough observations, the map becomes a reliable representation of the environment.
The occupancy grid is also the format used for path planning — the robot's path planning algorithms operate on this grid, finding routes through free cells and avoiding occupied ones.
SLAM: Building the Map While Navigating It
Here's the fundamental chicken-and-egg problem of mobile robot navigation: to localize accurately, you need a map. But to build a map, you need to know where you are. SLAM — Simultaneous Localization and Mapping — solves both problems at the same time.
A SLAM algorithm takes sensor data as input and produces two outputs simultaneously: an estimate of the robot's current position, and an updated map of the environment. As the robot moves, it continuously refines both.
The key insight is that even without a complete map, the robot can use the consistency of its sensor readings to constrain its position estimate. If the robot sees a wall at a certain distance and angle, and then moves forward and sees the same wall at a slightly different distance and angle, the geometry of those two observations constrains where the robot must have been when it took each reading. Accumulate enough of these constraints, and the robot's position and the map's structure become mutually reinforcing.
Loop Closure
One of the most important capabilities in SLAM is loop closure — recognizing when the robot has returned to a place it has visited before. Without loop closure, errors accumulate as the robot explores: the map gradually drifts, and the robot's position estimate drifts with it.
When the robot recognizes a previously visited location — by matching current sensor readings against stored map data — it can correct the accumulated drift. The map snaps into alignment, and the position estimate is corrected. Loop closure is what allows SLAM to produce accurate maps of large environments.
LiDAR SLAM vs. Visual SLAM
LiDAR SLAM uses laser scan data to build and maintain the map. It is highly accurate, works in any lighting condition, and is the dominant approach in industrial AMRs. The geometric precision of LiDAR makes it well-suited to the structured environments of warehouses and factories.
Visual SLAM (vSLAM) uses camera images instead of laser scans. It identifies visual features — corners, edges, distinctive textures — and tracks them across frames to estimate motion and build a map. vSLAM can work in environments where LiDAR struggles (very large open spaces with few geometric features) and provides richer environmental information. Its weaknesses are sensitivity to lighting changes and higher computational requirements.
Many modern systems use both, combining LiDAR's geometric precision with cameras' visual richness.
Path Planning: Getting from Here to There
Once the robot knows where it is and has a map, it needs to plan a route to its destination. Path planning is divided into two levels that work together: global planning and local planning.
Global Path Planning
Global path planning finds a route from the robot's current position to its destination across the entire map. It operates on the occupancy grid, treating free cells as traversable and occupied cells as obstacles.
The most common algorithm is A* (pronounced “A-star”), a graph search algorithm that finds the shortest path between two points while avoiding obstacles. A* explores possible routes efficiently by using a heuristic — an estimate of the remaining distance to the goal — to prioritize promising paths over dead ends.
The output of global path planning is a high-level route: a sequence of waypoints the robot should pass through to reach its destination. This route is computed once (or recomputed when the environment changes significantly) and represents the robot's intended path through the known environment.
Local Path Planning
Global planning works on the known map. But the real world contains things that aren't on the map: a person walking across the corridor, a pallet left in the aisle, a door that's been left open. Local path planning handles these dynamic, real-time obstacles.
The local planner operates on a small window around the robot — typically a few meters in every direction — using live sensor data rather than the stored map. It continuously adjusts the robot's immediate trajectory to avoid obstacles while staying as close as possible to the global plan.
A widely used local planning algorithm is the Dynamic Window Approach (DWA). It works by sampling many possible velocities the robot could take in the next moment, simulating where each would lead, and selecting the velocity that best balances progress toward the goal with obstacle avoidance and staying within the robot's physical motion limits.
The result is a robot that follows its planned route at the global level while smoothly weaving around unexpected obstacles at the local level — like a driver who knows the route but still steers around a pothole.
Obstacle Detection and Avoidance
Detecting obstacles is not the same as avoiding them. Detection is a perception problem — identifying that something is in the robot's path. Avoidance is a planning problem — deciding what to do about it.
Static vs. Dynamic Obstacles
Static obstacles — walls, shelving, fixed equipment — are represented in the map and handled by global planning. The robot simply doesn't plan routes through them.
Dynamic obstacles are the harder problem. A person walking across the robot's path, a forklift moving through an intersection, a cart left temporarily in an aisle — these appear and disappear unpredictably and are not in the map.
The local planner handles dynamic obstacles using live sensor data. When the robot's sensors detect something in its path that isn't in the map, the local planner adjusts the trajectory to go around it. If the obstacle is too large or the space too confined to navigate around, the robot slows and stops, waiting for the obstacle to clear.