Nav2 Costmap 2D Explained: Global vs Local, Inflation, Layers & ROS 2 YAML Config

Nav2 Costmap2D deep dive: global vs local costmap differences, obstacle and inflation layers, static map integration, YAML configuration, and tuning tradeoffs for ROS 2 mobile robots.

In this article

  • Why Costmaps Exist in Robot Navigation
  • Global Costmap vs Local Costmap
  • Costmap Layers
  • Nav2 Costmap YAML Configuration
  • How Inflation Changes Robot Behavior
  • Common Tuning Parameters
  • Typical Failure Modes
  • Costmap Filters: Keepout Zones and Speed Restrictions
  • How Costmaps Interact With Planners and Controllers
  • From My Own Build: Why a 2D Lidar Still Wants a Voxel Layer
  • Final Tuning Advice
  • Keywords Explained for Search and Study
  • FAQ: Nav2 Costmaps