The CoroActionNode class is an ideal candidate for asynchronous actions which need to communicate with a service provider using an asynch request/reply interface (being a notable example ActionLib in ROS, MoveIt clients or move_base clients). More...
#include <action_node.h>
Classes | |
struct | Pimpl |
Public Member Functions | |
CoroActionNode (const std::string &name, const NodeParameters ¶meters=NodeParameters()) | |
virtual NodeStatus | executeTick () override final |
The method that will be executed to invoke tick(); and setStatus();. | |
void | halt () override |
void | setStatusRunningAndYield () |
virtual | ~CoroActionNode () override |
Protected Attributes | |
std::unique_ptr< Pimpl > | _p |
The CoroActionNode class is an ideal candidate for asynchronous actions which need to communicate with a service provider using an asynch request/reply interface (being a notable example ActionLib in ROS, MoveIt clients or move_base clients).
It is up to the user to decide when to suspend execution of the behaviorTree invoking the method setStatusRunningAndYield().
Definition at line 158 of file action_node.h.
BT::CoroActionNode::CoroActionNode | ( | const std::string & | name, |
const NodeParameters & | parameters = NodeParameters() |
||
) |
Definition at line 128 of file action_node.cpp.
BT::CoroActionNode::~CoroActionNode | ( | ) | [override, virtual] |
Definition at line 135 of file action_node.cpp.
NodeStatus BT::CoroActionNode::executeTick | ( | ) | [override, virtual] |
The method that will be executed to invoke tick(); and setStatus();.
Reimplemented from BT::ActionNodeBase.
Definition at line 146 of file action_node.cpp.
void BT::CoroActionNode::halt | ( | ) | [override, virtual] |
You may want to override this method. But still, call remember to call this implementation too.
Example:
void MyAction::halt() { // do your stuff here CoroActionNode::halt(); }
Implements BT::TreeNode.
Reimplemented in FollowPath, and MyAsyncAction.
Definition at line 167 of file action_node.cpp.
When you want to return RUNNING and temporary "pause" the Action, use this method.
Definition at line 140 of file action_node.cpp.
std::unique_ptr<Pimpl> BT::CoroActionNode::_p [protected] |
Definition at line 188 of file action_node.h.