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?