Skip to content

Commit 399274f

Browse files
committed
Add more documentation, align trajectory/path actions with OSC 1.0
Signed-off-by: Pierre R. Mai <pmai@pmsf.de>
1 parent 3c94e8f commit 399274f

File tree

1 file changed

+102
-25
lines changed

1 file changed

+102
-25
lines changed

osi_trafficcommand.proto

Lines changed: 102 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ message TrafficCommand
6565
//
6666
message TrafficAction
6767
{
68-
// A TrajectoryAction
68+
// A FollowTrajectoryAction
6969
//
70-
optional TrajectoryAction trajectory_action = 1;
70+
optional FollowTrajectoryAction follow_trajectory_action = 1;
7171

72-
// A PathAction
72+
// A FollowPathAction
7373
//
74-
optional PathAction path_action = 2;
74+
optional FollowPathAction follow_path_action = 2;
7575

7676
// An AcquireGlobalPositionAction
7777
//
@@ -128,20 +128,28 @@ message ActionHeader
128128
}
129129

130130
//
131-
// \brief The TrajectoryAction. It provides an interface to describe the motion
132-
// in space as a function of time.
131+
// \brief Follow Trajectory Action.
133132
//
134-
// \note The StatePoint requires the timestamp to be set.
133+
// Controls a traffic participant to follow a trajectory using vertices
134+
// with timings. It specifies the motion in space as a function of time.
135135
//
136-
// \note The StatePoint requires the pose (xyz/rpy) to be set.
136+
// \note The StatePoint messages in trajectory_point require the timestamp
137+
// to be specified.
137138
//
138-
message TrajectoryAction
139+
// \note This action is aligned with the FollowTrajectoryAction of
140+
// OpenSCENARIO 1.0 using a 4/7D trajectory with shape Polyline.
141+
//
142+
message FollowTrajectoryAction
139143
{
140144
// The Action Header
141145
//
142146
optional ActionHeader action_header = 1;
143147

144-
// A list of TrajectoryPoints
148+
// A list of trajectory StatePoints
149+
//
150+
// The timestamp fields for all trajectory points are required to be
151+
// set, as are the position fields. The orientation fields can be set
152+
// depending on the constrain_orientation field being true.
145153
//
146154
// \note OSI uses singular instead of plural for repeated field names.
147155
//
@@ -151,27 +159,60 @@ message TrajectoryAction
151159
// by the trajectory points
152160
//
153161
// This boolean flag defines whether orientation values supplied in
154-
// the trajectory points shall be used to constrain the orientation
155-
// of the traffic participant or not.
162+
// the trajectory points (if any) shall be used to constrain the
163+
// orientation of the traffic participant or not.
156164
//
157165
optional bool constrain_orientation = 3;
166+
167+
// Specify the following mode that should be employed in executing
168+
// the trajectory.
169+
//
170+
optional FollowingMode following_mode = 4;
171+
172+
// Definition of Following Mode.
173+
//
174+
enum FollowingMode
175+
{
176+
// Following mode position forces the traffic participant to
177+
// follow the trajectory explicitly, disregarding any internal
178+
// constraints, like e.g. steering dynamics.
179+
//
180+
FOLLOWING_MODE_POSITION = 0;
181+
182+
// Following mode follow allows the traffic participant to
183+
// treat the trajectory as a target, to be achieved as closely
184+
// as possible while retaining any internal constraints,
185+
// like e.g. steering dynamics.
186+
//
187+
FOLLOWING_MODE_FOLLOW = 1;
188+
}
158189
}
159190

