The SimpleActionNode provides an easy to use SyncActionNode. The user should simply provide a callback with this signature. More...
#include <action_node.h>

Public Types | |
| typedef std::function < NodeStatus(TreeNode &)> | TickFunctor |
Public Member Functions | |
| SimpleActionNode (const std::string &name, TickFunctor tick_functor, const NodeConfiguration &config) | |
| ~SimpleActionNode () override | |
Protected Member Functions | |
| virtual NodeStatus | tick () override final |
| Method to be implemented by the user. | |
Protected Attributes | |
| TickFunctor | tick_functor_ |
The SimpleActionNode provides an easy to use SyncActionNode. The user should simply provide a callback with this signature.
BT::NodeStatus functionName(TreeNode&)
This avoids the hassle of inheriting from a ActionNode.
Using lambdas or std::bind it is easy to pass a pointer to a method. SimpleActionNode is executed synchronously and does not support halting. NodeParameters aren't supported.
Definition at line 81 of file action_node.h.
| typedef std::function<NodeStatus(TreeNode&)> BT::SimpleActionNode::TickFunctor |
Definition at line 84 of file action_node.h.
| BT::SimpleActionNode::SimpleActionNode | ( | const std::string & | name, |
| SimpleActionNode::TickFunctor | tick_functor, | ||
| const NodeConfiguration & | config | ||
| ) |
Definition at line 27 of file action_node.cpp.
| BT::SimpleActionNode::~SimpleActionNode | ( | ) | [override] |
| NodeStatus BT::SimpleActionNode::tick | ( | ) | [override, protected, virtual] |
Method to be implemented by the user.
Implements BT::TreeNode.
Definition at line 34 of file action_node.cpp.
TickFunctor BT::SimpleActionNode::tick_functor_ [protected] |
Definition at line 95 of file action_node.h.