15 #ifndef RCLCPP_ACTION__CLIENT_GOAL_HANDLE_IMPL_HPP_ 16 #define RCLCPP_ACTION__CLIENT_GOAL_HANDLE_IMPL_HPP_ 29 template<
typename ActionT>
30 ClientGoalHandle<ActionT>::ClientGoalHandle(
31 const GoalInfo & info, FeedbackCallback callback)
32 : info_(info), result_future_(result_promise_.get_future()), feedback_callback_(callback)
36 template<
typename ActionT>
41 template<
typename ActionT>
46 return info_.goal_id.uuid;
49 template<
typename ActionT>
56 template<
typename ActionT>
61 if (!is_result_aware_) {
64 return result_future_;
67 template<
typename ActionT>
72 status_ =
static_cast<int8_t
>(result.
code);
73 result_promise_.set_value(result);
76 template<
typename ActionT>
81 feedback_callback_ = callback;
84 template<
typename ActionT>
92 template<
typename ActionT>
100 template<
typename ActionT>
105 return feedback_callback_ !=
nullptr;
108 template<
typename ActionT>
113 return is_result_aware_;
116 template<
typename ActionT>
121 is_result_aware_ = awareness;
124 template<
typename ActionT>
129 status_ = GoalStatus::STATUS_UNKNOWN;
134 template<
typename ActionT>
140 if (shared_this.get() !=
this) {
145 if (
nullptr == feedback_callback_) {
150 feedback_callback_(shared_this, feedback_message);
155 #endif // RCLCPP_ACTION__CLIENT_GOAL_HANDLE_IMPL_HPP_
T make_exception_ptr(T... args)
int8_t get_status()
Definition: client_goal_handle_impl.hpp:86
Logger get_logger(const std::string &name)
virtual ~ClientGoalHandle()
Definition: client_goal_handle_impl.hpp:37
bool is_result_aware()
Definition: client_goal_handle_impl.hpp:110
#define RCLCPP_DEBUG(logger,...)
#define RCLCPP_ERROR(logger,...)
ResultCode code
A status to indicate if the goal was canceled, aborted, or suceeded.
Definition: client_goal_handle.hpp:60
rclcpp::Time get_goal_stamp() const
Definition: client_goal_handle_impl.hpp:51
Definition: client_goal_handle.hpp:55
action_msgs::msg::GoalInfo GoalInfo
Definition: types.hpp:34
Definition: client.hpp:44
Definition: exceptions.hpp:33
Definition: client_goal_handle.hpp:49
bool is_feedback_aware()
Definition: client_goal_handle_impl.hpp:102
const GoalID & get_goal_id() const
Definition: client_goal_handle_impl.hpp:43
std::shared_future< Result > async_result()
Definition: client_goal_handle_impl.hpp:58