ClientInterfaceBase Class
Provides an interface to an action client that can handle a single goal at a time. More...
Declaration
Included Headers
Derived Classes
| class | RclcppClientInterface |
|
Implements ClientInterfaceBase for the rclcpp action client. More... | |
Public Destructor Index
| ~ClientInterfaceBase ()=default | |
Public Member Functions Index
| 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... | |
| bool | waitForActionServer () const =0 |
|
Block until the action server is ready or a timeout is exceeded. More... | |
| 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... | |
| 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. More... | |
| 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... | |
Description
Provides an interface to an action client that can handle a single goal at a time.
Definition at line 35 of file action_client_behavior_base.hpp.
Public Destructor
~ClientInterfaceBase()
| virtual default |
Definition at line 38 of file action_client_behavior_base.hpp.
Public Member Functions
initialize()
|
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.
Definition at line 48 of file action_client_behavior_base.hpp.
syncCancelGoal()
|
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.
Definition at line 85 of file action_client_behavior_base.hpp.
syncGetResult()
|
Block until the in-progress action result is received or a timeout is exceeded.
- Parameters
-
timeout_message The 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.
Definition at line 76 of file action_client_behavior_base.hpp.
syncSendGoal()
|
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.
Definition at line 66 of file action_client_behavior_base.hpp.
waitForActionServer()
|
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.
Definition at line 57 of file action_client_behavior_base.hpp.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.