Skip to content

Commit afd0a1a

Browse files
author
beyza
committed
check the obstacles behind the EGO vehicle
Signed-off-by: beyza <bnk@leodrive.ai>
1 parent b3b8c3d commit afd0a1a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

planning/behavior_velocity_dynamic_obstacle_stop_module/src/object_filtering.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ std::vector<autoware_auto_perception_msgs::msg::PredictedObject> filter_predicte
5656
const auto obj_arc_length = motion_utils::calcSignedArcLength(
5757
ego_data.path.points, ego_data.pose.position,
5858
o.kinematics.initial_pose_with_covariance.pose.position);
59+
if(!params.ignore_objects_behind_ego){
60+
return (obj_arc_length < 0.0 &&
61+
std::abs(obj_arc_length) < params.behind_object_distance_threshold + o.shape.dimensions.x / 2.0) ||
62+
obj_arc_length > ego_data.longitudinal_offset_to_first_path_idx +
63+
params.ego_longitudinal_offset + o.shape.dimensions.x / 2.0;
64+
}
5965
return obj_arc_length > ego_data.longitudinal_offset_to_first_path_idx +
6066
params.ego_longitudinal_offset + o.shape.dimensions.x / 2.0;
6167
};

0 commit comments

Comments
 (0)