Nav2 Logo
latest
  • Getting Started
    • Installation
    • Running the Example
    • Navigating
  • Development Guides
    • Build and Install
      • Install
        • For Iron and Older
        • For Jazzy and Newer
      • Build
        • Released Distribution Binaries
        • Rolling Development Source
        • Docker Container Images
        • Using Pre-built nav2_docker Images
      • Generate Doxygen
      • Help
        • Build Troubleshooting Guide
    • Dev Containers
      • Dev Container Guide
        • Creating Dev Containers
        • Using Dev Containers
      • What, Why, How?
        • What is a Dev Container?
        • Why use a Dev Container?
        • How do Dev Containers work?
      • Prerequisites
      • Getting started
      • Security
    • Getting Involved
      • Getting Involved
      • Process
      • Licensing
      • Developer Certification of Origin (DCO)
  • Navigation Concepts
    • ROS 2
      • Action Server
      • Lifecycle Nodes and Bond
    • Behavior Trees
    • Navigation Servers
      • Planner, Controller, Smoother, Route, and Behavior Servers
      • Planners
      • Controllers
      • Behaviors
      • Smoothers
      • Route
      • Robot Footprints
      • Waypoint Following
    • State Estimation
      • Standards
      • Global Positioning: Localization and SLAM
      • Odometry
    • Environmental Representation
      • Costmaps and Layers
      • Costmap Filters
      • Other Forms
    • Nav2 Academic Overview
  • First-Time Robot Setup Guide
    • Setup Guide for Gazebo
      • Setting Up Transformations
        • Transforms Introduction
        • Static Transform Publisher Demo
        • Transforms in Navigation2
        • Conclusion
      • Setting Up The URDF
        • URDF and the Robot State Publisher
        • Setting Up the Environment
        • Writing the URDF
        • Build and Launch
        • Visualization using RVIZ
        • Adding Physical Properties
        • Conclusion
      • Setting Up The SDF - Gazebo
        • About SDF
        • Writing the SDF
        • Build and Launch
        • Conclusion
      • Setting Up Odometry - Gazebo
        • Odometry Introduction
        • Setting Up Odometry on your Robot
        • Simulating an Odometry System using Gazebo
        • Conclusion
      • Smoothing Odometry using Robot Localization
        • Configuring Robot Localization
        • Launch and Build Files
        • Build, Run and Verification
      • Setting Up Sensors - Gazebo
        • Sensor Introduction
        • Simulating Sensors using Gazebo
        • Conclusion
      • Mapping and Localization
        • Costmap 2D
        • Conclusion
      • Setting Up the Robot’s Footprint
        • Footprint Introduction
        • Configuring the Robot’s Footprint
        • Build, Run and Verification
        • Visualizing Footprint in RViz
        • Conclusion
      • Setting Up Navigation Plugins
        • Planner and Controller Servers
        • Selecting the Algorithm Plugins
        • Conclusion
    • Setup Guide for Gazebo Classic
      • Setting Up Transformations
        • Transforms Introduction
        • Static Transform Publisher Demo
        • Transforms in Navigation2
        • Conclusion
      • Setting Up The URDF
        • URDF and the Robot State Publisher
        • Setting Up the Environment
        • Writing the URDF
        • Build and Launch
        • Visualization using RVIZ
        • Adding Physical Properties
        • Conclusion
      • Setting Up Odometry - Gazebo Classic
        • Odometry Introduction
        • Setting Up Odometry on your Robot
        • Simulating an Odometry System using Gazebo
        • Conclusion
      • Smoothing Odometry using Robot Localization
        • Configuring Robot Localization
        • Launch and Build Files
        • Build, Run and Verification
      • Setting Up Sensors - Gazebo Classic
        • Sensor Introduction
        • Simulating Sensors using Gazebo Classic
        • Conclusion
      • Mapping and Localization
        • Costmap 2D
        • Conclusion
      • Setting Up the Robot’s Footprint
        • Footprint Introduction
        • Configuring the Robot’s Footprint
        • Build, Run and Verification
        • Visualizing Footprint in RViz
        • Conclusion
      • Setting Up Navigation Plugins
        • Planner and Controller Servers
        • Selecting the Algorithm Plugins
        • Conclusion
  • Robots Using
    • Research Robots
  • ROSCon Talks
    • Nav2 Developer Talks
    • Community’s Talks
  • General Tutorials
    • Navigating with a Physical Turtlebot 3
      • Overview
      • Requirements
      • Tutorial Steps
        • 0- Setup Your Environment Variables
        • 1- Launch Turtlebot 3
        • 2- Launch Nav2
        • 3- Launch RVIZ
        • 4- Initialize the Location of Turtlebot 3
        • 5- Send a Goal Pose
    • Navigating while Mapping (SLAM)
      • Overview
      • Requirements
      • Tutorial Steps
        • 0- Launch Robot Interfaces
        • 1- Launch Navigation2
        • 2- Launch SLAM
        • 3- Working with SLAM
        • 4- Getting Started Simplification
    • Using an External Costmap Plugin (STVL)
      • Overview
      • Costmap2D and STVL
      • Tutorial Steps
        • 0- Setup
        • 1- Install STVL
        • 1- Modify Navigation2 Parameter
        • 2- Launch Navigation2
        • 3- RVIZ
    • Navigating using GPS Localization
      • Overview
      • Requirements
      • GPS Localization Overview
      • Tutorial Steps
        • 0- Setup Gazebo World
        • 1- Setup GPS Localization system
        • 2- Setup Navigation system
        • 3- Interactive GPS Waypoint Follower
        • 4- Logged GPS Waypoint Follower & Waypoint Logging
      • Conclusion
    • Lidar-Free, Vision-Based Navigation
      • Preliminaries
      • Additional Resources
        • Rebuilding TensorRT Engine for Isaac Perceptor on Nova Carter
      • Concepts
      • NVIDIA Technologies
      • 0. NVIDIA Jetson Setup
        • Jetpack
        • Nova Init
        • Power Modes
        • Compatible Cameras
      • 1. Initial Setup
        • Tooling Setup
        • Demonstration Setup
      • 2. Software & Workflow Walkthrough
      • 3. Initial Environment Mapping
        • Data Collection
        • Data Processing
        • Final results
      • 4. Navigation Testing
      • 5. Conclusions & Extensions
        • Resources
        • Troubleshooting
    • Navigating with Semantic Segmentation (Nvidia Jetson)
      • Overview
      • Requirements
      • Semantic Segmentation Overview
        • What is Semantic Segmentation?
      • Tutorial Steps
        • 0- Setup Simulation Environment
        • 1- Setup Semantic Segmentation Inference Node
        • 2- Configure Nav2 with Semantic Segmentation Layer
        • 3- Run everything together
      • Conclusion
    • Navigating with Semantic Segmentation (SAM3, AMD Strix Halo)
      • Overview
      • Why SAM3 + Why Strix Halo
      • Requirements
      • Architecture Overview
      • Tutorial Steps
        • 0 - Clone the repository
        • 1 - Install ROCm and Python dependencies
        • 2 - Get the SAM3 weights
        • 3 - Build the SAM3 inference artifacts
        • 4 - Configuration
        • 5 - Build the ROS 2 workspace
        • 6 - Launch the SAM3 inference node
        • 7 - Configure Nav2 to use the layer
        • 8 - Launch Nav2
      • Real-World Demonstrations
        • Indoor Terrain
        • Outdoor Terrain
        • Difficult Small Obstacles
    • Groot Tutorials
      • Overview
      • Table of Contents
        • Groot - Interacting with Behavior Trees
        • Groot2 - Interacting with Behavior Trees
    • Using VIO to Augment Robot Odometry
      • Overview
      • Setting Up the ZED X Camera
      • Setting Up ZED ROS
      • Fusing VIO Into Local State Estimate
        • Fusing VSLAM Into Global State Estimate
      • Testing it Out!
    • Dynamic Object Following
      • Using Following Server
        • Following Server Overview
        • Following Server Tutorial Steps
      • Using ComputePathToPose and FollowPath
        • ComputePathToPose Overview
        • ComputePathToPose Tutorial Steps
    • Navigating with Keepout Zones
      • Overview
      • Requirements
      • Tutorial Steps
        • 1. Prepare filter mask
        • 2. Configure Costmap Filter Info Publisher Server
        • 3. Enable Keepout Filter
        • 4. Run Nav2 stack
    • Navigating with Speed Limits
      • Overview
      • Requirements
      • Tutorial Steps
        • 1. Prepare filter mask
        • 2. Configure Costmap Filter Info Publisher Server
        • 3. Enable Speed Filter
        • 4. Run Nav2 stack
        • 5. Optional: Enable path lookahead
    • Navigating with Zone Parameter Overrides
      • Overview
      • Requirements
      • Tutorial Steps
        • 1. Prepare filter mask
        • 2. Configure Costmap Filter Info Publisher Server
        • 3. Enable Zone Parameter Filter
        • 4. Run Nav2 stack
        • 5. Verify zone transitions
    • Using Docking Server
      • Overview
      • Requirements
      • ChargingDock Plugins
      • Dock Database
      • Configuring Docking Server
      • Adding Docking Server to Launch
      • Docking Action API
      • Putting It All Together
    • Using Rotation Shim Controller
      • Overview
      • What is the Rotation Shim Controller?
      • Configuring Rotation Shim Controller
      • Configuring Primary Controller
      • Demo Execution
    • Adding a Smoother to a BT
      • Overview
      • Requirements
      • Tutorial Steps
        • 0- Familiarization with the Smoother BT Node
        • 1- Specifying a Smoother Plugin
        • 2- Modifying your BT XML
    • Using Collision Monitor
      • Overview
      • Requirements
      • Configuring Collision Monitor
      • Configuring Collision Monitor with VelocityPolygon
      • Preparing Nav2 stack
      • Demo Execution
    • Adding a New Nav2 Task Server
      • Lifecycle Nodes
      • Composition
      • Error codes
      • Conclusion
    • Filtering of Noise-Induced Obstacles
      • Overview
      • Requirements
      • Tutorial Steps
        • 1. Enable Denoise Layer
        • 2. Run Nav2 stack
      • How it works
    • Camera Calibration
      • Overview
      • Requirements
      • Tutorial Steps
    • Get Backtrace in ROS 2 / Nav2
      • Overview
      • Preliminaries
      • From a Node
      • From a Launch File
      • From Large Project
      • From Nav2 Bringup
      • Automatic backtrace on crash
    • Profiling in ROS 2 / Nav2
      • Overview
      • Preliminaries
      • Profile from a Node
      • Profile from a Launch File
      • From Nav2 Bringup
      • Interpreting Results
    • Docker for Development: Zero to Hero
      • Overview
      • Preliminaries
      • Important Docker Commands
      • Exploring Your First Container
      • Understanding ROS Docker Images
      • For Docker-Based Development
        • Building a Development Image
        • Visualizations from Docker
      • For Docker-Based Deployment
      • Conclusion
      • Appendix
        • Nav2 Development Image
        • Nav2 Deployment Image
    • Route Server Tools
      • Provided Tools
        • Using the Nav2 Route Tool
        • Route Graph Generation LIF Editor
        • Route Graph Generation
        • SWAGGER Route Graph Generation
      • Description
      • Demonstration
    • Navigating with Vector Objects
      • Overview
      • Requirements
      • Configuring Vector Object Server
      • Preparing Nav2 stack
      • Demo Execution
      • Working with Vector Objects
    • ROSCon UK 2025: State Estimation for Mobile Robotics Workshop
      • Overview
      • Workshop Content
    • Enhanced Safety for Nav2 using 3Laws Supervisor
      • Concepts
      • 0. Obtain a License Key
      • 1. Installation
      • 2. Initial Configuration Walkthrough
        • Initializing Configuration with Nav2
        • Supervisor Configuration: General
        • Supervisor Configuration: Robot Model
        • Supervisor Configuration: Localization
        • Supervisor Configuration: Perception
        • Supervisor Configuration: Control
        • Supervisor Configuration: Supervisor
        • Debugging
        • Turtlebot4 Supervisor Example
      • 3. Nav2-Supervisor Configuration
        • Collision Monitor Integration
        • Controller Configuration
        • Launch Integration
      • 4. Nav2 Turtlebot4 Simulation Demonstration
      • 5. Hardware Demonstrations
        • Narrow Doorways
      • 6. Resources
    • Ground Terrain Segmentation using 3D Lidar
      • Overview
      • Requirements
      • Installation Steps
        • Setup Tutorial Package and Dependencies
        • Build the Demo
      • Ground Segmentation Overview
      • Ground Consistency Layer
        • Configuration and Tuning
        • External Parameters
      • Use Cases
      • Practical Example: Running the Demo
        • Launch the Simulation
        • Observe Ground Consistency Layer in Action
      • Conclusion
      • Extended Topics
        • Troubleshooting
      • Funding
    • AI Depth Estimation with Nav2 Costmap
      • Overview
        • What is Depth Anything 3 AI model?
        • Pipeline to process image
      • Requirements
      • Tutorial Steps
        • 1. Install Core Dependencies
        • 2. Build Depth Anything V3 package
        • 1. Model Weights Preparation
        • 4. Configure Params
        • 5. Launch the Pipeline
      • Acknowledgements
  • Plugin Tutorials
    • Writing a New Behavior Plugin
      • Overview
      • Requirements
      • Tutorial Steps
        • 1- Creating a new Behavior Plugin
        • 2- Exporting the Behavior Plugin
        • 3- Pass the plugin name through params file
        • 4- Run Behavior Plugin
    • Writing a New Behavior Tree Plugin
      • Overview
      • Requirements
      • Tutorial Steps
        • 1- Creating a new BT Plugin
        • 2- Exporting the planner plugin
        • 3- Add plugin library name to config
        • 4- Run Your Custom plugin
      • Using custom types for Input/Output ports
      • Visualize the content of the blackboard in Groot 2 (PRO)
    • Writing a New Controller Plugin
      • Overview
      • Requirements
      • Tutorial Steps
        • 1- Create a new Controller Plugin
        • 2- Exporting the controller plugin
        • 3- Pass the plugin name through the params file
        • 4- Run Pure Pursuit Controller plugin
    • Writing a New Costmap2D Plugin
      • Overview
      • Requirements
      • Tutorial Steps
        • 1- Write a new Costmap2D plugin
        • 2- Export and make GradientLayer plugin
        • 3- Enable the plugin in Costmap2D
        • 4- Run GradientLayer plugin
    • Writing a New Navigator Plugin
      • Overview
      • Requirements
      • Tutorial Steps
        • 1- Create a new Navigator Plugin
        • 2- Exporting the navigator plugin
        • 3- Pass the plugin name through the params file
        • 4- Run plugin
    • Writing a New Planner Plugin
      • Overview
      • Requirements
      • Tutorial Steps
        • 1- Creating a new Planner Plugin
        • 2- Exporting the planner plugin
        • 3- Pass the plugin name through params file
        • 4- Run StraightLine plugin
  • Configuration Guide
    • Core Servers
      • Behavior Server
        • Behavior Server Parameters
        • Default Plugins
        • Spin Behavior Parameters
        • BackUp Behavior Parameters
        • DriveOnHeading Behavior Parameters
        • AssistedTeleop Behavior Parameters
        • Example
      • Behavior-Tree Navigator
        • Parameters
        • NavigateToPose Parameters
        • NavigateThroughPoses Parameters
        • Example
      • Behavior Tree XML Nodes
        • Action Plugins
        • Condition Plugins
        • Control Plugins
        • Decorator Plugins
        • Example
      • Collision Monitor
        • Provided Nodes
      • Controller Server
        • Parameters
        • Provided Plugins
        • Default Plugins
        • Example
      • Costmap 2D
        • Costmap2D ROS Parameters
        • Default Plugins
        • Plugin Parameters
        • Costmap Filters Parameters
        • Example
      • Docking Server
        • Parameters
        • SimpleChargingDock Parameters
        • Example
      • Lifecycle Manager
        • Parameters
        • Example
      • Map Server
        • Map Server
        • Map Saver
        • Costmap Filter Info Server
        • Vector Object Server
      • Planner Server
        • Parameters
        • Default Plugins
        • Example
      • Route Server
        • Server Parameters
        • Edge Scorer Parameters
        • Route Operations Parameters
        • Example
        • Configuring the Nav2 Route Server Demo
      • Smoother Server
        • Smoother Server Parameters
        • Example
      • Velocity Smoother
        • Velocity Smoother Parameters
        • Example
      • Waypoint Follower
        • Parameters
        • Provided Plugins
        • Default Plugin
        • Example
    • Planners Plugins
      • NavFn Planner
        • Parameters
        • Example
      • Smac Planner
        • Provided Plugins
        • Description
      • Theta Star Planner
        • Parameters
        • Example
    • Controller Plugins
      • DWB Controller
        • Controller
        • Plugins
        • Trajectory Critics
        • Example
      • Graceful Controller
        • Graceful Controller Parameters
        • Example
      • Model Predictive Path Integral Controller
        • MPPI Parameters
        • Example
        • Notes to Users
      • Regulated Pure Pursuit
        • Regulated Pure Pursuit Parameters
        • Example
      • Rotation Shim Controller
        • Rotation Shim Controller Parameters
        • Example
    • Smoother Plugins
      • Constrained smoother
        • Smoother Server Parameters
        • Example
      • Savitzky-Golay Smoother
        • Savitzky-Golay Smoother Parameters
        • Example
      • Simple Smoother
        • Simple Smoother Parameters
        • Example
    • Others
      • AMCL
        • Parameters
        • Example
      • Coverage Server
        • Parameters
        • Example
      • Following Server
        • Parameters
        • Example
      • Loopback Simulator
        • Parameters
        • Example
  • Tuning Guide
    • Inflation Potential Fields
    • Robot Footprint vs Radius
    • Rotate in Place Behavior
    • Planner Plugin Selection
    • Controller Plugin Selection
    • Caching Obstacle Heuristic in Smac Planners
    • Costmap2D Plugins
    • Symmetric Yaw Tolerance
    • Nav2 Launch Options
    • Performance in ROS 2: RMW, Node Composition, Intra-process Communication, and QoS
    • Other Pages We’d Love To Offer
  • Nav2 Behavior Trees
    • Introduction To Nav2 Specific Nodes
      • Action Nodes
      • Condition Nodes
      • Decorator Nodes
      • Control: PipelineSequence
      • Control: Recovery
      • Control: RoundRobin
      • Control: NonblockingSequence
      • Control: PersistentSequence
      • Control: PauseResumeController
    • Detailed Behavior Tree Walkthrough
      • Overview
      • Prerequisites
      • Navigate To Pose With Replanning and Recovery
      • Navigation Subtree
      • Recovery Subtree
    • Navigate To Pose
    • Navigate Through Poses
    • Navigate To Pose and Pause Near Goal-Obstacle
    • Navigate To Pose With Consistent Replanning And If Path Becomes Invalid
    • Navigate on Route Graph with Recovery
    • Follow Dynamic Point
    • Odometry Calibration
  • Navigation Plugins
    • Behavior-Tree Navigators
    • Costmap Layers
    • Costmap Filters
    • Controllers
    • Planners
    • Smoothers
    • Behaviors
    • Waypoint Task Executors
    • Goal Checkers
    • Progress Checkers
    • Path Handlers
    • Behavior Tree Nodes
    • Route Plugins
      • Edge Scorers
      • Route Operations
      • Graph File Parsers
  • Migration Guides
    • Dashing to Eloquent
      • New Packages
      • New Plugins
      • Navigation2 Architectural Changes
    • Eloquent to Foxy
      • General
      • Server Updates
      • New Plugins
      • Map Server Re-Work
      • New Particle Filter Messages
      • Selection of Behavior Tree in each navigation action
      • FollowPoint Capability
      • New Costmap Layer
    • Foxy to Galactic
      • NavigateToPose Action Feedback updates
      • NavigateToPose BT-node Interface Changes
      • NavigateThroughPoses and ComputePathThroughPoses Actions Added
      • ComputePathToPose BT-node Interface Changes
      • ComputePathToPose Action Interface Changes
      • BackUp BT-node Interface Changes
      • BackUp Recovery Interface Changes
      • Nav2 Controllers and Goal Checker Plugin Interface Changes
      • FollowPath goal_checker_id attribute
      • Groot Support
      • New Plugins
      • Costmap Filters
      • SmacPlanner
      • ThetaStarPlanner
      • RegulatedPurePursuitController
      • Costmap2D current_ Usage
      • Standard time units in parameters
      • Ray Tracing Parameters
      • Obstacle Marking Parameters
      • Recovery Action Changes
      • Default Behavior Tree Changes
      • NavFn Planner Parameters
      • New ClearCostmapExceptRegion and ClearCostmapAroundRobot BT-nodes
      • New Behavior Tree Nodes
      • sensor_msgs/PointCloud to sensor_msgs/PointCloud2 Change
      • ControllerServer New Parameter failure_tolerance
      • Removed BT XML Launch Configurations
      • Nav2 RViz Panel Action Feedback Information
    • Galactic to Humble
      • Major improvements to Smac Planners
      • Simple (Python) Commander
      • Reduce Nodes and Executors
      • API Change for nav2_core
      • Extending the BtServiceNode to process Service-Results
      • Including new Rotation Shim Controller Plugin
      • Spawning the robot in Gazebo
      • Recovery Behavior Timeout
      • New parameter use_final_approach_orientation for the 3 2D planners
      • SmacPlanner2D and Theta*: fix goal orientation being ignored
      • SmacPlanner2D, NavFn and Theta*: fix small path corner cases
      • Change and fix behavior of dynamic parameter change detection
      • Dynamic Parameters
      • BT Action Nodes Exception Changes
      • BT Navigator Groot Multiple Navigators
      • Removed Kinematic Limiting in RPP
      • Added Smoother Task Server
      • Removed Use Approach Velocity Scaling Param in RPP
      • Refactored AMCL motion models as plugins
      • Dropping Support for Live Groot Monitoring of Nav2
      • Replanning Only if Path is Invalid
      • Fix CostmapLayer clearArea invert param logic
      • Dynamic Composition
      • BT Cancel Node
      • BT PathLongerOnApproach Node
      • BT TruncatePathLocal Node
      • Constrained Smoother
      • Replanning at a Constant Rate and if the Path is Invalid
      • Euclidean Distance 2D
      • Recovery To Behavior
      • Respawn Support in Launch and Lifecycle Manager
      • New Nav2 Velocity Smoother
      • Goal Checker API Changed
      • Added Assisted Teleop
    • Humble to Iron
      • New Behavior-Tree Navigator Plugins
      • Added Collision Monitor
      • Removed use_sim_time from yaml
      • Run-time Speed up of Smac Planner
      • Recursive Refinement of Smac and Simple Smoothers
      • Simple Commander Python API
      • Smac Planner Start Pose Included in Path
      • Parameterizable Collision Checking in RPP
      • Expanded Planner Benchmark Tests
      • Smac Planner Path Tolerances
      • costmap_2d_node default constructor
      • Feedback for Navigation Failures
      • Costmap Filters
      • Savitzky-Golay Smoother
      • Changes to Map yaml file path for map_server node in Launch
      • SmootherSelector BT Node
      • Publish Costmap Layers
      • Give Behavior Server Access to Both Costmaps
      • New Model Predictive Path Integral Controller
      • Behavior Tree Uses Error Codes
      • Load, Save and Loop Waypoints from the Nav2 Panel in RViz
      • DWB Forward vs Reverse Pruning
      • More stable regulation on curves for long lookahead distances
      • Publish Collision Monitor State
      • Renamed ROS-parameter in Collision Monitor
      • New safety behavior model “limit” in Collision Monitor
      • Velocity smoother applies deceleration when timeout
      • PoseProgressChecker plugin
      • Allow multiple goal checkers and change parameter progress_checker_plugin(s) name and type
      • IsBatteryChargingCondition BT Node
      • Behavior Server Error Codes
      • New Denoise Costmap Layer Plugin
      • SmacPlannerHybrid viz_expansions parameter
    • Iron to Jazzy
      • BehaviorTree.CPP upgraded to version 4.5+
      • Added TwistStamped Option for Commands
      • Add VelocityPolygon in Collision Monitor
      • Change polygon points parameter format in Collision Monitor
      • Introduction of Soft-Real Time Action Servers
      • opennav_coverage Project
      • opennav_docking Project
      • Introduce a new Multi-Robot Bringup Launch
      • New option for the Voxel and Obstacle Layers
      • use_interpolation RPP Parameter Depreciated
      • Changes to MPPI Goal Critic
      • Changes to MPPI Path Angle Critic
      • Changes to MPPI Path Handling For Directionality
      • Addition of new MPPI Cost Critic
      • MPPI Acceleration
      • Move Error Code Enumerations
      • Substitution in parameter file
      • Allow Behavior Server Plugins to Access The Action Result
      • Smac Planner Debug Param Name Change
      • Smac Planner On Approach to Goal Shortcutting Solutions
      • Added GPS Waypoint Follower Server
      • Smac Planner Hybrid-A* New Features
      • New node in nav2_collision_monitor: Collision Detector
      • Dynamic enabling/disabling of sources/polygons in Collision Monitor/Detector
      • Expose action server’s result timeout
      • RewrittenYaml could add new parameters to YAMLs
      • Simple Commander API Allows Multi-Robot Namespacing
      • Change duration type in wait_action node
      • The costmap activation fails when required transforms are not available
      • Subtrees Obtain Shared Resources
      • Collision Monitor: added watchdog mechanism based on source_timeout parameter with default blocking behavior
      • BtActionServer: use native library haltTree()
      • Global Frame Removed from 2 BT Nodes
      • Introduction of CostmapUpdate.msg
      • Full Stack Uses Node Clocks
      • New Graceful Motion Controller
      • Plugin Libraries in BT Navigator Only Includes Custom Nodes
      • New RViz Plugin for selecting Planners, Controllers, Goal Checkers, Progress Checkers and Smoothers
      • RPP new optional interpolate_curvature_after_goal behavior and fix conflict between use_rotate_to_heading and allow_reversing
      • Cancel Checker Interface For GlobalPlanner
      • New BtActionServer/BtNavigator parameter
      • New collision monitor parameter
      • New graceful cancellation API for Controllers
      • Standardization of Plugin Naming with Double Colons (::)
      • Collision monitor: dynamic radius for circle type polygons
      • Static Layer: new parameter footprint_clearing_enabled
      • Lifecycle Node: added bond_heartbeat_period parameter (and allow disabling the bond mechanism)
      • Rotation Shim Controller: new parameter rotate_to_goal_heading
      • MPPI Controller: Addition of acceleration constraints
      • RegulatedPurePursuit Controller [RPP]: new parameter use_cancel_deceleration
      • Clear Costamp Around Passed Pose
    • Jazzy to Kilted
      • Nav2 Route Server
      • BehaviorTree error_msg
      • TwistStamped Default CmdVel Change
      • New Nav2 Loopback Simulator
      • Docking with Static Infrastructure or Dynamic Docking
      • New RViz panel for Docking
      • BT Nodes Changes
      • New RViz Tool for Costmap Cost Cell Inspection
      • Fix flickering visualization
      • Option to limit velocity through DWB trajectory
      • Option to disable zero velocity publishing on goal exit
      • Rotation Shim Disengagement Threshold
      • Added optional collision checking for the Docking Server
      • Revamped multirobot bringup and config files to use namespaces
      • Removed global map_topic from Costmap node
      • Simplified Costmap2DROS constructors
      • Option to disable collision checking in DriveOnHeading, BackUp and Spin Actions
      • New Plugin Container Layer
      • Iterative Target Selection for the Graceful Controller
      • Conform to ROS 2 launch syntax in Turtlebot 3 multi-robot launch file
      • ComputePathThroughPoses, NavigateThroughPoses and other BT nodes now use nav_msgs/Goals instead of vector<PoseStamped>
      • MPPI controller re-implemented using Eigen library and performance improved by 40-45%
      • Enable goal orientation non-specificity
      • DriveOnHeading and BackUp behaviors: Addition of acceleration constraints
      • Rotation Shim Deceleration as a function of its target orientation
      • Rotation Shim Open-loop Control
      • Near collision cost in MPPI cost critic
      • Service introspection
      • Rotation Shim Using Path Orientations
      • MPPI - Publishing Optimal Trajectory
      • NavigateThroughPoses - Reporting waypoint statuses information
      • Groot 2 Support
      • Docking backwards as plugin parameter
      • New Position Goal Checker
      • Docking backwards without sensor
      • RegulatedPurePursuit Controller [RPP]: new parameter stateful
      • Controller Server Frequency Removed Dynamic Parameter
      • Default bringup supports keepout, speed zones, and route planning
    • Kilted to L-turtle
      • New Nav2 ROS Common & Nav2 Lifecycle Node
        • Plugin Migration
        • Service Client Migration
        • Service Server Migration
        • Action Server Migration
        • Action Client Migration
        • Publisher Subscriber Migration
      • Removed Parameter action_server_result_timeout
      • Dock Plugin External Detection Rotation
      • Dock Plugin Detector Control
      • Added Corner Smoothing functionality to route_server
      • Added NonblockingSequence Control Node
      • MPPI Optimal Trajectory Validator Plugin
      • Added PersistentSequence and PauseResumeController Control Nodes
      • Option to use point_cloud_transport
        • Configuration guide
        • Performance Metrics
      • Private BT Navigator’s BlackBoard ID parameters
      • Add BehaviorTree SubTrees Support
      • Option to have custom window size and poly order in Savitsky-Golay Smoother
      • Vector Objects were Supported for Raster Maps
      • Toggle collision monitor service and BT plugin
      • Following Server
      • Option for MPPI to use open loop mode
      • Partial paths from Planner Server
      • Namespace added for primary controller parameters in Rotation Shim Controller
      • New CostmapSource observation type for Collision Monitor and CollisionDetector
      • Options to build with isolated tests
      • RoundRobin wrap_around Parameter
      • Configurable Inscribed Obstacle Cost Value for Costmap Conversion
      • Updated Nav2 RViz Panel
      • Add Dynamic Window Pure Pursuit Option to Regulated Pure Pursuit Controller
      • Bond Heartbeat Period Default Value Change
        • Performance Impact
      • Centralize Path Handler logic in Controller Server
        • GoalChecker
        • Controller Plugins
        • DWB
        • RPP
        • Graceful
        • MPPI
      • Symmetric Yaw Tolerance for Goal Checking and Navigation
      • Option to enable Intra-process Communication in Nav2
      • New AxisGoalChecker Plugin
      • New default_cancel_timeout parameter in bt_navigator
      • Add support for switching between SMAC planners
      • OMNI Analytic Expansion Support in SmacPlannerLattice
      • New bt_log_idle_transitions parameter in bt_navigator
      • New IsWithinPathTrackingBounds Node
      • RPP: min_distance_to_obstacle fix and new allow_obstacle_checking_beyond_goal parameter
      • Refactored Inflation layer powered by OpenMP
      • Move isStopped, isPathValid, and isPoseOccupied from condition nodes to action nodes
      • Collision Monitor debounce parameters
      • MPPI per-critic trajectory cost visualization
      • Constrained Smoother cost function formulation corrected
      • ValidatePath / IsPathValid parameter changes
      • Nav2 Loopback Simulator converted to C++
      • Global planner plugin natively accepts viapoints
      • MPPI motion models use plugin-based configuration
      • Adaptive tolerance goal checker
      • Stateful parameter removed from Regulated Pure Pursuit Controller
      • Clearing Individual Costmap Plugins
      • MPPI Controller: Per-Axis Delay Compensation with command history replay
      • SpeedFilter path lookahead
      • TruncatePathLocal BT Node: robot_frame renamed to robot_base_frame
      • Asymmetric Inflation Field
      • Custom Inscribed Radius for Inflation Layer
      • Collision Monitor exclusion zones
      • Behavior Tree action request error reporting
      • Goal Validation in Action Servers
      • New ZoneParameterFilter Costmap Filter
  • Simple Commander API
    • Overview
    • Commander API
    • Costmap API
    • Footprint Collision Checker API
    • Examples and Demos
  • API Docs
  • Roadmaps
    • Lyrical Roadmap
    • Kilted Roadmap
    • Jazzy Roadmap
    • Iron Roadmap
    • Humble Roadmap
  • Citations
  • About and Contact
    • Related Projects
    • About
    • Contact
  • Maintainer Docs
    • ROS Distribution Release Process
      • 0. Initial Freeze
      • 1. Local Functional Testing
      • 2. Setup Nav2 Docker Images
      • 2. Branch Off Distribution
      • 3. Mark Branch as Protected
      • 4. Setup Branch CI
      • 5. Update Auxiliary Projects
      • 6. Run Bloom Release
      • 7. Nav2 Docker Build
      • 8. Bloom Related Packages
      • 9. Announcements
    • ROS Distribution Sync Process
      • 0. Initial Setup
      • 1. Backporting Process
      • 2. Testing
      • 3. Open a PR
      • 4. Bloom Release
