[Nav2] New Navigator Plugin Types


Your friendly neighborhood navigator here - happy new year! To celebrate the passing of another year, why not add another type of plugin?

Thus, I’m happy to announce that we’ve pluginized the BT Navigator server to allow users to define their own custom navigation interfaces (in addition to the currently provided navigate to pose and navigate through poses)! Deriving from the new nav2_core::BehaviorTreeNavigator class, your plugin will be templated by the action interface definition of interest. The plugin itself is required to fill in a couple of functions which serve to setup the navigator, extract information from navigation requests, populate information for action feedback or results, and a few other necessary bells and whistles.

This is a bit more involved than the other plugin types with some more subtle explanations required, so I’ve also added a new tutorial alongside the release to help. It is important to note that the navigators are used to customize the action interface to use to communicate with the behavior tree (e.g. if you have additional fields of interest your navigation system needs to know about from the client) not to customize the navigation behavior itself. That continues to be handled at the Behavior Tree XML level!


While there are generally no restrictions on what the message must contain, I highly encourage all navigation custom action interfaces to include a string behavior_tree field as a standard. You can see the navigator plugin types populated on our website and find the new navigators parameter field within BT Navigator for loading and utilizing your custom navigators.


Happy custom-actioning,



That’s a great idea, we’ve actually needed that and had already implemented navigators as plugins.
It’s cool that this is now part of the nav2 stack.

Nice! We also hacked our way into achieving the same. Any plans to backport this to Humble?

This cannot be backported as it majorly changes the class structures and locations of methods (and namespaces).

1 Like

I managed to make it work under Humble without too much effort. Start from the last Humble sync and cherry pick from main the relevant commits

1 Like