9 BT::ReturnStatus
Tick();
17 std::cout <<
"The Condition is true" << std::endl;
19 return NodeStatus::SUCCESS;
27 BT::ReturnStatus
Tick();
36 std::cout <<
"The Action is doing some operations" << std::endl;
37 std::this_thread::sleep_for(std::chrono::milliseconds(500));
40 return NodeStatus::IDLE;
43 std::cout <<
"The Action is doing some others operations" << std::endl;
44 std::this_thread::sleep_for(std::chrono::milliseconds(500));
47 return NodeStatus::IDLE;
50 std::cout <<
"The Action is doing more operations" << std::endl;
51 std::this_thread::sleep_for(std::chrono::milliseconds(500));
54 return NodeStatus::IDLE;
57 std::cout <<
"The Action has succeeded" << std::endl;
58 return NodeStatus::SUCCESS;
64 int main(
int argc,
char* argv[])
69 int tick_time_milliseconds = 1000;
71 seq->AddChild(my_con_1);
72 seq->AddChild(my_act_1);
74 Execute(seq, tick_time_milliseconds);
MyAction(const std::string &name)
ConditionNode(const std::string &name, const NodeConfiguration &config)
MyCondition(const std::string &name)
const std::string & name() const
Name of the instance, not the type.
int main(int argc, char *argv[])
The SequenceNode is used to tick children in an ordered sequence. If any child returns RUNNING...