-
Notifications
You must be signed in to change notification settings - Fork 785
Description
If there is a better place to ask this, please tell me! I just wanted to make sure my understanding of how behavior trees should be structured.
-
If i have a robot driver that is threadsafe and async, I think this fits the requirements of BTs well (non blocking). But should i create a new node class for each function like is_enabled, move_to_pose, set_velocity_limit? AFAICT this is the recommended way through inheritance.
-
Related to this, how do i pass the robot driver object to the node class? Should I instantiate it and do the setup before setting up the BT and then just save it on the blackboard and use input ports? Same for stuff like the logger object or any config that i need for the implementation.
-
For setting the desired pose, i.e. requesting a movement, this is my current approach: i define an action in the XML file, and set desired_pose="{desired_pose}" which then needs to be updated on the blackboard before the movement by another node. Is that correct?
-
Assuming that is true, I have a tree with a few subtrees, lets assume its just a pick and place task but with 4 slots so 4 different pick and place poses. Is the proper way of doing it to just write the BT with desired_pose="{pick_pose}", desired_pose="{place_pose}", and then have a node before that update all required variables on the blackboard by popping elements off a queue that was initialized at startup?