-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Feature request
Feature description
I would like to open a discussion (or continue the one in #1748) about how the users of Navigation2 can select the desired robot's behavior during operation. This behavior is coded by the BTs XML file and selected in nav2_params.yaml.
By now, we consider navigating is going from point A to point B (or patrol several points, but it is the same function), and finish the navigation. #1748 is different. It uses navigation to follow a dynamic point to a certain distance, and this is not going from A to B and finish. Using Navigation2 instead of a reactive behavior provides a way to create paths and to avoid obstacles, using all the algorithms that we are developing in this repo. My approach in #1748 is using a different BT for navigating, composing the necessary nodes to accomplish this task.
Navigation2 users could need to change the navigation behavior during robot operation. For example:
- Navigate from the entrance to the living-room.
- Following a dynamic goal for 1 minute.
- Return to entrance.
I believe that the difference is the BT used to navigate. BT in 1 and 3 is different from 2. How could the Navigation2 user do this at runtime? My opinion is that this may be done by selecting in NavigateToPoseAction the BT that should be used to navigate.
Implementation considerations
-
Changes in NavigateToPose.action to include a field
string behavior_treeor something like that in the request field. If it is void, the use the BT by default. -
Use a list of BTs, in the similar way as plugins (the first could be the BT by default):
bt_xml_filenames: ["navigate_w_replanning_and_recovery.xml", "dynamic_goal.xml"]
bt_ids: ["default", "dynamic_goal"]
- In
bt_navigatormake the callbt_->buildTreeFromText(..)innavigateToPosemethod if the selected BT changes.