Skip to content

Commit 6b8d46d

Browse files
authored
Merge pull request #465 from OpenSimulationInterface/feature/ha/ExternalIdentifier
Definiton of external references
2 parents aeb8541 + 3f28734 commit 6b8d46d

8 files changed

+261
-1
lines changed

osi_common.proto

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,68 @@ message Identifier
215215
optional uint64 value = 1;
216216
}
217217

218+
// \brief References to external objects.
219+
//
220+
// The external reference is an optional recommendation to refer to objects defined outside of OSI.
221+
// This could be other OpenX standards, 3rd-party standards or user-defined objects.
222+
//
223+
// \note ExternalReference is optional and can be left empty.
224+
//
225+
message ExternalReference
226+
{
227+
// The source of the external references.
228+
//
229+
// Defines the original source of an object as uniquely identifiable reference.
230+
// In case of using \c GroundTruth::map_reference or
231+
// \c GroundTruth::model_reference, the reference can be left empty.
232+
// If not otherwise required, an URI is suggested. The syntax should follow
233+
// \link https://tools.ietf.org/html/rfc3986 RFC 3986\endlink.
234+
//
235+
//
236+
optional string reference = 1;
237+
238+
// The type of the external references.
239+
//
240+
// Mandatory value describing the type of the original source.
241+
//
242+
// For OpenX/ASAM standards it is specified as follows:
243+
// - net.asam.opendrive
244+
// - net.asam.openscenario
245+
//
246+
// For third-party standards and user-defined objects,
247+
// reverse domain name notation with lower-case type field
248+
// is recommended to guarantee unique and interoperable identification.
249+
//
250+
optional string type = 2;
251+
252+
// The external identifier reference value.
253+
//
254+
// The repeated string is chosen as a common description of the external
255+
// identifier, because a variety of identificatier types could be
256+
// involved .
257+
//
258+
// For example, referencing a unique lane in OpenDRIVE requires the
259+
// following identifiers:
260+
// * RoadId: String
261+
// * S-Value of LaneSection: Double
262+
// * LaneId: Int
263+
//
264+
// \note The detailed description of the identifiers and how they are
265+
// used for referencing external objects is given in the individual
266+
// messages where the external identifier is used.
267+
//
268+
// \see EnvironmentalConditions::source_reference
269+
// \see Lane::source_reference
270+
// \see LaneBoundary::source_reference
271+
// \see StationaryObject::source_reference
272+
// \see MovingObject::source_reference
273+
// \see RoadMarking::source_reference
274+
// \see TrafficLight::source_reference
275+
// \see TrafficSign::source_reference
276+
//
277+
repeated string identifier = 3;
278+
}
279+
218280
//
219281
// \brief Specifies the mounting position of a sensor.
220282
//
@@ -517,4 +579,3 @@ message WavelengthData
517579
//
518580
optional double samples_number = 3;
519581
}
520-

osi_environment.proto

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ syntax = "proto2";
22

33
option optimize_for = SPEED;
44

5+
import "osi_common.proto";
6+
57
package osi3;
68

79
//
@@ -85,6 +87,19 @@ message EnvironmentalConditions
8587
// Description of the fog.
8688
//
8789
optional Fog fog = 7;
90+
91+
// Optional external reference to the environmental condition sources.
92+
//
93+
// \note For OpenDRIVE and OpenSECNARIO there is no direct counterpart.
94+
//
95+
// \note For non-ASAM standards, it is implementation-specific how
96+
// source_reference is resolved.
97+
//
98+
// \note The value has to be repeated because one object may be derived
99+
// from more than one origin source, for example, from a scenario file
100+
// and from sensors.
101+
//
102+
repeated ExternalReference source_reference = 9;
88103

89104
// Definition of discretized precipitation states according to [1].
90105
// (I = Intensity of precipitation in mm per hour mm/h)

osi_lane.proto

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,30 @@ message Lane
5050
//
5151
optional Classification classification = 2;
5252

