Go to the documentation of this file.
27 using std::chrono::high_resolution_clock;
30 auto initial_time = high_resolution_clock::now();
33 while (!isHaltRequested() && high_resolution_clock::now() < initial_time + time_)
35 std::this_thread::sleep_for(std::chrono::milliseconds(1));
39 if (isHaltRequested())
53 return expected_result_;
69 expected_result_ = res;
83 return expected_result_;
88 expected_result_ = res;
The AsyncActionNode uses a different thread, where the action will be executed.
SyncActionTest(const std::string &name)
void setExpectedResult(NodeStatus res)
std::chrono::high_resolution_clock::duration Duration
void setExpectedResult(NodeStatus res)
void setTime(BT::Duration time)
BT::NodeStatus tick() override
Method to be implemented by the user.
AsyncActionTest(const std::string &name, BT::Duration deadline_ms=std::chrono::milliseconds(100))
virtual void halt() override
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...
virtual void halt() override
BT::NodeStatus tick() override
Method to be implemented by the user.
behaviortree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Wed Jun 26 2024 02:51:19