Skip to content

Commit ba73472

Browse files
authored
Merge pull request #194 from OpenSimulationInterface/feature/genericsensorview
Generic Sensor Sub Views and Timestamps
2 parents 7f11fee + 3788433 commit ba73472

File tree

2 files changed

+106
-11
lines changed

2 files changed

+106
-11
lines changed

osi_sensorview.proto

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,29 +111,47 @@ message SensorView
111111
//
112112
optional Identifier host_vehicle_id = 8;
113113

114+
// Generic SensorView(s).
115+
//
116+
// \note OSI uses singular instead of plural for repeated field names.
117+
//
118+
repeated GenericSensorView generic_sensor_view = 1000;
119+
114120
// Radar-specific SensorView(s).
115121
//
116122
// \note OSI uses singular instead of plural for repeated field names.
117123
//
118-
repeated RadarSensorView radar_sensor_view = 1000;
124+
repeated RadarSensorView radar_sensor_view = 1001;
119125

120126
// Lidar-specific SensorView(s).
121127
//
122128
// \note OSI uses singular instead of plural for repeated field names.
123129
//
124-
repeated LidarSensorView lidar_sensor_view = 1001;
130+
repeated LidarSensorView lidar_sensor_view = 1002;
125131

126132
// Camera-specific SensorView(s).
127133
//
128134
// \note OSI uses singular instead of plural for repeated field names.
129135
//
130-
repeated CameraSensorView camera_sensor_view = 1002;
136+
repeated CameraSensorView camera_sensor_view = 1003;
131137

132138
// Ultrasonic-specific SensorView(s).
133139
//
134140
// \note OSI uses singular instead of plural for repeated field names.
135141
//
136-
repeated UltrasonicSensorView ultrasonic_sensor_view = 1003;
142+
repeated UltrasonicSensorView ultrasonic_sensor_view = 1004;
143+
}
144+
145+
//
146+
// \brief Definition of the generic sensor view.
147+
//
148+
// Generic sensor view data.
149+
//
150+
message GenericSensorView
151+
{
152+
// Generic view configuration valid at the time the data was created.
153+
//
154+
optional GenericSensorViewConfiguration view_configuration = 1;
137155
}
138156

139157
//

osi_sensorviewconfiguration.proto

Lines changed: 84 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ message SensorViewConfiguration
150150
// Unit: [s]
151151
// \note In the case of FMU packaging this will correspond to the
152152
// communication step size.
153-
optional double update_cycle_time = 8;
153+
optional Timestamp update_cycle_time = 8;
154154

155155
// Initial update cycle offset of the sensor model.
156156
//
@@ -170,7 +170,7 @@ message SensorViewConfiguration
170170
// simulation start times, e.g. for partial resimulation.
171171
//
172172
// Unit: [s]
173-
optional double update_cycle_offset = 9;
173+
optional Timestamp update_cycle_offset = 9;
174174

175175
// Simulation Start time
176176
//
@@ -179,31 +179,103 @@ message SensorViewConfiguration
179179
// the sensor model.
180180
//
181181
// Unit: [s]
182-
optional double simulation_start_time = 10;
182+
optional Timestamp simulation_start_time = 10;
183183

184+
// Generic SensorView Configuration(s).
185+
//
186+
// \note OSI uses singular instead of plural for repeated field names.
187+
//
188+
repeated GenericSensorViewConfiguration generic_sensor_view_configuration = 1000;
184189
// Radar-specific SensorView Configuration(s).
185190
//
186191
// \note OSI uses singular instead of plural for repeated field names.
187192
//
188-
repeated RadarSensorViewConfiguration radar_sensor_view_configuration = 1000;
193+
repeated RadarSensorViewConfiguration radar_sensor_view_configuration = 1001;
189194

190195
// Lidar-specific SensorView Configuration(s).
191196
//
192197
// \note OSI uses singular instead of plural for repeated field names.
193198
//
194-
repeated LidarSensorViewConfiguration lidar_sensor_view_configuration = 1001;
199+
repeated LidarSensorViewConfiguration lidar_sensor_view_configuration = 1002;
195200

196201
// Camera-specific SensorView Configuration(s).
197202
//
198203
// \note OSI uses singular instead of plural for repeated field names.
199204
//
200-
repeated CameraSensorViewConfiguration camera_sensor_view_configuration = 1002;
205+
repeated CameraSensorViewConfiguration camera_sensor_view_configuration = 1003;
201206

