added switch for unknown color;
This commit is contained in:
parent
39fead94f9
commit
3d88059f8d
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user