rclcpp_action  master
C++ ROS Action Client Library
Classes | Public Types | Public Member Functions | List of all members
rclcpp_action::ClientGoalHandle< ActionT > Class Template Reference

Class for interacting with goals sent from action clients. More...

#include <client_goal_handle.hpp>

Classes

struct  WrappedResult
 

Public Types

typedef struct rclcpp_action::ClientGoalHandle::WrappedResult WrappedResult
 
using Feedback = typename ActionT::Feedback
 
using Result = typename ActionT::Result
 
using FeedbackCallback = std::function< void(typename ClientGoalHandle< ActionT >::SharedPtr, const std::shared_ptr< const Feedback >)>
 
using ResultCallback = std::function< void(const WrappedResult &result)>
 

Public Member Functions

virtual ~ClientGoalHandle ()
 
const GoalUUIDget_goal_id () const
 Get the unique ID for the goal. More...
 
rclcpp::Time get_goal_stamp () const
 Get the time when the goal was accepted. More...
 
std::shared_future< WrappedResultasync_result ()
 Get a future to the goal result. More...
 
int8_t get_status ()
 Get the goal status code. More...
 
bool is_feedback_aware ()
 Check if an action client has subscribed to feedback for the goal. More...
 
bool is_result_aware ()
 Check if an action client has requested the result for the goal. More...
 

Detailed Description

template<typename ActionT>
class rclcpp_action::ClientGoalHandle< ActionT >

Class for interacting with goals sent from action clients.

Use this class to check the status of a goal as well as get the result.

This class is not meant to be created by a user, instead it is created when a goal has been accepted. A Client will create an instance and return it to the user (via a future) after calling Client::async_send_goal.

Member Typedef Documentation

◆ WrappedResult

◆ Feedback

template<typename ActionT >
using rclcpp_action::ClientGoalHandle< ActionT >::Feedback = typename ActionT::Feedback

◆ Result

template<typename ActionT >
using rclcpp_action::ClientGoalHandle< ActionT >::Result = typename ActionT::Result

◆ FeedbackCallback

template<typename ActionT >
using rclcpp_action::ClientGoalHandle< ActionT >::FeedbackCallback = std::function<void ( typename ClientGoalHandle<ActionT>::SharedPtr, const std::shared_ptr<const Feedback>)>

◆ ResultCallback

template<typename ActionT >
using rclcpp_action::ClientGoalHandle< ActionT >::ResultCallback = std::function<void (const WrappedResult & result)>

Constructor & Destructor Documentation

◆ ~ClientGoalHandle()

template<typename ActionT >
rclcpp_action::ClientGoalHandle< ActionT >::~ClientGoalHandle
virtual

Member Function Documentation

◆ get_goal_id()

template<typename ActionT >
const GoalUUID & rclcpp_action::ClientGoalHandle< ActionT >::get_goal_id

Get the unique ID for the goal.

◆ get_goal_stamp()

template<typename ActionT >
rclcpp::Time rclcpp_action::ClientGoalHandle< ActionT >::get_goal_stamp

Get the time when the goal was accepted.

◆ async_result()

template<typename ActionT >
std::shared_future< typename ClientGoalHandle< ActionT >::WrappedResult > rclcpp_action::ClientGoalHandle< ActionT >::async_result

Get a future to the goal result.

Deprecated:
Use rclcpp_action::Client::async_get_result() instead.

This method should not be called if the ignore_result flag was set when sending the original goal request (see Client::async_send_goal).

is_result_aware() can be used to check if it is safe to call this method.

Exceptions
exceptions::UnawareGoalHandleErrorIf the the goal handle is unaware of the result.
Returns
A future to the result.

◆ get_status()

template<typename ActionT >
int8_t rclcpp_action::ClientGoalHandle< ActionT >::get_status

Get the goal status code.

◆ is_feedback_aware()

template<typename ActionT >
bool rclcpp_action::ClientGoalHandle< ActionT >::is_feedback_aware

Check if an action client has subscribed to feedback for the goal.

◆ is_result_aware()

template<typename ActionT >
bool rclcpp_action::ClientGoalHandle< ActionT >::is_result_aware

Check if an action client has requested the result for the goal.


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