local-costmap-config

Configure Nav2 local costmap rolling windows, resolution, and sensor layers for reactive obstacle avoidance.

Updated Aug 16, 2026
One-click install
npx skills add https://github.com/three1324/yeonjinautomotive --skill local-costmap-config-three1324
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: local-costmap-config
Source: https://github.com/three1324/yeonjinautomotive/tree/main/.claude/skills/local-costmap-config
Command: npx skills add https://github.com/three1324/yeonjinautomotive --skill local-costmap-config-three1324

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up the Nav2 local costmap incorrectly causes unstable controller behavior, wasted CPU, and slow obstacle reactions. This Skill provides the correct parameter structure and sizing rules so the rolling window costmap works reliably with controllers like DWB, RPP, and MPPI. ## Core Features & Use Cases - Correct Frame and Window Setup: Enforces rolling_window true and global_frame odom to avoid TF jitter from localization corrections. - Sizing and CPU Guidance: Provides a cell-count formula and sizing table so the costmap matches robot speed without overloading the update loop. - Multi-Sensor Layer Configuration: Supplies a complete YAML example combining voxel_layer, obstacle_layer, range_sensor_layer, and inflation_layer with proper combination methods. - Use Case: A robotics engineer tuning a differential-drive indoor robot uses this Skill to set a 5m x 5m rolling costmap at 0.05m resolution fed by a LaserScan, avoiding the common mistake of using the map frame. ## Quick Start Ask the assistant to generate a Nav2 local costmap YAML configuration for your robot's sensors and size constraints.

Frequently Asked Questions about local-costmap-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure the Nav2 local costmap?

Set rolling_window to true, global_frame to odom, define width and height in meters, and add sensor layers such as voxel_layer or obstacle_layer with observation sources like a LaserScan topic. A complete YAML example covers all required parameters.

What size should the Nav2 local costmap be?

The local costmap should extend at least twice the robot's stopping distance at max velocity. For a differential drive robot at 0.3 m/s, 3 to 5 meters is sufficient; larger windows waste CPU on cells the controller never evaluates.

Should the local costmap use the map or odom frame?

The local costmap must use the odom frame, not map. Using map causes TF jitter when localization corrections shift the frame, which destabilizes the controller. The odom frame provides smooth, continuous transforms.

Why is my Nav2 local costmap update loop lagging?

Lag usually comes from an oversized costmap with fine resolution, such as 20m x 20m at 0.025m producing 640,000 cells. Reduce width, height, or resolution, and verify actual rates with ros2 topic hz on the costmap topic.

Can the local costmap combine multiple sensor types?

Yes, you can stack voxel_layer for lidar, obstacle_layer for bump sensors, and range_sensor_layer for proximity sensors. Set combination_method to 1 (Maximum) so one layer's raytracing does not clear another layer's marks.