Commit a7e83ff 1 parent c7f2e1e commit a7e83ff Copy full SHA for a7e83ff
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 @@ -468,8 +468,16 @@ void NormalLaneChange::insertStopPoint(
468
468
469
469
PathWithLaneId NormalLaneChange::getReferencePath () const
470
470
{
471
- return utils::getCenterLinePathFromLanelet (
472
- status_.lane_change_path .info .target_lanes .front (), planner_data_);
471
+ lanelet::ConstLanelet closest_lanelet;
472
+ if (!lanelet::utils::query::getClosestLanelet (
473
+ status_.lane_change_path .info .target_lanes , getEgoPose (), &closest_lanelet)) {
474
+ return prev_module_output_.reference_path ;
475
+ }
476
+ const auto reference_path = utils::getCenterLinePathFromLanelet (closest_lanelet, planner_data_);
477
+ if (reference_path.points .empty ()) {
478
+ return prev_module_output_.reference_path ;
479
+ }
480
+ return reference_path;
473
481
}
474
482
475
483
std::optional<PathWithLaneId> NormalLaneChange::extendPath ()
You can’t perform that action at this time.
0 commit comments