This module handles how the robot calculates its route and physically drives. Nav2 splits this responsibility into two separate servers to handle long-range planning and short-range reactive driving.
1. The Planner Server (Global Planner)
This is the overall who can see the full picture. It calculates the absolute best, most efficient path from the robot's current position to the final goal destination
- It uses a static representation of the world. It ignores sudden dynamic obstacles (like a person walking by) and focuses purely on the geometry of static walls
- Common Plugins:
- NavfnPlanner uses classic Dijkstra or A* algorithms to find the absolute shortest path on a grid
- SmacPlanner is a advanced variant (like Hybrid-A*) that takes the actual physics and turning radius of car-like or tank-like robots into account, ensuring it does not suggest a path the robot cannot physically execute
2. The Controller Server (Local Planner)
This is the live driver on the ground. It takes the path generated by the Global Planner and converts it into real-time velocity commands (/cmd_vel) to feed to the motor controllers
- It operates at a high frequency (e.g., 20Hz). It actively monitors live sensor data to steer around unexpected obstacles while trying to stay as close to the global path as possible
- Common Plugins:
- DWB (Dynamic Window Approach) evaluates hundreds of possible short-term driving trajectories and chooses the best one based on goal progression, speed, and safety
- MPPI (Model Predictive Path Integral) is a modern predictive control algorithm that simulates thousands of future paths to achieve hyper-smooth, aggressive obstacle avoidance
- Regulated Pure Pursuit is a straightforward, highly reliable line-following controller popular for industrial automated guided vehicles (AGVs)