14 #ifndef BEHAVIORTREECORE_ACTIONNODE_H 15 #define BEHAVIORTREECORE_ACTIONNODE_H 64 virtual void halt() override final
96 TickFunctor tick_functor_;
125 return halt_requested_.load();
131 virtual void halt()
override;
165 void halt()
override final;
176 virtual void onHalted() = 0;
180 #ifndef BT_NO_COROUTINES 198 void setStatusRunningAndYield();
214 void halt()
override;
219 std::unique_ptr<Pimpl>
_p;
The ActionNodeBase is the base class to use to create any kind of action. A particular derived class ...
const std::string & name() const
Name of the instance, not the type.
const NodeConfiguration & config() const
bool isHaltRequested() const
std::atomic_bool halt_requested_
StatefulActionNode(const std::string &name, const NodeConfiguration &config)
The AsyncActionNode uses a different thread, where the action will be executed.
The ActionNode is the goto option for, but it is actually much easier to use correctly.
virtual NodeType type() const overridefinal
The CoroActionNode class is an ideal candidate for asynchronous actions which need to communicate wit...
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...
~ActionNodeBase() override=default
std::unique_ptr< Pimpl > _p
virtual void halt() overridefinal
You don't need to override this.
ActionNodeBase(const std::string &name, const NodeConfiguration &config)
std::function< NodeStatus(TreeNode &)> TickFunctor
The SimpleActionNode provides an easy to use SyncActionNode. The user should simply provide a callbac...
std::exception_ptr exptr_
virtual BT::NodeStatus executeTick()
The method that should be used to invoke tick() and setStatus();.
AsyncActionNode(const std::string &name, const NodeConfiguration &config)
NodeType
Enumerates the possible types of nodes.
std::future< NodeStatus > thread_handle_
virtual BT::NodeStatus tick()=0
Method to be implemented by the user.
void setStatus(NodeStatus new_status)