File tree 1 file changed +10
-2
lines changed
planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -467,8 +467,16 @@ void NormalLaneChange::insertStopPoint(
467
467
468
468
PathWithLaneId NormalLaneChange::getReferencePath () const
469
469
{
470
- return utils::getCenterLinePathFromLanelet (
471
- status_.lane_change_path .info .target_lanes .front (), planner_data_);
470
+ lanelet::ConstLanelet closest_lanelet;
471
+ if (!lanelet::utils::query::getClosestLanelet (
472
+ status_.lane_change_path .info .target_lanes , getEgoPose (), &closest_lanelet)) {
473
+ return prev_module_output_.reference_path ;
474
+ }
475
+ const auto reference_path = utils::getCenterLinePathFromLanelet (closest_lanelet, planner_data_);
476
+ if (reference_path.points .empty ()) {
477
+ return prev_module_output_.reference_path ;
478
+ }
479
+ return reference_path;
472
480
}
473
481
474
482
std::optional<PathWithLaneId> NormalLaneChange::extendPath ()
You can’t perform that action at this time.
0 commit comments