diff --git a/nav2_waypoint_follower/include/nav2_waypoint_follower/waypoint_follower.hpp b/nav2_waypoint_follower/include/nav2_waypoint_follower/waypoint_follower.hpp index 83ffa14f69e24a97b9819c8e14749cd41c669d00..3485a2cf4b9fe3f2861944a072b98ae589a10a84 100644 --- a/nav2_waypoint_follower/include/nav2_waypoint_follower/waypoint_follower.hpp +++ b/nav2_waypoint_follower/include/nav2_waypoint_follower/waypoint_follower.hpp @@ -106,10 +106,9 @@ protected: /** * @brief Action client goal response callback - * @param future Shared future to goalhandle + * @param goal Response of action server updated asynchronously */ - void goalResponseCallback( - std::shared_future<rclcpp_action::ClientGoalHandle<ClientT>::SharedPtr> future); + void goalResponseCallback(const rclcpp_action::ClientGoalHandle<ClientT>::SharedPtr & goal); // Our action server std::unique_ptr<ActionServer> action_server_; diff --git a/nav2_waypoint_follower/src/waypoint_follower.cpp b/nav2_waypoint_follower/src/waypoint_follower.cpp index 3230c6a7707f7bb7f7b080b4993f52bf6e73685a..a923098de69ea946e88401101e0b896423935336 100644 --- a/nav2_waypoint_follower/src/waypoint_follower.cpp +++ b/nav2_waypoint_follower/src/waypoint_follower.cpp @@ -246,10 +246,9 @@ WaypointFollower::resultCallback( void WaypointFollower::goalResponseCallback( - std::shared_future<rclcpp_action::ClientGoalHandle<ClientT>::SharedPtr> future) + const rclcpp_action::ClientGoalHandle<ClientT>::SharedPtr & goal) { - auto goal_handle = future.get(); - if (!goal_handle) { + if (!goal) { RCLCPP_ERROR( get_logger(), "navigate_to_pose action client failed to send goal to server.");