9 BT::ReturnStatus
Tick();
18 std::cout <<
"The Condition is true" << std::endl;
20 return NodeStatus::SUCCESS;
28 BT::ReturnStatus
Tick();
38 std::cout <<
"The Action is doing some operations" << std::endl;
39 std::this_thread::sleep_for(std::chrono::milliseconds(500));
42 return NodeStatus::IDLE;
45 std::cout <<
"The Action is doing some others operations" << std::endl;
46 std::this_thread::sleep_for(std::chrono::milliseconds(500));
49 return NodeStatus::IDLE;
52 std::cout <<
"The Action is doing more operations" << std::endl;
53 std::this_thread::sleep_for(std::chrono::milliseconds(500));
56 return NodeStatus::IDLE;
59 std::cout <<
"The Action has succeeded" << std::endl;
60 return NodeStatus::SUCCESS;
67 int main(
int argc,
char* argv[])
72 int tick_time_milliseconds = 1000;
74 seq->AddChild(my_con_1);
75 seq->AddChild(my_act_1);
77 Execute(seq, tick_time_milliseconds);
const std::string & name() const
Name of the instance, not the type.
MyAction(const std::string &name)
ConditionNode(const std::string &name, const NodeConfiguration &config)
MyCondition(const std::string &name)
int main(int argc, char *argv[])
The SequenceNode is used to tick children in an ordered sequence. If any child returns RUNNING...