Some trees make changes (e.g., allowing certain collisions, toggling perception nodes on) that should be undone when the tree ends. The tree can end in a couple of circumstances:
- Tree succeeds: The tree should be designed in such a way that all behaviors necessary to undo the changes are taken care of if the tree succeeds.
- Tree fails: In this case, we can add a selector with memory to run certain cleanup behaviors after failure.
- ROS action fails or is aborted: In this case, we need a cleanup function in
create_action_servers.py
that cleans up any state from the action.
This Issue is to implement #3.