|
| 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 | +} |
0 commit comments