14 #ifndef BEHAVIORTREECORE_ACTIONNODE_H 15 #define BEHAVIORTREECORE_ACTIONNODE_H 62 virtual void halt() override final
92 TickFunctor tick_functor_;
118 ActionNodeBase(name, config)
123 return halt_requested_.load();
129 virtual void halt()
override;
163 void halt()
override final;
174 virtual void onHalted() = 0;
177 #ifndef BT_NO_COROUTINES 193 void setStatusRunningAndYield();
209 void halt()
override;
213 std::unique_ptr<Pimpl>
_p;
The ActionNodeBase is the base class to use to create any kind of action. A particular derived class ...
virtual void halt() override final
You don't need to override this.
const NodeConfiguration & config() const
std::atomic_bool halt_requested_
StatefulActionNode(const std::string &name, const NodeConfiguration &config)
static pthread_mutex_t mutex
bool isHaltRequested() const
The AsyncActionNode uses a different thread, where the action will be executed.
The ActionNode is the prefered way to implement asynchronous Actions. It is actually easier to use co...
The CoroActionNode class is an a good candidate for asynchronous actions which need to communicate wi...
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...
~ActionNodeBase() override=default
const std::string & name() const
Name of the instance, not the type.
std::unique_ptr< Pimpl > _p
ActionNodeBase(const std::string &name, const NodeConfiguration &config)
std::future< void > thread_handle_
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.
virtual BT::NodeStatus tick()=0
Method to be implemented by the user.
virtual NodeType type() const override final