static-layer

Configure the Nav2 StaticLayer plugin to load maps into the global costmap.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Robots using Nav2 often fail to receive or correctly interpret the pre-built map in the global costmap, causing empty costmaps, blocked planning, or stale map data. This Skill provides the correct StaticLayer configuration and debugging guidance to fix those issues. ## Core Features & Use Cases - Map Loading Configuration: Set map_topic, map_subscribe_transient_local, and subscribe_to_updates so the costmap reliably receives maps from map_server or slam_toolbox. - Cost Translation Control: Choose between trinary and full-range cost mapping, and tune lethal_cost_threshold and unknown_cost_value for your map conventions. - Use Case: Your global costmap appears empty after launch because the costmap node started before map_server. Enable map_subscribe_transient_local so the static layer receives the last published map via transient-local QoS. ## Quick Start Configure the Nav2 static layer in my global costmap so it loads the map from map_server on the /map topic.

Frequently Asked Questions about static-layer

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

FAQPage Schema
How do I load a map into the Nav2 global costmap?

Add the StaticLayer plugin to the global costmap plugins list and set map_topic to your map_server topic, typically /map. Enable map_subscribe_transient_local so the layer receives the map even if it subscribes after map_server published.

Why is my Nav2 costmap empty after startup?

An empty costmap usually means the static layer never received the map because it subscribed after map_server published. Set map_subscribe_transient_local to true for transient-local QoS, and verify the map with ros2 topic echo /map --once.

Should I use the static layer in the local costmap?

No. A local costmap with rolling_window enabled builds from live sensor data, so loading the full static map is wasteful and becomes stale relative to the robot's surroundings. Use obstacle or voxel layers in the local costmap instead.

What does trinary_costmap do in Nav2?

trinary_costmap collapses OccupancyGrid values into three states: free (0), lethal (254), and unknown (255). Setting it to false scales the full 0-100 map range into 0-254 costmap values, preserving soft cost information from probabilistic SLAM maps.

How do I get live map updates during SLAM in Nav2?

Set subscribe_to_updates to true so the static layer subscribes to the map_updates topic, such as /map_updates from slam_toolbox. Keep map_subscribe_transient_local enabled so the initial full map is still received.