Skip to content

Commit 9c436bf

Browse files
authored
fix(merge_from_private): fix stop position calculation (#6286)
Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
1 parent 57f8a94 commit 9c436bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

planning/behavior_velocity_intersection_module/src/scene_merge_from_private_road.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,13 @@ bool MergeFromPrivateRoadModule::modifyPathVelocity(PathWithLaneId * path, StopR
126126
if (!first_conflicting_idx_opt) {
127127
return false;
128128
}
129+
// ==========================================================================================
130+
// first_conflicting_idx is calculated considering baselink2front already, so there is no need
131+
// to subtract baselink2front/ds here
132+
// ==========================================================================================
129133
const auto stopline_idx_ip = static_cast<size_t>(std::max<int>(
130134
0, static_cast<int>(first_conflicting_idx_opt.value()) -
131-
static_cast<int>(baselink2front / planner_param_.path_interpolation_ds)));
135+
static_cast<int>(planner_param_.stopline_margin / planner_param_.path_interpolation_ds)));
132136

133137
const auto stopline_idx_opt = util::insertPointIndex(
134138
interpolated_path_info.path.points.at(stopline_idx_ip).point.pose, path,

0 commit comments

Comments
 (0)