Skip to content

Nav2 Keepout Zones and No-Go Areas

Source: keepout-zones

Why This Matters

Some places are off-limits regardless of what the sensors currently report. Keepout filters let you encode navigation policy directly into the world model instead of hoping the operator or planner remembers it.

Distilled Takeaways

  • Keepout zones are usually implemented with a separate mask map plus filter metadata, not by painting over the navigation map itself.
  • The mask must align exactly with the navigation map in resolution and origin.
  • Keepout is usually binary: a cell is either restricted or not.
  • The global costmap is the main place to apply keepout because that is where route selection happens.
  • Putting keepout into the local costmap can add a final safety barrier when policy violations are unacceptable.

Practical Guidance

  • Use keepout for staircases, hazardous lab regions, private rooms, fragile displays, or docking-side exclusion zones.
  • Keep the mask visually simple: white everywhere, black only where access is forbidden.
  • Add the mask server and filter info server to lifecycle management or the filter will appear configured but inactive.
  • Visualize the keepout mask in RViz as a separate map layer when debugging alignment.

Common Failure Modes

  • Inverted mask semantics causing most of the map to become lethal.
  • Resolution or origin mismatch between the base map and the keepout mask.
  • Forgetting to load the filter plugin in the costmap even though the mask server is running.

Corroborating References

When to Read the Original Source

Read the source skill when you want the exact multi-node setup, lifecycle integration details, or a concrete example of how the filter and mask server fit into a Nav2 launch system.