Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(merge_from_private): fix stop position calculation #6286

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,13 @@ bool MergeFromPrivateRoadModule::modifyPathVelocity(PathWithLaneId * path, StopR
if (!first_conflicting_idx_opt) {
return false;
}
// ==========================================================================================
// first_conflicting_idx is calculated considering baselink2front already, so there is no need
// to subtract baselink2front/ds here
// ==========================================================================================
const auto stopline_idx_ip = static_cast<size_t>(std::max<int>(
0, static_cast<int>(first_conflicting_idx_opt.value()) -
static_cast<int>(baselink2front / planner_param_.path_interpolation_ds)));
static_cast<int>(planner_param_.stopline_margin / planner_param_.path_interpolation_ds)));

const auto stopline_idx_opt = util::insertPointIndex(
interpolated_path_info.path.points.at(stopline_idx_ip).point.pose, path,
Expand Down
Loading