@@ -55,111 +55,6 @@ message TrafficSign
5555 VARIABILITY_VARIABLE = 3 ;
5656 }
5757
58- // Unit for values on traffic sign
59- //
60- enum Unit
61- {
62- // Unit of the sign's value is unknown (must not be used in ground
63- // truth).
64- //
65- UNIT_UNKNOWN = 0 ;
66-
67- // Other (unspecified but known) unit of the sign's value.
68- //
69- UNIT_OTHER = 1 ;
70-
71- // Value without
72- // unit.
73- //
74- // Unit: []
75- //
76- UNIT_NO_UNIT = 2 ;
77-
78- // Velocity.
79- // Kilometers per hour.
80- //
81- // Unit: [km/h]
82- //
83- UNIT_KILOMETER_PER_HOUR = 3 ;
84-
85- // Velocity .
86- // Miles per hour.
87- //
88- // Unit: [mph]
89- //
90- UNIT_MILE_PER_HOUR = 4 ;
91-
92- // Length.
93- // Meter.
94- //
95- // Unit: [m]
96- //
97- UNIT_METER = 5 ;
98-
99- // Length.
100- // Kilometer.
101- //
102- // Unit: [km]
103- //
104- UNIT_KILOMETER = 6 ;
105-
106- // Length.
107- // Feet.
108- //
109- // Unit: [ft]
110- //
111- UNIT_FEET = 7 ;
112-
113- // Length.
114- // Mile.
115- //
116- // Unit: [mile]
117- //
118- UNIT_MILE = 8 ;
119-
120- // Weight.
121- // Ton.
122- //
123- // Unit: [t]
124- //
125- UNIT_METRIC_TON = 9 ;
126-
127- // Weight.
128- // Long ton UK 1,016.047 [kg].
129- //
130- // Unit: [tn. l.]
131- //
132- UNIT_LONG_TON = 10 ;
133-
134- // Weight.
135- // Short ton USA 907.1847 [kg].
136- //
137- // Unit: [tn. sh.]
138- //
139- UNIT_SHORT_TON = 11 ;
140-
141- // Time of day.
142- // Hour since midnight.
143- //
144- // Unit: [min]
145- //
146- UNIT_MINUTES = 12 ;
147-
148- // Day of the week.
149- // Days since Monday. Monday = 0; Tuesday = 1; ...
150- //
151- // Unit: []
152- //
153- UNIT_DAY = 13 ;
154-
155- // Percentage.
156- // .
157- //
158- // Unit: [%]
159- //
160- UNIT_PERCENTAGE = 14 ;
161- }
162-
16358 //
16459 // \brief Additional, supplementary sign modifying a parent traffic sign.
16560 //
@@ -187,13 +82,8 @@ message TrafficSign
18782 // speed limit.
18883 //
18984 // \note Field need not be set if traffic sign type does not require it.
190- // Unit of field \c #value is defined by field \c #value_unit.
19185 //
192- optional double value = 3 ;
193-
194- // Unit for additional value.
195- //
196- optional Unit value_unit = 4 ;
86+ optional TrafficSignValue value = 3 ;
19787
19888 // Some traffic signs have an additional arrow symbol as an additional
19989 // constraint for their scope (e.g. no parking to the right).
@@ -215,7 +105,7 @@ message TrafficSign
215105 // sign. Actual traffic signs lying on the ground might have been
216106 // intentionally unmounted and, hence, not be in effect.
217107 //
218- optional DirectionScope direction_scope = 5 ;
108+ optional DirectionScope direction_scope = 4 ;
219109
220110 // The IDs of the lanes that the sign is assigned to.
221111 // May be multiple if the sign is valid for multiple lanes.
@@ -905,7 +795,6 @@ message TrafficSign
905795 }
906796 }
907797
908-
909798 //
910799 // \brief Additional, supplementary sign modifying a parent traffic sign.
911800 //
@@ -929,41 +818,14 @@ message TrafficSign
929818 //
930819 optional Type type = 1 ;
931820
932- // Optional first value defining additional properties , e.g. length, mass
821+ // Additional value(s) associated with the traffic sign , e.g. length, mass
933822 // or starting time in time range.
934823 //
935- optional double value_1 = 2 ;
936-
937- // Unit for first optional value.
938- //
939- optional Unit value_1_unit = 3 ;
940-
941- // Optional second value defining additional properties, e.g. end time in
942- // time range.
943- //
944- optional double value_2 = 4 ;
945-
946- // Unit for second optional value.
947- //
948- optional Unit value_2_unit = 5 ;
949-
950- // Optional third value defining additional properties, e.g. day of the
951- // week start.
952- //
953- optional double value_3 = 6 ;
954-
955- // Unit for third optional value.
956- //
957- optional Unit value_3_unit = 7 ;
958-
959- // Optional fourth value defining additional properties, e.g. day of the
960- // week end.
824+ // \note Field need not be set if traffic sign type does not require it.
961825 //
962- optional double value_4 = 8 ;
963-
964- // Unit for fourth optional value.
826+ // \note OSI uses singular instead of plural for repeated field names.
965827 //
966- optional Unit value_4_unit = 9 ;
828+ repeated TrafficSignValue value = 2 ;
967829
968830 // The IDs of the lanes that the sign is assigned to.
969831 // May be multiple if the sign is valid for multiple lanes.
@@ -1098,6 +960,127 @@ message TrafficSign
1098960 }
1099961}
1100962
963+ //
964+ // \brief Additional value associated with a traffic sign or road marking
965+ // and its unit.
966+ //
967+ message TrafficSignValue
968+ {
969+ // Additional value associated with a traffic sign or road marking,
970+ // e.g. value of a speed limit.
971+ //
972+ optional double value = 3 ;
973+
974+ // Unit for additional value.
975+ //
976+ optional Unit value_unit = 4 ;
977+
978+ // Unit for values on traffic sign
979+ //
980+ enum Unit
981+ {
982+ // Unit of the sign's value is unknown (must not be used in ground
983+ // truth).
984+ //
985+ UNIT_UNKNOWN = 0 ;
986+
987+ // Other (unspecified but known) unit of the sign's value.
988+ //
989+ UNIT_OTHER = 1 ;
990+
991+ // Value without
992+ // unit.
993+ //
994+ // Unit: []
995+ //
996+ UNIT_NO_UNIT = 2 ;
997+
998+ // Velocity.
999+ // Kilometers per hour.
1000+ //
1001+ // Unit: [km/h]
1002+ //
1003+ UNIT_KILOMETER_PER_HOUR = 3 ;
1004+
1005+ // Velocity .
1006+ // Miles per hour.
1007+ //
1008+ // Unit: [mph]
1009+ //
1010+ UNIT_MILE_PER_HOUR = 4 ;
1011+
1012+ // Length.
1013+ // Meter.
1014+ //
1015+ // Unit: [m]
1016+ //
1017+ UNIT_METER = 5 ;
1018+
1019+ // Length.
1020+ // Kilometer.
1021+ //
1022+ // Unit: [km]
1023+ //
1024+ UNIT_KILOMETER = 6 ;
1025+
1026+ // Length.
1027+ // Feet.
1028+ //
1029+ // Unit: [ft]
1030+ //
1031+ UNIT_FEET = 7 ;
1032+
1033+ // Length.
1034+ // Mile.
1035+ //
1036+ // Unit: [mile]
1037+ //
1038+ UNIT_MILE = 8 ;
1039+
1040+ // Weight.
1041+ // Ton.
1042+ //
1043+ // Unit: [t]
1044+ //
1045+ UNIT_METRIC_TON = 9 ;
1046+
1047+ // Weight.
1048+ // Long ton UK 1,016.047 [kg].
1049+ //
1050+ // Unit: [tn. l.]
1051+ //
1052+ UNIT_LONG_TON = 10 ;
1053+
1054+ // Weight.
1055+ // Short ton USA 907.1847 [kg].
1056+ //
1057+ // Unit: [tn. sh.]
1058+ //
1059+ UNIT_SHORT_TON = 11 ;
1060+
1061+ // Time of day.
1062+ // Hour since midnight.
1063+ //
1064+ // Unit: [min]
1065+ //
1066+ UNIT_MINUTES = 12 ;
1067+
1068+ // Day of the week.
1069+ // Days since Monday. Monday = 0; Tuesday = 1; ...
1070+ //
1071+ // Unit: []
1072+ //
1073+ UNIT_DAY = 13 ;
1074+
1075+ // Percentage.
1076+ // .
1077+ //
1078+ // Unit: [%]
1079+ //
1080+ UNIT_PERCENTAGE = 14 ;
1081+ }
1082+ }
1083+
11011084//
11021085// \brief A traffic light.
11031086//
@@ -1396,17 +1379,12 @@ message RoadMarking
13961379 //
13971380 optional Color monochrome_color = 5 ;
13981381
1399- // Additional value associated with the road marking, e.g. value of the
1382+ // Additional value associated with the road marking, e.g. value of the
14001383 // speed limit.
14011384 //
1402- // \note This field needs not be set if the road marking's type does not
1403- // require it.
1404- //
1405- optional double value = 6 ;
1406-
1407- // Unit for optional value.
1385+ // \note Field need not be set if road marking type does not require it.
14081386 //
1409- optional TrafficSign.Unit value_unit = 7 ;
1387+ optional TrafficSignValue value = 7 ;
14101388
14111389 // Additional text value as road marking, e.g. BUS, TAXI etc.
14121390 //
0 commit comments