Skip to content

Commit 6807643

Browse files
authored
Merge pull request #732 from OpenSimulationInterface/feature/sub-bounding-boxes
Add new message for sub-bounding boxes
2 parents 659a95c + 7e81917 commit 6807643

File tree

1 file changed

+137
-0
lines changed

1 file changed

+137
-0
lines changed

osi_common.proto

+137
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,102 @@ message LogicalLaneAssignment
387387
optional double angle_to_lane = 4;
388388
}
389389

390+
// \brief A bounding box description.
391+
//
392+
// A bounding box representing a sub-section of its parent's overall
393+
// dimension, either that of a \c BaseMoving or \c BaseStationary .
394+
//
395+
// The parent frame of the \c BoundingBox is identical to the parent frame
396+
// of the \c MovingObject or \c StationaryObject it is associated to. For
397+
// example, if the parent object coordinates are given relative to the
398+
// global coordinate system, then the \c BoundingBox coordinates are also
399+
// given relative to the global coordinate system.
400+
//
401+
// \note The overall bounding box of the object is still defined using the
402+
// dimension, position and orientation of the \c BaseMoving or
403+
// \c BaseStationary .
404+
//
405+
message BoundingBox
406+
{
407+
// The 3D dimensions of the bounding box.
408+
//
409+
optional Dimension3d dimension = 1;
410+
411+
// The 3D position of the bounding box. The position is the center
412+
// of the bounding box and the pivot for the \c dimension and \c orientation.
413+
//
414+
// \note The position should be within the same coordinate frame as
415+
// its parent, not relative to coordinate frame of the parent object.
416+
// The position becomes global/absolute if the parent frame is inertial
417+
// (all parent frames up to ground truth).
418+
//
419+
optional Vector3d position = 2;
420+
421+
// The 3D orientation of the bounding box.
422+
//
423+
// \note The orientation should be within the same coordinate frame as
424+
// its parent, not relative to the coordinate frame of the parent object.
425+
// The orientation becomes global/absolute if the parent frame is inertial
426+
// (all parent frames up to ground truth).
427+
//
428+
optional Orientation3d orientation = 3;
429+
430+
// The type of object contained in the bounding box.
431+
//
432+
optional Type contained_object_type = 4;
433+
434+
// Opaque reference of an associated 3D model of the bounding box.
435+
//
436+
// \note It is implementation-specific how model_references are resolved to
437+
// 3d models. This means the coordinate system, model origin, and model
438+
// orientation are also implementation-specific.
439+
//
440+
optional string model_reference = 5;
441+
442+
// Definition of different types of object contained within the bounding box
443+
//
444+
enum Type
445+
{
446+
// Object of unknown type (must not be used in ground truth).
447+
//
448+
TYPE_UNKNOWN = 0;
449+
450+
// Any other type of object.
451+
//
452+
TYPE_OTHER = 1;
453+
454+
// The main structure of an object, e.g. a chassis of a vehicle,
455+
// or the central structure of a building, a tree trunk, etc.
456+
//
457+
TYPE_BASE_STRUCTURE = 2;
458+
459+
// A protruding, integral part of an object, which is not
460+
// temporarily attached, e.g. a tree crown, a light pole arm, or a
461+
// parking house gate. The protruding structure is meant to be an
462+
// additional part to a base structure.
463+
//
464+
TYPE_PROTRUDING_STRUCTURE = 3;
465+
466+
// Additional, temporarily attached cargo to an object.
467+
//
468+
TYPE_CARGO = 4;
469+
470+
// The door of an object.
471+
//
472+
// For vehicles, this includes driver and passenger doors, trunk
473+
// and front hoods, and fuel or charging port covers.
474+
//
475+
TYPE_DOOR = 5;
476+
477+
// The side mirror of a vehicle.
478+
//
479+
// \note The side mirror is not included in the overall bounding box
480+
// of the parent object.
481+
//
482+
TYPE_SIDE_MIRROR = 6;
483+
}
484+
}
485+
390486
//
391487
// \brief The base attributes of a stationary object or entity.
392488
//
@@ -405,6 +501,9 @@ message BaseStationary
405501
// The 3D dimensions of the stationary object (bounding box), e.g. a
406502
// landmark.
407503
//
504+
// \note The \c #dimension must completely enclose the geometry of the
505+
// \c BaseStationary .
506+
//
408507
optional Dimension3d dimension = 1;
409508

410509
// The reference point for position and orientation, i.e. the center (x,y,z)
@@ -447,6 +546,23 @@ message BaseStationary
447546
// The polygon is defined counter-clockwise.
448547
//
449548
repeated Vector2d base_polygon = 4;
549+
550+
// Sub-divisions of the overall bounding box of the \c BaseStationary object.
551+
//
552+
// The bounding box sections can include separate parts on partially-opaque
553+
// objects such as trees with a distinction between trunk and crown.
554+
//
555+
// \note The bounding box sub-divisions can extend beyond the overall
556+
// bounding box, however no actual geometry must reside outside of the
557+
// overall bounding box.
558+
//
559+
// \note If any sub-divisions are provided, then they must cover all
560+
// occupied space of the overall bounding box. In other words, a consumer
561+
// of this data is guaranteed that any part of the overall bounding box
562+
// that is not covered by any sub-division is free of physical objects,
563+
// and thus no collisions can occur there.
564+
//
565+
repeated BoundingBox bounding_box_section = 5;
450566
}
451567

452568
//
@@ -469,6 +585,9 @@ message BaseMoving
469585
{
470586
// The 3D dimension of the moving object (its bounding box).
471587
//
588+
// \note The \c #dimension must completely enclose the geometry of the
589+
// \c BaseMoving with the exception of the side mirrors for vehicles.
590+
//
472591
// \note The bounding box does NOT include side mirrors for vehicles.
473592
//
474593
optional Dimension3d dimension = 1;
@@ -569,6 +688,24 @@ message BaseMoving
569688
// The polygon is defined counter-clockwise.
570689
//
571690
repeated Vector2d base_polygon = 7;
691+
692+
// Sub-divisions of the overall bounding box of the \c BaseMoving object.
693+
//
694+
// The bounding box sections can include side mirrors, cargo, etc. for
695+
// vehicles, as well as body-part sections for pedestrians. Note that for
696+
// more precise pedestrian information \c PedestrianAttributes can be used.
697+
//
698+
// \note The bounding box sub-divisions can extend beyond the overall
699+
// bounding box, however no actual geometry must reside outside of the
700+
// overall bounding box, with the specific exception of the side mirrors.
701+
//
702+
// \note If any sub-divisions are provided, then they must cover all
703+
// occupied space of the overall bounding box. In other words, a consumer
704+
// of this data is guaranteed that any part of the overall bounding box
705+
// that is not covered by any sub-division is free of physical objects,
706+
// and thus no collisions can occur there.
707+
//
708+
repeated BoundingBox bounding_box_section = 9;
572709
}
573710

574711
//

0 commit comments

Comments
 (0)