33 using std::chrono::high_resolution_clock;
36 auto initial_time = high_resolution_clock::now();
38 while (!
stop_loop_ && high_resolution_clock::now() < initial_time +
time_)
40 std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::atomic_bool boolean_value_
SyncActionTest(const std::string &name)
const std::string & name() const
Name of the instance, not the type.
AsyncActionTest(const std::string &name, BT::Duration deadline_ms)
The AsyncActionNode uses a different thread where the action will be executed.
void setBoolean(bool boolean_value)
virtual void halt() override
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...
std::atomic< int > tick_count_
void setTime(BT::Duration time)
BT::NodeStatus tick() override
Method to be implemented by the user.
std::atomic_bool stop_loop_
void setBoolean(bool boolean_value)
BT::NodeStatus tick() override
Method to be implemented by the user.
std::chrono::high_resolution_clock::duration Duration