Skip to content

Commit

Permalink
fix(merge_from_private): fix stop position calculation (autowarefound…
Browse files Browse the repository at this point in the history
…ation#6286)

Signed-off-by: Mamoru Sobue <[email protected]>
  • Loading branch information
soblin authored Feb 2, 2024
1 parent 57f8a94 commit 9c436bf
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 9c436bf

Please sign in to comment.