Nav2
Edit
  • General Tutorials
  • Navigating with Zone Parameter Overrides

Navigating with Zone Parameter Overrides

  • Overview

  • Requirements

  • Tutorial Steps

Overview

This tutorial shows how to change parameters of Nav2 servers automatically when the robot enters marked zones on the map. An example case is a snow or ice covered section of an outdoor route or a work cell shared with people: the robot may still drive there, but it should behave more carefully - lower maximum velocity, longer backup simulation time, and so on. Keepout Filter blocks such areas entirely and Speed Filter changes only the speed limit, while ZoneParameterFilter costmap filter plugin, which will be enabled and used in this document, can change any parameter on any node. When the robot enters a zone, the filter applies the parameter setpoints configured for that zone; when the robot returns to a nominal area, it restores the declared nominal defaults.

Requirements

It is assumed that ROS 2, Gazebo and TurtleBot4 packages are installed or built locally. Please make sure that Nav2 project is also built locally as it was made in Build and Install.

Tutorial Steps

1. Prepare filter mask

As was written in Navigation Concepts, any Costmap Filter (including Zone Parameter Filter) reads the data marked in a filter mask file. Filter mask is the usual Nav2 2D-map distributed through PGM, PNG or BMP raster file with its metadata containing in a YAML file. The first step of the Navigating with Keepout Zones tutorial explains in detail how the color lightness of mask pixels converts to OccupancyGrid values depending on the map mode; please refer to it if you have not prepared a filter mask before.

