From 018ebd0fdb65feea1464c803759102a8a9589cad Mon Sep 17 00:00:00 2001 From: MasatoSaeki Date: Wed, 11 Mar 2026 17:02:41 +0900 Subject: [PATCH] fix(perception_fp): change method contain to intersect Signed-off-by: MasatoSaeki --- .../driving_log_replayer_v2/perception_fp/models.py | 6 +----- sample/perception_fp/scenario.yaml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/driving_log_replayer_v2/driving_log_replayer_v2/perception_fp/models.py b/driving_log_replayer_v2/driving_log_replayer_v2/perception_fp/models.py index 59b411e1..b65890ed 100644 --- a/driving_log_replayer_v2/driving_log_replayer_v2/perception_fp/models.py +++ b/driving_log_replayer_v2/driving_log_replayer_v2/perception_fp/models.py @@ -308,11 +308,7 @@ def is_in_non_detection_area( else True ) ) - is_in_xy = np.any( - contains( - prep_geom, corners[:, 0], corners[:, 1] - ) # or contains(non_detection_area, Polygon(corners[:, 0:2])) - ) + is_in_xy = np.any(prep_geom.intersects(Polygon(corners[:, 0:2]))) if is_in_z and is_in_xy: fp.append(bbox) exist = len(fp) != 0 diff --git a/sample/perception_fp/scenario.yaml b/sample/perception_fp/scenario.yaml index 345f017b..16847add 100644 --- a/sample/perception_fp/scenario.yaml +++ b/sample/perception_fp/scenario.yaml @@ -53,3 +53,16 @@ Evaluation: z_max: null # [m] null [Do not filter by z_max] or value timestamp: null # null [Do not filter by timestamp] or ros timestamp value in seconds topic_type: [pointcloud] # List of topic types to evaluate + - PassRate: 99.0 + criteria_name: test_function + non_detection_area: # Non-detection area specification in map coordinates + frame_id: map + polygon: # List of vertices of the polygon in map coordinates (x, y, z), clockwise order + - [3806.4705, 73721.0869, 19.6891] + - [3804.568, 73709.4626, 19.7295] + - [3799.1703, 73706.7849, 19.6921] + - [3804.503, 73720.9015, 19.6713] + z_min: null # [m] null [Do not filter by z_min] or value + z_max: null # [m] null [Do not filter by z_max] or value + timestamp: null # null [Do not filter by timestamp] or ros timestamp value in seconds + topic_type: [bbox] # List of topic types to evaluate