Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hi all, I am confused by the usage of the requiresWakeUp member function of the TreeNode class and how it used by the different control node types. The Sequence and Fallback nodes use the requiresWakeUp() call along with the member variable async_ to decide whether to return NodeStatus::RUNNING when transitioning from a previous status of NodeStatus::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 sleeping https://www.behaviortree.dev/docs/migration#ticking-in-a-while-loop. Other control nodes use the requiresWakeUp 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 returns NodeStatus::RUNNING when one of its children return NodeStatus::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);
          }

image
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.