For Zone Parameter Filter the OccupancyGrid value of a mask cell is the id of the state that must be active while the robot stands on that cell. Value 0 means the nominal state: no overrides. Values 1 and higher select the states declared in the filter configuration (see step 3). Since exact integer values matter here, use the raw map mode, where the OccupancyGrid value is equal to the color lightness of the pixel:

  • Paint each zone with the lightness equal to its state id: 1 for the first zone, 2 for the second one, and so on.

  • Fill everything else with black (lightness 0, the nominal state).

To make the mask, copy depot.pgm main map which will be used in a world simulation from a Nav2 repository to a new depot_zones.pgm file and edit it in a raster graphics editor (as an example could be taken GIMP editor): paint the zones over the map areas they should cover first, then fill all remaining pixels with black.

Note

In raw mode a lightness of 101 or higher converts to the unknown value (-1). On an unknown cell the filter holds the current state and prints a throttled warning, so stray light pixels will delay the switch back to nominal. Keep every pixel either at 0 or at a declared state id. When the robot leaves the mask coverage entirely, the filter resets to the nominal state.

Like all other maps, the filter mask should have its own YAML metadata file. Copy depot.yaml to depot_zones.yaml, then point the image field to the new mask and set the raw mode:

image: depot_zones.pgm
mode: raw

