Nav2 Global Costmap Configuration¶
Source: global-costmap-config
Why This Matters¶
The global costmap is where the planner reasons about route structure across the mapped environment. If it is framed incorrectly or polluted with local-reactive logic, the planner will produce paths that are brittle, overly conservative, or simply impossible.
Distilled Takeaways¶
- The global costmap should usually use
global_frame: map, notodom. - It is usually anchored by the static map and then augmented with selective dynamic information.
track_unknown_spacechanges whether unexplored cells are treated as blocked or traversable. That is a planning policy decision, not just a technical toggle.- Footprint definition matters globally because planner feasibility depends on robot geometry, not just local obstacle avoidance.
- A minimal global costmap is often better than a crowded one.
Practical Guidance¶
- Start with
static_layerplusinflation_layer. Addobstacle_layeronly if transient obstacles need to affect global replanning. - Use
robot_radiusonly for simple circular robots. Switch to an explicit polygonfootprintwhen corners matter. - Leave map dimensions to the static map unless you have a strong reason to resample or override them.
- Use
always_send_full_costmap: falseunless a downstream tool really needs full snapshots every cycle. - If global planning fails across open space, check
track_unknown_spaceand whether unknown cells are being treated as impassable.
Common Failure Modes¶
- Using
global_frame: odomand getting globally drifting plans. - Copying the local costmap layer stack into the global costmap and paying a heavy compute cost for little planning value.
- Forgetting that the static map defines the authoritative large-scale geometry, so planner issues are blamed on the planner instead of the map or static layer.
Corroborating References¶
When to Read the Original Source¶
Read the source skill when you need a concrete YAML baseline, a quick reminder on track_unknown_space, or a crisp explanation of why the global costmap should usually live in the map frame.