22#include < spdlog/spdlog.h>
33#include < cmath>
44#include < rclcpp_components/register_node_macro.hpp>
5- #include < vortex/utils/ros/ros_conversions.hpp>
65
76namespace vortex ::mission {
87
@@ -87,11 +86,6 @@ WaypointManagerNode::construct_result(bool success) const {
8786 auto result =
8887 std::make_shared<vortex_msgs::action::WaypointManager_Result>();
8988 result->success = success;
90- result->pose_valid = has_reference_pose_;
91- if (has_reference_pose_) {
92- result->final_pose = vortex::utils::ros_conversions::to_pose_msg (
93- latest_ref_feedback_.reference );
94- }
9589 return result;
9690}
9791
@@ -100,7 +94,6 @@ void WaypointManagerNode::cleanup_mission_state() {
10094 current_index_ = 0 ;
10195 persistent_action_mode_active_ = false ;
10296 priority_mode_active_ = false ;
103- has_reference_pose_ = false ;
10497
10598 if (active_reference_filter_goal_) {
10699 reference_filter_client_->async_cancel_goal (
@@ -122,6 +115,12 @@ void WaypointManagerNode::send_next_reference_filter_goal() {
122115 return ;
123116 }
124117
118+ if (active_action_goal_ && active_action_goal_->is_active ()) {
119+ auto wm_fb = std::make_shared<WaypointManager::Feedback>();
120+ wm_fb->current_waypoint = waypoints_[current_index_];
121+ active_action_goal_->publish_feedback (wm_fb);
122+ }
123+
125124 ReferenceFilterAction::Goal rf_goal;
126125 rf_goal.waypoint = waypoints_[current_index_];
127126 rf_goal.convergence_threshold = convergence_threshold_;
@@ -153,7 +152,6 @@ rclcpp_action::GoalResponse WaypointManagerNode::handle_waypoint_goal(
153152 current_index_ = 0 ;
154153 persistent_action_mode_active_ = goal->persistent ;
155154 priority_mode_active_ = false ;
156- has_reference_pose_ = false ;
157155 convergence_threshold_ = goal->convergence_threshold ;
158156
159157 if (waypoints_.empty () && !persistent_action_mode_active_) {
@@ -212,7 +210,6 @@ void WaypointManagerNode::handle_send_waypoints_service_request(
212210 mission_id_++;
213211 waypoints_ = request->waypoints ;
214212 current_index_ = 0 ;
215- has_reference_pose_ = false ;
216213
217214 if (active_reference_filter_goal_) {
218215 reference_filter_client_->async_cancel_goal (
@@ -269,31 +266,6 @@ void WaypointManagerNode::send_reference_filter_goal(
269266 }
270267 };
271268
272- options.feedback_callback =
273- [this , this_mission](
274- ReferenceFilterGoalHandle::SharedPtr,
275- const std::shared_ptr<const ReferenceFilterAction::Feedback> fb) {
276- if (this_mission != mission_id_) {
277- return ;
278- }
279-
280- latest_ref_feedback_ = *fb;
281- has_reference_pose_ = true ;
282-
283- if (!active_action_goal_ || !active_action_goal_->is_active ())
284- return ;
285-
286- geometry_msgs::msg::Pose robot_pose =
287- vortex::utils::ros_conversions::to_pose_msg (fb->reference );
288-
289- if (current_index_ < waypoints_.size ()) {
290- auto wm_fb = std::make_shared<WaypointManager::Feedback>();
291- wm_fb->current_pose = robot_pose;
292- wm_fb->current_waypoint = waypoints_[current_index_];
293- active_action_goal_->publish_feedback (wm_fb);
294- }
295- };
296-
297269 options
298270 .result_callback = [this , this_mission](
299271 const ReferenceFilterGoalHandle::WrappedResult&
0 commit comments