Hi all, I am confused by the usage of therequiresWakeUp member function of theTreeNode class and how it used by the different control node types. TheSequence andFallback nodes use therequiresWakeUp() call along with the member variableasync_ to decide whether to returnNodeStatus::RUNNING when transitioning from a previous status ofNodeStatus::IDLE to a terminal status (i.e. failure for a sequence and success for a fallback). I believe this is done to support better reactivity to respond to events while the tree is sleepinghttps://www.behaviortree.dev/docs/migration#ticking-in-a-while-loop. Other control nodes use therequiresWakeUp check without also checking theasync_ member. Is this because they are not called on status transitions that halt execution of the parent? I am using a sequence with memory node on the left hand side of a reactive fallback as part of a complex condition check in the PPA (Postcondition, Precondition, Action) framework. On the right hand side of the reactive fallback I have a long running task that I would like to keep running until the postcondition is true. The problem is the sequence with memory returnsNodeStatus::RUNNING when one of its children returnNodeStatus::SUCCESS. This in turn causes the reactive fallback to halt all children other than the branch that returned running thereby canceling my long running task. Should the reactive fallback really cancel all children and not simply all previous children as suggested by the code comment shown below (from the Reactive Fallback source code)? I believe this also relates to the suggestion here#954. // reset the previous children, to make sure that they are // in IDLE state the next time we tick them for(size_t i = 0; i < childrenCount(); i++) { if(i != index) { haltChild(i); }
 |