-
Notifications
You must be signed in to change notification settings - Fork 785
Closed
Description
Hi,
I am using a ReactiveSequence with _skipIf preconditions on the children, and it throws:
terminate called after throwing an instance of 'BT::LogicError'
what(): ReactiveSequence is not supposed to reach this point
Looking at the code
BehaviorTree.CPP/src/controls/reactive_sequence.cpp
Lines 54 to 72 in 109eccd
| case NodeStatus::SKIPPED: { | |
| // node skipped | |
| } | |
| break; | |
| case NodeStatus::IDLE: { | |
| throw LogicError("[", name(), "]: A children should not return IDLE"); | |
| } | |
| } // end switch | |
| } //end for | |
| if (success_count == childrenCount()) | |
| { | |
| resetChildren(); | |
| // Skip if ALL the nodes have been skipped | |
| return status() == (NodeStatus::RUNNING) ? NodeStatus::SUCCESS : NodeStatus::SKIPPED; | |
| } | |
| throw LogicError("ReactiveSequence is not supposed to reach this point"); |
it seems that this happens because if a children is SKIPPED the success_count is not increased, neither the method returns, ending in the throw. Am I right?
I can provide simple example if necessary to replicate this
Metadata
Metadata
Assignees
Labels
No labels