From 184544774aa69bdc19dfca0d92d276580759a367 Mon Sep 17 00:00:00 2001 From: Jacob Perron Date: Tue, 15 Sep 2020 14:29:17 -0700 Subject: [PATCH] Update goal response callback signature The signature changed in https://github.com/ros2/rclcpp/pull/1311 Also remove related dead code. Signed-off-by: Jacob Perron --- turtlesim/tutorials/teleop_turtle_key.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/turtlesim/tutorials/teleop_turtle_key.cpp b/turtlesim/tutorials/teleop_turtle_key.cpp index a8779f58..ebf30762 100644 --- a/turtlesim/tutorials/teleop_turtle_key.cpp +++ b/turtlesim/tutorials/teleop_turtle_key.cpp @@ -161,7 +161,6 @@ class TeleopTurtle private: void spin(); void sendGoal(float theta); - void goalResponseCallback(std::shared_future::SharedPtr> future); void cancelGoal(); rclcpp::Node::SharedPtr nh_; @@ -193,20 +192,14 @@ void TeleopTurtle::sendGoal(float theta) goal.theta = theta; auto send_goal_options = rclcpp_action::Client::SendGoalOptions(); send_goal_options.goal_response_callback = - [this](std::shared_future::SharedPtr> future) + [this](rclcpp_action::ClientGoalHandle::SharedPtr goal_handle) { RCLCPP_DEBUG(nh_->get_logger(), "Goal response received"); - this->goal_handle_ = future.get(); + this->goal_handle_ = goal_handle; }; rotate_absolute_client_->async_send_goal(goal, send_goal_options); } -void TeleopTurtle::goalResponseCallback(std::shared_future::SharedPtr> future) -{ - RCLCPP_DEBUG(nh_->get_logger(), "Goal response received"); - this->goal_handle_ = future.get(); -} - void TeleopTurtle::cancelGoal() { if (goal_handle_)