@@ -305,9 +305,10 @@ void WaypointFollower::followWaypointsHandler(
305305 current_goal_status_.status == ActionStatus::FAILED ||
306306 current_goal_status_.status == ActionStatus::UNKNOWN)
307307 {
308- nav2_msgs::msg::MissedWaypoint missedWaypoint;
309- missedWaypoint.index = goal_index;
310- missedWaypoint.goal = poses[goal_index];
308+ nav2_msgs::msg::WaypointStatus missedWaypoint;
309+ missedWaypoint.waypoint_status = nav2_msgs::msg::WaypointStatus::FAILED;
310+ missedWaypoint.waypoint_index = goal_index;
311+ missedWaypoint.waypoint_pose = poses[goal_index];
311312 missedWaypoint.error_code = current_goal_status_.error_code ;
312313 missedWaypoint.error_msg = current_goal_status_.error_msg ;
313314 result->missed_waypoints .push_back (missedWaypoint);
@@ -340,9 +341,10 @@ void WaypointFollower::followWaypointsHandler(
340341 is_task_executed ? " succeeded" : " failed!" );
341342
342343 if (!is_task_executed) {
343- nav2_msgs::msg::MissedWaypoint missedWaypoint;
344- missedWaypoint.index = goal_index;
345- missedWaypoint.goal = poses[goal_index];
344+ nav2_msgs::msg::WaypointStatus missedWaypoint;
345+ missedWaypoint.waypoint_status = nav2_msgs::msg::WaypointStatus::FAILED;
346+ missedWaypoint.waypoint_index = goal_index;
347+ missedWaypoint.waypoint_pose = poses[goal_index];
346348 missedWaypoint.error_code =
347349 nav2_msgs::action::FollowWaypoints::Result::TASK_EXECUTOR_FAILED;
348350 missedWaypoint.error_msg = " Task execution failed" ;
0 commit comments