Skip to content

Commit 6787130

Browse files
committed
Proposed TrafficUpdate changes
The original requirements are here: https://code.asam.net/simulation/proposal/osi/-/blob/master/subchapters/1-4_requirements.adoc#user-content-provide-interface-for-traffic-participants These changes satisfy all requirements from (1), (2), (3), and (4). It doesn't address 5-7 as they are largely orthogonal. Signed-off-by: Caspar de Haes <caspar.dehaes@five.ai>
1 parent 00e872f commit 6787130

File tree

2 files changed

+96
-7
lines changed

2 files changed

+96
-7
lines changed

osi_object.proto

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,45 @@ message MovingObject
436436
// through.
437437
//
438438
optional double ground_clearance = 6;
439+
440+
// Detailed wheel data.
441+
//
442+
// \note OSI uses singular instead of plural for repeated field names.
443+
//
444+
repeated WheelData wheel = 7;
445+
446+
// \brief Information for a single wheel.
447+
//
448+
message WheelData
449+
{
450+
// The axle which contains this wheel. A value of 0 represents the
451+
// front-most axle of the vehicle with higher numbers incrementing
452+
// towards the rear-most axle.
453+
optional uint32 axle = 1;
454+
455+
// The index of the wheel on the axle, counting in the direction
456+
// of positive-y, i.e. right-to-left.
457+
//
458+
// For example, on a standard 2-axle, 4-wheel car, the rear-right
459+
// wheel would be (axle=1, index=0).
460+
optional uint32 index = 2;
461+
462+
// Steering angle with positive values indicating a clockwise
463+
// rotation about the z-axis. Must be zero for non-steering
464+
// wheels.
465+
optional double steer_angle = 3;
466+
467+
// Rotation of the wheel about the axle in radians per second.
468+
optional double rotation_rate = 4;
469+
470+
// Current rotation about the axle. Rotation angle
471+
// increases as the vehicle moves forward (x-positive) and
472+
// decreases as the vehicle moves backwards.
473+
//
474+
// \note This value doesn't wrap but permanently increases or
475+
// decreases.
476+
optional double rotation_angle = 5;
477+
}
439478
}
440479

441480
//

osi_trafficupdate.proto

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package osi3;
1717
// updated information is provided as a MovingObject. Certain fields
1818
// of this sub-message need not be set and will be ignored by the
1919
// simulation environment, because they are in fact static information.
20-
// Instead of creating a seperate message type for only the non-static
20+
// Instead of creating a separate message type for only the non-static
2121
// information, re-use of the existing message was considered more
2222
// appropriate.
2323
//
@@ -39,13 +39,63 @@ message TrafficUpdate
3939
//
4040
optional Timestamp timestamp = 2;
4141

42-
// Updated Moving Object
42+
// Updated traffic participant data
4343
//
44-
// \note Only the id, base member (without dimension and base_polygon),
45-
// and the vehicle_classification.light_state members are considered in
46-
// updates, all other members can be left undefined, and will be
47-
// ignored by the receiver of this message.
44+
repeated TrafficParticipantUpdate traffic = 3;
45+
46+
// \brief Data for a single traffic participant to update the simulator.
47+
//
48+
// It includes an immediate update for the current timestamp reported in
49+
// parent traffic update message which can include the full detail of a
50+
// moving object message.
51+
//
52+
// The future trajectory is deliberately more sparse as much of the detail
53+
// won't be known for all future points.
4854
//
49-
optional MovingObject update = 3;
55+
message TrafficParticipantUpdate
56+
{
57+
// Updated Moving Object
58+
//
59+
// \note Only the id, base member (without dimension and base_polygon),
60+
// and the vehicle_classification.light_state members are considered in
61+
// updates, all other members can be left undefined, and will be
62+
// ignored by the receiver of this message.
63+
//
64+
optional MovingObject update = 1;
65+
66+
// The future trajectory message is to allow traffic participants to
67+
// indicate to the simulator their current expectations of where they plan to
68+
// be in the future.
69+
//
70+
// \note Traffic participants aren't required to stick precisely to this future
71+
// trajectory. It is to allow the simulator to provide realistic agent
72+
// behaviours without performing prediction for all external traffic
73+
// participants.
74+
//
75+
repeated FutureTrajectoryNode future_trajectory = 2;
76+
77+
//
78+
// /brief The future node is a single point in time as part of a future
79+
// trajectory which defines the pose, velocity, acceleration, etc. at
80+
// that point.
81+
// See the FutureTrajectory message for details and context.
82+
//
83+
message FutureTrajectoryNode
84+
{
85+
// The future timestamp for the trajectory node. Zero time is arbitrary
86+
// but must be identical for all messages. Zero time does not need to
87+
// coincide with the UNIX epoch. Recommended is the starting time point of
88+
// the simulation.
89+
//
90+
// \note This must be in the future compared to the timestamp in the top
91+
// level traffic update message.
92+
//
93+
optional Timestamp timestamp = 1;
5094

95+
// Traffic participant data for the future trajectory node.
96+
//
97+
// \note Dimensions and base polygon are ignored.
98+
optional BaseMoving future_point = 2;
99+
}
100+
}
51101
}

0 commit comments

Comments
 (0)