Skip to content

Definiton of external references #465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 62 additions & 1 deletion osi_common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,68 @@ message Identifier
optional uint64 value = 1;
}

// \brief References to external objects.
//
// The external reference is an optional recommendation to refer to objects defined outside of OSI.
// This could be other OpenX standards, 3rd-party standards or user-defined objects.
//
// \note ExternalReference is optional and can be left empty.
//
message ExternalReference
{
// The source of the external references.
//
// Defines the original source of an object as uniquely identifiable reference.
// In case of using \c GroundTruth::map_reference or
// \c GroundTruth::model_reference, the reference can be left empty.
// If not otherwise required, an URI is suggested. The syntax should follow
// \link https://tools.ietf.org/html/rfc3986 RFC 3986\endlink.
//
//
optional string reference = 1;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include URI as a suggestion instead of a must, considering that it can also be a model-reference.
Take a look at the map, and model references.
Possibly to adapt this definition also to model and map references.


// The type of the external references.
//
// Mandatory value describing the type of the original source.
//
// For OpenX/ASAM standards it is specified as follows:
// - net.asam.opendrive
// - net.asam.openscenario
//
// For third-party standards and user-defined objects,
// reverse domain name notation with lower-case type field
// is recommended to guarantee unique and interoperable identification.
//
optional string type = 2;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Insert list of predefined types (like those for OpenX) and general rules/guidance for user-defined standards or objects.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Output CCB 12.05.2021:

  1. Remove the version from the comment description, name should be enough (OpenDRIVE instead of OpenDrive 1.6)
  2. Use the domain name notation, e.g. net.asam.opendrive instead of OpenDRIVE.
  3. Indicate that the type field should be lower case.


// The external identifier reference value.
//
// The repeated string is chosen as a common description of the external
// identifier, because a variety of identificatier types could be
// involved .
//
// For example, referencing a unique lane in OpenDRIVE requires the
// following identifiers:
// * RoadId: String
// * S-Value of LaneSection: Double
// * LaneId: Int
//
// \note The detailed description of the identifiers and how they are
// used for referencing external objects is given in the individual
// messages where the external identifier is used.
//
// \see EnvironmentalConditions::source_reference
// \see Lane::source_reference
// \see LaneBoundary::source_reference
// \see StationaryObject::source_reference
// \see MovingObject::source_reference
// \see RoadMarking::source_reference
// \see TrafficLight::source_reference
// \see TrafficSign::source_reference
//
repeated string identifier = 3;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note maybe:
More details on how identifiers are set to be used for referencing external objects are given in places where the ExternalIdentifier message is used.

}

//
// \brief Specifies the mounting position of a sensor.
//
Expand Down Expand Up @@ -517,4 +579,3 @@ message WavelengthData
//
optional double samples_number = 3;
}

15 changes: 15 additions & 0 deletions osi_environment.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ syntax = "proto2";

option optimize_for = SPEED;

import "osi_common.proto";

package osi3;

//
Expand Down Expand Up @@ -85,6 +87,19 @@ message EnvironmentalConditions
// Description of the fog.
//
optional Fog fog = 7;

// Optional external reference to the environmental condition sources.
//
// \note For OpenDRIVE and OpenSECNARIO there is no direct counterpart.
//
// \note For non-ASAM standards, it is implementation-specific how
// source_reference is resolved.
//
// \note The value has to be repeated because one object may be derived
// from more than one origin source, for example, from a scenario file
// and from sensors.
//
repeated ExternalReference source_reference = 9;

// Definition of discretized precipitation states according to [1].
// (I = Intensity of precipitation in mm per hour mm/h)
Expand Down
38 changes: 38 additions & 0 deletions osi_lane.proto
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,30 @@ message Lane
//
optional Classification classification = 2;

