Skip to content

Commit afb9953

Browse files
committed
feat(traffic_light_fine_detector): add test case
Signed-off-by: Shin-kyoto <aquashin0202@gmail.com>
1 parent 4c941e3 commit afb9953

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

perception/traffic_light_fine_detector/test/test_nodelet.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,11 @@ tensorrt_yolox::Object createYoloxBbox(
4040
bbox.type = type;
4141
return bbox;
4242
}
43+
44+
TEST(CalWeightedIouTest, NoOverlap)
45+
{
46+
const sensor_msgs::msg::RegionOfInterest map_based_bbox = createMapBasedBbox(0, 0, 10, 10);
47+
const tensorrt_yolox::Object yolox_bbox = createYoloxBbox(20, 20, 10, 10, 0.9f, 0);
48+
49+
EXPECT_FLOAT_EQ(traffic_light::calWeightedIou(map_based_bbox, yolox_bbox), 0.0f);
50+
}

0 commit comments

Comments
 (0)