Provides an interface to an action client that can handle a single goal at a time.
More...
#include <action_client_behavior_base.hpp>
|
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. More...
|
|
virtual bool | waitForActionServer () const =0 |
| Block until the action server is ready or a timeout is exceeded. More...
|
|
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. More...
|
|
virtual tl::expected< typename ActionClientBehaviorBase::ClientGoalHandle::WrappedResult, std::string > | syncGetResult () const =0 |
| Block until the in-progress action result is received or a timeout is exceeded. More...
|
|
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. More...
|
|
template<typename ActionT>
class moveit_studio::behaviors::ActionClientBehaviorBase< ActionT >::ClientInterfaceBase
Provides an interface to an action client that can handle a single goal at a time.
◆ ~ClientInterfaceBase()
template<typename ActionT >
◆ initialize()
template<typename ActionT >
virtual void moveit_studio::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_name | Action name to use when initializing the client. |
wait_for_server_timeout | Duration to wait for the action server to be available before failing. |
goal_response_timeout | Duration to wait for a goal response before failing. |
goal_result_timeout | Duration to wait for a result before failing. If the duration is negative, wait forever. |
cancel_response_timeout | Duration to wait for a cancel response before failing. |
Implemented in moveit_studio::behaviors::ActionClientBehaviorBase< ActionT >::RclcppClientInterface.
◆ syncCancelGoal()
template<typename ActionT >
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_studio::behaviors::ActionClientBehaviorBase< ActionT >::RclcppClientInterface.
◆ syncGetResult()
template<typename ActionT >
◆ syncSendGoal()
template<typename ActionT >
Send an action goal and block until the goal is accepted or a timeout is exceeded.
- Parameters
-
goal | Action goal message to send to the action server. |
feedback_fn | Function 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_studio::behaviors::ActionClientBehaviorBase< ActionT >::RclcppClientInterface.
◆ waitForActionServer()
template<typename ActionT >
The documentation for this class was generated from the following file: