Skip to content

Commit d6b9e0e

Browse files
committed
Stop using deprecated version of FieldOperatorApplication::plan in EgoEntity::requestReplanRoute
1 parent 7e43fca commit d6b9e0e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

simulation/traffic_simulator/src/entity/ego_entity.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,22 @@ auto EgoEntity::requestReplanRoute(
393393
-> void
394394
{
395395
clearRoute();
396-
plan(route, allow_goal_modification);
396+
/*
397+
NOTE:
398+
This function does not support use_lane_level_specification_for_waypoints option.
399+
The developers should consider manual override simulation to determine whether support it or not.
400+
*/
401+
{
402+
concealer::FieldOperatorApplication::RouteOption route_option;
403+
route_option.allow_goal_modification = allow_goal_modification;
404+
assert(not route.empty());
405+
auto goal = route.back().pose;
406+
std::vector<geometry_msgs::msg::Pose> waypoints;
407+
for (size_t i = 0; i < route.size() - 1; ++i) {
408+
waypoints.push_back(route[i].pose);
409+
}
410+
plan(goal, waypoints, route_option);
411+
}
397412
enableAutowareControl();
398413
FieldOperatorApplication::engage();
399414
}

0 commit comments

Comments
 (0)