Skip to content

Commit 9313d1d

Browse files
shmpwkzulfaqar-azmi-t4mkquda
authored
fix(lane_change): extending lane change path for multiple lane change (RT1-8427) (autowarefoundation#9268) (#1656)
* RT1-8427 extending lc path for multiple lc * Update planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp --------- Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> Co-authored-by: Zulfaqar Azmi <93502286+zulfaqar-azmi-t4@users.noreply.github.com> Co-authored-by: mkquda <168697710+mkquda@users.noreply.github.com>
1 parent 4f4110c commit 9313d1d

File tree

1 file changed

+5
-15
lines changed
  • planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src

1 file changed

+5
-15
lines changed

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

+5-15
Original file line numberDiff line numberDiff line change
@@ -584,13 +584,6 @@ std::optional<PathWithLaneId> NormalLaneChange::extendPath()
584584
{
585585
universe_utils::ScopedTimeTrack st(__func__, *time_keeper_);
586586
const auto path = status_.lane_change_path.path;
587-
const auto lc_start_point = status_.lane_change_path.info.lane_changing_start.position;
588-
589-
const auto dist = calcSignedArcLength(path.points, lc_start_point, getEgoPosition());
590-
591-
if (dist < 0.0) {
592-
return std::nullopt;
593-
}
594587

595588
auto & target_lanes = common_data_ptr_->lanes_ptr->target;
596589
const auto target_lane_length = lanelet::utils::getLaneletLength2d(target_lanes);
@@ -601,22 +594,21 @@ std::optional<PathWithLaneId> NormalLaneChange::extendPath()
601594
if ((target_lane_length - dist_in_target.length) > forward_path_length) {
602595
return std::nullopt;
603596
}
597+
const auto dist_to_end_of_path =
598+
lanelet::utils::getArcCoordinates(target_lanes, path.points.back().point.pose).length;
604599

605-
const auto is_goal_in_target = getRouteHandler()->isInGoalRouteSection(target_lanes.back());
606-
607-
if (is_goal_in_target) {
600+
if (common_data_ptr_->lanes_ptr->target_lane_in_goal_section) {
608601
const auto goal_pose = getRouteHandler()->getGoalPose();
609602

610603
const auto dist_to_goal = lanelet::utils::getArcCoordinates(target_lanes, goal_pose).length;
611-
const auto dist_to_end_of_path =
612-
lanelet::utils::getArcCoordinates(target_lanes, path.points.back().point.pose).length;
613604

614605
return getRouteHandler()->getCenterLinePath(target_lanes, dist_to_end_of_path, dist_to_goal);
615606
}
616607

617608
lanelet::ConstLanelet next_lane;
618609
if (!getRouteHandler()->getNextLaneletWithinRoute(target_lanes.back(), &next_lane)) {
619-
return std::nullopt;
610+
return getRouteHandler()->getCenterLinePath(
611+
target_lanes, dist_to_end_of_path, transient_data.target_lane_length);
620612
}
621613

622614
target_lanes.push_back(next_lane);
@@ -640,8 +632,6 @@ std::optional<PathWithLaneId> NormalLaneChange::extendPath()
640632

641633
const auto dist_to_target_pose =
642634
lanelet::utils::getArcCoordinates(target_lanes, target_pose).length;
643-
const auto dist_to_end_of_path =
644-
lanelet::utils::getArcCoordinates(target_lanes, path.points.back().point.pose).length;
645635

646636
return getRouteHandler()->getCenterLinePath(
647637
target_lanes, dist_to_end_of_path, dist_to_target_pose);

0 commit comments

Comments
 (0)