Skip to content

Commit

Permalink
consider rss distance
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <[email protected]>
  • Loading branch information
kosuke55 committed Oct 6, 2023
1 parent 978b710 commit 2cd2ede
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,15 @@ void NormalLaneChange::insertStopPoint(
// If the lane change space is occupied by a stationary obstacle, move the stop line closer.
// TODO(Horibe): We need to loop this process because the new space could be occupied as well.
stopping_distance = std::min(
distance_to_ego_lane_obj - lane_change_buffer - stop_point_buffer, stopping_distance);
distance_to_ego_lane_obj - lane_change_buffer - stop_point_buffer -
calcRssDistance(
0.0, planner_data_->parameters.minimum_lane_changing_velocity,
lane_change_parameters_->rss_params),
stopping_distance);
}

const auto stopping_distance_baselink = stopping_distance - getCommonParam().base_link2front;

if (stopping_distance_baselink > 0.0) {
const auto stop_point = utils::insertStopPoint(stopping_distance_baselink, path);
setStopPose(stop_point.point.pose);
Expand Down

0 comments on commit 2cd2ede

Please sign in to comment.