Custom BT malfunctions #4862
-
Hello, I created my own BT using already available behavior nodes (updated the nav2_params.yaml file to give the right file) Expected behavior: Gets a set of waypoints, follow the path until the goal is reached. If the system gets a new path (a new set of waypoints) it should be followed only after the current path is completed. I have been trying with various structures but they all update the path immediately. I am not sure whether its an actual bug or a fault in my BT. Kindly advise.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
If new goals are added, those new goals are preempting the existing ones. You should wait to send the new goals to the on-going navigation task until they're completed. You can easily check this from your action client and have a return callback triggered when the current set of points are completed -- to then trigger the next batch. If you want to handle this from the BT, you certainly can, but it will require that you create your own custom BT XML and handle the goal list management yourself. The system is designed to be responsive to changes so that you can dynamically adjust goals on the fly as you go, which is a common need / application. |
Beta Was this translation helpful? Give feedback.
You could do that - there are many options! I leave it to your creative thinking skills for how you'd like to execute on it within your BT :-)
I dont think you need a new blackboard though, just keep the one that's there and add some new goal vector list that is being managed by your custom BT node looking at the current state of the blackboard goal and managing that list. How you choose to manage that list and BT node, is up to your creative logic and what you want your behavior to look like, but it should be pretty straight forward. Then insert it into your BT at the appropriate location (before planning) to adjust the goal blackboard key appropriately