Vehicles in the simulator are instanced from a Vehicle Configuration represented by the following Properties structure:
The following tables show the possible entries for the different Properties structures.
Vehicle Properties
Entry | Unit | Type | Description | Default Value |
---|---|---|---|---|
name |
S | Name of the vehicle. | "UnnamedCar" |
|
The following three start_... position entries are exclusive: they are alternate ways of specifying the starting position. |
||||
start_pos |
[m,m] | Vec2 | The starting position of the vehicle in (local) world coordinates. | |
start_coords |
[lon,lat] | Coordinates | The starting position of the vehicle in geographic coordinates (longitude/latitude). | |
start_osm_node |
I | The starting position of the vehicle as OSM node-id. | ||
start_orientation |
deg | FP | The starting rotation of the vehicle. 0 deg is pointing EAST. Counter-clockwise (90 deg is NORTH). |
0 deg (EAST) |
task |
O | A Task Properties specification. Tells the objectives of the vehicle. | ||
body |
O | A Body Properties specification. | ||
wheels |
O | A Wheel Properties specification. | ||
powertrain |
O | A PowerTrain Properties specification. | ElectricalPowerTrain |
|
physics |
O | A Physics Properties specification. (Only implementation right now: RigidbodyPhysics , see below.) |
RigidbodyPhysics |
|
components |
[O] | A JSON Array containing EEComponentProperties specifications (see below). |
RigidbodyPhysics Properties
Right now only specify: "type": "rigidbody"
.
This physics model uses simple rigidbody physics to model the car. It is not the most realistic of model and can use further improvements.
EE-components properties
EE comes from "Electrical & Electronic Systems"
The different EE-components in the vehicle are all modelled individually. These components communicate using messages. The components send the messages through buses, which are also modelled as ee-components.
The components
entry of the vehicle properties is a list of those components and how they are connected together.
These are typed entries, so they must have the "type": "..."
entry as first entry.
All EEComponent
sub-types can also have the following entries:
Entry | Unit | Type | Description | Default Value |
---|---|---|---|---|
connected_to |
[S] | List of component names this component is attached to. | ||
priority |
I | For components that can send messages: the priority on the buses. |
As can be seen in the graphic at the start of this page, the following are EE-components:
ConstantBus
CAN
Sensor
Actuator
Bridge
Navigation
SCG
Lidar
SpeedLimit
TestAutopilot
JavaAutopilot
Computer
The following pages show the detailed properties of those components.
Examples
Basic Setup and Specifying EE-components
The start position of the vehicle can alternatively be specified using the start_coords
or start_osm_node
entries (instead of start_pos
).
The ee-component properties are detailed in the next pages, this example show how they would appear in the vehicle configuration.
The details of the tasks are omitted here.
{
"name": "TestVehicle1",
"start_pos": [ -123.09, 21.64 ],
"start_orientation": -30.0,
"task": {
"goals": [ ... ]
},
"components": [
{
"type": "constant_bus",
"mode": "instant",
"rate": 0.0,
"connected_to": [
"SteeringActuator",
...
]
},
{
"type": "actuator",
"name": "SteeringActuator",
"physical_value_name": "steering",
...
},
...
]
}
Specifying body, wheel or powertrain properties
The body, wheel and powertrain are detailed in the next pages, but this example shows how they would appear in the vehicle configuration. (All these have default values, so do not have to be specified if the defaults are used.)
{
"name": "TestVehicle2",
"start_pos": [ 0, 0 ],
"task": {
"goals": [ ... ]
},
"components": [ ... ],
"body": {
"length": 4.971,
"width": 1.87,
...
},
"wheels": {
"diameter": 0.6612,
"width": 0.255,
...
},
"powertrain": {
"type": "electrical",
"traction": "rear",
...
},
"physics": {
"type": "rigidbody"
}
}
Next: Task Properties