Skip to main content
Version: 7

Nav2 Setup Guide

MoveIt Pro has built-in support to interface with Nav2, primarily via Behaviors that can invoke the NavigateToPose and NavigateThroughPoses Nav2 actions.

This how-to guide provides the most straightforward method of updating your MoveIt Pro config to be able to interface with Nav2.

1. Update the package.xml for your MoveIt Pro config

To get access to the Nav2 packages, the easiest way is to update the package.xml file of your MoveIt Pro config such that the packages are installed when rosdep is run.

This can be done by adding the following to the config's package.xml file:

<depend>nav2_bringup</depend>

The nav2_bringup package is an example bringup system for Nav2 applications. Adding this dependency to the package.xml file will also transitively install navigation2 packages when rosdep is run.

Your MoveIt Pro images will need to be rebuilt after this step, using moveit_pro build.

2. Update the config.yaml file to include Nav2 Behaviors

To get access to the NavigateToPose and NavigateThroughPoses Behaviors, the config.yaml file needs to be updated such that the MoveIt Pro Behaviors that interface with Nav2 are loaded. This is done by adding the following to config.yaml:

objectives:
behavior_loader_plugins:
core:
- "moveit_studio::behaviors::NavBehaviorsLoader"

3. Launch Nav2 processes from the robot_driver_persist_launch_file

MoveIt Pro can be configured to launch specific processes at runtime using robot driver and launch files. More information on those launch files can be found here.

These robot_driver_persist_launch_file and simulated_robot_driver_persist_launch_file are intended to launch processes which are expected to stay active the entire time MoveIt Pro is running such as the Nav2 localization and navigation stacks. The localization_launch.py and navigation_launch.py file in the nav2_bringup/launch directory can be used as a reference on how to launch the Nav2 localization and navigation stacks.

4. Add Nav2 specific configuration files to the MoveIt Pro config

More information on how to setup Nav2 can be found in the Nav2 documentation.

Your MoveIt Pro config should now be setup to use Nav2!