@@ -43,8 +43,8 @@ message TrafficCommand
4343 //
4444 // \note OSI uses singular instead of plural for repeated field names.
4545 //
46- // \note The current SL425 discussion status: We assume all actions are
47- // executed in parallel.
46+ // \note If more than one action is being supplied in one command message
47+ // all actions are executed in parallel.
4848 //
4949 repeated TrafficAction action = 4 ;
5050
@@ -53,14 +53,19 @@ message TrafficCommand
5353//
5454// \brief Atomic Traffic Actions to be performed
5555//
56- // \note This message allows "inheritance", as all TrafficActions can be treated
57- // the same, even they have different implementation.
56+ // The actual commands being transmitted are the atomic traffic actions
57+ // described by this message.
58+ //
59+ // \note This message is notionally a choice selection, i.e. only one
60+ // of the multiple optional fields in it must be set at any time.
61+ // It is not defined as a one of field, since this is not currently
62+ // used in OSI message definitions for portability reasons. From
63+ // an API point of view this results in the same generated interface,
64+ // but without the better enforcement of the restriction on the wire.
5865//
5966message TrafficAction
6067{
61- // Only one of the TrafficActions is supposed to be chosen. Pending, if the proto-keyword "One of" can be used.
62-
63- // A TrafficAction
68+ // A TrajectoryAction
6469 //
6570 optional TrajectoryAction trajectory_action = 1 ;
6671
@@ -77,19 +82,13 @@ message TrafficAction
7782 optional LaneChangeAction lane_change_action = 4 ;
7883}
7984
80-
81-
8285//
8386// \brief The StatePoint definition
8487//
8588// \note The StatePoint definition does not define mandatory fields.
8689// The context defines how and what fields are used.
8790// For example: Path only used xyz of the StatePoint, trajectory also timestamp...
8891//
89- // A StatePoint contains a BaseMoving (full state with xyz/rpy and the derivatives
90- // linear /angular velocity and acceleration).
91- // Furthermore it contains a time stamp.
92- //
9392message StatePoint
9493{
9594 // The timestamp of a StatePoint
@@ -98,16 +97,16 @@ message StatePoint
9897 //
9998 optional Timestamp time_stamp = 1 ;
10099
101-
102- // Offset position relative to the global coordinate system in [m].
100+ // Position in the global coordinate system.
101+ //
103102 // The position refers to the center (x,y,z) of the bounding box.
104103 //
105104 // \note Remark: The definition of the reference point follows the
106105 // specification of the \c BaseMoving message.
107106 //
108107 optional Vector3d position = 2 ;
109108
110- // Orientation offset relative to the global coordinate system in [rad] .
109+ // Orientation in the global coordinate system.
111110 //
112111 optional Orientation3d orientation = 3 ;
113112}
@@ -118,30 +117,27 @@ message StatePoint
118117//
119118message ActionHeader
120119{
121- // The unique id of the command
122- //
123- // \note This field is mandatory.
124- //
125- // \note SL425 discussion: In what context must the id be unique? Global, for
126- // all TrafficCommands or only in TrafficCommand context?
127- //
128- optional Identifier action_id = 1 ;
129-
130- // The start_time can be used to set a starttime of execution
131- //
132- // \note Is optional. If not set, execution must start directly.
133- //
134- // \note Zero time point does not need to coincide with the UNIX epoch.
135- //
136- optional Timestamp start_time = 2 ;
137-
138- // This boolean describes if the Orientation values in StatePoint shall be set or not: 1 = yes, 0 = no.
139- optional bool Orientation_constrain = 3 ;
120+ // The unique id of the action
121+ //
122+ // \note This field is mandatory.
123+ //
124+ // \note This id must be unique within all traffic command
125+ // messages exchanged with one traffic participant.
126+ //
127+ optional Identifier action_id = 1 ;
140128
129+ // The start_time can be used to set a starttime of execution
130+ //
131+ // \note Is optional. If not set, execution must start directly.
132+ //
133+ // \note Zero time point does not need to coincide with the UNIX epoch.
134+ //
135+ optional Timestamp start_time = 2 ;
136+
137+ // This boolean describes if the Orientation values in StatePoint shall be set or not: 1 = yes, 0 = no.
138+ optional bool Orientation_constrain = 3 ;
141139}
142140
143-
144-
145141//
146142// \brief The TrajectoryAction. It provides an interface to describe the motion
147143// in space as a function of time.
@@ -150,15 +146,9 @@ message ActionHeader
150146//
151147// \note The StatePoint requires the pose (xyz/rpy) to be set.
152148//
153- // \note The velocity and acceleration can be set. If not set, the model must
154- // calculate it itself.
155- //
156- // \note SL425 discussion: We define it to be set in the world frame atm.
157- //
158149message TrajectoryAction
159150{
160- // The action_header
161- //
151+ // The Action Header
162152 //
163153 optional ActionHeader action_header = 1 ;
164154
@@ -178,12 +168,9 @@ message TrajectoryAction
178168//
179169// \note All other StatePoint values are ignored.
180170//
181- // \note SL425 discussion: We define it to be set in the world frame atm.
182- //
183171message PathAction
184172{
185- // The action_header
186- //
173+ // The Action Header
187174 //
188175 optional ActionHeader action_header = 1 ;
189176
@@ -194,60 +181,80 @@ message PathAction
194181 repeated StatePoint path_point = 2 ;
195182}
196183
197-
198-
199184//
200185// \brief Acquire Global Position Action. It provides an interface to describe
201186// a target pose.
202187//
203- // \note Remark: Maybe better to avoid an other redefinition and use a
204- // PathAction with only one path_point.
205- //
206188message AcquireGlobalPositionAction
207189{
208- // The action_header
209- //
190+ // The Action Header
210191 //
211192 optional ActionHeader action_header = 1 ;
212193
213- // Offset position relative to the global coordinate system in [m].
194+ // Position in the global coordinate system.
195+ //
214196 // The position refers to the center (x,y,z) of the bounding box.
215197 //
216198 // \note Remark: The definition of the reference point follows the
217199 // specification of the \c BaseMoving message.
218200 //
219201 optional Vector3d position = 2 ;
220202
221- // Orientation offset relative to the global coordinate system in [rad] .
203+ // Orientation in the global coordinate system.
222204 //
223205 optional Orientation3d orientation = 3 ;
224206}
225207
226208message LaneChangeAction
227209{
228- // The action_header
229- //
210+ // The Action Header
230211 //
231212 optional ActionHeader action_header = 1 ;
232213
233- // Required field for this Action. Targeted Lane relative to the current lane. Convention: +1 means to the right, -1 means to the left.
214+ // Targeted lane relative to the current lane.
215+ //
216+ // Convention: +1 means to the right, -1 means to the left.
217+ //
234218 optional int32 RelativeTargetLane = 2 ;
235219
236- // Enum definition
220+ // Specified shape of the lane change action.
221+ //
237222 optional DynamicsShape dynamics_shape = 3 ;
238223
239- // duration of the lane change, in seconds
224+ // Duration of the lane change.
225+ //
226+ // Unit: s
227+ //
240228 optional double duration = 4 ;
241229
242- // distance of the lane change, in meters
230+ // Distance of the lane change.
231+ //
232+ // Unit: m
233+ //
243234 optional double distance = 5 ;
244-
235+
236+ // Definition of LaneChange dynamic shapes.
237+ //
245238 enum DynamicsShape
246239 {
247- UNDEFINED = 1 ;
248- LINEAR = 2 ;
249- CUBIC = 3 ;
250- SINUSOIDAL = 4 ;
251- STEP = 5 ;
240+ // Shape is unspecified.
241+ //
242+ DYNAMICS_SHAPE_UNSPECIFIED = 0 ;
243+
244+ // Shape is linear.
245+ //
246+ DYNAMICS_SHAPE_LINEAR = 2 ;
247+
248+ // Shape is cubic.
249+ //
250+ DYNAMICS_SHAPE_CUBIC = 3 ;
251+
252+ // Shape is sinusoidal.
253+ //
254+ DYNAMICS_SHAPE_SINUSOIDAL = 4 ;
255+
256+ // Shape is a step function.
257+ //
258+ DYNAMICS_SHAPE_STEP = 5 ;
252259 }
253260}
0 commit comments