-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwaymo_types.py
97 lines (80 loc) · 2.25 KB
/
waymo_types.py
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
# Motion Transformer (MTR): https://arxiv.org/abs/2209.13508
# Published at NeurIPS 2022
# Written by Shaoshuai Shi
# All Rights Reserved
object_type = {
0: 'TYPE_UNSET',
1: 'TYPE_VEHICLE',
2: 'TYPE_PEDESTRIAN',
3: 'TYPE_CYCLIST',
4: 'TYPE_OTHER'
}
lane_type = {
0: 'TYPE_UNDEFINED',
1: 'TYPE_FREEWAY',
2: 'TYPE_SURFACE_STREET',
3: 'TYPE_BIKE_LANE'
}
road_line_type = {
0: 'TYPE_UNKNOWN',
1: 'TYPE_BROKEN_SINGLE_WHITE',
2: 'TYPE_SOLID_SINGLE_WHITE',
3: 'TYPE_SOLID_DOUBLE_WHITE',
4: 'TYPE_BROKEN_SINGLE_YELLOW',
5: 'TYPE_BROKEN_DOUBLE_YELLOW',
6: 'TYPE_SOLID_SINGLE_YELLOW',
7: 'TYPE_SOLID_DOUBLE_YELLOW',
8: 'TYPE_PASSING_DOUBLE_YELLOW'
}
road_edge_type = {
0: 'TYPE_UNKNOWN',
# // Physical road boundary that doesn't have traffic on the other side (e.g.,
# // a curb or the k-rail on the right side of a freeway).
1: 'TYPE_ROAD_EDGE_BOUNDARY',
# // Physical road boundary that separates the car from other traffic
# // (e.g. a k-rail or an island).
2: 'TYPE_ROAD_EDGE_MEDIAN'
}
polyline_type = {
# for lane
'TYPE_UNDEFINED': -1,
'TYPE_FREEWAY': 1,
'TYPE_SURFACE_STREET': 2,
'TYPE_BIKE_LANE': 3,
# for roadline
'TYPE_UNKNOWN': -1,
'TYPE_BROKEN_SINGLE_WHITE': 6,
'TYPE_SOLID_SINGLE_WHITE': 7,
'TYPE_SOLID_DOUBLE_WHITE': 8,
'TYPE_BROKEN_SINGLE_YELLOW': 9,
'TYPE_BROKEN_DOUBLE_YELLOW': 10,
'TYPE_SOLID_SINGLE_YELLOW': 11,
'TYPE_SOLID_DOUBLE_YELLOW': 12,
'TYPE_PASSING_DOUBLE_YELLOW': 13,
# for roadedge
'TYPE_ROAD_EDGE_BOUNDARY': 15,
'TYPE_ROAD_EDGE_MEDIAN': 16,
# for stopsign
'TYPE_STOP_SIGN': 17,
# for crosswalk
'TYPE_CROSSWALK': 18,
# for speed bump
'TYPE_SPEED_BUMP': 19
}
signal_state = {
0: 'LANE_STATE_UNKNOWN',
# // States for traffic signals with arrows.
1: 'LANE_STATE_ARROW_STOP',
2: 'LANE_STATE_ARROW_CAUTION',
3: 'LANE_STATE_ARROW_GO',
# // Standard round traffic signals.
4: 'LANE_STATE_STOP',
5: 'LANE_STATE_CAUTION',
6: 'LANE_STATE_GO',
# // Flashing light signals.
7: 'LANE_STATE_FLASHING_STOP',
8: 'LANE_STATE_FLASHING_CAUTION'
}
signal_state_to_id = {}
for key, val in signal_state.items():
signal_state_to_id[val] = key