From c19815bdd0b0d3ed099b4398e509a946b7b908c5 Mon Sep 17 00:00:00 2001 From: carsten-kuebler <32508295+carsten-kuebler@users.noreply.github.com> Date: Wed, 28 Mar 2018 12:02:09 +0200 Subject: [PATCH 1/2] Restructuring All messages expect DetectedObject message --- osi_detectedlandmark.proto | 253 +++++-------------------------------- osi_detectedlane.proto | 118 ++--------------- osi_detectedobject.proto | 66 ++++++++++ osi_detectedoccupant.proto | 53 +------- 4 files changed, 120 insertions(+), 370 deletions(-) diff --git a/osi_detectedlandmark.proto b/osi_detectedlandmark.proto index 310937873..37c293cfa 100644 --- a/osi_detectedlandmark.proto +++ b/osi_detectedlandmark.proto @@ -13,16 +13,9 @@ package osi3; // message DetectedTrafficSign { - // Specific ID of the traffic sign as assigned by the sensor internally. - // Need not match with \c #ground_truth_id. + // Common information of one detected item. // - optional Identifier tracking_id = 2; - - // The ID of the original traffic sign in the ground truth. - // In case of a ghost sign (no corresponding ground truth), this field - // should be unset. - // - optional Identifier ground_truth_id = 3; + optional DetectedItemHeader header = 1; // The main sign as detected by the sensor. // @@ -34,28 +27,6 @@ message DetectedTrafficSign // repeated EstimatedSupplementarySign supplementary_sign = 5; - // The estimated probability that this traffic sign with all supplementary - // signs really exists, not based on history. - // - // \note Use as confidence measure where a low value means less confidence - // and a high value indicates strong confidence. - // - optional double existence_probability = 7; - - // A list of sensors which detected this detected entity. - // - // If \c SensorData has detected entities and all detections are missing, - // then e.g. the number of sensors can confirm the - // \c #existence_probability. - // - // \note This information can be determined via the detected entities' - // detections ( \c ...Detection::object_id = 'this detected entity' ) and - // the sensors (their IDs) to which these detections belong. - // - // \note OSI uses singular instead of plural for repeated field names. - // - repeated Identifier sensor_id = 8; - // // \brief Candidates for a detected sign as estimated by the sensor. // @@ -84,30 +55,16 @@ message DetectedTrafficSign // message CandidateMainSign { + // Common information of one detected item candidate. + // + optional DetectedItemHeader.CandidateItemHeader header = 1; + // The definition of one main sign that defines this candidate. // // \note IDs, which are referenced in this message, usually // reference to \c DetectedXXX::tracking_id IDs. // - optional TrafficSign.MainSign main_sign = 1; - - // The estimated probability that this candidate is the true value. - // The sum of all \c #probability must be one. - // - // Range: [0,1] - // - optional double probability = 2; - - // The amount of time that this detected object has been currently - // observed/tracked. - // - // Unit: [s] - // - optional double age = 3; - - // The measurement state. - // - optional MeasurementState measurement_state = 4; + optional TrafficSign.MainSign main_sign = 2; } // Definition of traffic sign geometries. @@ -206,32 +163,17 @@ message DetectedTrafficSign // message CandidateSupplementarySign { + // Common information of one detected item candidate. + // + optional DetectedItemHeader.CandidateItemHeader header = 1; + // The definition of one of more supplementary signs that together // define this candidate. // // \note IDs, which are referenced in this message, usually // reference to \c DetectedXXX::tracking_id IDs. // - optional TrafficSign.SupplementarySign supplementary_sign = 1; - - // The estimated probability that this candidate is the true value. - // The sum of all \c #probability of one supplementary - // sign must be one. - // - // Range: [0,1] - // - optional double probability = 2; - - // The amount of time that this detected object has been currently - // observed/tracked. - // - // Unit: [s] - // - optional double age = 3; - - // The measurement state. - // - optional MeasurementState measurement_state = 4; + optional TrafficSign.SupplementarySign supplementary_sign = 2; } } } @@ -241,43 +183,14 @@ message DetectedTrafficSign // message DetectedTrafficLight { - // Specific ID of the traffic light as assigned by the sensor internally. - // Need not match with \c #ground_truth_id. - // - optional Identifier tracking_id = 2; - - // The ID of the original traffic light in the ground truth. - // In case of a ghost detection (no corresponding ground truth), this field - // should be unset. + // Common information of one detected item. // - optional Identifier ground_truth_id = 3; + optional DetectedItemHeader header = 1; // The main sign as detected by the sensor. // optional EstimatedTrafficLight traffic_light = 4; - // The estimated probability that this traffic light really exists, not - // based on history. - // - // \note Use as confidence measure where a low value means less confidence - // and a high value indicates strong confidence. - // - optional double existence_probability = 8; - - // A list of sensors which detected this detected entity. - // - // If \c SensorData has detected entities and all detections are missing, - // then e.g. the number of sensors can confirm the - // \c #existence_probability. - // - // \note This information can be determined via the detected entities' - // detections ( \c ...Detection::object_id = 'this detected entity' ) and - // the sensors (their IDs) to which these detections belong. - // - // \note OSI uses singular instead of plural for repeated field names. - // - repeated Identifier sensor_id = 10; - // // \brief Candidates for a detected traffic light as estimated by the // sensor. @@ -303,29 +216,16 @@ message DetectedTrafficLight // message CandidateTrafficLight { + // Common information of one detected item candidate. + // + optional DetectedItemHeader.CandidateItemHeader header = 1; + // The definition of one traffic light that define this candidate. // // \note IDs, which are referenced in this message, usually // reference to \c DetectedXXX::tracking_id IDs. // - optional TrafficLight traffic_light = 1; - - // The estimated probability that this candidate is the true value. - // The sum of all \c #probability must be one. - // - // Range: [0,1] - // - optional double probability = 2; - - // The amount of time that this detected object has been currently - // observed/tracked. - // - // Unit: [s] - optional double age = 3; - - // The measurement state. - // - optional MeasurementState measurement_state = 4; + optional TrafficLight traffic_light = 2; } } } @@ -335,43 +235,14 @@ message DetectedTrafficLight // message DetectedRoadMarking { - // Specific ID of the road marking as assigned by the sensor internally. - // Need not match with \c #ground_truth_id. + // Common information of one detected item. // - optional Identifier tracking_id = 2; - - // The ID of the original road marking in the ground truth. - // In case of a ghost detection (no corresponding ground truth), this field - // should be unset. - // - optional Identifier ground_truth_id = 3; + optional DetectedItemHeader header = 1; // The road marking as detected by the sensor. // optional EstimatedRoadMarking road_marking = 4; - // The estimated probability that this road marking really exists, not based - // on history. - // - // \note Use as confidence measure where a low value means less confidence - // and a high value indicates strong confidence. - // - optional double existence_probability = 5; - - // A list of sensors which detected this detected entity. - // - // If \c SensorData has detected entities and all detections are missing, - // then e.g. the number of sensors can confirm the - // \c #existence_probability. - // - // \note This information can be determined via the detected entities' - // detections ( \c ...Detection::object_id = 'this detected entity' ) and - // the sensors (their IDs) to which these detections belong. - // - // \note OSI uses singular instead of plural for repeated field names. - // - repeated Identifier sensor_id = 11; - // // \brief Candidates for a detected traffic light as estimated by the // sensor. @@ -397,30 +268,16 @@ message DetectedRoadMarking // message CandidateRoadMarking { + // Common information of one detected item candidate. + // + optional DetectedItemHeader.CandidateItemHeader header = 1; + // The description of the road marking. // // \note IDs, which are referenced in this message, usually // reference to \c DetectedXXX::tracking_id IDs. // - optional RoadMarking road_marking = 1; - - // The estimated probability that this candidate is the true value. - // The sum of all \c #probability must be one. - // - // Range: [0,1] - // - optional double probability = 2; - - // The amount of time that this detected object has been currently - // observed/tracked. - // - // Unit: [s] - // - optional double age = 3; - - // The measurement state. - // - optional MeasurementState measurement_state = 4; + optional RoadMarking road_marking = 2; } } } @@ -430,44 +287,14 @@ message DetectedRoadMarking // message DetectedLandmark { - // Specific ID of the landmark as assigned by the sensor internally. - // Need not match with \c #ground_truth_id. + // Common information of one detected item. // - optional Identifier tracking_id = 1; - - // The ID of the original landmark in the ground truth. - // In case of a ghost detection (no corresponding ground truth), this field - // should be unset. - // - // \note OSI uses singular instead of plural for repeated field names. - // - repeated Identifier ground_truth_id = 2; + optional DetectedItemHeader header = 1; // The landmark as detected by the sensor. // optional EstimatedLandmark landmark = 3; - // The estimated probability that this landmark really exists, not based - // on history. - // - // \note Use as confidence measure where a low value means less confidence - // and a high value indicates strong confidence. - // - optional double existence_probability = 4; - - // A list of sensors which detected this detected entity. - // - // If \c SensorData has detected entities and all detections are missing, - // then e.g. the number of sensors can confirm the #existence_probability. - // - // \note This information can be determined via the detected entities' - // detections ( \c ...Detection::object_id = 'this detected entity' ) and - // the sensors (their IDs) to which these detections belong. - // - // \note OSI uses singular instead of plural for repeated field names. - // - repeated Identifier sensor_id = 6; - // // \brief Candidates for a detected Landmark as estimated by the // sensor. @@ -492,30 +319,16 @@ message DetectedLandmark // message CandidateLandmark { + // Common information of one detected item candidate. + // + optional DetectedItemHeader.CandidateItemHeader header = 1; + // The description of the landmark. // // \note IDs, which are referenced in this message, usually // reference to \c DetectedXXX::tracking_id IDs. // - optional Landmark landmark = 1; - - // The estimated probability that this candidate is the true value. - // The sum of all \c #probability must be one. - // - // Range: [0,1] - // - optional double probability = 2; - - // The amount of time that this detected object has been currently - // observed/tracked. - // - // Unit: [s] - // - optional double age = 3; - - // The measurement state. - // - optional MeasurementState measurement_state = 4; + optional Landmark landmark = 2; } } } diff --git a/osi_detectedlane.proto b/osi_detectedlane.proto index 0ee498767..d14d22ebc 100644 --- a/osi_detectedlane.proto +++ b/osi_detectedlane.proto @@ -13,45 +13,13 @@ package osi3; // message DetectedLane { - // Specific ID of the detected lane as assigned by the sensor internally. - // Need not match with \c #ground_truth_id IDs. + // Common information of one detected item. // - optional Identifier tracking_id = 1; + optional DetectedItemHeader header = 1; - // The ID of the original lane in the ground truth. - // Multiple entries if the detected lane is a merge of multiple lanes in - // ground truth (as lane segment definitions may vary between sensor and - // ground truth). - // - // \note OSI uses singular instead of plural for repeated field names. - // - repeated Identifier ground_truth_id = 2; - // The lane as detected by the sensor. // optional EstimatedLane lane = 3; - - // The estimated probability that this lane really exists, not based on - // history. - // - // \note Use as confidence measure where a low value means less confidence - // and a high value indicates strong confidence. - // - optional double existence_probability = 4; - - // A list of sensors which detected this detected entity. - // - // If \c SensorData has detected entities and all detections are missing, - // then e.g. the number of sensors can confirm the - // \c #existence_probability. - // - // \note This information can be determined via the detected entities' - // detections ( \c ...Detection::object_id = 'this detected entity' ) and - // the sensors (their IDs) to which these detections belong. - // - // \note OSI uses singular instead of plural for repeated field names. - // - repeated Identifier sensor_id = 5; // // \brief Candidates for a detected lane as estimated by the sensor. @@ -70,30 +38,16 @@ message DetectedLane // message CandidateLane { + // Common information of one detected item candidate. + // + optional DetectedItemHeader.CandidateItemHeader header = 1; + // The definition of one lane that defines this candidate. // // \note IDs, which are referenced in this message, usually // reference to \c DetectedXXX::tracking_id IDs. // - optional Lane lane = 1; - - // The estimated probability that this candidate is the true value. - // The sum of all \c #probability must be one. - // - // Range: [0,1] - // - optional double probability = 2; - - // The amount of time that this detected object has been currently - // observed/tracked. - // - // Unit: [s] - // - optional double age = 3; - - // The measurement state. - // - optional MeasurementState measurement_state = 4; + optional Lane lane = 2; } } } @@ -103,44 +57,14 @@ message DetectedLane // message DetectedLaneBoundary { - // Specific ID of the detected lane boundary as assigned by the sensor - // internally. Need not match with \c #ground_truth_id. - // - optional Identifier tracking_id = 1; - - // The ID of the original \c LaneBoundary in the ground truth. - // - // \note In case of a ghost \c LaneBoundary (no corresponding ground truth), - // this field should be unset. + // Common information of one detected item. // - optional Identifier ground_truth_id = 2; + optional DetectedItemHeader header = 1; // The lane boundary as detected by the sensor. // optional EstimatedLaneBoundary lane_boundary = 3; - // The estimated probability that this lane boundary really exists, not - // based on history. - // - // \note Use as confidence measure where a low value means less confidence - // and a high value indicates strong confidence. - // - optional double existence_probability = 4; - - // A list of sensors which detected this detected entity. - // - // If \c SensorData has detected entities and all detections are missing, - // then e.g. the number of sensors can confirm the - // \c #existence_probability. - // - // \note This information can be determined via the detected entities' - // detections ( \c ...Detection::object_id = 'this detected entity' ) and - // the sensors (their IDs) to which these detections belong. - // - // \note OSI uses singular instead of plural for repeated field names. - // - repeated Identifier sensor_id = 5; - // // \brief Candidates for a detected lane boundary as estimated by the // sensor. @@ -175,30 +99,16 @@ message DetectedLaneBoundary // message CandidateLaneBoundary { + // Common information of one detected item candidate. + // + optional DetectedItemHeader.CandidateItemHeader header = 1; + // The definition of one lane boundary that defines this candidate. // // \note IDs, which are referenced in this message, usually // reference to \c DetectedXXX::tracking_id IDs. // - optional LaneBoundary lane_boundary = 1; - - // The estimated probability that this candidate is the true value. - // The sum of all \c #probability must be one. - // - // Range: [0,1] - // - optional double probability = 2; - - // The amount of time that this detected object has been currently - // observed/tracked. - // - // Unit: [s] - // - optional double age = 3; - - // The measurement state. - // - optional MeasurementState measurement_state = 4; + optional LaneBoundary lane_boundary = 2; // Confidence of the classified lane boundary type. // diff --git a/osi_detectedobject.proto b/osi_detectedobject.proto index edd8c69f0..03ebb6918 100644 --- a/osi_detectedobject.proto +++ b/osi_detectedobject.proto @@ -382,3 +382,69 @@ enum MeasurementState // MEASUREMENT_STATE_PREDICTED = 3; } + + + + +message DetectedItemHeader +{ + // Specific ID of the detected item as assigned by the sensor internally. + // Need not match with \c #ground_truth_id. + // + optional Identifier tracking_id = 1; + + // The ID of the original detected item in the ground truth. + // + // \note OSI uses singular instead of plural for repeated field names. + // + repeated Identifier ground_truth_id = 2; + + // The estimated probability that this detected item really exists, not + // based on history. + // + // \note Use as confidence measure where a low value means less confidence + // and a high value indicates strong confidence. + // + // Range: [0,1] + // + optional double existence_probability = 3; + + // A list of sensors which detected this detected item. + // + // If \c SensorData has detected entities and all detections are missing, + // then e.g. the number of sensors can confirm the + // \c #existence_probability. + // + // \note This information can be determined via the detected entities' + // detections ( \c ...Detection::object_id = 'this detected item' ) and + // the sensors (their IDs) to which these detections belong. + // + // \note OSI uses singular instead of plural for repeated field names. + // + repeated Identifier sensor_id = 4; + + // + // \brief A candidate for a detected item as estimated by the + // sensor. + // + message CandidateItemHeader + { + // The estimated probability that this candidate is the true value. + // The sum of all \c #probability must be one. + // + // Range: [0,1] + // + optional double probability = 1; + + // The amount of time that this detected object has been currently + // observed/tracked. + // + // Unit: [s] + // + optional double age = 2; + + // The measurement state. + // + optional MeasurementState measurement_state = 3; + } +} diff --git a/osi_detectedoccupant.proto b/osi_detectedoccupant.proto index c4ff6f380..23f63a216 100644 --- a/osi_detectedoccupant.proto +++ b/osi_detectedoccupant.proto @@ -13,40 +13,14 @@ package osi3; // message DetectedOccupant { - // Specific ID of the occupant as assigned by the sensor internally. Need - // not match with \c #ground_truth_id. + // Common information of one detected item. // - optional Identifier tracking_id = 2; - - // The ID of the original vehicle occupant in the ground truth. - // - optional Identifier ground_truth_id = 4; + optional DetectedItemHeader header = 1; // The occupant as detected by the sensor. // optional EstimatedOccupant occupant = 5; - // The estimated probability that this occupant really exists, not - // based on history. - // - // \note Use as confidence measure where a low value means less confidence - // and a high value indicates strong confidence. - // - optional double existence_probability = 6; - - // A list of sensors which detected this detected entity. - // - // If SensorData has detected entities and all detections are missing, then - // e.g. the number of sensors can confirm the existence_probability. - // - // \note This information can be determined via the detected entities' - // detections ( \c ...Detection::object_id = 'this detected entity' ) and - // the sensors (their IDs) to which these detections belong. - // - // \note OSI uses singular instead of plural for repeated field names. - // - repeated Identifier sensor_id = 7; - // // \brief Candidates for a detected occupant as estimated by the sensor. // @@ -71,29 +45,16 @@ message DetectedOccupant // message CandidateOccupant { + // Common information of one detected item candidate. + // + optional DetectedItemHeader.CandidateItemHeader header = 1; + // The detected vehicle occupant. // // \note IDs, which are referenced in this message, usually // reference to \c DetectedXXX::tracking_id IDs. // - optional Occupant occupant = 1; - - // The estimated probability that this candidate is the true value. - // The sum of all \c #probability must be one. - // - // Range: [0,1] - // - optional double probability = 2; - - // The amount of time that this detected object has been currently - // observed/tracked. - // - // Unit: [s] - optional double age = 3; - - // The measurement state. - // - optional MeasurementState measurement_state = 4; + optional Occupant occupant = 2; } } } From f9c58d031d26074fc5679af8abe224e992bf35bb Mon Sep 17 00:00:00 2001 From: carsten-kuebler <32508295+carsten-kuebler@users.noreply.github.com> Date: Wed, 28 Mar 2018 13:27:44 +0200 Subject: [PATCH 2/2] Headers not nested. --- osi_detectedlandmark.proto | 10 ++++---- osi_detectedlane.proto | 4 ++-- osi_detectedobject.proto | 47 +++++++++++++++++++------------------- osi_detectedoccupant.proto | 2 +- 4 files changed, 32 insertions(+), 31 deletions(-) diff --git a/osi_detectedlandmark.proto b/osi_detectedlandmark.proto index 37c293cfa..b6a0e27b3 100644 --- a/osi_detectedlandmark.proto +++ b/osi_detectedlandmark.proto @@ -57,7 +57,7 @@ message DetectedTrafficSign { // Common information of one detected item candidate. // - optional DetectedItemHeader.CandidateItemHeader header = 1; + optional DetectedCandidateItemHeader header = 1; // The definition of one main sign that defines this candidate. // @@ -165,7 +165,7 @@ message DetectedTrafficSign { // Common information of one detected item candidate. // - optional DetectedItemHeader.CandidateItemHeader header = 1; + optional DetectedCandidateItemHeader header = 1; // The definition of one of more supplementary signs that together // define this candidate. @@ -218,7 +218,7 @@ message DetectedTrafficLight { // Common information of one detected item candidate. // - optional DetectedItemHeader.CandidateItemHeader header = 1; + optional DetectedCandidateItemHeader header = 1; // The definition of one traffic light that define this candidate. // @@ -270,7 +270,7 @@ message DetectedRoadMarking { // Common information of one detected item candidate. // - optional DetectedItemHeader.CandidateItemHeader header = 1; + optional DetectedCandidateItemHeader header = 1; // The description of the road marking. // @@ -321,7 +321,7 @@ message DetectedLandmark { // Common information of one detected item candidate. // - optional DetectedItemHeader.CandidateItemHeader header = 1; + optional DetectedCandidateItemHeader header = 1; // The description of the landmark. // diff --git a/osi_detectedlane.proto b/osi_detectedlane.proto index d14d22ebc..75141a30a 100644 --- a/osi_detectedlane.proto +++ b/osi_detectedlane.proto @@ -40,7 +40,7 @@ message DetectedLane { // Common information of one detected item candidate. // - optional DetectedItemHeader.CandidateItemHeader header = 1; + optional DetectedCandidateItemHeader header = 1; // The definition of one lane that defines this candidate. // @@ -101,7 +101,7 @@ message DetectedLaneBoundary { // Common information of one detected item candidate. // - optional DetectedItemHeader.CandidateItemHeader header = 1; + optional DetectedCandidateItemHeader header = 1; // The definition of one lane boundary that defines this candidate. // diff --git a/osi_detectedobject.proto b/osi_detectedobject.proto index 03ebb6918..b8d2f2e3a 100644 --- a/osi_detectedobject.proto +++ b/osi_detectedobject.proto @@ -383,9 +383,10 @@ enum MeasurementState MEASUREMENT_STATE_PREDICTED = 3; } - - - +// +// \brief The common information for a detected item as estimated by the +// sensor. +// message DetectedItemHeader { // Specific ID of the detected item as assigned by the sensor internally. @@ -422,29 +423,29 @@ message DetectedItemHeader // \note OSI uses singular instead of plural for repeated field names. // repeated Identifier sensor_id = 4; +} +// +// \brief The common information for a detected item's candidate as estimated +// by the sensor. +// +message DetectedCandidateItemHeader +{ + // The estimated probability that this candidate is the true value. + // The sum of all \c #probability must be one. // - // \brief A candidate for a detected item as estimated by the - // sensor. + // Range: [0,1] // - message CandidateItemHeader - { - // The estimated probability that this candidate is the true value. - // The sum of all \c #probability must be one. - // - // Range: [0,1] - // - optional double probability = 1; + optional double probability = 1; - // The amount of time that this detected object has been currently - // observed/tracked. - // - // Unit: [s] - // - optional double age = 2; + // The amount of time that this detected object has been currently + // observed/tracked. + // + // Unit: [s] + // + optional double age = 2; - // The measurement state. - // - optional MeasurementState measurement_state = 3; - } + // The measurement state. + // + optional MeasurementState measurement_state = 3; } diff --git a/osi_detectedoccupant.proto b/osi_detectedoccupant.proto index 23f63a216..695903dce 100644 --- a/osi_detectedoccupant.proto +++ b/osi_detectedoccupant.proto @@ -47,7 +47,7 @@ message DetectedOccupant { // Common information of one detected item candidate. // - optional DetectedItemHeader.CandidateItemHeader header = 1; + optional DetectedCandidateItemHeader header = 1; // The detected vehicle occupant. //