202207
// Ultrasonic-specific SensorView Configuration(s).
203208
//
204209
// \note OSI uses singular instead of plural for repeated field names.
205210
//
206-
repeated UltrasonicSensorViewConfiguration ultrasonic_sensor_view_configuration = 1003;
211+
repeated UltrasonicSensorViewConfiguration ultrasonic_sensor_view_configuration = 1004;
212+
}
213+
214+
//
215+
// \brief The configuration settings for the Generic Sensor View to be provided
216+
// by the environment simulation.
217+
//
218+
message GenericSensorViewConfiguration
219+
{
220+
// The ID of the sensor at host vehicle's mounting_position.
221+
//
222+
// This is the ID of the physical sensor, to be used in its detected
223+
// features output; it is distinct from the ID of its virtual sensor.
224+
//
225+
// The ID is to be provided by the environment simulation, the sensor
226+
// model is not in a position to provide a useful default value.
227+
//
228+
optional Identifier sensor_id = 1;
229+
230+
// The physical mounting position of the sensor (origin and orientation
231+
// of the sensor coordinate system) given in vehicle coordinates [1].
232+
// The physical position pertains to this detector individually, and
233+
// governs the sensor-relative coordinates in features detected by this
234+
// detector.
235+
//
236+
// \arg \b x-direction of sensor coordinate system: sensor viewing direction
237+
// \arg \b z-direction of sensor coordinate system: sensor (up)
238+
// \arg \b y-direction of sensor coordinate system: perpendicular to x and z
239+
// right hand system
240+
//
241+
// \par References:
242+
// [1] DIN ISO 8855:2013-11
243+
//
244+
// \note The origin of vehicle's coordinate system in world frame is
245+
// ( \c Vehicle::base.position + Inverse_Rotation_yaw_pitch_roll(
246+
// \c Vehicle::base.orientation) * \c Vehicle::bbcenter_to_rear ).
247+
// The orientation of the vehicle's coordinate system is equal to the
248+
// orientation of the vehicle's bounding box \c Vehicle::base.orientation.
249+
// \note A default position can be provided by the sensor model (e.g. to
250+
// indicate the position the model was validated for),
251+
// but this is optional; the environment simulation must provide a valid
252+
// mounting position (based on the vehicle configuration) when setting the
253+
// view configuration.
254+
//
255+
optional MountingPosition mounting_position = 2;
256+
257+
// The root mean squared error of the mounting position.
258+
//
259+
optional MountingPosition mounting_position_rmse = 3;
260+
261+
// Field of View in horizontal orientation of the physical sensor.
262+
//
263+
// Viewing range: [-field_of_view_horizontal/2, field_of_view_horizontal/2]
264+
// azimuth in the sensor frame as defined in \c Spherical3d.
265+
//
266+
// Unit: [rad]
267+
optional double field_of_view_horizontal = 4;
268+
269+
// Field of View in vertical orientation of the physical sensor.
270+
//
271+
// Viewing range: [-field_of_view_vertical/2, field_of_view_vertical/2]
272+
// elevation in the sensor frame at zero azimuth as defined in
273+
// \c Spherical3d.
274+
//
275+
// Unit: [rad]
276+
optional double field_of_view_vertical = 5;
277+
278+
// TBD: Generic sensor specific configuration.
207279
}
208280

209281
//
@@ -257,6 +329,7 @@ message RadarSensorViewConfiguration
257329
//
258330
// Viewing range: [-field_of_view_horizontal/2, field_of_view_horizontal/2]
259331
// azimuth in the sensor frame as defined in \c Spherical3d.
332+
//
260333
// Unit: [rad]
261334
optional double field_of_view_horizontal = 4;
262335

@@ -388,6 +461,7 @@ message LidarSensorViewConfiguration
388461
//
389462
// Viewing range: [-field_of_view_horizontal/2, field_of_view_horizontal/2]
390463
// azimuth in the sensor frame as defined in \c Spherical3d.
464+
//
391465
// Unit: [rad]
392466
optional double field_of_view_horizontal = 4;
393467

@@ -483,6 +557,7 @@ message CameraSensorViewConfiguration
483557
//
484558
// Viewing range: [-field_of_view_horizontal/2, field_of_view_horizontal/2]
485559
// azimuth in the sensor frame as defined in \c Spherical3d.
560+
//
486561
// Unit: [rad]
487562
optional double field_of_view_horizontal = 4;
488563

@@ -520,6 +595,7 @@ message CameraSensorViewConfiguration
520595
// be one of the values the sensor model requested - or there
521596
// must be no value, indicating that the simulation environment
522597
// cannot provide image data in one of the requested formats.
598+
//
523599
repeated ChannelFormat channel_format = 8;
524600

525601
enum ChannelFormat {
@@ -639,6 +715,7 @@ message UltrasonicSensorViewConfiguration
639715
//
640716
// Viewing range: [-field_of_view_horizontal/2, field_of_view_horizontal/2]
641717
// azimuth in the sensor frame as defined in \c Spherical3d.
718+
//
642719
// Unit: [rad]
643720
optional double field_of_view_horizontal = 4;
644721

0 commit comments

Comments
 (0)