Skip to content

Commit 7ba6d23

Browse files
committed
add ego lateral offset to detection range
Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
1 parent cb760a4 commit 7ba6d23

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

planning/behavior_velocity_crosswalk_module/src/scene_crosswalk.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,11 @@ bool CrosswalkModule::modifyPathVelocity(PathWithLaneId * path, StopReason * sto
244244
!is_crosswalk_ignored(crosswalk_, planner_param_.occlusion_ignore_with_traffic_light)) {
245245
const auto dist_ego_to_crosswalk =
246246
calcSignedArcLength(path->points, ego_pos, path_intersects.front());
247-
const auto detection_range = calculate_detection_range(
248-
planner_param_.occlusion_occluded_object_velocity, dist_ego_to_crosswalk,
249-
planner_data_->current_velocity->twist.linear.x);
247+
const auto detection_range =
248+
planner_data_->vehicle_info_.max_lateral_offset_m +
249+
calculate_detection_range(
250+
planner_param_.occlusion_occluded_object_velocity, dist_ego_to_crosswalk,
251+
planner_data_->current_velocity->twist.linear.x);
250252
const auto is_ego_on_the_crosswalk =
251253
dist_ego_to_crosswalk <= planner_data_->vehicle_info_.max_longitudinal_offset_m;
252254
if (!is_ego_on_the_crosswalk) {

0 commit comments

Comments
 (0)