diff --git a/perception/traffic_light_fine_detector/test/test_nodelet.cpp b/perception/traffic_light_fine_detector/test/test_nodelet.cpp index 99b90f8b74881..7d50c1c4068ee 100644 --- a/perception/traffic_light_fine_detector/test/test_nodelet.cpp +++ b/perception/traffic_light_fine_detector/test/test_nodelet.cpp @@ -40,3 +40,11 @@ tensorrt_yolox::Object createYoloxBbox( bbox.type = type; return bbox; } + +TEST(CalWeightedIouTest, NoOverlap) +{ + const sensor_msgs::msg::RegionOfInterest map_based_bbox = createMapBasedBbox(0, 0, 10, 10); + const tensorrt_yolox::Object yolox_bbox = createYoloxBbox(20, 20, 10, 10, 0.9f, 0); + + EXPECT_FLOAT_EQ(traffic_light::calWeightedIou(map_based_bbox, yolox_bbox), 0.0f); +}