Save depot_zones.yaml and the new filter mask is ready to use.

2. Configure Costmap Filter Info Publisher Server

Each costmap filter reads incoming meta-information (such as filter type or data conversion coefficients) in messages of nav2_msgs/CostmapFilterInfo type. These messages are being published by Costmap Filter Info Publisher Server. The server is running as a lifecycle node. nav2_msgs/CostmapFilterInfo messages are going in a pair with OccupancyGrid filter mask topic, therefore along with Costmap Filter Info Publisher Server there should be enabled a new instance of Map Server configured to publish the filter mask. Parameters of both servers are listed at Map Server page. The example of params_file for them:

costmap_filter_info_server:
  ros__parameters:
    use_sim_time: true
    type: 4
    filter_info_topic: "/costmap_filter_info"
    mask_topic: "/zone_filter_mask"
    base: 0.0
    multiplier: 1.0

filter_mask_server:
  ros__parameters:
    use_sim_time: true
    frame_id: "map"
    topic_name: "/zone_filter_mask"
    yaml_filename: "depot_zones.yaml"

Note, that:

  • For Zone Parameter Filter the type of costmap filter should be set to 4.

  • Filter mask topic name should be the equal for mask_topic parameter of Costmap Filter Info Publisher Server and topic_name parameter of Map Server.

  • base and multiplier are not used by Zone Parameter Filter: mask values are taken directly as state ids, without a linear conversion. Keep them at 0.0 and 1.0; other values produce a warning at startup.

