Skip to content

Commit

Permalink
fix(lane_change): add distance check for the lane change acceleration…
Browse files Browse the repository at this point in the history
… sampling (autowarefoundation#4556)

* fix(lane_change): add distance checker in acceleration sampling

Signed-off-by: yutaka <purewater0901@gmail.com>

* fix format

Signed-off-by: yutaka <purewater0901@gmail.com>

* update

Signed-off-by: yutaka <purewater0901@gmail.com>

---------

Signed-off-by: yutaka <purewater0901@gmail.com>
  • Loading branch information
purewater0901 authored and LeoDriveProject committed Aug 16, 2023
1 parent 9ed15f7 commit fc87400
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,11 @@ std::vector<double> NormalLaneChange::sampleLongitudinalAccValues(
current_velocity, common_parameters,
route_handler.getLateralIntervalsToPreferredLane(current_lanes.back()), max_acc);

if (max_lane_change_length > utils::getDistanceToEndOfLane(current_pose, current_lanes)) {
return utils::lane_change::getAccelerationValues(
min_acc, max_acc, longitudinal_acc_sampling_num);
}

// if maximum lane change length is less than length to goal or the end of target lanes, only
// sample max acc
if (route_handler.isInGoalRouteSection(target_lanes.back())) {
Expand Down

0 comments on commit fc87400

Please sign in to comment.