diff --git a/components/orchestration/orchestrator.py b/components/orchestration/orchestrator.py index 110d216..acee465 100644 --- a/components/orchestration/orchestrator.py +++ b/components/orchestration/orchestrator.py @@ -157,7 +157,7 @@ class Orchestrator: i = i + 2 target_vel = floor(speed_needed_max) - else: + elif self.tls[tl_id]['color'] is TrafficLightColor.GREEN: # Check if we can reach TL in time speed_needed_min = (distance / float(time_until_switch)) * 3.6 if speed_needed_min < 130 * SCALING: @@ -173,5 +173,6 @@ class Orchestrator: speed_needed_max = (distance / float(next_green_phase_start)) * 3.6 i = i + 2 target_vel = floor(speed_needed_max) - + else: + print('Unknown Traffic Light Color!') return target_vel