Skip to content

Commit 9364922

Browse files
authored
Merge pull request #196 from OpenSimulationInterface/update/DetectedMessages-restructured
Restructuring DetectedXXX messages
2 parents 0703124 + 7446fac commit 9364922

File tree

4 files changed

+152
-447
lines changed

4 files changed

+152
-447
lines changed

osi_detectedlandmark.proto

Lines changed: 33 additions & 220 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,9 @@ package osi3;
1313
//
1414
message DetectedTrafficSign
1515
{
16-
// Specific ID of the traffic sign as assigned by the sensor internally.
17-
// Need not match with \c #ground_truth_id.
16+
// Common information of one detected item.
1817
//
19-
optional Identifier tracking_id = 2;
20-
21-
// The ID of the original traffic sign in the ground truth.
22-
// In case of a ghost sign (no corresponding ground truth), this field
23-
// should be unset.
24-
//
25-
optional Identifier ground_truth_id = 3;
18+
optional DetectedItemHeader header = 1;
2619

2720
// The main sign as detected by the sensor.
2821
//
@@ -34,28 +27,6 @@ message DetectedTrafficSign
3427
//
3528
repeated EstimatedSupplementarySign supplementary_sign = 5;
3629

37-
// The estimated probability that this traffic sign with all supplementary
38-
// signs really exists, not based on history.
39-
//
40-
// \note Use as confidence measure where a low value means less confidence
41-
// and a high value indicates strong confidence.
42-
//
43-
optional double existence_probability = 7;
44-
45-
// A list of sensors which detected this detected entity.
46-
//
47-
// If \c SensorData has detected entities and all detections are missing,
48-
// then e.g. the number of sensors can confirm the
49-
// \c #existence_probability.
50-
//
51-
// \note This information can be determined via the detected entities'
52-
// detections ( \c ...Detection::object_id = 'this detected entity' ) and
53-
// the sensors (their IDs) to which these detections belong.
54-
//
55-
// \note OSI uses singular instead of plural for repeated field names.
56-
//
57-
repeated Identifier sensor_id = 8;
58-
5930
//
6031
// \brief Candidates for a detected sign as estimated by the sensor.
6132
//
@@ -84,30 +55,16 @@ message DetectedTrafficSign
8455
//
8556
message CandidateMainSign
8657
{
58+
// Common information of one detected item candidate.
59+
//
60+
optional DetectedCandidateItemHeader header = 1;
61+
8762
// The definition of one main sign that defines this candidate.
8863
//
8964
// \note IDs, which are referenced in this message, usually
9065
// reference to \c DetectedXXX::tracking_id IDs.
9166
//
92-
optional TrafficSign.MainSign main_sign = 1;
93-
94-
// The estimated probability that this candidate is the true value.
95-
// The sum of all \c #probability must be one.
96-
//
97-
// Range: [0,1]
98-
//
99-
optional double probability = 2;
100-
101-
// The amount of time that this detected object has been currently
102-
// observed/tracked.
103-
//
104-
// Unit: [s]
105-
//
106-
optional double age = 3;
107-
108-
// The measurement state.
109-
//
110-
optional MeasurementState measurement_state = 4;
67+
optional TrafficSign.MainSign main_sign = 2;
11168
}
11269

11370
// Definition of traffic sign geometries.
@@ -206,32 +163,17 @@ message DetectedTrafficSign
206163
//
207164
message CandidateSupplementarySign
208165
{
166+
// Common information of one detected item candidate.
167+
//
168+
optional DetectedCandidateItemHeader header = 1;
169+
209170
// The definition of one of more supplementary signs that together
210171
// define this candidate.
211172
//
212173
// \note IDs, which are referenced in this message, usually
213174
// reference to \c DetectedXXX::tracking_id IDs.
214175
//
215-
optional TrafficSign.SupplementarySign supplementary_sign = 1;
216-
217-
// The estimated probability that this candidate is the true value.
218-
// The sum of all \c #probability of one supplementary
219-
// sign must be one.
220-
//
221-
// Range: [0,1]
222-
//
223-
optional double probability = 2;
224-
225-
// The amount of time that this detected object has been currently
226-
// observed/tracked.
227-
//
228-
// Unit: [s]
229-
//
230-
optional double age = 3;
231-
232-
// The measurement state.
233-
//
234-
optional MeasurementState measurement_state = 4;
176+
optional TrafficSign.SupplementarySign supplementary_sign = 2;
235177
}
236178
}
237179
}
@@ -241,43 +183,14 @@ message DetectedTrafficSign
241183
//
242184
message DetectedTrafficLight
243185
{
244-
// Specific ID of the traffic light as assigned by the sensor internally.
245-
// Need not match with \c #ground_truth_id.
246-
//
247-
optional Identifier tracking_id = 2;
248-
249-
// The ID of the original traffic light in the ground truth.
250-
// In case of a ghost detection (no corresponding ground truth), this field
251-
// should be unset.
186+
// Common information of one detected item.
252187
//
253-
optional Identifier ground_truth_id = 3;
188+
optional DetectedItemHeader header = 1;
254189

255190
// The main sign as detected by the sensor.
256191
//
257192
optional EstimatedTrafficLight traffic_light = 4;
258193

259-
// The estimated probability that this traffic light really exists, not
260-
// based on history.
261-
//
262-
// \note Use as confidence measure where a low value means less confidence
263-
// and a high value indicates strong confidence.
264-
//
265-
optional double existence_probability = 8;
266-
267-
// A list of sensors which detected this detected entity.
268-
//
269-
// If \c SensorData has detected entities and all detections are missing,
270-
// then e.g. the number of sensors can confirm the
271-
// \c #existence_probability.
272-
//
273-
// \note This information can be determined via the detected entities'
274-
// detections ( \c ...Detection::object_id = 'this detected entity' ) and
275-
// the sensors (their IDs) to which these detections belong.
276-
//
277-
// \note OSI uses singular instead of plural for repeated field names.
278-
//
279-
repeated Identifier sensor_id = 10;
280-
281194
//
282195
// \brief Candidates for a detected traffic light as estimated by the
283196
// sensor.
@@ -303,29 +216,16 @@ message DetectedTrafficLight
303216
//
304217
message CandidateTrafficLight
305218
{
219+
// Common information of one detected item candidate.
220+
//
221+
optional DetectedCandidateItemHeader header = 1;
222+
306223
// The definition of one traffic light that define this candidate.
307224
//
308225
// \note IDs, which are referenced in this message, usually
309226
// reference to \c DetectedXXX::tracking_id IDs.
310227
//
311-
optional TrafficLight traffic_light = 1;
312-
313-
// The estimated probability that this candidate is the true value.
314-
// The sum of all \c #probability must be one.
315-
//
316-
// Range: [0,1]
317-
//
318-
optional double probability = 2;
319-
320-
// The amount of time that this detected object has been currently
321-
// observed/tracked.
322-
//
323-
// Unit: [s]
324-
optional double age = 3;
325-
326-
// The measurement state.
327-
//
328-
optional MeasurementState measurement_state = 4;
228+
optional TrafficLight traffic_light = 2;
329229
}
330230
}
331231
}
@@ -335,43 +235,14 @@ message DetectedTrafficLight
335235
//
336236
message DetectedRoadMarking
337237
{
338-
// Specific ID of the road marking as assigned by the sensor internally.
339-
// Need not match with \c #ground_truth_id.
238+
// Common information of one detected item.
340239
//
341-
optional Identifier tracking_id = 2;
342-
343-
// The ID of the original road marking in the ground truth.
344-
// In case of a ghost detection (no corresponding ground truth), this field
345-
// should be unset.
346-
//
347-
optional Identifier ground_truth_id = 3;
240+
optional DetectedItemHeader header = 1;
348241

349242
// The road marking as detected by the sensor.
350243
//
351244
optional EstimatedRoadMarking road_marking = 4;
352245

353-
// The estimated probability that this road marking really exists, not based
354-
// on history.
355-
//
356-
// \note Use as confidence measure where a low value means less confidence
357-
// and a high value indicates strong confidence.
358-
//
359-
optional double existence_probability = 5;
360-
361-
// A list of sensors which detected this detected entity.
362-
//
363-
// If \c SensorData has detected entities and all detections are missing,
364-
// then e.g. the number of sensors can confirm the
365-
// \c #existence_probability.
366-
//
367-
// \note This information can be determined via the detected entities'
368-
// detections ( \c ...Detection::object_id = 'this detected entity' ) and
369-
// the sensors (their IDs) to which these detections belong.
370-
//
371-
// \note OSI uses singular instead of plural for repeated field names.
372-
//
373-
repeated Identifier sensor_id = 11;
374-
375246
//
376247
// \brief Candidates for a detected traffic light as estimated by the
377248
// sensor.
@@ -397,30 +268,16 @@ message DetectedRoadMarking
397268
//
398269
message CandidateRoadMarking
399270
{
271+
// Common information of one detected item candidate.
272+
//
273+
optional DetectedCandidateItemHeader header = 1;
274+
400275
// The description of the road marking.
401276
//
402277
// \note IDs, which are referenced in this message, usually
403278
// reference to \c DetectedXXX::tracking_id IDs.
404279
//
405-
optional RoadMarking road_marking = 1;
406-
407-
// The estimated probability that this candidate is the true value.
408-
// The sum of all \c #probability must be one.
409-
//
410-
// Range: [0,1]
411-
//
412-
optional double probability = 2;
413-
414-
// The amount of time that this detected object has been currently
415-
// observed/tracked.
416-
//
417-
// Unit: [s]
418-
//
419-
optional double age = 3;
420-
421-
// The measurement state.
422-
//
423-
optional MeasurementState measurement_state = 4;
280+
optional RoadMarking road_marking = 2;
424281
}
425282
}
426283
}
@@ -430,44 +287,14 @@ message DetectedRoadMarking
430287
//
431288
message DetectedLandmark
432289
{
433-
// Specific ID of the landmark as assigned by the sensor internally.
434-
// Need not match with \c #ground_truth_id.
290+
// Common information of one detected item.
435291
//
436-
optional Identifier tracking_id = 1;
437-
438-
// The ID of the original landmark in the ground truth.
439-
// In case of a ghost detection (no corresponding ground truth), this field
440-
// should be unset.
441-
//
442-
// \note OSI uses singular instead of plural for repeated field names.
443-
//
444-
repeated Identifier ground_truth_id = 2;
292+
optional DetectedItemHeader header = 1;
445293

446294
// The landmark as detected by the sensor.
447295
//
448296
optional EstimatedLandmark landmark = 3;
449297

450-
// The estimated probability that this landmark really exists, not based
451-
// on history.
452-
//
453-
// \note Use as confidence measure where a low value means less confidence
454-
// and a high value indicates strong confidence.
455-
//
456-
optional double existence_probability = 4;
457-
458-
// A list of sensors which detected this detected entity.
459-
//
460-
// If \c SensorData has detected entities and all detections are missing,
461-
// then e.g. the number of sensors can confirm the #existence_probability.
462-
//
463-
// \note This information can be determined via the detected entities'
464-
// detections ( \c ...Detection::object_id = 'this detected entity' ) and
465-
// the sensors (their IDs) to which these detections belong.
466-
//
467-
// \note OSI uses singular instead of plural for repeated field names.
468-
//
469-
repeated Identifier sensor_id = 6;
470-
471298
//
472299
// \brief Candidates for a detected Landmark as estimated by the
473300
// sensor.
@@ -492,30 +319,16 @@ message DetectedLandmark
492319
//
493320
message CandidateLandmark
494321
{
322+
// Common information of one detected item candidate.
323+
//
324+
optional DetectedCandidateItemHeader header = 1;
325+
495326
// The description of the landmark.
496327
//
497328
// \note IDs, which are referenced in this message, usually
498329
// reference to \c DetectedXXX::tracking_id IDs.
499330
//
500-
optional Landmark landmark = 1;
501-
502-
// The estimated probability that this candidate is the true value.
503-
// The sum of all \c #probability must be one.
504-
//
505-
// Range: [0,1]
506-
//
507-
optional double probability = 2;
508-
509-
// The amount of time that this detected object has been currently
510-
// observed/tracked.
511-
//
512-
// Unit: [s]
513-
//
514-
optional double age = 3;
515-
516-
// The measurement state.
517-
//
518-
optional MeasurementState measurement_state = 4;
331+
optional Landmark landmark = 2;
519332
}
520333
}
521334
}

0 commit comments

Comments
 (0)