Skip to content

Commit

Permalink
fix(crosswalk):fix cherry-pick from autowarefoundation#6015
Browse files Browse the repository at this point in the history
  • Loading branch information
KenItagaki committed Aug 6, 2024
1 parent 7c470df commit e078974
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ std::optional<StopFactor> CrosswalkModule::checkStopForCrosswalkUsers(
return {};
}

// Check if the ego should stop beyond the stop line.
// Check if the ego should stop at the stop line or the other points.
const bool stop_at_stop_line =
dist_ego_to_stop < nearest_stop_info->second &&
nearest_stop_info->second < dist_ego_to_stop + planner_param_.far_object_threshold;
Expand All @@ -387,9 +387,9 @@ std::optional<StopFactor> CrosswalkModule::checkStopForCrosswalkUsers(
return createStopFactor(*default_stop_pose, stop_factor_points);
}
} else {
// Stop beyond the stop line
const auto stop_pose = calcLongitudinalOffsetPose(
ego_path.points, nearest_stop_info->first, planner_param_.stop_distance_from_object);
ego_path.points, nearest_stop_info->first,
-base_link2front - planner_param_.stop_distance_from_object);
if (stop_pose) {
return createStopFactor(*stop_pose, stop_factor_points);
}
Expand Down

0 comments on commit e078974

Please sign in to comment.