Skip to content

Commit

Permalink
Merge pull request OpenSimulationInterface#40 from OpenSimulationInte…
Browse files Browse the repository at this point in the history
…rface/contour2d

Contour2d
  • Loading branch information
jdsika authored Feb 23, 2017
2 parents 49adb5f + c0c1907 commit 4fbc2e9
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build/
dist/
CMakeCache.txt
CMakeFiles
CMakeScripts
Expand All @@ -10,3 +11,4 @@ CTestTestfile.cmake
build
*.egg-info
osi
.project
47 changes: 45 additions & 2 deletions osi_common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ message InterfaceVersion
/// The field containing the version number. Should be left on default, not to be modified by sender. Increments will
/// happen as part of changes to the whole interface.
optional uint32 major = 1 [default = 2];
optional uint32 minor = 2 [default = 0];
optional uint32 patch = 3 [default = 1];
optional uint32 minor = 2 [default = 1];
optional uint32 patch = 3 [default = 0];
}

///
Expand All @@ -32,6 +32,19 @@ message Vector3d
optional double z = 3;
}

///
/// A cartesian 2D vector for positions, velocities or accelerations.
/// Units are [m] for positions, [m/s] for velocities and [m/s^2] for accelerations.
///
message Vector2d
{
/// The x coordinate
optional double x = 1;

/// The y coordinate
optional double y = 2;
}

///
/// A timestamp.
/// Names and types of fields chosen in accordance with google/protobuf/timestamp.proto to allow a possible switch in the
Expand Down Expand Up @@ -141,6 +154,21 @@ message BaseStationary

/// The relative orientation of the landmark w.r.t its parent frame.
optional Orientation3d orientation = 3;

/// Usage as ground truth:
/// The two dimensional (flat) contour of the object. This is an extension of the concept of a
/// bounding box as defined in Dimension3d. The contour is the projection of the object outline
/// on the z-plane in the object frame (independent of its current position and orientation).
/// Usage as sensor data:
/// The polygon describes the visible part of the object's contour.
/// General definitions:
/// The polygon is defined in the local object frame: x pointing forward and y to the left.
/// The origin is the center of the bounding box.
/// As ground truth, the polygon is closed by connecting the last with the first point. Therefore
/// these two points are different and there are at least three points.
/// As sensor data, the polygon is open.
/// The polygon is defined counter-clockwise.
repeated Vector2d base_polygon = 4;
}

///
Expand Down Expand Up @@ -169,4 +197,19 @@ message BaseMoving
/// The relative orientation rate of the object w.r.t. its parent frame and parent orientation rate.
/// Obviously, the orientation rate becomes global/absolute if the parent frame is not rotating.
optional Orientation3d orientation_rate = 6;

/// Usage as ground truth:
/// The two dimensional (flat) contour of the object. This is an extension of the concept of a
/// bounding box as defined in Dimension3d. The contour is the projection of the object outline
/// on the z-plane in the object frame (independent of its current position and orientation).
/// Usage as sensor data:
/// The polygon describes the visible part of the object's contour.
/// General definitions:
/// The polygon is defined in the local object frame: x pointing forward and y to the left.
/// The origin is the center of the bounding box.
/// As ground truth, the polygon is closed by connecting the last with the first point. Therefore
/// these two points are different and there are at least three points.
/// As sensor data, the polygon is open.
/// The polygon is defined counter-clockwise.
repeated Vector2d base_polygon = 7;
}
19 changes: 10 additions & 9 deletions osi_object.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ package osi;
///
/// A vehicle.
///
/// This is basically a BaseObject with additional attributes, such as type and lights. Note that, if this vehicle is a
/// simulated ego vehicle (i.e. ego_vehicle is set to true), relative_ego_origin has to be set, defining the offset from
/// the ego vehicle's bounding box center to the center of the vehicle's rear axis. This defines the origin of the ego
/// vehicle's rear axis coordinate system and allows calculation of quantities relative to this reference frame. The
/// origin of the rear axis coordinate system in world coordinates is calculated as: base.position + R * relative_ego_origin
/// This is basically a BaseObject with additional attributes, such as type and lights.
/// The origin of the rear (front) axis coordinate system in world coordinates is calculated as: base.position + R * bbcenter_to_rear (front)
/// for the ego vehicle (R rotates from vehicle to world frame). For all vehicles, including ego vehicles, the position given
/// in base.position points to the center of the vehicle's bounding box.
///
Expand All @@ -35,10 +32,9 @@ message Vehicle
/// See the description above!
optional bool ego_vehicle = 5;

/// The position of the vehicle's reference point.
/// See the description above!
/// Field need not be set (or should be zero) if ego_vehicle is set to false.
optional Vector3d relative_ego_origin = 6;
/// The vector pointing from the bounding box center point (base.position) to the middle (in x, y and z)
/// of the rear axle under neutral load conditions. In object coordinates.
optional Vector3d bbcenter_to_rear = 6;

/// The ids of the lanes that this vehicle is assigned to.
/// Might be multiple if the vehicle is switching lanes or moving from one lane into another following lane.
Expand All @@ -54,6 +50,11 @@ message Vehicle
/// The id of the driver of the (ego) vehicle.
/// Field need not be set if ego_vehicle is set to false.
optional Identifier driver = 10;

/// The vector pointing from the bounding box center point (base.position) to the middle (in x, y and z)
/// of the front axle under neutral load conditions. In object coordinates.
optional Vector3d bbcenter_to_front = 11;


/// Definition of vehicle types.
enum Type
Expand Down

0 comments on commit 4fbc2e9

Please sign in to comment.