24 while (!stop_loop_ && i++ < time_)
26 std::this_thread::sleep_for(std::chrono::milliseconds(100));
31 virtual void halt()
override 59 std::cout << count++ <<
" : " << root.
status() <<
" / " << action1.
status() <<
" / " 60 << action2.
status() << std::endl;
62 std::this_thread::sleep_for(std::chrono::milliseconds(100));
std::atomic_bool stop_loop_
virtual void halt() override
The method used to interrupt the execution of a RUNNING node.
The AsyncActionNode a different thread where the action will be executed.
NodeStatus tick() override
Method to be implemented by the user.
void haltAllActions(TreeNode *root_node)
static volatile int count
The SimpleActionNode provides an easy to use ActionNode. The user should simply provide a callback wi...
void addChild(TreeNode *child)
NodeStatus status() const
ActionTestNode(const std::string &name)
virtual BT::NodeStatus executeTick()
The method that will be executed to invoke tick(); and setStatus();.
The SequenceNode is used to execute a sequence of children. If any child returns RUNNING, previous children will be ticked again.