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));
53 return expected_result_;
69 expected_result_ = res;
83 return expected_result_;
88 expected_result_ = res;
SyncActionTest(const std::string &name)
std::chrono::high_resolution_clock::duration Duration
void setExpectedResult(NodeStatus res)
void setExpectedResult(NodeStatus res)
void setTime(BT::Duration time)
BT::NodeStatus tick() override
Method to be implemented by the user.
virtual void halt() override
AsyncActionTest(const std::string &name, BT::Duration deadline_ms=std::chrono::milliseconds(100))
The ThreadedAction executes the tick in a different thread.
virtual void halt() override
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...
BT::NodeStatus tick() override
Method to be implemented by the user.