Skip to content

Commit e078974

Browse files
committed
fix(crosswalk):fix cherry-pick from autowarefoundation#6015
1 parent 7c470df commit e078974

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

planning/behavior_velocity_crosswalk_module/src/scene_crosswalk.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ std::optional<StopFactor> CrosswalkModule::checkStopForCrosswalkUsers(
376376
return {};
377377
}
378378

379-
// Check if the ego should stop beyond the stop line.
379+
// Check if the ego should stop at the stop line or the other points.
380380
const bool stop_at_stop_line =
381381
dist_ego_to_stop < nearest_stop_info->second &&
382382
nearest_stop_info->second < dist_ego_to_stop + planner_param_.far_object_threshold;
@@ -387,9 +387,9 @@ std::optional<StopFactor> CrosswalkModule::checkStopForCrosswalkUsers(
387387
return createStopFactor(*default_stop_pose, stop_factor_points);
388388
}
389389
} else {
390-
// Stop beyond the stop line
391390
const auto stop_pose = calcLongitudinalOffsetPose(
392-
ego_path.points, nearest_stop_info->first, planner_param_.stop_distance_from_object);
391+
ego_path.points, nearest_stop_info->first,
392+
-base_link2front - planner_param_.stop_distance_from_object);
393393
if (stop_pose) {
394394
return createStopFactor(*stop_pose, stop_factor_points);
395395
}

0 commit comments

Comments
 (0)