diff --git a/src/v2i-hub/MUSTSensorDriverPlugin/src/MUSTSensorDetection.h b/src/v2i-hub/MUSTSensorDriverPlugin/src/MUSTSensorDetection.h index 313204811..cd2dfcd6f 100644 --- a/src/v2i-hub/MUSTSensorDriverPlugin/src/MUSTSensorDetection.h +++ b/src/v2i-hub/MUSTSensorDriverPlugin/src/MUSTSensorDetection.h @@ -16,6 +16,9 @@ namespace MUSTSensorDriverPlugin { enum class DetectionClassification { SEDAN, TRUCK, + BUS, + PICKUP_TRUCK, + PEDESTRIAN, VAN, NA }; @@ -46,7 +49,10 @@ namespace MUSTSensorDriverPlugin { const static std::unordered_map stringToDetectionClassificationMap = { {"sedan", DetectionClassification::SEDAN}, {"truck", DetectionClassification::TRUCK}, - {"van", DetectionClassification::VAN} + {"van", DetectionClassification::VAN}, + {"bus", DetectionClassification::BUS}, + {"pickup truck", DetectionClassification::PICKUP_TRUCK}, + {"pedestrian", DetectionClassification::PEDESTRIAN} }; /** diff --git a/src/v2i-hub/MUSTSensorDriverPlugin/test/TestMUSTSensorDetection.cpp b/src/v2i-hub/MUSTSensorDriverPlugin/test/TestMUSTSensorDetection.cpp index a50783d3a..99595cc02 100644 --- a/src/v2i-hub/MUSTSensorDriverPlugin/test/TestMUSTSensorDetection.cpp +++ b/src/v2i-hub/MUSTSensorDriverPlugin/test/TestMUSTSensorDetection.cpp @@ -18,6 +18,9 @@ TEST(TestMUSTSensorDetection, fromStringToDetectionClassification) EXPECT_EQ(DetectionClassification::SEDAN, fromStringToDetectionClassification("sedan")); EXPECT_EQ(DetectionClassification::VAN, fromStringToDetectionClassification("van")); EXPECT_EQ(DetectionClassification::TRUCK, fromStringToDetectionClassification("truck")); + EXPECT_EQ(DetectionClassification::BUS, fromStringToDetectionClassification("bus")); + EXPECT_EQ(DetectionClassification::PICKUP_TRUCK, fromStringToDetectionClassification("pickup truck")); + EXPECT_EQ(DetectionClassification::PEDESTRIAN, fromStringToDetectionClassification("pedestrian")); EXPECT_EQ(DetectionClassification::NA, fromStringToDetectionClassification("not_a_classification")); } @@ -78,6 +81,9 @@ TEST(TestMUSTSensorDetection, detectionClassificationToSensorDetectedObjectType EXPECT_STRCASEEQ("SEDAN", detectionClassificationToSensorDetectedObjectType(DetectionClassification::SEDAN).c_str()); EXPECT_STRCASEEQ("VAN", detectionClassificationToSensorDetectedObjectType(DetectionClassification::VAN).c_str()); EXPECT_STRCASEEQ("TRUCK", detectionClassificationToSensorDetectedObjectType(DetectionClassification::TRUCK).c_str()); + EXPECT_STRCASEEQ("BUS", detectionClassificationToSensorDetectedObjectType(DetectionClassification::BUS).c_str()); + EXPECT_STRCASEEQ("PICKUP TRUCK", detectionClassificationToSensorDetectedObjectType(DetectionClassification::PICKUP_TRUCK).c_str()); + EXPECT_STRCASEEQ("PEDESTRIAN", detectionClassificationToSensorDetectedObjectType(DetectionClassification::PEDESTRIAN).c_str()); EXPECT_THROW(detectionClassificationToSensorDetectedObjectType(DetectionClassification::NA).c_str(), std::runtime_error); }