Skip to content

Commit b681fe7

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

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
@@ -245,9 +245,11 @@ bool CrosswalkModule::modifyPathVelocity(PathWithLaneId * path, StopReason * sto
245245
!is_crosswalk_ignored(crosswalk_, planner_param_.occlusion_ignore_with_traffic_light)) {
246246
const auto dist_ego_to_crosswalk =
247247
calcSignedArcLength(path->points, ego_pos, path_intersects.front());
248-
const auto detection_range = calculate_detection_range(
249-
planner_param_.occlusion_occluded_object_velocity, dist_ego_to_crosswalk,
250-
planner_data_->current_velocity->twist.linear.x);
248+
const auto detection_range =
249+
planner_data_->vehicle_info_.max_lateral_offset_m +
250+
calculate_detection_range(
251+
planner_param_.occlusion_occluded_object_velocity, dist_ego_to_crosswalk,
252+
planner_data_->current_velocity->twist.linear.x);
251253
const auto is_ego_on_the_crosswalk =
252254
dist_ego_to_crosswalk <= planner_data_->vehicle_info_.max_longitudinal_offset_m;
253255
if (!is_ego_on_the_crosswalk) {

0 commit comments

Comments
 (0)