|
|
## SensorProperties
|
|
|
|
|
|
A `Sensor` reads a `PhysicalValue` inside the vehicle and sends its value with the specified time interval.
|
|
|
|
|
|
| Entry | [Unit](/user-docs/JSON-scenarios-reference#units) | [Type](/user-docs/JSON-scenarios-reference#types) | Description | Default Value |
|
|
|
| :---- | :--- | :--- | :---------- | :------------ |
|
|
|
| `type` | - | S | Must be `sensor` for a `Sensor` component. Must be the first entry. | |
|
|
|
| `physical_value_name` | - | S | Name of the watched value. | - |
|
|
|
| `update_interval` | s | Duration | Duration between to sensor "reads". | 100 ms |
|
|
|
| `read_time` | s | Duration | Duration to read the value. | 10 ms |
|
|
|
| `send_only_changed` | - | Bool | Whether the sensor sends a message only when the read value has changed or not. | false |
|
|
|
|
|
|
List of `PhysicalValues` available for sensing:
|
|
|
|
|
|
| Name | Description | [Unit](/user-docs/JSON-scenarios-reference#units) |
|
|
|
| :---- | :--- | :--- |
|
|
|
| `true_position` | Perfect read (unrealistic) of the car's position (at the center of mass). Directly copied from the car's internal rigidbody. | [m,m,m] |
|
|
|
| `true_velocity` | Perfect read (unrealistic) of the car's velocity. Directly copied from the car's internal rigidbody. | km/h |
|
|
|
| `true_compass` | Perfect read (unrealistic) of the car's orientation (on the XY plane, with 0 -> +X axis, counterclockwise). Directly copied from the car's internal rigidbody. | deg |
|
|
|
| `battery_level` | For *Electric* power trains: Charge level of the battery. | % (0-100) |
|
|
|
|
|
|
## ActuatorProperties
|
|
|
|
|
|
An `Actuator` receives messages with the name `set_` + *physical_value_name*. This will update a `PhysicalValue` with name *physical_value_name* at a given maximum rate.
|
|
|
The actuator can also have a *feedback sensor* attached (`sensor` entry) which will send the current value back (with message name *physical_value_name*).
|
|
|
|
|
|
| Entry | [Unit](/user-docs/JSON-scenarios-reference#units) | [Type](/user-docs/JSON-scenarios-reference#types) | Description | Default Value |
|
|
|
| :---- | :--- | :--- | :---------- | :------------ |
|
|
|
| `type` | - | S | Must be `actuator` for a `Actuator` component. Must be the first entry. | |
|
|
|
| `physical_value_name` | - | S | Name of the set value. | - |
|
|
|
| `change_rate` | Units/s | FP | Speed at which the actuator can change the physical value, in "units" per seconds. | - |
|
|
|
| `sensor` | - | `SensorProperties` | (**Optional**) If set, the actuator will send feedback for the current value. The `type` and `physical_value_name` entries of the `SensorProperties` are ignored here. | - |
|
|
|
|
|
|
List of `PhysicalValues` from the powertrain that can be actuated:
|
|
|
|
|
|
| Name | Description | Range |
|
|
|
| :---- | :--- | :--- |
|
|
|
| `gas` | How much the vehicle should accelerate. A value of `1` is full throttle. Negative values can be used as a simplified way to go reverse. | [-0.5 ; 1] |
|
|
|
| `steering` | Desired *wheel orientation* (not steering wheel). Negative is to the right. | [-30 deg ; +30 deg] |
|
|
|
| `braking` | How much the vehicle should brake. A value of `1` is full braking force. | [0 ; 1] |
|
|
|
|
|
|
---
|
|
|
Next: [Bridge, Navigation and SimpleCommunicationGateway Properties](/user-docs/json-scenario-reference/Bridge,-Navigation-and-SimpleCommunicationGateway-Properties) |
|
|
\ No newline at end of file |