diff --git a/osi_common.proto b/osi_common.proto index 3243a37a7..37b24bdb2 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -387,6 +387,113 @@ message LogicalLaneAssignment optional double angle_to_lane = 4; } +// \brief A bounding box containing a sub-section of a object. +// +// A bounding box representing a sub-section of it's parents overall dimension, +// either that of a \c MovingObject or \c StationaryObject . +// +// The parent frame of the \c BoundingBox is not relative to the parent object +// it is associated to, but in the same parent frame as the parent object. +// +message BoundingBox +{ + // The 3D dimensions of the bounding box. + // + optional Dimension3d dimension = 1; + + // The 3D position of the bounding box. + // + // \note The position should be within the same coordinate frame as it's + // parent, not relative to coordinate frame of the parent object. The + // position becomes global/absolute if the parent frame is inertial + // (all parent frames up to ground truth). + // + optional Vector3d position = 2; + + // The 3D orientation of the bounding box. + // + // \note The orientation should be within the same coordinate frame as it's + // parent, not relative to coordinate frame of the parent object. The + // orientation becomes global/absolute if the parent frame is inertial + // (all parent frames up to ground truth). + // + optional Orientation3d orientation = 3; + + // The type of object contained in the bounding box. + // + optional Type contained_object_type = 4; + + // Opaque reference of an associated 3D model of the bounding box. + // + // \note It is implementation-specific how model_references are resolved to + // 3d models. This means the coordinate system, model origin, and model + // orientation are also implementation-specific. + // + optional string model_reference = 5; + + // Definition of different types of object contained within the bounding box + // + enum Type + { + // Object of unknown type (must not be used in ground truth). + // + TYPE_UNKNOWN = 0; + + // Any other type of object. + // + TYPE_OTHER = 1; + + // The main chassis of a vehicle. + // + TYPE_CHASSIS = 2; + + // The door of a vehicle. + // + TYPE_DOOR = 3; + + // The side mirror of a vehicle. + // + TYPE_SIDE_MIRROR = 4; + + // Additional cargo attached to the a vehicle which is temporarily + // attached. + // + TYPE_CARGO = 5; + + // The wheel of a vehicle. + // + TYPE_WHEEL = 6; + + // The torso section of a person or animal. + // + TYPE_TORSO = 7; + + // An external limb of a person or animal. + // + TYPE_LIMB = 8; + + // The head of a person or animal. + // + TYPE_HEAD = 9; + + // The trunk section of a tree. + // + TYPE_TREE_TRUNK = 10; + + // The crown of a tree, usually encompassing the branches and leaves. + // + TYPE_TREE_CROWN = 11; + + // The vertical pole of a street light. + // + TYPE_STREET_LIGHT_POLE = 12; + + // The horizontal arm of a street light. + // + TYPE_STREET_LIGHT_ARM = 13; + } +} + // // \brief The base attributes of a stationary object or entity. // @@ -447,6 +554,17 @@ message BaseStationary // The polygon is defined counter-clockwise. // repeated Vector2d base_polygon = 4; + + // Sub-divisions of the overall bounding box of the \c BaseStationary object. + // + // The bounding box sections can include separate parts on partially-opaque + // objects such are trees with a distinction between trunk and crown. + // + // \note When one or more \c BoundingBox s are associated to a + // \c BaseStationary , the expectation is that all sections are contained + // within the bounds of the \c #dimension . + // + repeated BoundingBox bounding_box_section = 5; } // @@ -569,6 +687,19 @@ message BaseMoving // The polygon is defined counter-clockwise. // repeated Vector2d base_polygon = 7; + + // Sub-divisions of the overall bounding box of the \c BaseMoving object. + // + // The bounding box sections can include side mirrors, cargo, etc. for + // vehicles, as well as body-part sections for pedestrians. + // + // \note When one or more \c BoundingBox s are associated to a + // \c BaseMoving , the expectation is that all sections are contained + // within the bounds of the \c #dimension . Currently there several accepted + // exceptions to this rule, specifically the sub-sections for cargo, vehicle + // side mirrors, and doors not in the their closed position. + // + repeated BoundingBox bounding_box_section = 9; } //