Both servers could be run as lifecycle nodes with a standalone launch-file like the one below (the same shape the costmap filters demo from navigation2_tutorials uses for the other filters):

from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node


def generate_launch_description() -> LaunchDescription:
    params_file = LaunchConfiguration('params_file')
    mask_yaml_file = LaunchConfiguration('mask')

    declare_params_file_cmd = DeclareLaunchArgument(
        'params_file',
        description='Full path to the ROS 2 parameters file for both servers')

    declare_mask_yaml_file_cmd = DeclareLaunchArgument(
        'mask',
        description='Full path to filter mask yaml file to load')

    start_filter_mask_server_cmd = Node(
        package='nav2_map_server',
        executable='map_server',
        name='filter_mask_server',
        output='screen',
        parameters=[params_file, {'yaml_filename': mask_yaml_file}])

    start_costmap_filter_info_server_cmd = Node(
        package='nav2_map_server',
        executable='costmap_filter_info_server',
        name='costmap_filter_info_server',
        output='screen',
        parameters=[params_file])

    start_lifecycle_manager_cmd = Node(
        package='nav2_lifecycle_manager',
        executable='lifecycle_manager',
        name='lifecycle_manager_costmap_filters',
        output='screen',
        parameters=[{'use_sim_time': True},
                    {'autostart': True},
                    {'node_names': ['filter_mask_server',
                                    'costmap_filter_info_server']}])

    ld = LaunchDescription()
    ld.add_action(declare_params_file_cmd)
    ld.add_action(declare_mask_yaml_file_cmd)
    ld.add_action(start_filter_mask_server_cmd)
    ld.add_action(start_costmap_filter_info_server_cmd)
    ld.add_action(start_lifecycle_manager_cmd)
    return ld