160191
//
161-
// \brief The PathAction. It provides an interface to describe a path.
192+
// \brief Follow Path Action.
193+
//
194+
// Controls a traffic participant to follow a trajectory using vertices
195+
// with timings. It specifies the motion in space independent of time.
162196
//
163-
// \note The StatePoint requires the position to be set. The orientation can be
164-
// set optional.
197+
// \note The StatePoint messages in path_point only require the position
198+
// field to be specified. The orientation can be set optionally. Any
199+
// timestamp StatePoint values are ignored.
165200
//
166-
// \note All other StatePoint values are ignored.
201+
// \note This action is aligned with the FollowTrajectoryAction of
202+
// OpenSCENARIO 1.0 using a 3/6D trajectory with shape Polyline.
167203
//
168-
message PathAction
204+
message FollowPathAction
169205
{
170206
// The Action Header
171207
//
172208
optional ActionHeader action_header = 1;
173209

174-
// A list of PathPoints
210+
// A list of path StatePoints
211+
//
212+
// The position fields for all path points required to be set.
213+
// The timestamp field are not required to be set and are ignored.
214+
// The orientation fields can be set depending on the constrain_orientation
215+
// field being true.
175216
//
176217
// \note OSI uses singular instead of plural for repeated field names.
177218
//
@@ -185,11 +226,44 @@ message PathAction
185226
// of the traffic participant or not.
186227
//
187228
optional bool constrain_orientation = 3;
229+
230+
// Specify the following mode that should be employed in executing
231+
// the path.
232+
//
233+
optional FollowingMode following_mode = 4;
234+
235+
// Definition of Following Mode.
236+
//
237+
enum FollowingMode
238+
{
239+
// Following mode position forces the traffic participant to
240+
// follow the path explicitly, disregarding any internal
241+
// constraints, like e.g. steering dynamics.
242+
//
243+
FOLLOWING_MODE_POSITION = 0;
244+
245+
// Following mode follow allows the traffic participant to
246+
// treat the path as a target, to be achieved as closely
247+
// as possible while retaining any internal constraints,
248+
// like e.g. steering dynamics.
249+
//
250+
FOLLOWING_MODE_FOLLOW = 1;
251+
}
188252
}
189253

190254
//
191-
// \brief Acquire Global Position Action. It provides an interface to describe
192-
// a target pose.
255+
// \brief Acquire Global Position Action.
256+
//
257+
// This action assigns a route to an traffic participant. The route
258+
// assigned will be the shortest route (along roads or satisfying any
259+
// other constraints a traffic participant is operating under) between
260+
// the traffic participant's current position and the position specified.
261+
//
262+
// As with all routing actions, the exact way this route is achieved is
263+
// under the control of the traffic participant model.
264+
//
265+
// \note This action is aligned with the AcquirePositionAction of
266+
// OpenSCENARIO 1.0 using a WorldPosition position argument.
193267
//
194268
message AcquireGlobalPositionAction
195269
{
@@ -208,6 +282,9 @@ message AcquireGlobalPositionAction
208282

209283
// Orientation in the global coordinate system.
210284
//
285+
// This is optional, if no orientation is given, the end orientation
286+
// is under control of the traffic participant.
287+
//
211288
optional Orientation3d orientation = 3;
212289
}
213290

@@ -219,23 +296,23 @@ message LaneChangeAction
219296
// The Action Header
220297
//
221298
optional ActionHeader action_header = 1;
222-
299+
223300
// Targeted lane relative to the current lane.
224301
//
225302
// Convention: +1 means to the right, -1 means to the left.
226303
//
227304
optional int32 relative_target_lane = 2;
228-
305+
229306
// Specified shape of the lane change action.
230307
//
231308
optional DynamicsShape dynamics_shape = 3;
232-
309+
233310
// Duration of the lane change.
234311
//
235312
// Unit: s
236313
//
237314
optional double duration = 4;
238-
315+
239316
// Distance of the lane change.
240317
//
241318
// Unit: m
@@ -265,5 +342,5 @@ message LaneChangeAction
265342
// Shape is a step function.
266343
//
267344
DYNAMICS_SHAPE_STEP = 4;
268-
}
345+
}
269346
}

0 commit comments

Comments
 (0)