Closed ZhipengZhang-flexiv closed 1 year ago
Well, say for example you're running this under a "Parallel" or "Reactive Sequence" control node. If something else fails and causes the stateful action node to terminate early (i.e., while it's still RUNNING), then the onHalted()
method will kick in to do any cleanup.
I would point you to the BehaviorTree.CPP documentation : https://www.behaviortree.dev/docs/tutorial-basics/tutorial_04_sequence
I rewrote the example of t04 according to your prompt, and it did work. Thank you
I am confused about when and how this onHalted() method will be called. In BT source code the comment said that "callback to execute if the action was aborted by another node." But how can I implement that?I mean how can I abort a running statefulActionNode using another custom node? Thanks!