Skip to content

Commit 33a8efe

Browse files
authored
Initial commit of the Open Simulation Interface (OSI) Version 17 (#1)
Thanks!
1 parent 19e43f1 commit 33a8efe

18 files changed

+2015
-0
lines changed

LICENSE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Open Simulation Interface (OSI)
2+
===============================
3+
4+
Copyright (C) 2016 BMW AG
5+
6+
This Source Code Form is subject to the terms of the Mozilla Public
7+
License, v. 2.0. If a copy of the MPL was not distributed with this
8+
file, You can obtain one at http://mozilla.org/MPL/2.0/.

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Open Simulation Interface (OSI)
2+
===============================
3+
4+
General description
5+
-------------------
6+
https://www.hot.ei.tum.de/forschung/automotive-veroeffentlichungen/
7+
8+
9+
Global remarks
10+
--------------
11+
All fields in the interface are set to optional and required is not used. This has been done to allow backward
12+
compatible changes in the field. Additionally, this is the default behavior in protobuf version 3 that does no longer
13+
have the required type and therefore ensures update compatibility.
14+
However, this does not mean that filling the field is optional. For the purpose of providing a complete interface, all
15+
existing fields should be set, unless not setting a field carries a specific meaning as indicated in the accompanying
16+
comment.
17+
18+
19+
Fault injection: how-to
20+
------------------------
21+
Injection of pre-defined sensor errors should be handled by a specialized "fault injector" component that acts like a
22+
sensor model component, i.e. it takes a SensorData message as input and returns a modified SensorData message as output.
23+
Specific errors should be handled as follows:
24+
-- Ghost objects / false positive: An additional SensorDataObject is added to the list of objects in SensorData.object
25+
with SensorDataObject.model_internal_object.ground_truth_type set to kTypeGhost.
26+
-- False negative: The object is marked as not seen by the sensor by setting the property
27+
SensorDataObject.model_internal_object.is_seen to false. The implementation of field-of-view calculation modules
28+
should respect this flag and never reset an object marked as not-seen to seen.
29+
30+
31+
Versioning
32+
----------
33+
The version number is defined in InterfaceVersion::version_number in osi_common.proto as the field's default value.

osi_common.proto

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
// define the proto language version
2+
syntax = "proto2";
3+
// optimize for speed
4+
option optimize_for = SPEED;
5+
6+
// OSI - Open Simulation Interface
7+
package osi;
8+
9+
/**
10+
* The interface version number.
11+
*/
12+
message InterfaceVersion
13+
{
14+
// The field containing the version number. Should be left on default, not to be modified by sender.
15+
// Increments will happen as part of changes to the whole interface.
16+
optional uint32 version_number = 1 [default = 17];
17+
}
18+
19+
/**
20+
* A cartesian 3D vector for positions, velocities or accelerations.
21+
* Units are [m] for positions, [m/s] for velocities and [m/s^2] for accelerations.
22+
*/
23+
message Vector3d
24+
{
25+
// The x coordinate
26+
optional double x = 1;
27+
28+
// The y coordinate
29+
optional double y = 2;
30+
31+
// The z coordinate
32+
optional double z = 3;
33+
}
34+
35+
/**
36+
* A timestamp.
37+
* Names and types of fields chosen in accordance with google/protobuf/timestamp.proto to allow a possible switch
38+
* in the future. Definition of zero point in time differs and does not use Unix epoch.
39+
*/
40+
message Timestamp
41+
{
42+
// The number of seconds since start of the simulation / system / vehicle. Unit: [s].
43+
optional int64 seconds = 1;
44+
45+
// The number of nanoseconds since the start of the last second. Unit: [ns].
46+
optional int32 nanos = 2;
47+
}
48+
49+
/**
50+
* A 3D dimension, e.g. parameters of a 3D bounding box.
51+
* Units are all [m].
52+
*/
53+
message Dimension3d
54+
{
55+
// The width of the bounding box.
56+
optional double width = 1;
57+
58+
// The length of the bounding box.
59+
optional double length = 2;
60+
61+
//The height of the bounding box.
62+
optional double height = 3;
63+
}
64+
65+
/**
66+
* A 3D orientation, orientation rate or orientation acceleration.
67+
* Units are [rad] for orientation, [rad/s] for rates and [rad/s^2] for accelerations. The preferred angular range is
68+
* (-pi, pi]. See http://planning.cs.uiuc.edu/node102.html for a definition of the rotational order. The rotations are
69+
* to be performed roll first, then the pitch, and finally the yaw. Rotations are defined in the reference coordinate
70+
* frame around z (=yaw), y (=pitch) and x (=roll), not in the body frame of the object. Rotations with positive angles
71+
* are performed counter-clockwise.
72+
*
73+
* Roll/Pitch are 0 if objects xy-plane corresponds it's parent xy-plane.
74+
* Yaw is 0 if the x axis is parallel to the x axis of it's parent coordinate system.
75+
*/
76+
message Orientation3d
77+
{
78+
// The roll angle/rate/acceleration.
79+
optional double roll = 1;
80+
81+
// The pitch angle/rate/acceleration.
82+
optional double pitch = 2;
83+
84+
// The yaw angle/rate/acceleration.
85+
optional double yaw = 3;
86+
}
87+
88+
/**
89+
* A common identifier.
90+
* Has to be unique among all simulated items at any given time.
91+
* For ground truth, the identifier of an item (object, lane, sign, etc.) must remain stable over its lifetime.
92+
* Identifier values might be only be reused if the available address space is exhausted and the specific values have
93+
* not been in use for several timesteps.
94+
* Sensor specific tracking ids have no restrictions and should behave according to the sensor specifications.
95+
*/
96+
message Identifier
97+
{
98+
// The identifier's value.
99+
optional uint64 value = 1;
100+
}
101+
102+
/**
103+
* Specifies the mounting position of a sensor. Details are specified in each instance where MountingPosition is used.
104+
*/
105+
message MountingPosition
106+
{
107+
// Offset position relative to specified reference coordinate system.
108+
optional Vector3d position = 1;
109+
110+
// Orientation offset relative to specified reference coordinate system.
111+
optional Orientation3d orientation = 2;
112+
}
113+
114+
/**
115+
* A polar representation for a point / vector in 3D space used for low level representations of radar detections.
116+
* Units are [m] for radial distance and [rad] for azimuth and elevation angles.
117+
* If azimuth and elevation are zero, the referenced point is directly in front / vector is pointing
118+
* directly in the central viewing direction of the sensor.
119+
*/
120+
message Polar3d
121+
{
122+
// The radial distance.
123+
optional double distance = 1;
124+
125+
// The azimuth (horizontal) angle.
126+
optional double azimuth = 2;
127+
128+
// The elevation (vertical) angle.
129+
optional double elevation = 3;
130+
}
131+
132+
/**
133+
* The base attributes of object or similar that is stationary.
134+
* This includes the StationaryObject, TrafficSign, TrafficLight, RoadMarking messages.
135+
*/
136+
message BaseStationary
137+
{
138+
// The 3D dimension of the landmark (bounding box):
139+
optional Dimension3d dimension = 1;
140+
141+
// The reference point for position and rotation (orientation): center (x, y, z) of bounding box.
142+
optional Vector3d position = 2;
143+
144+
// The relative orientation of the landmark w.r.t its parent frame.
145+
optional Orientation3d orientation = 3;
146+
}
147+
148+
/**
149+
* The base attributes of each object that is moving.
150+
* This includes the MovingObject messages.
151+
*/
152+
message BaseMoving
153+
{
154+
// The 3D dimension of the object (bounding box):
155+
optional Dimension3d dimension = 1;
156+
157+
// The reference point for position and rotation (orientation): center (x, y, z) of bounding box.
158+
optional Vector3d position = 2;
159+
160+
// The relative orientation of the object w.r.t its parent frame.
161+
optional Orientation3d orientation = 3;
162+
163+
// The relative velocity of the object w.r.t. its parent frame and parent velocity.
164+
// Obviously, the velocity becomes global/absolute if the parent frame does not move.
165+
optional Vector3d velocity = 4;
166+
167+
// The relative acceleration of the object w.r.t. its parent frame and parent acceleration.
168+
// Obviously, the acceleration becomes global/absolute if the parent frame is not accelerating.
169+
optional Vector3d acceleration = 5;
170+
171+
// The relative orientation rate of the object w.r.t. its parent frame and parent orientation rate.
172+
// Obviously, the orientation rate becomes global/absolute if the parent frame is not rotating.
173+
optional Orientation3d orientation_rate = 6;
174+
}

osi_datarecording.proto

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// define the proto language version
2+
syntax = "proto2";
3+
// optimize for speed
4+
option optimize_for = SPEED;
5+
6+
// imports
7+
import "osi_sensordata.proto";
8+
9+
// OSI - Open Simulation Interface
10+
package osi;
11+
12+
/**
13+
* (Time) Series of SensorData messages that may be used for data recording or internal buffering by some sensor models.
14+
*/
15+
message SensorDataSeries
16+
{
17+
// List of sensor data messages for subsequent timesteps.
18+
repeated SensorData sensor_data = 1;
19+
}
20+
21+
/**
22+
* List of SensorData interface copies, one for each sensor in the vehicle.
23+
* Can be used to bundle output of multiple sensors in one transmission.
24+
*/
25+
message SensorDataList
26+
{
27+
// List of sensor data for multiple sensors at a specific timestep.
28+
repeated SensorData sensor = 1;
29+
}
30+
31+
/**
32+
* List of sensors where each element contains a time series of SensorData messages.
33+
*/
34+
message SensorDataSeriesList
35+
{
36+
// List of sensor data for multiple sensors at subsequent timesteps.
37+
repeated SensorDataSeries sensor = 1;
38+
}

0 commit comments

Comments
 (0)