MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / _is_light_red

Method _is_light_red

leaderboard/team_code/auto_pilot.py:307–315  ·  view source on GitHub ↗
(self, lights_list)

Source from the content-addressed store, hash-verified

305 return None
306
307 def _is_light_red(self, lights_list):
308 if self._vehicle.get_traffic_light_state() != carla.libcarla.TrafficLightState.Green:
309 affecting = self._vehicle.get_traffic_light()
310
311 for light in self._traffic_lights:
312 if light.id == affecting.id:
313 return affecting
314
315 return None
316
317 def _is_walker_hazard(self, walkers_list):
318 z = self._vehicle.get_location().z

Callers 1

_should_brakeMethod · 0.95

Calls 1

Tested by

no test coverage detected