MoveIt Pro API
Core Behaviors for MoveIt Pro
Loading...
Searching...
No Matches
moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::ClientInterfaceBase Class Referenceabstract

Provides an interface to an action client that can handle a single goal at a time. More...

#include <action_client_behavior_base.hpp>

Inheritance diagram for moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::ClientInterfaceBase:

Public Member Functions

virtual ~ClientInterfaceBase ()=default
 
virtual void initialize (const std::string &action_name, std::chrono::duration< double > wait_for_server_timeout, std::chrono::duration< double > goal_response_timeout, std::chrono::duration< double > goal_result_timeout, std::chrono::duration< double > cancel_response_timeout)=0
 Initialize the action client.
 
virtual bool waitForActionServer () const =0
 Block until the action server is ready or a timeout is exceeded.
 
virtual tl::expected< void, std::string > syncSendGoal (const typename ActionT::Goal &goal, typename ClientGoalHandle::FeedbackCallback feedback_fn)=0
 Send an action goal and block until the goal is accepted or a timeout is exceeded.
 
virtual tl::expected< typename ActionClientBehaviorBase::ClientGoalHandle::WrappedResult, std::string > syncGetResult (const std::string &timeout_message) const =0
 Block until the in-progress action result is received or a timeout is exceeded.
 
virtual tl::expected< std::shared_ptr< typename ActionT::Impl::CancelGoalService::Response >, std::string > syncCancelGoal () const =0
 Send a request to cancel an in-progress action goal and block until the cancellation request is accepted or a timeout is exceeded.
 

Detailed Description

template<typename ActionT>
class moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::ClientInterfaceBase

Provides an interface to an action client that can handle a single goal at a time.

Constructor & Destructor Documentation

◆ ~ClientInterfaceBase()

template<typename ActionT >
virtual moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::ClientInterfaceBase::~ClientInterfaceBase ( )
virtualdefault

Member Function Documentation

◆ initialize()

template<typename ActionT >
virtual void moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::ClientInterfaceBase::initialize ( const std::string &  action_name,
std::chrono::duration< double wait_for_server_timeout,
std::chrono::duration< double goal_response_timeout,
std::chrono::duration< double goal_result_timeout,
std::chrono::duration< double cancel_response_timeout 
)
pure virtual

Initialize the action client.

Parameters
action_nameAction name to use when initializing the client.
wait_for_server_timeoutDuration to wait for the action server to be available before failing.
goal_response_timeoutDuration to wait for a goal response before failing.
goal_result_timeoutDuration to wait for a result before failing. If the duration is negative, wait forever.
cancel_response_timeoutDuration to wait for a cancel response before failing.

Implemented in moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::RclcppClientInterface.

◆ syncCancelGoal()

template<typename ActionT >
virtual tl::expected< std::shared_ptr< typename ActionT::Impl::CancelGoalService::Response >, std::string > moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::ClientInterfaceBase::syncCancelGoal ( ) const
pure virtual

Send a request to cancel an in-progress action goal and block until the cancellation request is accepted or a timeout is exceeded.

Returns
If a cancel response was received, return the cancel response message. If the timeout limit was reached or if the action goal could not be canceled, return an error result describing the failure.

Implemented in moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::RclcppClientInterface.

◆ syncGetResult()

template<typename ActionT >
virtual tl::expected< typename ActionClientBehaviorBase::ClientGoalHandle::WrappedResult, std::string > moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::ClientInterfaceBase::syncGetResult ( const std::string &  timeout_message) const
pure virtual

Block until the in-progress action result is received or a timeout is exceeded.

Parameters
timeout_messageThe error message to surface if a timeout is reached before a goal result is returned.
Returns
If an action result was received, return the WrappedResult received from the action server. If the timeout limits was reached before the WrappedResult was received, return an error result.

Implemented in moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::RclcppClientInterface.

◆ syncSendGoal()

template<typename ActionT >
virtual tl::expected< void, std::string > moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::ClientInterfaceBase::syncSendGoal ( const typename ActionT::Goal &  goal,
typename ClientGoalHandle::FeedbackCallback  feedback_fn 
)
pure virtual

Send an action goal and block until the goal is accepted or a timeout is exceeded.

Parameters
goalAction goal message to send to the action server.
feedback_fnFunction to execute when the action goal handle received feedback from the server during execution.
Returns
If successful, return void. If the goal request failed to send or timed out before the goal response was received, return an error result describing the failure.

Implemented in moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::RclcppClientInterface.

◆ waitForActionServer()

template<typename ActionT >
virtual bool moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::ClientInterfaceBase::waitForActionServer ( ) const
pure virtual

Block until the action server is ready or a timeout is exceeded.

Returns
True if the action server was found to be available before the timeout. False if it was not.

Implemented in moveit_pro::behaviors::ActionClientBehaviorBase< ActionT >::RclcppClientInterface.


The documentation for this class was generated from the following file: