-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
-
Remove any the mock function that handles the detection class id for traffic light reg elem and implement
class_idtoTrafficLightStatemethod under traffic light reg elem class. (See for traffic sign implementation) -
Also clean up the hd_map, remove any irrelevant comments or unused functions.
For example:
- Remove this:
wato_monorepo/src/world_modeling/hd_map/src/hd_map_router.cpp
Lines 184 to 207 in b573a4f
// Mock function to get traffic light state (to change or remove) TrafficLightState HDMapRouter::get_traffic_light_state( const vision_msgs::msg::Detection3D::SharedPtr traffic_light_msg_ptr) { if (traffic_light_msg_ptr->results.empty()) { return TrafficLightState::Unknown; } TrafficLightState traffic_light_state = TrafficLightState::Unknown; float base_score = 0; for (const auto& result : traffic_light_msg_ptr->results) { if (result.hypothesis.score > base_score) { if (result.hypothesis.class_id == "GREEN") { traffic_light_state = TrafficLightState::Green; } else if (result.hypothesis.class_id == "YELLOW") { traffic_light_state = TrafficLightState::Yellow; } else if (result.hypothesis.class_id == "RED") { traffic_light_state = TrafficLightState::Red; } base_score = result.hypothesis.score; } } return TrafficLightState::Green; }
Metadata
Metadata
Assignees
Labels
No labels