53+
// Optional external reference to the lane source.
54+
//
55+
// The external reference points to the source of the lane, if it is derived
56+
// from one or more objects or external references.
57+
//
58+
// For example, to reference a lane defined in an OpenDRIVE map
59+
// the items should be set as follows:
60+
// * reference = URI to map, can remain empty if identical with definiton
61+
// in \c GroundTruth::map_reference
62+
// * type = "net.asam.opendrive"
63+
// * identifier[0] = id of t_road
64+
// * identifier[1] = s of t_road_lanes_laneSection
65+
// * identifier[2] = id of t_road_lanes_laneSection_left_lane,
66+
// t_road_lanes_laneSection_right_lane
67+
//
68+
// \note For non-ASAM Standards, it is implementation-specific how
69+
// source_reference is resolved.
70+
//
71+
// \note The value has to be repeated, because one lane segment may be
72+
// derived from more than one origin segment. Multiple sources
73+
// may be added as reference as well, for example, a map and sensors.
74+
//
75+
repeated ExternalReference source_reference = 3;
76+
5377
//
5478
// \brief \c Classification of a lane.
5579
//
@@ -724,6 +748,20 @@ message LaneBoundary
724748
// The classification of the lane boundary.
725749
//
726750
optional Classification classification = 3;
751+
752+
// Optional external reference to the lane boundary source.
753+
//
754+
// \note For OpenDRIVE, there is no direct possibility to reference the
755+
// RoadMark, as there is no unique identifier in this sub-object.
756+
//
757+
// \note For non-ASAM Standards, it is implementation-specific how
758+
// source_reference is resolved.
759+
//
760+
// \note The value has to be repeated because one object may be derived
761+
// from more than one origin source, for example, from a scenario file
762+
// and from sensors.
763+
//
764+
repeated ExternalReference source_reference = 4;
727765

728766
//
729767
// \brief A single point of a lane boundary.

osi_object.proto

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,41 @@ message StationaryObject
4040
//
4141
optional string model_reference = 4;
4242

43+
// External reference to the stationary-object source.
44+
//
45+
// The external reference points to the source of a stationary object, if it
46+
// is derived from an external sources like OpenDRIVE or OpenSCENARIO.
47+
//
48+
// For example, to reference an object defined in an OpenDRIVE map
49+
// the items should be set as follows:
50+
// * reference = URI to map, can remain empty if identical with definiton
51+
// in \c GroundTruth::map_reference
52+
// * type = "net.asam.opendrive"
53+
// * identifier[0] = "object" for t_road_objects_object and
54+
// "bridge" for t_road_objects_bridge
55+
// * identifier[1] = id of t_road_objects_object or t_road_objects_bridge
56+
//
57+
// For example, to reference OpenSCENARIO entities of the type MiscObject,
58+
// which describe partly stationary objects, the items should be set as
59+
// follows:
60+
// * reference = URI to the OpenSCENARIO File
61+
// * type = "net.asam.openscenario"
62+
// * identifier[0] = Entity-Type ("MiscObject")
63+
// * identifier[1] = name of MiscObject in Entity
64+
//
65+
// \note The following rule, described in OpenDRIVE, also applies:
66+
// * Objects derived from OpenSCENARIO shall not be mixed with objects
67+
// described in OpenDRIVE.
68+
//
69+
// \note For non-ASAM Standards, it is implementation-specific how
70+
// source_reference is resolved.
71+
//
72+
// \note The value has to be repeated because one object may be derived
73+
// from more than one origin source, for example, from a scenario file
74+
// and from sensors.
75+
//
76+
repeated ExternalReference source_reference = 5;
77+
4378
//
4479
// \brief Classification data for a stationary object.
4580
//
@@ -359,6 +394,30 @@ message MovingObject
359394
//
360395
optional MovingObjectClassification moving_object_classification = 9;
361396

397+
// Optional external reference to the moving-object source
398+
//
399+
// The external reference points to the source of an moving object, if it
400+
// is derived from an external sources like OpenSCENARIO.
401+
//
402+
// For example, to reference OpenSCENARIO entities of the type Vehicle or
403+
// Pedestrian, which describe moving objects, the items should be set as
404+
// follows:
405+
// * reference = URI to the OpenSCENARIO File
406+
// * type = "net.asam.openscenario"
407+
// * identifier[0] = Entity-Type ("Vehicle" or "Pedestrian")
408+
// * identifier[1] = name of Vehicle/Pedestrian in Entity
409+
//
410+
// \todo OpenSCENARIO currently does not provide an animal type.
411+
//
412+
// \note For non-ASAM Standards, it is implementation-specific how
413+
// source_reference is resolved.
414+
//
415+
// \note The value has to be repeated because one object may be derived
416+
// from more than one origin source, for example, from a scenario file
417+
// and from sensors.
418+
//
419+
repeated ExternalReference source_reference = 10;
420+
362421
// Definition of object types.
363422
//
364423
enum Type

