ROS2 Nav2 stack change planner (local and global)

Hey Community :slight_smile: ,

In the /opt/ros/foxy/nav2_bringup/params, i found the nav2_params.yaml file. In the section controller_server, the plugin is set to dwb_core::DWBLocalPlanner. So, i guess the default local planner is dwb?

I want to change the local planner to teb or to another planner (SmacPlanner2D). what steps are necessary to change the local planner?

I would be grateful for any help

Hi @Nartmangnourt ,

Welcome to this Community!

I believe SmacPlanner2D is a planner and not a controller. DWBLocalPlanner is a controller. You cannot use a global planner on a local planner. That would not work.

Also, I am not sure if TEB is available for ROS2.

Check this page to know more: Configuration Guide — Navigation 2 1.0.0 documentation

If you still need help, let me know.


1 Like

Hey Girish,

first i would like to thank you for your help.
I really appreciate it :slight_smile:
Sorry for the confusion. I thought controller and local planner are the same thing.
Do you have an approach to change the local and global planner or do you know where i can change it ?
I guess there are more planner provided from the nav2 stack or do i have to create a planner by myself?

Thank you very much in advance !

Hi @Nartmangnourt ,

Yes, controller and local planner are the same. planner and global planner are the same.
local planner is not the same as global planner. planner is not the same as controller.
planner in ROS2 is global planner. controller in ROS2 is local planner. I hope now you are clear.

I believe there are 3 types of planners and 4 types of controllers currently in ROS2 Nav Stack.
And I am sure that you cannot use all of them on one type of robot. It may not be efficient.
If you want to create a planner or controller yourself, sure you can do so, but you need quite some knowledge on how to package it for ROS(1/2) nav stack.


1 Like

Thank you for your answer Girish :slight_smile: