Skip to content

Commit 40ed473

Browse files
authored
fix(route_handler): make new route continuous with previous route (autowarefoundation#8238)
Signed-off-by: Fumiya Watanabe <rej55.g@gmail.com>
1 parent 6f7ef5e commit 40ed473

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

planning/autoware_route_handler/src/route_handler.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -2143,6 +2143,14 @@ bool RouteHandler::planPathLaneletsBetweenCheckpoints(
21432143
continue;
21442144
}
21452145
is_route_found = true;
2146+
lanelet::ConstLanelet preferred_lane{};
2147+
if (getClosestPreferredLaneletWithinRoute(start_checkpoint, &preferred_lane)) {
2148+
if (st_llt.id() == preferred_lane.id()) {
2149+
shortest_path = optional_route->shortestPath();
2150+
start_lanelet = st_llt;
2151+
break;
2152+
}
2153+
}
21462154
if (angle_diff < smallest_angle_diff) {
21472155
smallest_angle_diff = angle_diff;
21482156
shortest_path = optional_route->shortestPath();

0 commit comments

Comments
 (0)