ROS 2 reference
Nav2 navigation
Nav2 turns a goal pose into velocity commands by passing it down a chain of servers, and any link in that chain can quietly break. Most navigation bugs are not 'the robot is dumb'; they are one server failing while the rest keep waiting.
Costmaps: where the world is wrong
A costmap is a grid of per-cell costs built from stacked layers. The three that matter most: Static (the map itself), Obstacle/Voxel (live sensor hits), and Inflation (a buffer of high cost grown around every obstacle so the robot keeps clearance). When navigation refuses to move, the costmap is usually the reason.
- Inflation radius too large: the inflation buffer swallows the free space, so the goal or the robot itself lands in a lethal or inscribed cell and the planner refuses to plan.
- Obstacle layer not clearing: phantom obstacles linger because raytrace or clearing is misconfigured, blocking paths that are actually open.
- Wrong footprint or robot_radius: the robot believes it is a different size than it is, and either scrapes walls or cannot fit through gaps it should.
Planner vs controller: two different failures
The plannermakes a global path across the whole costmap. When it fails you get “failed to create plan”, and the cause is almost always the costmap: the start or goal sits in a lethal cell, or the free space is disconnected. No path exists, so nothing downstream runs.
The controller follows that path locally and emits velocity. When itfails, a global path exists in RViz but the robot sits and spins or twitches in place. The cause is local trajectory scoring: DWB critic weights, bad goal tolerances, or a path the robot’s kinematics simply cannot follow. Knowing which server failed tells you which half of the config to open.
The failures, and their tells
- Robot spins in place, never drives forward
- The controller cannot score a valid forward trajectory. DWB critic weights, xy/yaw goal tolerances, or a path the robot's kinematics cannot follow.
- Goal rejected, planner never plans
- Start or goal is in a lethal or inflated cell, or the costmap free space is disconnected. Usually inflation radius or an uncleared obstacle.
- Nav2 never starts, no goal accepted
- A lifecycle node failed to activate, so lifecycle_manager halted the bringup. See the lifecycle page.
- Phantom obstacle blocks a clear route
- The obstacle layer is marking but not clearing. Raytrace range or observation source misconfigured.
- Path exists in RViz but robot ignores it
- Controller frame or odom problem, or the controller plugin rejected the path. Check the local costmap frames and the controller log.
- Robot loops through recoveries forever
- The behavior tree keeps hitting a recovery branch because planning or control never succeeds. Fix the underlying costmap or controller cause, not the BT.
Fix it in a lab
These faults are not hypothetical. Cases like a robot that spins without ever driving, or a goal placed inside an inflated cell, are Nav2 bugs you diagnose in a live Gazebo session with the real stack running. Open the navigation path and find the broken server yourself.