Skip to content

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, not odom.
  • It is usually anchored by the static map and then augmented with selective dynamic information.
  • track_unknown_space changes 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_layer plus inflation_layer. Add obstacle_layer only if transient obstacles need to affect global replanning.
  • Use robot_radius only for simple circular robots. Switch to an explicit polygon footprint when 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: false unless a downstream tool really needs full snapshots every cycle.
  • If global planning fails across open space, check track_unknown_space and whether unknown cells are being treated as impassable.

Common Failure Modes

  • Using global_frame: odom and 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.