13 #include <gtest/gtest.h> 30 : root(
"root_sequence")
31 , action_1(
"action_1")
32 , condition_1(
"condition_1")
33 , condition_2(
"condition_2")
34 , fal_conditions(
"fallback_conditions")
38 fal_conditions.
addChild(&condition_1);
39 fal_conditions.
addChild(&condition_2);
58 ASSERT_EQ(NodeStatus::RUNNING, state);
72 ASSERT_EQ(NodeStatus::RUNNING, state);
79 int main(
int argc,
char** argv)
81 testing::InitGoogleTest(&argc, argv);
82 return RUN_ALL_TESTS();
BT::ConditionTestNode condition_2
BT::ConditionTestNode condition_1
BT::FallbackNode fal_conditions
void setBoolean(bool boolean_value)
void haltAllActions(TreeNode *root_node)
int main(int argc, char **argv)
void addChild(TreeNode *child)
NodeStatus status() const
virtual BT::NodeStatus executeTick()
The method that will be executed to invoke tick(); and setStatus();.
The FallbackNode is used to try different strategies, until one succeed. If any child returns RUNNING...
The SequenceNode is used to execute a sequence of children. If any child returns RUNNING, previous children will be ticked again.
TEST_F(BehaviorTreeTest, Condition1ToFalseCondition2True)
BT::AsyncActionTest action_1