-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Steps to reproduce issue
Expected behavior
1- If the first child of the RecoveryNode fails, I would expect the second child to be ticked after the specified bt_loop_duration (aka at the next tick).
2- If the second child of the RecoveryNode succeeds (after the first child failed), I would expect the first child to be (re)ticked after the specified bt_loop_duration (aka at the next tick).
Actual behavior
In both cases 1 and 2, the next child is ticked immediately (at the next iteration of the internal while loop)
Generalization
Both Nav2's (e.g. RecoveryNode, PipelineSequence, RoundRobinNode) and BT.CPP's non-leaf nodes do not return RUNNING after their children reach a terminal state (e.g SUCCESS, FAILURE); they directly tick the next child according to their control logic.
I don't have any theoretical proof but I feel like control nodes should not have their independent logic to execute children multiple times at their own rate; they should instead be saving a certain state (in the case of RecoveryNode that's with current_child_idx_) and executing according to it only at the next top-level tick. @facontidavide is this the philosophy you follow?