personalrobotics / ada_feeding

Robot-assisted feeding demos and projects for the ADA robot
4 stars 4 forks source link

ActionServerBT Overhaul and Add Static TF Object #114

Closed egordon closed 1 year ago

egordon commented 1 year ago

Description

As a pre-cursor to the overhaul of the MoveIt2 behaviors, this PR does a smaller overhaul of ActionServerBT (ASBT)

The key idea is that a given ASBT object should act as a generator, where create_tree can be called numerous times with different names and get logically distinct trees. This tree creation should be entirely independent of the action server logic so that it can be used for sub-trees.

Additionally, send_goal, get_result, and get_feedback should be able to be called on any result of create_tree in order to populate / read from the tree's data to implement the action server logic.

Individual behaviors should get their ROS2 Node from setup (as per #105), but the node is currently passed to the ASBT in __init__ in order to:

  1. Be used in all the AS logic (send_goal, get_result, and get_feedback; likely just for the node clock)
  2. Be used in create_tree to handle only behaviors that don't yet get their ROS node in setup.

Once #105 is solved, it may make sense to remove node from init and pass it directly to the AS functions, but I don't think that's necessary.

Testing procedure

Before opening a pull request

Before Merging