// Optional external reference to the lane source.
//
// The external reference points to the source of the lane, if it is derived
// from one or more objects or external references.
//
// For example, to reference a lane defined in an OpenDRIVE map
// the items should be set as follows:
// * reference = URI to map, can remain empty if identical with definiton
// in \c GroundTruth::map_reference
// * type = "net.asam.opendrive"
// * identifier[0] = id of t_road
// * identifier[1] = s of t_road_lanes_laneSection
// * identifier[2] = id of t_road_lanes_laneSection_left_lane,
// t_road_lanes_laneSection_right_lane
//
// \note For non-ASAM Standards, it is implementation-specific how
// source_reference is resolved.
//
// \note The value has to be repeated, because one lane segment may be
// derived from more than one origin segment. Multiple sources
// may be added as reference as well, for example, a map and sensors.
//
repeated ExternalReference source_reference = 3;

//
// \brief \c Classification of a lane.
//
Expand Down Expand Up @@ -724,6 +748,20 @@ message LaneBoundary
// The classification of the lane boundary.
//
optional Classification classification = 3;

// Optional external reference to the lane boundary source.
//
// \note For OpenDRIVE, there is no direct possibility to reference the
// RoadMark, as there is no unique identifier in this sub-object.
//
// \note For non-ASAM Standards, it is implementation-specific how
// source_reference is resolved.
//
// \note The value has to be repeated because one object may be derived
// from more than one origin source, for example, from a scenario file
// and from sensors.
//
repeated ExternalReference source_reference = 4;

//
// \brief A single point of a lane boundary.
Expand Down
59 changes: 59 additions & 0 deletions osi_object.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,41 @@ message StationaryObject
//
optional string model_reference = 4;

// External reference to the stationary-object source.
//
// The external reference points to the source of a stationary object, if it
// is derived from an external sources like OpenDRIVE or OpenSCENARIO.
//
// For example, to reference an object defined in an OpenDRIVE map
// the items should be set as follows:
// * reference = URI to map, can remain empty if identical with definiton
// in \c GroundTruth::map_reference
// * type = "net.asam.opendrive"
// * identifier[0] = "object" for t_road_objects_object and
// "bridge" for t_road_objects_bridge
// * identifier[1] = id of t_road_objects_object or t_road_objects_bridge
//
// For example, to reference OpenSCENARIO entities of the type MiscObject,
// which describe partly stationary objects, the items should be set as
// follows:
// * reference = URI to the OpenSCENARIO File
// * type = "net.asam.openscenario"
// * identifier[0] = Entity-Type ("MiscObject")
// * identifier[1] = name of MiscObject in Entity
//
// \note The following rule, described in OpenDRIVE, also applies:
// * Objects derived from OpenSCENARIO shall not be mixed with objects
// described in OpenDRIVE.
//
// \note For non-ASAM Standards, it is implementation-specific how
// source_reference is resolved.
//
// \note The value has to be repeated because one object may be derived
// from more than one origin source, for example, from a scenario file
// and from sensors.
//
repeated ExternalReference source_reference = 5;

//
// \brief Classification data for a stationary object.
//
Expand Down Expand Up @@ -359,6 +394,30 @@ message MovingObject
//
optional MovingObjectClassification moving_object_classification = 9;

// Optional external reference to the moving-object source
//
// The external reference points to the source of an moving object, if it
// is derived from an external sources like OpenSCENARIO.
//
// For example, to reference OpenSCENARIO entities of the type Vehicle or
// Pedestrian, which describe moving objects, the items should be set as
// follows:
// * reference = URI to the OpenSCENARIO File
// * type = "net.asam.openscenario"
// * identifier[0] = Entity-Type ("Vehicle" or "Pedestrian")
// * identifier[1] = name of Vehicle/Pedestrian in Entity
//
// \todo OpenSCENARIO currently does not provide an animal type.
//
// \note For non-ASAM Standards, it is implementation-specific how
// source_reference is resolved.
//
// \note The value has to be repeated because one object may be derived
// from more than one origin source, for example, from a scenario file
// and from sensors.
//
repeated ExternalReference source_reference = 10;

