(self, vehicle, timestamp)
| 8 | self._dist_threshold = dist_threshold |
| 9 | |
| 10 | def tick(self, vehicle, timestamp): |
| 11 | info = None |
| 12 | |
| 13 | light_state, light_loc, light_id = TrafficLightHandler.get_light_state( |
| 14 | vehicle, dist_threshold=self._dist_threshold) |
| 15 | |
| 16 | if light_id is not None: |
| 17 | if light_id != self._last_light_id: |
| 18 | self._last_light_id = light_id |
| 19 | info = { |
| 20 | 'step': timestamp['step'], |
| 21 | 'simulation_time': timestamp['relative_simulation_time'], |
| 22 | 'id': light_id, |
| 23 | 'tl_loc': light_loc.tolist() |
| 24 | } |
| 25 | |
| 26 | return info |
nothing calls this directly
no test coverage detected