Remove unused imports
This commit is contained in:
parent
1bed201f21
commit
adb10a609e
@ -1,10 +1,8 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import pickle
|
import pickle
|
||||||
import sys
|
import sys
|
||||||
from random import randrange
|
|
||||||
from typing import List, Dict
|
from typing import List, Dict
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from math import floor, ceil
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from dse_shared_libs import daf, traffic_light_state, traffic_light_color, target_velocity
|
from dse_shared_libs import daf, traffic_light_state, traffic_light_color, target_velocity
|
||||||
@ -93,7 +91,6 @@ class Orchestrator:
|
|||||||
current_vel = received_daf_object.velocity
|
current_vel = received_daf_object.velocity
|
||||||
target_vel = 130
|
target_vel = 130
|
||||||
print('Nearest traffic lights: {}'.format(traffic_lights_geo['cursor']))
|
print('Nearest traffic lights: {}'.format(traffic_lights_geo['cursor']))
|
||||||
print('Nearest traffic light count: {}'.format(len(traffic_lights_geo['cursor'])))
|
|
||||||
for traffic_light in traffic_lights_geo['cursor']:
|
for traffic_light in traffic_lights_geo['cursor']:
|
||||||
# Should only ever contain one traffic light
|
# Should only ever contain one traffic light
|
||||||
tl_id = traffic_light['id']
|
tl_id = traffic_light['id']
|
||||||
@ -119,7 +116,7 @@ class Orchestrator:
|
|||||||
print('Wait on green -> red -> green switch')
|
print('Wait on green -> red -> green switch')
|
||||||
time_until_green = time_until_switch + timedelta(seconds=self.tls[tl_id]['switching_time'])
|
time_until_green = time_until_switch + timedelta(seconds=self.tls[tl_id]['switching_time'])
|
||||||
target_vel = (distance / float(time_until_green.total_seconds())) * 3.6
|
target_vel = (distance / float(time_until_green.total_seconds())) * 3.6
|
||||||
print('Speed should be way lower than 130: {}'.format(target_vel))
|
print('Speed lower than 130: {}'.format(target_vel))
|
||||||
|
|
||||||
response_channel = self._velocity_mbs[received_daf_object.vehicle_identification_number]
|
response_channel = self._velocity_mbs[received_daf_object.vehicle_identification_number]
|
||||||
print('Target velocity: {}'.format(target_vel))
|
print('Target velocity: {}'.format(target_vel))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user