// Definition of object types.
//
enum Type
Expand Down
13 changes: 13 additions & 0 deletions osi_occupant.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ message Occupant
//
optional Classification classification = 2;

// External reference to the occupant source.
//
// \note For OpenDRIVE and OpenSCENARIO there is no direct counterpart.
//
// \note For non-ASAM Standards, it is implementation-specific how
// source_reference is resolved.
//
// \note The value has to be repeated because one object may be derived
// from more than one origin source, for example, from a scenario file
// and from sensors.
//
repeated ExternalReference source_reference = 3;

//
// \brief Information regarding the classification of the occupant.
//
Expand Down
27 changes: 27 additions & 0 deletions osi_roadmarking.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,33 @@ message RoadMarking
//
optional Classification classification = 3;

// Optional external reference to the road-marking source.
//
// The external reference points to the source of the surface marking, if it
// is derived from one or more objects or external references. An example
// here is the reference to the signal defined in a OpenDRIVE map.
//
// For example, to reference a signal defined in an OpenDRIVE map
// the items should be set as follows:
// * reference = URI to map, can remain empty if identical with definiton
// in \c GroundTruth::map_reference
// * type = "net.asam.opendrive"
// * identifier[0] = id of t_road_signals_signal
//
// \note With OpenDRIVE, surface markings can also be defined as objects.
// In this case, the associated object is usually referenced within
// OpenDRIVE using the reference t_road_signals_signal_reference.
// An additional reference to the object is therefore not necessary.
//
// \note For non-ASAM Standards, it is implementation-specific how
// source_reference is resolved.
//
// \note The value has to be repeated, because one lane segment may be
// derived from more than one origin segment. Multiple sources
// may be added as reference as well, for example, a map and sensors.
//
repeated ExternalReference source_reference = 4;

//
// \brief \c Classification data for a road surface marking.
//
Expand Down
21 changes: 21 additions & 0 deletions osi_trafficlight.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,27 @@ message TrafficLight
//
optional string model_reference = 4;

// Optional external reference to the traffic light source.
//
// The external reference points to the source of the traffic light, if it
// is derived from one or more objects or external references.
//
// For example, to reference a signal defined in an OpenDRIVE map
// the items should be set as follows:
// * reference = URI to map, can remain empty if identical with definition
// in \c GroundTruth::map_reference
// * type = "net.asam.opendrive"
// * identifier[0] = id of t_road_signals_signal
//
// \note For non-ASAM Standards, it is implementation-specific how
// source_reference is resolved.
//
// \note The value has to be repeated, because one lane segment may be
// derived from more than one origin segment. Multiple sources
// may be added as reference as well, for example, a map and sensors.
//
repeated ExternalReference source_reference = 5;

//
// \brief \c Classification data for a traffic light.
//
Expand Down
26 changes: 26 additions & 0 deletions osi_trafficsign.proto
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,32 @@ message TrafficSign
//
repeated SupplementarySign supplementary_sign = 3;


// Optional external reference to the traffic sign source.
//
// The external reference point to the source of the traffic sign, if it is
// derived from one or more objects or external references.
//
// For example, to reference a signal defined in an OpenDRIVE map
// the items should be set as follows:
// * reference = URI to map, can remain empty if identical with definition
// in \c GroundTruth::map_reference
// * type = "net.asam.opendrive"
// * identifier[0] = id of t_road_signals_signal
//
// \note For non-ASAM Standards, it is implementation-specific how
// source_reference is resolved.
//
// \note If an individual identification of MainSign and SupplementarySign
// is necessary, this should be done via multiple individual
// entries of this source_reference.
//
// \note The value has to be repeated, because one lane segment may be
// derived from more than one origin segment. Multiple sources
// may be added as reference as well, for example, a map and sensors.
//
repeated ExternalReference source_reference = 4;

//
// \brief Main sign of the traffic sign.
//
Expand Down