Ask Your Question

nav2: changing controller plugins manually during runtime

asked 2020-11-25 00:05:54 -0500

Divyanshu gravatar image

updated 2020-11-25 03:06:50 -0500

gvdhoorn gravatar image

I have created a controller plugin by following the tutorial and it is working as expected. I now have two controller plugins (The DWB controller present by default and the controller plugin I created) which are loaded at runtime and I can use those plugins in my behaviour tree as per my requirements.

My question is: Is there a way in which I can I change the controller plugin during runtime manually if the need arises? If yes then How?

I am using Ubuntu 20.04 with ROS2 Foxy

Thanks for the help in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-11-25 13:21:28 -0500

In Nav2, you can have N different plugins in the controller server, rather than just 1. So you can load both of your plugins to use in the controller server and have them individually callable by their "name" namespace using the BT nodes for follow path. There's a controller_id field that defaults to the default ID we assign in the controller server, but that can be set to a different value in the section of the behavior tree that requires another controller.

edit flag offensive delete link more


Is there any tutorial or sample package from which one can learn? Specifically for beginners of Nav2.

prince gravatar image prince  ( 2020-12-16 23:12:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-11-25 00:05:54 -0500

Seen: 72 times

Last updated: Nov 25 '20