-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathosi_trafficlight.proto
More file actions
638 lines (523 loc) · 18.8 KB
/
osi_trafficlight.proto
File metadata and controls
638 lines (523 loc) · 18.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
syntax = "proto2";
option optimize_for = SPEED;
import "osi_common.proto";
package osi3;
//
// \brief A traffic light.
//
// \image html OSI_TrafficLight.svg
//
// One traffic light message defines a single 'bulb' and not a box of several
// bulbs, e.g. red, yellow, green are three separate traffic lights.
//
message TrafficLight
{
// The ID of the traffic light.
//
// \rules
// is_globally_unique
// \endrules
//
optional Identifier id = 1;
// The base parameters of the traffic light.
//
// \c BaseStationary::orientation x-axis is view normal of the traffic
// light's icon.
//
optional BaseStationary base = 2;
// The classification data for the traffic light.
//
optional Classification classification = 3;
// Opaque reference of an associated 3D model of the traffic light.
//
// \note It is implementation-specific how model_references are resolved to
// 3d models.
//
optional string model_reference = 4;
// Optional external reference to the traffic light source.
//
// The external reference points to the source of the traffic light, if it
// is derived from one or more objects or external references.
//
// For example, to reference a signal defined in an OpenDRIVE map
// the items should be set as follows:
// * reference = URI to map, can remain empty if identical with definition
// in \c GroundTruth::map_reference
// * type = "net.asam.opendrive"
// * identifier[0] = id of t_road_signals_signal
//
// \note For non-ASAM Standards, it is implementation-specific how
// source_reference is resolved.
//
// \note The value has to be repeated, because one lane segment may be
// derived from more than one origin segment. Multiple sources
// may be added as reference as well, for example, a map and sensors.
//
repeated ExternalReference source_reference = 5;
// The visual color of the traffic light.
//
// \note This does not represent the semantic classification but the visual
// appearance. For semantic classification of the traffic light use the phase
// field in \c Classification.
//
optional ColorDescription color_description = 6;
//
// \brief \c Classification data for a traffic light.
//
message Classification
{
// The semantic color of the traffic light.
//
// \attention DEPRECATED: This color enum will be removed in version
// 4.0.0. Use the field \c #phase (\c Phase) of
// \c Classification instead.
//
// \note The color types represent the semantic color classification of a
// traffic light only. They do not represent an actual visual appearance.
//
// \note If the color of the traffic light is known (from history or
// geometrical arrangement) and the state \c #mode is
// \c #MODE_OFF then \c #color could remain unchanged.
// If traffic light displays images in different colors and traffic
// light is off ( \c #mode = \c #MODE_OFF), then \c #color = \c
// #COLOR_OTHER .
//
optional Color color = 1;
// The icon of the traffic light.
//
// \attention DEPRECATED: This icon enum will be removed in version
// 4.0.0. Use the field \c #symbol (\c Symbol) of
// \c Classification instead.
//
optional Icon icon = 2;
// The operating mode of the traffic light.
//
optional Mode mode = 3;
// The phase of the traffic light.
//
optional Phase phase = 4;
// The symbol of the traffic light.
//
optional Symbol symbol = 5;
// The value of the countdown counter.
// Unit: % or s
//
// \note Set value only if traffic light bulb is a countdown counter.
//
// \rules
// is_greater_than_or_equal_to: 0
// \endrules
//
optional double counter = 6;
// The value of the on duration of a flashing traffic light.
// Unit: s
//
// \note Set value only if traffic light mode is set to flashing.
//
// \rules
// is_greater_than_or_equal_to: 0
// \endrules
//
optional double flashing_on_duration = 7;
// The value of the off duration of a flashing traffic light.
// Unit: s
//
// \note Set value only if traffic light mode is set to flashing.
//
// \rules
// is_greater_than_or_equal_to: 0
// \endrules
//
optional double flashing_off_duration = 8;
// The IDs of the lanes that the traffic light is assigned to.
// Might be multiple if the traffic light is valid for multiple driving
// lanes.
//
// \note OSI uses singular instead of plural for repeated field names.
//
// \rules
// refers_to: Lane
// \endrules
//
repeated Identifier assigned_lane_id = 9;
// Boolean flag to indicate that the traffic light is taken out of service.
// This can be achieved by visibly crossing the light, covering it completely
// or swiching the traffic light off.
//
optional bool is_out_of_service = 10;
// Assignment of this object to logical lanes.
//
// \note OSI uses singular instead of plural for repeated field names.
//
repeated LogicalLaneAssignment logical_lane_assignment = 7;
// Definition of semantic colors for traffic lights.
//
// \attention DEPRECATED: This color enum will be removed in version
// 4.0.0. Use the enum \c Phase instead.
//
// \note The color types represent the semantic classification of a traffic light
// only. They do not represent an actual visual appearance.
//
enum Color
{
// Color is unknown (must not be used in ground truth).
//
COLOR_UNKNOWN = 0;
// Other (unspecified but known) color.
//
COLOR_OTHER = 1;
// Red light.
//
COLOR_RED = 2;
// Orange-yellow light.
//
COLOR_YELLOW = 3;
// Green light.
//
COLOR_GREEN = 4;
// Blue light.
//
COLOR_BLUE = 5;
// White light.
//
COLOR_WHITE = 6;
}
// Definition of traffic light bulb icon.
//
// \attention DEPRECATED: This icon enum will be removed in version
// 4.0.0. Use the enum \c Symbol instead.
//
enum Icon
{
// Unknown icon of traffic light (must not be used in ground truth).
//
ICON_UNKNOWN = 0;
// Other (unspecified but known) icon of traffic light.
//
ICON_OTHER = 1;
// This is a normal traffic light without specification of e.g.
// direction.
//
ICON_NONE = 2;
// This traffic light applies to the lane straight ahead.
//
ICON_ARROW_STRAIGHT_AHEAD = 3;
// This traffic light applies to left turns.
//
ICON_ARROW_LEFT = 4;
// This traffic light applies to diagonal left turns.
//
ICON_ARROW_DIAG_LEFT = 5;
// This traffic light applies to a lane allowing to drive straight
// ahead or to turn left.
//
ICON_ARROW_STRAIGHT_AHEAD_LEFT = 6;
// This traffic light applies to right turns.
//
ICON_ARROW_RIGHT = 7;
// This traffic light applies to diagonal right turns.
//
ICON_ARROW_DIAG_RIGHT = 8;
// This traffic light applies to a lane allowing to drive straight
// ahead or to turn right.
//
ICON_ARROW_STRAIGHT_AHEAD_RIGHT = 9;
// This traffic light applies to a lane allowing to turn left or
// right.
//
ICON_ARROW_LEFT_RIGHT = 10;
// This traffic light indicates that the assigned lane is open for
// driving.
//
ICON_ARROW_DOWN = 11;
// This traffic light indicates a necessary lane change to the left
// ahead.
//
ICON_ARROW_DOWN_LEFT = 12;
// This traffic light indicates a necessary lane change to the right
// ahead.
//
ICON_ARROW_DOWN_RIGHT = 13;
// This traffic light indicates that the assigned lane is not open
// for driving.
//
ICON_ARROW_CROSS = 14;
// This traffic light is valid for pedestrians.
//
ICON_PEDESTRIAN = 15;
// This traffic light is valid for pedestrians with letters 'walk'.
//
ICON_WALK = 16;
// This traffic light is valid for pedestrians with letters 'don't
// walk'.
//
ICON_DONT_WALK = 17;
// This traffic light is valid for bicyclists.
//
ICON_BICYCLE = 18;
// This traffic light is valid for pedestrians and bicyclists.
//
ICON_PEDESTRIAN_AND_BICYCLE = 19;
// This traffic light counter in second.
//
ICON_COUNTDOWN_SECONDS = 20;
// This traffic light counter in percent.
//
ICON_COUNTDOWN_PERCENT = 21;
// This traffic light is valid for
// trams.
//
// \note There is no detailed traffic light specification for trams
// and buses at the moment.
//
ICON_TRAM = 22;
// This traffic light is valid for
// buses.
//
// \note There is no detailed traffic light specification for trams
// and buses at the moment.
//
ICON_BUS = 23;
// This traffic light is valid for
// buses and trams.
//
// \note There is no detailed traffic light specification for trams
// and buses at the moment.
//
ICON_BUS_AND_TRAM = 24;
}
// Definition of light modes for traffic lights.
//
enum Mode
{
// Mode is unknown (must not be used in ground truth).
//
MODE_UNKNOWN = 0;
// Other (unspecified but known) mode.
//
MODE_OTHER = 1;
// Traffic light is off.
//
MODE_OFF = 2;
// Light is on and not flashing.
//
MODE_CONSTANT = 3;
// Light is flashing.
//
MODE_FLASHING = 4;
// Light is counting.
//
MODE_COUNTING = 5;
}
// Definition of phases for the traffic light
//
enum Phase
{
// Phase is unknown (must not be used in ground truth).
//
PHASE_UNKNOWN = 0;
// Other (unspecified but known) phase.
//
PHASE_OTHER = 1;
// Traffic light is in phase off.
//
PHASE_OFF = 2;
// Traffic light is in phase stop.
//
PHASE_STOP = 3;
// Traffic light is in phase attention.
//
PHASE_ATTENTION = 4;
// Traffic light is in phase stop attention.
//
PHASE_STOP_ATTENTION = 5;
// Traffic light is in phase go.
//
PHASE_GO = 6;
// Traffic light is in phase go exclusive.
//
PHASE_GO_EXCLUSIVE = 7;
}
// Definition of traffic light bulb symbol.
//
enum Symbol
{
// Unknown symbol of traffic light (must not be used in ground truth).
//
SYMBOL_UNKNOWN = 0;
// Other (unspecified but known) symbol of traffic light.
//
SYMBOL_OTHER = 1;
// This is a normal traffic light without specification of e.g.
// direction.
//
SYMBOL_NONE = 2;
// This traffic light applies to the lane straight ahead.
//
SYMBOL_ARROW_STRAIGHT_AHEAD = 3;
// This traffic light applies to left turns.
//
SYMBOL_ARROW_LEFT = 4;
// This traffic light applies to diagonal left turns.
//
SYMBOL_ARROW_DIAG_LEFT = 5;
// This traffic light applies to left u-turns.
//
SYMBOL_ARROW_LEFT_U_TURN = 6;
// This traffic light applies to a lane allowing to drive straight
// ahead or to turn left.
//
SYMBOL_ARROW_STRAIGHT_AHEAD_LEFT = 7;
// This traffic light applies to right turns.
//
SYMBOL_ARROW_RIGHT = 8;
// This traffic light applies to diagonal right turns.
//
SYMBOL_ARROW_DIAG_RIGHT = 9;
// This traffic light applies to right u-turns.
//
SYMBOL_ARROW_RIGHT_U_TURN = 10;
// This traffic light applies to a lane allowing to drive straight
// ahead or to turn right.
//
SYMBOL_ARROW_STRAIGHT_AHEAD_RIGHT = 11;
// This traffic light applies to a lane allowing to turn left or
// right.
//
SYMBOL_ARROW_LEFT_RIGHT = 12;
// This traffic light indicates that the assigned lane is open for
// driving.
//
SYMBOL_ARROW_DOWN = 13;
// This traffic light indicates a necessary lane change to the left
// ahead.
//
SYMBOL_ARROW_DOWN_LEFT = 14;
// This traffic light indicates a necessary lane change to the right
// ahead.
//
SYMBOL_ARROW_DOWN_RIGHT = 15;
// This traffic light indicates that the assigned lane is not open
// for driving.
//
SYMBOL_ARROW_CROSS = 16;
// This traffic light is valid for pedestrians.
//
SYMBOL_PEDESTRIAN = 17;
// This traffic light is valid for pedestrians with letters 'walk'.
//
SYMBOL_WALK = 18;
// This traffic light is valid for pedestrians with letters 'don't
// walk'.
//
SYMBOL_DONT_WALK = 19;
// This traffic light is valid for bicyclists.
//
SYMBOL_BICYCLE = 20;
// This traffic light is valid for bicyclists and applies to left
// turns.
//
SYMBOL_BICYCLE_LEFT = 21;
// This traffic light is valid for bicyclists and applies to right
// turns.
//
SYMBOL_BICYCLE_RIGHT = 22;
// This traffic light is valid for pedestrians and bicyclists.
//
SYMBOL_PEDESTRIAN_AND_BICYCLE = 23;
// This traffic light counter in second.
//
SYMBOL_COUNTDOWN_SECONDS = 24;
// This traffic light counter in percent.
//
SYMBOL_COUNTDOWN_PERCENT = 25;
// This traffic light is warning that buses can cross.
//
SYMBOL_BUS_WARNING = 26;
// This traffic light is warning that trams can cross.
//
SYMBOL_TRAM_WARNING = 27;
// This traffic light is warning that bicyclists can cross.
//
SYMBOL_BICYCLE_WARNING = 28;
// This traffic light is warning that pedestrians can cross.
//
SYMBOL_PEDESTRIAN_WARNING = 29;
// This traffic light is warning that bicyclists or
// pedestrians can cross.
//
SYMBOL_PEDESTRIAN_AND_BICYCLE_WARNING = 30;
// This traffic light is warning that horses can cross.
//
SYMBOL_HORSE_WARNING = 31;
// This traffic light is valid for bus and tram. It is of
// type F and subtype 0.
//
SYMBOL_F_0 = 32;
// This traffic light is valid for bus and tram. It is of
// type F and subtype 1.
//
SYMBOL_F_1 = 33;
// This traffic light is valid for bus and tram. It is of
// type F and subtype 2.
//
SYMBOL_F_2 = 34;
// This traffic light is valid for bus and tram. It is of
// type F and subtype 3.
//
SYMBOL_F_3 = 35;
// This traffic light is valid for bus and tram. It is of
// type F and subtype 4.
//
SYMBOL_F_4 = 36;
// This traffic light is valid for bus and tram. It is of
// type F and subtype 5.
//
SYMBOL_F_5 = 37;
// This traffic light is valid for bus and tram. It is of
// type W and subtype 0.
//
SYMBOL_W_0 = 38;
// This traffic light is valid for bus and tram. It is of
// type W and subtype 1.
//
SYMBOL_W_1 = 39;
// This traffic light is valid for bus and tram. It is of
// type F and subtype 2.
//
SYMBOL_W_2 = 40;
// This traffic light is valid for bus and tram. It is of
// type W and subtype 3.
//
SYMBOL_W_3 = 41;
// This traffic light is valid for bus and tram. It is of
// type W and subtype 11.
//
SYMBOL_W_11 = 42;
// This traffic light is valid for bus and tram. It is of
// type W and subtype 12.
//
SYMBOL_W_12 = 43;
// This traffic light is valid for bus and tram. It is of
// type F and subtype 13.
//
SYMBOL_W_13 = 44;
// This traffic light is valid for bus and tram. It is of
// type W and subtype 14.
//
SYMBOL_W_14 = 45;
// This traffic light is valid for bus and tram. It is of
// type A and subtype 1.
//
SYMBOL_A_1 = 46;
// This traffic light is valid for bus and tram. It is of
// type A and subtype X.
//
SYMBOL_A_X = 47;
// This traffic light is valid for bus and tram. It is of
// type A and subtype 2B.
//
SYMBOL_A_2B = 48;
}
}
}