From 0dd2ff12aff2042ce4c023bc18d07da1b3fa30e3 Mon Sep 17 00:00:00 2001 From: Maxime CLEMENT Date: Tue, 21 Nov 2023 20:06:05 +0900 Subject: [PATCH] Skip predicted paths with less than 2 points after removing overlap pts Signed-off-by: Maxime CLEMENT --- .../src/filter_predicted_objects.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/planning/behavior_velocity_out_of_lane_module/src/filter_predicted_objects.hpp b/planning/behavior_velocity_out_of_lane_module/src/filter_predicted_objects.hpp index 13bad0d04792..7bad4974ea9a 100644 --- a/planning/behavior_velocity_out_of_lane_module/src/filter_predicted_objects.hpp +++ b/planning/behavior_velocity_out_of_lane_module/src/filter_predicted_objects.hpp @@ -44,8 +44,10 @@ autoware_auto_perception_msgs::msg::PredictedObjects filter_predicted_objects( auto filtered_object = object; const auto is_invalid_predicted_path = [&](const auto & predicted_path) { const auto is_low_confidence = predicted_path.confidence < params.objects_min_confidence; + const auto no_overlap_path = motion_utils::removeOverlapPoints(predicted_path.path); + if (no_overlap_path.size() <= 1) return true; const auto lat_offset_to_current_ego = - std::abs(motion_utils::calcLateralOffset(predicted_path.path, ego_data.pose.position)); + std::abs(motion_utils::calcLateralOffset(no_overlap_path, ego_data.pose.position)); const auto is_crossing_ego = lat_offset_to_current_ego <= object.shape.dimensions.y / 2.0 + std::max(