The CoroActionNode class is an ideal candidate for asynchronous actions which need to communicate with an external service using an asynch request/reply interface (being notable examples 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 NodeConfiguration &config) | |
virtual NodeStatus | executeTick () override final |
The method that should be used to invoke tick() and setStatus();. | |
void | halt () override |
void | setStatusRunningAndYield () |
Use this method to return RUNNING and temporary "pause" the Action. | |
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 an external service using an asynch request/reply interface (being notable examples ActionLib in ROS, MoveIt clients or move_base clients).
It is up to the user to decide when to suspend execution of the Action and resume the parent node, invoking the method setStatusRunningAndYield().
Definition at line 147 of file action_node.h.
BT::CoroActionNode::CoroActionNode | ( | const std::string & | name, |
const NodeConfiguration & | config | ||
) |
Definition at line 148 of file action_node.cpp.
BT::CoroActionNode::~CoroActionNode | ( | ) | [override, virtual] |
Definition at line 157 of file action_node.cpp.
NodeStatus BT::CoroActionNode::executeTick | ( | ) | [override, virtual] |
The method that should be used to invoke tick() and setStatus();.
Reimplemented from BT::TreeNode.
Definition at line 171 of file action_node.cpp.
void BT::CoroActionNode::halt | ( | ) | [override, virtual] |
You may want to override this method. But still, remember to call this implementation too.
Example:
void MyAction::halt() { // do your stuff here CoroActionNode::halt(); }
Implements BT::TreeNode.
Reimplemented in FollowPath, and SimpleCoroAction.
Definition at line 201 of file action_node.cpp.
Use this method to return RUNNING and temporary "pause" the Action.
Definition at line 165 of file action_node.cpp.
std::unique_ptr<Pimpl> BT::CoroActionNode::_p [protected] |
Definition at line 175 of file action_node.h.