Skip to content

Commit

Permalink
feat(mission_planner): print modified goal reroute
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <[email protected]>
  • Loading branch information
kosuke55 committed Dec 5, 2023
1 parent 60b4030 commit 7c272e8
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ void MissionPlanner::on_set_mrm_route(
res->status.success = false;
}
change_state(RouteState::Message::SET);
RCLCPP_INFO(get_logger(), "Route is successfully changed with the modified goal");
return;
}

Expand All @@ -452,6 +453,7 @@ void MissionPlanner::on_set_mrm_route(
change_mrm_route(new_route);
change_state(RouteState::Message::SET);
res->status.success = true;
RCLCPP_INFO(get_logger(), "MRM route is successfully changed with the modified goal");
return;
}

Expand Down Expand Up @@ -537,6 +539,8 @@ void MissionPlanner::on_clear_mrm_route(

void MissionPlanner::on_modified_goal(const ModifiedGoal::Message::ConstSharedPtr msg)
{
RCLCPP_INFO(get_logger(), "Received modified goal.");

if (state_.state != RouteState::Message::SET) {
RCLCPP_ERROR(get_logger(), "The route hasn't set yet. Cannot reroute.");
return;
Expand Down Expand Up @@ -572,6 +576,7 @@ void MissionPlanner::on_modified_goal(const ModifiedGoal::Message::ConstSharedPt

change_mrm_route(new_route);
change_state(RouteState::Message::SET);
RCLCPP_INFO(get_logger(), "Changed the MRM route with the modified goal");
return;
}

Expand All @@ -593,6 +598,7 @@ void MissionPlanner::on_modified_goal(const ModifiedGoal::Message::ConstSharedPt

change_route(new_route);
change_state(RouteState::Message::SET);
RCLCPP_INFO(get_logger(), "Changed the route with the modified goal");
return;
}

Expand Down

0 comments on commit 7c272e8

Please sign in to comment.