Document non-player agents
This commit is contained in:
parent
d6b61aac63
commit
b2bdd96501
|
@ -126,18 +126,68 @@ If enabled, the server attaches a list of agents to the measurements package
|
|||
every frame. Each of these agents has an unique id that identifies it, and
|
||||
belongs to one of the following classes
|
||||
|
||||
* **Vehicle** Contains its transform, box-extent, and forward speed.
|
||||
* **Pedestrian** Contains its transform, box-extent, and forward speed. (*)
|
||||
* **Traffic light** Contains its transform and state (green, yellow, red).
|
||||
* **Speed-limit sign** Contains its transform and speed-limit.
|
||||
* Vehicle
|
||||
* Pedestrian
|
||||
* Traffic ligth
|
||||
* Speed limit sign
|
||||
|
||||
(*) At this point every pedestrian is assumed to have the same bounding-box
|
||||
size.
|
||||
Each of them can be accessed in Python by checking if the agent object has the
|
||||
field enabled
|
||||
|
||||
```python
|
||||
measurements, sensor_data = client.read_data()
|
||||
|
||||
for agent in measurements.non_player_agents:
|
||||
agent.id # unique id of the agent
|
||||
if agent.HasField('vehicle'):
|
||||
agent.vehicle.forward_speed
|
||||
agent.vehicle.transform
|
||||
agent.vehicle.bounding_box
|
||||
```
|
||||
|
||||
<h6>Vehicle</h6>
|
||||
|
||||
Key | Type | Description
|
||||
------------------------------- | --------- | ------------
|
||||
id | uint32 | Agent ID
|
||||
vehicle.forward_speed | float | Forward speed of the vehicle in m/s
|
||||
vehicle.transform | Transform | Agent-to-world transform
|
||||
vehicle.bounding_box.transform | Transform | Transform of the bounding box relative to the vehicle
|
||||
vehicle.bounding_box.extent | Vector3D | Radii dimensions of the bounding box in meters
|
||||
|
||||
<h6>Pedestrian</h6>
|
||||
|
||||
Key | Type | Description
|
||||
--------------------------------- | --------- | ------------
|
||||
id | uint32 | Agent ID
|
||||
pedestrian.forward_speed | float | Forward speed of the pedestrian in m/s
|
||||
pedestrian.transform | Transform | Agent-to-world transform
|
||||
pedestrian.bounding_box.transform | Transform | Transform of the bounding box relative to the pedestrian
|
||||
pedestrian.bounding_box.extent | Vector3D | Radii dimensions of the bounding box in meters (*)
|
||||
|
||||
<small>(*) At this point every pedestrian is assumed to have the same
|
||||
bounding-box size.</small>
|
||||
|
||||
<h6>Traffic light</h6>
|
||||
|
||||
Key | Type | Description
|
||||
---------------------------- | --------- | ------------
|
||||
id | uint32 | Agent ID
|
||||
traffic_light.transform | Transform | Agent-to-world transform
|
||||
traffic_light.state | enum | Traffic light state; `GREEN`, `YELLOW`, or `RED`
|
||||
|
||||
<h6>Speed limit sign</h6>
|
||||
|
||||
Key | Type | Description
|
||||
---------------------------- | --------- | ------------
|
||||
id | uint32 | Agent ID
|
||||
speed_limit_sign.transform | Transform | Agent-to-world transform
|
||||
speed_limit_sign.speed_limit | float | Speed limit in m/s
|
||||
|
||||
<h4>Transform and bounding box</h4>
|
||||
|
||||
The transform defines the location and orientation of the agent. The bounding
|
||||
box is centered at the agent's location. The box extent gives the radii
|
||||
dimensions of the bounding box of the agent.
|
||||
The transform defines the location and orientation of the agent. The transform
|
||||
of the bounding box is given relative to the vehicle. The box extent gives the
|
||||
radii dimensions of the bounding box of the agent.
|
||||
|
||||

|
||||
|
|
Loading…
Reference in New Issue