Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77d2aa7 commit 22c6350Copy full SHA for 22c6350
include/behaviortree_cpp/decorators/blackboard_precondition.h
@@ -70,9 +70,18 @@ NodeStatus BlackboardPreconditionNode<T>::tick()
70
bool same = ( getParam("expected", expected_value) &&
71
blackboard()->get(key, current_value) &&
72
current_value == expected_value ) ;
73
+ if(same)
74
+ {
75
+ return child_node_->executeTick();
76
+ }
77
+ else{
78
+ if( child()->status() == NodeStatus::RUNNING)
79
80
+ haltChild();
81
82
+ return NodeStatus::FAILURE;
83
84
- return same ? child_node_->executeTick() :
- NodeStatus::FAILURE;
85
}
86
87
0 commit comments