3. Enable Zone Parameter Filter

Costmap Filters are Costmap2D plugins. You can enable the ZoneParameterFilter plugin by adding zone_params to the filters parameter in nav2_params.yaml. Zone Parameter Filter does not change the costmap values: it only tracks which mask cell the robot stands on and issues parameter updates on state changes. One instance in the global_costmap is enough; a second instance in local_costmap would send every update twice.

The filter configuration consists of three parts: the states, their setpoints and the nominal defaults.

states lists the state names. Each state declares an id - the mask cell value that selects it:

zone_params:
  plugin: "nav2_costmap_2d::ZoneParameterFilter"
  filter_info_topic: "/costmap_filter_info"
  states: ["snow_zone", "work_zone"]
  snow_zone:
    id: 1
  work_zone:
    id: 2

Valid ids are 1 through 255; 0 is reserved for the nominal state. A mask published by Map Server carries values up to 100, so in practice ids stay in that range. Every non-zero value present in the mask must have a state declared for it: the filter treats an undeclared positive value as a configuration error and throws.

Each state declares its setpoints - the parameters to override while its zone is active. A setpoint names the target node, the parameter on that node and the value to set. The value may be of any parameter type: double, integer, boolean, string or list. A setpoint with an empty node or parameter, or with no value, is reported at startup and skipped:

