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

Method sensors

scenario_runner/srunner/autoagents/npc_agent.py:36–60  ·  view source on GitHub ↗

Define the sensor suite required by the agent :return: a list containing the required sensors in the following format: [ {'type': 'sensor.camera.rgb', 'x': 0.7, 'y': -0.4, 'z': 1.60, 'roll': 0.0, 'pitch': 0.0, 'yaw': 0.0, 'width': 300, 'he

(self)

Source from the content-addressed store, hash-verified

34 self._agent = None
35
36 def sensors(self):
37 """
38 Define the sensor suite required by the agent
39
40 :return: a list containing the required sensors in the following format:
41
42 [
43 {'type': 'sensor.camera.rgb', 'x': 0.7, 'y': -0.4, 'z': 1.60, 'roll': 0.0, 'pitch': 0.0, 'yaw': 0.0,
44 'width': 300, 'height': 200, 'fov': 100, 'id': 'Left'},
45
46 {'type': 'sensor.camera.rgb', 'x': 0.7, 'y': 0.4, 'z': 1.60, 'roll': 0.0, 'pitch': 0.0, 'yaw': 0.0,
47 'width': 300, 'height': 200, 'fov': 100, 'id': 'Right'},
48
49 {'type': 'sensor.lidar.ray_cast', 'x': 0.7, 'y': 0.0, 'z': 1.60, 'yaw': 0.0, 'pitch': 0.0, 'roll': 0.0,
50 'id': 'LIDAR'}
51
52
53 """
54
55 sensors = [
56 {'type': 'sensor.camera.rgb', 'x': 0.7, 'y': -0.4, 'z': 1.60, 'roll': 0.0, 'pitch': 0.0, 'yaw': 0.0,
57 'width': 300, 'height': 200, 'fov': 100, 'id': 'Left'},
58 ]
59
60 return sensors
61
62 def run_step(self, input_data, timestamp):
63 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected