Skip to content
Snippets Groups Projects
Commit e08212d5 authored by Eli Henry Dykhne's avatar Eli Henry Dykhne
Browse files

modified to add a green light check

parent fd8d1ab3
No related branches found
No related tags found
2 merge requests!21Major changes. convert nuplan devkit to handle occlusions for project,!5Relavant agents occluded metrics
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -135,6 +135,8 @@ class CanScenarioBeMadeDangerousStatistics(MetricBase): ...@@ -135,6 +135,8 @@ class CanScenarioBeMadeDangerousStatistics(MetricBase):
d += 1 d += 1
if connector.has_traffic_lights() and connector.id in traffic_light_status_dict[iteration][TrafficLightStatusType.RED]: if connector.has_traffic_lights() and connector.id in traffic_light_status_dict[iteration][TrafficLightStatusType.RED]:
n += 1 n += 1
elif connector.has_traffic_lights() and connector.id in traffic_light_status_dict[iteration][TrafficLightStatusType.GREEN]:
return True #if the light is explicitly green at any point, we can assume it is not red for the relavant portion of the scenario
if n / d > threshold: if n / d > threshold:
#print('hi there', n, d, n / d) #print('hi there', n, d, n / d)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment