An autonomous navigation stack is the set of software layers that lets a robot sense its surroundings, estimate where it is, choose a safe path, and move toward a goal. This cheat sheet helps students connect robotics topics that are often taught separately, such as sensors, maps, planning, and feedback control. It is useful for understanding how real robots navigate in homes, warehouses, roads, and competitions.
Key Facts
- A robot pose in 2D is usually written as x = (x, y, theta), where x and y give position and theta gives heading angle.
- Dead reckoning updates position from motion using x_new = x_old + v cos(theta) dt, y_new = y_old + v sin(theta) dt, and theta_new = theta_old + omega dt.
- Sensor fusion combines predictions and measurements so the estimate is more reliable than using one sensor alone.
- A Kalman filter prediction can be summarized as state_predicted = model(state_previous, controls) and corrected using measurement error = measured value - predicted measurement.
- A costmap assigns each cell a cost, where low cost means safe or easy to travel through and high cost means obstacle, danger, or poor terrain.
- A common planning score is f(n) = g(n) + h(n), where g(n) is cost from the start and h(n) is estimated cost to the goal.
- A feedback controller reduces tracking error, often using control = Kp(error) for proportional control or control = Kp(error) + Kd(error rate) for PD control.
- The navigation loop repeats sense, localize, map, plan, control, and monitor until the robot reaches the goal or detects a failure.
Vocabulary
- Navigation stack
- A group of connected software modules that let a robot estimate its state, plan motion, and control its movement.
- Localization
- The process of estimating a robot's position and orientation within a known or changing environment.
- SLAM
- Simultaneous Localization and Mapping is the process of building a map while also estimating the robot's location in that map.
- Costmap
- A grid or map layer that stores the estimated difficulty or danger of driving through each area.
- Path planning
- The process of finding a route from a start pose to a goal pose while avoiding obstacles and high-cost areas.
- Feedback control
- A control method that uses the difference between the desired motion and actual motion to adjust robot commands.
Common Mistakes to Avoid
- Treating GPS, lidar, or camera data as perfect position data is wrong because every sensor has noise, delay, and possible failure cases.
- Using only dead reckoning for long navigation is wrong because small wheel slip and heading errors accumulate into large position errors.
- Planning a path through the center of free grid cells without clearance is unsafe because real robots have size, turning limits, and uncertainty.
- Confusing global planning with local control is wrong because a global planner chooses a broad route while the local controller handles immediate motion and obstacle avoidance.
- Ignoring coordinate frames is a major error because sensor data, robot pose, map coordinates, and goal coordinates must be transformed into compatible frames.
Practice Questions
- 1 A robot starts at x = 2.0 m, y = 1.0 m, theta = 0 degrees and drives forward at v = 0.5 m/s for 4 s with omega = 0. What are x_new, y_new, and theta_new?
- 2 A robot uses A* planning. For a node, g(n) = 12 and h(n) = 7. What is f(n), and what does this score represent?
- 3 A proportional controller has Kp = 0.8. If the heading error is 15 degrees, what steering command does the controller output in degree-units?
- 4 A robot has a good map but begins to drift away from its true location because the wheels slip on a smooth floor. Which parts of the navigation stack should correct or reduce this problem, and why?
Understanding Autonomous Navigation Stack
Navigation is difficult because every source of information has errors. Wheel encoders can slip on dust, carpet, or wet ground. A camera can be confused by shadows, glare, or low light.
A laser scanner may miss glass or thin objects. Small errors build up over time. If a robot believes it is a few centimetres away from its real position, it may turn too early near a doorway.
Good navigation software stores uncertainty, not just one guessed location. It treats estimates with caution when the sensors disagree or when measurements are weak. This is why a robot may slow down or stop in an unfamiliar area.
Localization depends on matching current sensor data with something known. That known information might be a saved floor map, visual landmarks, radio beacons, or the shape of nearby walls. Simultaneous localization and mapping is used when no reliable map exists yet.
The robot builds a map while using the growing map to improve its position estimate. This creates a circular problem. A bad position estimate can place a wall in the wrong location, while a bad map makes position matching harder.
Loop closure helps limit this problem. When the robot recognizes a place it visited earlier, the software can adjust accumulated errors across the map. Students should notice that maps are models, not perfect copies of a room.
Perception turns raw sensor readings into useful objects and spaces. A depth camera produces distance data, but the navigation system must decide whether those points belong to a person, a chair, a wall, or noise. Some systems only need to identify free space and blocked space.
Others need object classes because a moving person needs different handling from a fixed shelf. A costmap usually expands obstacles by a safety margin based on the robot size, speed, and stopping distance. This explains why a robot might avoid a route that looks open to a person.
In school robotics, measure the full width of the robot, including bumpers, cables, and carried objects. A path that clears the central frame may still cause a collision.
Planning usually happens at more than one scale. A global planner finds a broad route through rooms or along corridors. A local planner reacts to fresh sensor data near the robot.
The local planner may steer around a backpack that was not present when the global route was made. It must balance progress toward the goal with clearance, smooth motion, and limits on turning or acceleration. The controller then converts the chosen motion into motor commands.
Fast control can create wobbling when corrections are too strong. Slow control can allow large tracking errors.
Testing should include blocked paths, moving obstacles, sensor dropouts, poor traction, and delayed data. A navigation system is trustworthy when it detects conditions it cannot handle and enters a safe state instead of continuing with a confident but wrong estimate.