osi_occupant.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ message Occupant
2323
//
2424
optional Classification classification = 2;
2525

26+
// External reference to the occupant source.
27+
//
28+
// \note For OpenDRIVE and OpenSCENARIO there is no direct counterpart.
29+
//
30+
// \note For non-ASAM Standards, it is implementation-specific how
31+
// source_reference is resolved.
32+
//
33+
// \note The value has to be repeated because one object may be derived
34+
// from more than one origin source, for example, from a scenario file
35+
// and from sensors.
36+
//
37+
repeated ExternalReference source_reference = 3;
38+
2639
//
2740
// \brief Information regarding the classification of the occupant.
2841
//

osi_roadmarking.proto

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,33 @@ message RoadMarking
5555
//
5656
optional Classification classification = 3;
5757

58+
// Optional external reference to the road-marking source.
59+
//
60+
// The external reference points to the source of the surface marking, if it
61+
// is derived from one or more objects or external references. An example
62+
// here is the reference to the signal defined in a OpenDRIVE map.
63+
//
64+
// For example, to reference a signal defined in an OpenDRIVE map
65+
// the items should be set as follows:
66+
// * reference = URI to map, can remain empty if identical with definiton
67+
// in \c GroundTruth::map_reference
68+
// * type = "net.asam.opendrive"
69+
// * identifier[0] = id of t_road_signals_signal
70+
//
71+
// \note With OpenDRIVE, surface markings can also be defined as objects.
72+
// In this case, the associated object is usually referenced within
73+
// OpenDRIVE using the reference t_road_signals_signal_reference.
74+
// An additional reference to the object is therefore not necessary.
75+
//
76+
// \note For non-ASAM Standards, it is implementation-specific how
77+
// source_reference is resolved.
78+
//
79+
// \note The value has to be repeated, because one lane segment may be
80+
// derived from more than one origin segment. Multiple sources
81+
// may be added as reference as well, for example, a map and sensors.
82+
//
83+
repeated ExternalReference source_reference = 4;
84+
5885
//
5986
// \brief \c Classification data for a road surface marking.
6087
//

osi_trafficlight.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,27 @@ message TrafficLight
4242
//
4343
optional string model_reference = 4;
4444

45+
// Optional external reference to the traffic light source.
46+
//
47+
// The external reference points to the source of the traffic light, if it
48+
// is derived from one or more objects or external references.
49+
//
50+
// For example, to reference a signal defined in an OpenDRIVE map
51+
// the items should be set as follows:
52+
// * reference = URI to map, can remain empty if identical with definition
53+
// in \c GroundTruth::map_reference
54+
// * type = "net.asam.opendrive"
55+
// * identifier[0] = id of t_road_signals_signal
56+
//
57+
// \note For non-ASAM Standards, it is implementation-specific how
58+
// source_reference is resolved.
59+
//
60+
// \note The value has to be repeated, because one lane segment may be
61+
// derived from more than one origin segment. Multiple sources
62+
// may be added as reference as well, for example, a map and sensors.
63+
//
64+
repeated ExternalReference source_reference = 5;
65+
4566
//
4667
// \brief \c Classification data for a traffic light.
4768
//

osi_trafficsign.proto

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,32 @@ message TrafficSign
156156
//
157157
repeated SupplementarySign supplementary_sign = 3;
158158

159+
160+
// Optional external reference to the traffic sign source.
161+
//
162+
// The external reference point to the source of the traffic sign, if it is
163+
// derived from one or more objects or external references.
164+
//
165+
// For example, to reference a signal defined in an OpenDRIVE map
166+
// the items should be set as follows:
167+
// * reference = URI to map, can remain empty if identical with definition
168+
// in \c GroundTruth::map_reference
169+
// * type = "net.asam.opendrive"
170+
// * identifier[0] = id of t_road_signals_signal
171+
//
172+
// \note For non-ASAM Standards, it is implementation-specific how
173+
// source_reference is resolved.
174+
//
175+
// \note If an individual identification of MainSign and SupplementarySign
176+
// is necessary, this should be done via multiple individual
177+
// entries of this source_reference.
178+
//
179+
// \note The value has to be repeated, because one lane segment may be
180+
// derived from more than one origin segment. Multiple sources
181+
// may be added as reference as well, for example, a map and sensors.
182+
//
183+
repeated ExternalReference source_reference = 4;
184+
159185
//
160186
// \brief Main sign of the traffic sign.
161187
//

0 commit comments

Comments
 (0)