A base class for behaviors which need to send a goal to a ROS action client and wait for a result. If the behavior is halted before the action result is received, the action goal will be canceled.
More...
|
| | ActionClientBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) |
| | Constructs ActionClientBehaviorBase using the RclcppClientInterface.
|
| |
| | ActionClientBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::unique_ptr< ClientInterfaceBase > client_interface) |
| | Constructs ActionClientBehaviorBase using a user-provided implementation of ClientInterfaceBase.
|
| |
| virtual | ~ActionClientBehaviorBase ()=default |
| |
| virtual tl::expected< std::string, std::string > | getActionName ()=0 |
| | User-provided function to get the name of the action when initializing the action client.
|
| |
| virtual tl::expected< std::chrono::duration< double >, std::string > | getResultTimeout () |
| | Optional user-provided function to set the timeout used when waiting for the action result.
|
| |
| virtual tl::expected< typename ActionT::Goal, std::string > | createGoal ()=0 |
| | User-provided function to create the action goal before sending the action goal request.
|
| |
| virtual tl::expected< bool, std::string > | processResult (const std::shared_ptr< typename ActionT::Result >) |
| | Optional user-provided function to process the action result after the action has finished.
|
| |
| virtual void | processFeedback (const std::shared_ptr< const typename ActionT::Feedback >) |
| | Optional user-provided function to process feedback sent by the action server.
|
| |
| virtual std::string | getTimeoutMessage () const |
| | Optional user-provided function to retrieve and surface an error message when a timeout occurs before the goal result is returned.
|
| |
| virtual std::string | getServerUnavailableMessage (const std::string &action_name) const |
| | Optional user-provided function to retrieve and surface an error message when the action server is not available after waiting for the server timeout duration.
|
| |
| virtual std::string | getAbortedMessage (const std::shared_ptr< const typename ActionT::Result >) const |
| | Optional user-provided function to retrieve and surface an error message from an aborted action server result.
|
| |
| | AsyncBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) |
| |
| | ~AsyncBehaviorBase () override=default |
| |
| BT::NodeStatus | onStart () override |
| | Required implementation of BT::StatefulActionNode::onStart().
|
| |
| BT::NodeStatus | onRunning () override |
| | Required implementation of BT::StatefulActionNode::onRunning().
|
| |
| void | onHalted () override |
| | Required implementation of BT::StatefulActionNode::onHalted().
|
| |
| void | resetStatus () |
| | Resets the internal status of this node.
|
| |
| virtual std::shared_future< tl::expected< bool, std::string > > & | getFuture ()=0 |
| | Gets the shared future which is used to monitor the progress of the async process.
|
| |
| void | notifyCanHalt () |
| | Called when runAsync() finishes to notify onHalted() that the async process has finished.
|
| |
| | SharedResourcesNode (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &behavior_context) |
| | Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node.
|
| |
| const std::shared_ptr< BehaviorContext > & | getBehaviorContext () const |
| |
template<
typename ActionT>
class moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >
A base class for behaviors which need to send a goal to a ROS action client and wait for a result. If the behavior is halted before the action result is received, the action goal will be canceled.
Important: If a halt is requested before the action goal request is sent to the action server or before the action goal response has been received from the action server, the behavior will wait to halt until the action goal response has been received then request that the action goal be canceled, and will finally wait until the in-progress action goal has finished.
- Template Parameters
-
| ActionT | ROS action message type used to specialize this class for a specific action |