zone_params:
  ...
  snow_zone:
    id: 1
    setpoints: ["slow_fwd", "long_backup"]
    slow_fwd:
      node: "controller_server"
      parameter: "FollowPath.max_vel_x"
      value: 0.15
    long_backup:
      node: "behavior_server"
      parameter: "backup.simulate_ahead_time"
      value: 2.5

nominal_defaults declares the baseline values, in the same node / parameter / value form, that the filter restores when the robot returns to a 0 area or leaves the mask. Each entry lives in the nominal_defaults namespace. Since nominal_defaults is already the name of the list, the entry keys are written in dotted form (nominal_defaults.fwd_speed:): Declare a nominal entry for every parameter your states touch: the filter warns at startup about each state setpoint without a matching entry, and the reset will not restore that parameter:

zone_params:
  ...
  nominal_defaults: ["fwd_speed", "backup_time"]
  nominal_defaults.fwd_speed:
    node: "controller_server"
    parameter: "FollowPath.max_vel_x"
    value: 0.26
  nominal_defaults.backup_time:
    node: "behavior_server"
    parameter: "backup.simulate_ahead_time"
    value: 2.0

The resulting configuration:

global_costmap:
  global_costmap:
    ros__parameters:
      ...
      plugins: ["static_layer", "obstacle_layer", "inflation_layer"]
      filters: ["zone_params"]
      ...
      zone_params:
        plugin: "nav2_costmap_2d::ZoneParameterFilter"
        enabled: True
        filter_info_topic: "/costmap_filter_info"
        states: ["snow_zone", "work_zone"]
        snow_zone:
          id: 1
          setpoints: ["slow_fwd", "long_backup"]
          slow_fwd:
            node: "controller_server"
            parameter: "FollowPath.max_vel_x"
            value: 0.15
          long_backup:
            node: "behavior_server"
            parameter: "backup.simulate_ahead_time"
            value: 2.5
        work_zone:
          id: 2
          setpoints: ["crawl_fwd"]
          crawl_fwd:
            node: "controller_server"
            parameter: "FollowPath.max_vel_x"
            value: 0.10
        nominal_defaults: ["fwd_speed", "backup_time"]
        nominal_defaults.fwd_speed:
          node: "controller_server"
          parameter: "FollowPath.max_vel_x"
          value: 0.26
        nominal_defaults.backup_time:
          node: "behavior_server"
          parameter: "backup.simulate_ahead_time"
          value: 2.0

