Nav2 Costmap Filters and Mask Layers¶
Source: ros2-copilot-skills costmap filters skill
Why This Matters¶
Obstacle layers tell the robot where things are. Costmap filters tell it how to behave in specific places. That distinction matters whenever the robot should avoid some areas, slow down in others, or follow environment-specific policy rather than just raw geometry.
Distilled Takeaways¶
- Costmap filters are for spatial policy, not just obstacle marking.
- Filter masks let you encode keepout zones, speed restrictions, and similar map-anchored behavior.
- Filters work best when the map, mask, and robot frame conventions are aligned cleanly.
- This mechanism is a strong fit for indoor service robots, warehouses, and mixed human-robot environments.
Practical Guidance¶
- Use filters when you need the robot to behave differently by location, not merely avoid obstacles.
- Keep the semantic meaning of each mask explicit and documented.
- Validate alignment between the base map and the filter mask visually before tuning downstream behavior.
- Treat costmap filters as operational policy that may change over time, not hardcoded design facts.
Corroborating References¶
When to Read the Original Source¶
Go to the original skill when you want the filter-mask mental model, deployment patterns, and concrete examples for keepout and speed-restriction overlays.