13 #include <gtest/gtest.h> 19 using std::chrono::milliseconds;
31 : root(
"root_sequence")
32 , action_1(
"action_1", milliseconds(100) )
33 , condition_1(
"condition_1")
34 , condition_2(
"condition_2")
35 , fal_conditions(
"fallback_conditions")
39 fal_conditions.
addChild(&condition_1);
40 fal_conditions.
addChild(&condition_2);
59 ASSERT_EQ(NodeStatus::RUNNING, state);
73 ASSERT_EQ(NodeStatus::RUNNING, state);
80 int main(
int argc,
char** argv)
82 testing::InitGoogleTest(&argc, argv);
83 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)
The method used to add nodes to the children vector.
NodeStatus status() const
virtual BT::NodeStatus executeTick()
The method that should be used to invoke tick() and setStatus();.
The FallbackNode is used to try different strategies, until one succeeds. If any child returns RUNNIN...
The SequenceNode is used to tick children in an ordered sequence. If any child returns RUNNING...
TEST_F(BehaviorTreeTest, Condition1ToFalseCondition2True)
BT::AsyncActionTest action_1