On a transition between two zones the filter first resets the parameters set by the previous state but not by the new one back to their nominal defaults, then applies the new state’s setpoints, batched per target node. The updates are issued asynchronously, so the costmap update loop is not blocked. An update that fails or is rejected by the target node makes the filter throw instead of continuing silently. Every state change is also published as a std_msgs/UInt8 message on the topic set by the state_event_topic parameter (default: zone_filter_state).

Full list of parameters supported by ZoneParameterFilter are listed at Zone Parameter Filter Parameters page.

4. Run Nav2 stack

Run Nav2 with the modified parameters file:

ros2 launch nav2_bringup tb4_simulation_launch.py params_file:=/path/to/nav2_params.yaml

Then in a second terminal launch both filter servers from step 2:

ros2 launch /path/to/zone_filter_info.launch.py params_file:=/path/to/zone_filter_server_params.yaml mask:=/path/to/depot_zones.yaml

Check the costmap log for the ZoneParameterFilter: Received filter info and ZoneParameterFilter: Received filter mask lines: the filter starts working right after both arrive.

5. Verify zone transitions

Echo the state event topic. The default zone_filter_state name is resolved relative to the costmap’s parent namespace, so in the single-robot setup used here it appears at the root:

ros2 topic echo /zone_filter_state

Set a Nav2 goal in RViz so that the route passes through a painted zone. When the robot enters the snow_zone area, the topic shows data: 1 and the setpoints are applied. Since the updates travel through the target node’s parameter service, they take effect shortly after the transition, not in the same instant:

$ ros2 param get /controller_server FollowPath.max_vel_x
Double value is: 0.15

When the robot drives out to a black area, the topic shows data: 0 and the nominal defaults are restored:

$ ros2 param get /controller_server FollowPath.max_vel_x
Double value is: 0.26

The costmap log follows the transitions as well:

ZoneParameterFilter: Entered state 1 (reset 0 N-only parameter(s); applied 2 parameter(s) across 2 node(s)).
ZoneParameterFilter: Entered state 0 (reset to nominal).

© Copyright 2026, Open Navigation LLC.