RclcppClientInterface Class
Implements ClientInterfaceBase for the rclcpp action client. More...
Declaration
Included Headers
Base class
| class | ClientInterfaceBase |
|
Provides an interface to an action client that can handle a single goal at a time. More... | |
Public Constructors Index
| RclcppClientInterface (const std::shared_ptr< BehaviorContext > &behavior_context) | |
|
Constructor for this implementation. More... | |
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) override |
|
Implementation of ClientInterfaceBase::initialize for an rclcpp action client. More... | |
| bool | waitForActionServer () const override |
|
Implementation of ClientInterfaceBase::waitForActionServer for an rclcpp action client. More... | |
| tl::expected< void, std::string > | syncSendGoal (const typename ActionT::Goal &goal, typename ClientGoalHandle::FeedbackCallback feedback_fn) override |
|
Implementation of ClientInterfaceBase::syncSendGoal for an rclcpp action client. More... | |
| tl::expected< typename ActionClientBehaviorBase::ClientGoalHandle::WrappedResult, std::string > | syncGetResult (const std::string &timeout_message) const override |
|
Implementation of ClientInterfaceBase::syncGetResult for an rclcpp action client. More... | |
| tl::expected< std::shared_ptr< typename ActionT::Impl::CancelGoalService::Response >, std::string > | syncCancelGoal () const override |
|
Implementation of ClientInterfaceBase::syncCancelGoal for an rclcpp action client. More... | |
Private Member Attributes Index
| std::shared_ptr< rclcpp::Node > | node_ |
|
Node to use when initializing the action client. More... | |
| std::shared_ptr< rclcpp::CallbackGroup > | mutually_exclusive_callback_group_ |
|
Mutually-exclusive callback group used by the action client. More... | |
| std::string | current_action_name_ |
|
Action name used by the action client. More... | |
| std::shared_ptr< rclcpp_action::Client< ActionT > > | client_ |
|
Action client. More... | |
| std::shared_ptr< typename ActionClientBehaviorBase::ClientGoalHandle > | goal_handle_ |
|
Action goal handle created by the action client when the goal request is accepted by the server. More... | |
| std::mutex | goal_handle_mutex_ |
|
Protects access to goal_handle_. More... | |
| std::chrono::duration< double > | wait_for_server_timeout_ |
|
Duration in seconds to wait for the action server to be available before failing. More... | |
| std::chrono::duration< double > | goal_response_timeout_ |
|
Duration in seconds to wait for a goal response before failing. More... | |
| std::chrono::duration< double > | goal_result_timeout_ |
|
Duration in seconds to wait for a result before failing. More... | |
| std::chrono::duration< double > | cancel_response_timeout_ |
|
Duration in seconds to wait for a cancel response before failing. More... | |
Description
Implements ClientInterfaceBase for the rclcpp action client.
Definition at line 91 of file action_client_behavior_base.hpp.
Public Constructors
RclcppClientInterface()
| explicit |
Constructor for this implementation.
- Parameters
-
node Node to use when initializing the action client.
Declaration at line 98 of file action_client_behavior_base.hpp, definition at line 22 of file action_client_behavior_base_impl.hpp.
Public Member Functions
initialize()
| virtual |
Implementation of ClientInterfaceBase::initialize for an rclcpp action client.
Sets client_ to a new action client instance
Declaration at line 104 of file action_client_behavior_base.hpp, definition at line 30 of file action_client_behavior_base_impl.hpp.
syncCancelGoal()
| virtual |
Implementation of ClientInterfaceBase::syncCancelGoal for an rclcpp action client.
Calls the action client's async_cancel_goal function and blocks while waiting on the future which it returns. This implementation also returns an error result if the action goal handle is not initialized or not in-progress.
Declaration at line 136 of file action_client_behavior_base.hpp, definition at line 160 of file action_client_behavior_base_impl.hpp.
syncGetResult()
| virtual |
Implementation of ClientInterfaceBase::syncGetResult for an rclcpp action client.
Calls the action client's async_get_result function and blocks while waiting on the future which it returns. This implementation also returns an error result if the action goal handle is not initialized or not in-progress.
Declaration at line 128 of file action_client_behavior_base.hpp, definition at line 89 of file action_client_behavior_base_impl.hpp.
syncSendGoal()
| virtual |
Implementation of ClientInterfaceBase::syncSendGoal for an rclcpp action client.
Calls the action client's async_send_goal function and blocks while waiting on the future which it returns.
Declaration at line 119 of file action_client_behavior_base.hpp, definition at line 60 of file action_client_behavior_base_impl.hpp.
waitForActionServer()
| virtual |
Implementation of ClientInterfaceBase::waitForActionServer for an rclcpp action client.
Calls the action client's wait_for_action_server function.
Declaration at line 113 of file action_client_behavior_base.hpp, definition at line 54 of file action_client_behavior_base_impl.hpp.
Private Member Attributes
cancel_response_timeout_
|
Duration in seconds to wait for a cancel response before failing.
Definition at line 167 of file action_client_behavior_base.hpp.
client_
|
Action client.
Definition at line 149 of file action_client_behavior_base.hpp.
current_action_name_
|
Action name used by the action client.
Definition at line 146 of file action_client_behavior_base.hpp.
goal_handle_
|
Action goal handle created by the action client when the goal request is accepted by the server.
Definition at line 152 of file action_client_behavior_base.hpp.
goal_handle_mutex_
| mutable |
Protects access to goal_handle_.
Definition at line 155 of file action_client_behavior_base.hpp.
goal_response_timeout_
|
Duration in seconds to wait for a goal response before failing.
Definition at line 161 of file action_client_behavior_base.hpp.
goal_result_timeout_
|
Duration in seconds to wait for a result before failing.
Definition at line 164 of file action_client_behavior_base.hpp.
mutually_exclusive_callback_group_
|
Mutually-exclusive callback group used by the action client.
Definition at line 143 of file action_client_behavior_base.hpp.
node_
|
Node to use when initializing the action client.
Definition at line 140 of file action_client_behavior_base.hpp.
wait_for_server_timeout_
|
Duration in seconds to wait for the action server to be available before failing.
Definition at line 158 of file action_client_behavior_base.hpp.
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.