From f09e5751d1d74c5d47786129bb45f1021fb8e5e2 Mon Sep 17 00:00:00 2001 From: Kosuke Takeuchi Date: Tue, 13 Jun 2023 12:40:52 +0900 Subject: [PATCH] fix(mission_planner): keep uuid when rerouting with modified goal (#3956) Signed-off-by: kosuke55 --- .../mission_planner/src/mission_planner/mission_planner.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/planning/mission_planner/src/mission_planner/mission_planner.cpp b/planning/mission_planner/src/mission_planner/mission_planner.cpp index 654f0129710da..c7073a38de075 100644 --- a/planning/mission_planner/src/mission_planner/mission_planner.cpp +++ b/planning/mission_planner/src/mission_planner/mission_planner.cpp @@ -373,8 +373,10 @@ void MissionPlanner::on_modified_goal(const ModifiedGoal::Message::ConstSharedPt change_state(RouteState::Message::CHANGING); const std::vector empty_waypoints; - const auto new_route = + auto new_route = create_route(msg->header, empty_waypoints, msg->pose, normal_route_->allow_modification); + // create_route generate new uuid, so set the original uuid again to keep that. + new_route.uuid = msg->uuid; if (new_route.segments.empty()) { change_route(*normal_route_); change_state(RouteState::Message::SET);