MCPcopy Create free account
hub / github.com/OpenDriveLab/TCP / _get_affordances

Method _get_affordances

leaderboard/team_code/base_agent.py:396–410  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

394
395
396 def _get_affordances(self):
397
398 # affordance tl
399 affordances = {}
400 affordances["traffic_light"] = None
401
402 affecting = self._vehicle.get_traffic_light()
403 if affecting is not None:
404 for light in self._traffic_lights:
405 if light.id == affecting.id:
406 affordances["traffic_light"] = self._translate_tl_state(self._vehicle.get_traffic_light_state())
407
408 affordances["stop_sign"] = self._affected_by_stop
409
410 return affordances
411
412 def _get_3d_bbs(self, max_distance=50):
413

Callers

nothing calls this directly

Calls 2

_translate_tl_stateMethod · 0.95

Tested by

no test coverage detected