Apollo 11.0
自动驾驶开放平台
grading_condition.proto
浏览该文件的文档.
1syntax = "proto2";
2
3package apollo.simulation;
4
6
7// Next-id: 29
8message Condition {
9 oneof condition {
10 LogicalCondition logical_condition = 1;
11 SpeedCondition speed_condition = 2;
12 AccelerationCondition acceleration_condition = 3;
13 JerkCondition jerk_condition = 4;
14 ObjectOverlapCondition object_overlap_condition = 5;
15 RegionOverlapCondition region_overlap_condition = 6;
16 RegionOverlapLWCondition region_overlap_lw_condition = 7;
17 SpinCondition spin_condition = 8;
18 OnRoadCondition on_road_condition = 9;
19 RunRedLightCondition run_red_light_condition = 10;
20 ChangeLaneAtJunctionCondition change_lane_at_junction_condition = 11;
21 RoutingCondition routing_condition = 12;
22 CrosswalkYieldCondition crosswalk_yield_condition = 13;
23 AbnormalStopCondition abnormal_stop_condition = 14;
24 BrakeTapCondition brake_tap_condition = 15;
25 RunStopSignCondition run_stop_sign_condition = 16;
26 CheckpointCondition checkpoint_condition = 17;
27 DistToEndCondition dist_to_end_condition = 18;
28 DistToLaneCenterCondition dist_to_lane_center_condition = 19;
29 CrosswalkStopCondition crosswalk_stop_condition = 20;
30 RedLightStopCondition red_light_stop_condition = 21;
31 SpeedbumpLimitCondition speedbump_limit_condition = 22;
32 WorkingZoneAvoidLimitCondition working_zone_avoid_limit_condition = 23;
33 LimitedTimeParkingCondition limited_time_parking_condition = 24;
34 FollowAndBypassCondition follow_and_bypass_condition = 25;
35 ObstacleBypassCondition obstacle_bypass_condition = 26;
36 CentripetalAccelerationCondition centripetal_acceleration_condition = 27;
37 TimeLimitCondition time_limit_condition = 28;
38 AntiCheatingCondition anti_cheating_condition = 29;
39 KeyPointCondition key_point_condition = 30;
40 }
41
42 optional GradePlanning grade_planning = 100;
43}
44
45message GradePlanning {
46 // any negative integer: grade all the planning points,
47 // 0: do not grade any planning point,
48 // any positive integer k: grade planning points within k sec.
49 optional sint32 duration = 1 [default = 0];
50 // Whether to search for a perception obstacle frame that is
51 // close enough in time to the planning point.
52 optional bool update_obstacles = 2 [default = false];
53 // Whether to evaluate planning points in a certain range.
54 optional bool use_planning_as_history = 3 [default = false];
55}
56
57message LogicalCondition {
58 enum OperatorType {
59 UNKNOWN = 0;
60 NOT = 1;
61 AND = 2;
62 OR = 3;
63 IMPLY = 4;
64 XOR = 5;
65 }
66 optional OperatorType operator_type = 1;
67 repeated Condition sub_condition = 2;
68}
69
70message SpeedCondition {
71 optional string name = 1 [default = "speed"];
72 optional double min_speed = 2 [default = -0.5];
73 optional double max_speed = 3 [default = 1000.0];
74 optional bool use_score = 4 [default = false];
75 optional double single_deduction = 5 [default = 0.5];
76}
77
78message CentripetalAccelerationCondition {
79 // 向心加速度限制
80 optional string name = 1 [default = "centripetal_acceleration"];
81 optional double max_centripetal_acceleration = 2 [default = 2.0];
82 optional bool use_score = 3 [default = false];
83 optional double single_deduction = 4 [default = 0.5];
84}
85
86message AccelerationCondition {
87 optional string name = 1 [default = "acceleration"];
88 optional double min_acceleration = 2 [default = -1000.0];
89 optional double max_acceleration = 3 [default = 1000.0];
90 optional bool use_score = 4 [default = false];
91 optional double single_deduction = 5 [default = 0.5];
92}
93
94message JerkCondition {
95 optional string name = 1 [default = "jerk"];
96 optional double min_jerk = 2 [default = -1000.0];
97 optional double max_jerk = 3 [default = 1000.0];
98}
99
100message SpinCondition {
101 optional string name = 1 [default = "spin"];
102 optional double min_spin = 2 [default = -1000.0];
103 optional double max_spin = 3 [default = 1000.0];
104}
105
106message ObjectOverlapCondition {
107 enum DirectionType {
108 EXCLUDE_BACK = 0;
109 INCLUDE_BACK = 1;
110 }
111
112 optional string source_object_ids = 1;
113 optional string target_object_ids = 2;
114 optional double distance = 3;
115 // the relative direction from the source object
116 optional DirectionType direction = 4 [default = EXCLUDE_BACK];
117 repeated string ignore_object_ids = 5;
118 optional bool use_score = 6 [default = false];
119}
120
121message RegionOverlapCondition {
122 optional string object_ids = 1;
123
124 // Coordinates of region corners. e.g. x1, y1, x2, y2, etc.
125 repeated double region_corner_xy = 2 [packed = true];
126
127 // True if the condition requires the region fully containing the object.
128 optional bool require_fully_contain = 3;
129
130 // Specify if the polygon has certain pre-defined heading.
131 optional double heading = 4;
132 optional bool use_score = 5 [default = false];
133}
134
135message RegionOverlapLWCondition {
136 optional string object_ids = 1;
137
138 optional double x = 2;
139 optional double y = 3;
140
141 optional double length = 4;
142 optional double width = 5;
143
144 // True if the condition requires the region fully containing the object.
145 optional bool require_fully_contain = 6;
146 optional bool use_score = 7 [default = false];
147}
148
149message OnRoadCondition {
150 // True if evaluate based on road boundary rather than lane boundary.
151 optional bool use_road_boundary = 1 [default = false];
152 optional bool use_score = 2 [default = false];
153}
154
155message RunRedLightCondition {
156 optional bool use_score = 1 [default = false];
157}
158
159message RedLightStopCondition {
160 optional double min_distance = 1 [default = 2.0];
161 optional double max_distance = 2 [default = 2.2];
162 optional bool use_score = 3 [default = false];
163 optional double single_deduction = 4 [default = 5];
164}
165
166message ChangeLaneAtJunctionCondition {}
167
168message RoutingCondition {}
169
170message CrosswalkYieldCondition {}
171
172message CrosswalkStopCondition {
173 optional double min_distance = 1 [default = 2.2];
174 optional double max_distance = 2 [default = 2.7];
175 optional bool use_score = 3 [default = false];
176 optional double single_deduction = 4 [default = 5];
177}
178
179message AbnormalStopCondition {
180 optional double duration = 1 [default = 5.0];
181 optional double distance = 2 [default = 10.0];
182 optional double x = 3;
183 optional double y = 4;
184}
185
186message BrakeTapCondition {
187 optional double min_duration = 1 [default = 1.0];
188 optional double max_duration = 2 [default = 4.0];
189}
190
191message RunStopSignCondition {
192 optional double distance = 1 [default = 2.0];
193}
194
195message CheckpointCondition {
196 // Each checkpoint sub-condition needs to be true at least once.
197 repeated Condition checkpoint = 1;
198}
199
200message DistToEndCondition {}
201
202message DistToLaneCenterCondition {}
203
204message TimeLimitCondition {
205 // time limitation, in seconds
206 optional double timeout = 1;
207 optional bool use_score = 2 [default = false];
208}
209
210message SpeedbumpLimitCondition {
211 // change speedbump from line segment to rectangle which length = line segment
212 // length
213 optional double speedbump_half_width = 1 [default = 0.2];
214 optional double max_speed = 2 [default = 3.0];
215 // (adc_speed - max_speed)/deduction_speed_unit 来计算扣分次数
216 optional double deduction_speed_unit = 3 [default = 1.0];
217 optional bool use_score = 4 [default = false];
218 optional double single_deduction = 5 [default = 5];
219}
220
221// 区别:和regionOverlap希望包含这个polygon或者有重叠的情况
222// 施工区域:希望不包含这个polygon,同时含限时+限速
223// 忽略限速和限时,将变成一个判断no overlap的情况
224// 可以理解为:regionOverlap反向
225message WorkingZoneAvoidLimitCondition {
226 // adc should avoid working zone
227 repeated apollo.hdmap.Polygon working_zone = 1;
228 optional double max_speed = 2 [default = 8.33];
229 // whole area used for judge if car enter this area
230 // if enter, then check if enter working_zone
231 // this field required
232 optional apollo.hdmap.Polygon whole_area = 3;
233 optional bool use_score = 4 [default = false];
234 // 单帧扣分系数,应该与位移及检测帧率成负相关,与总分值成正相关
235 // 扣分公式为sum((vx/vl-1)^(vx/vl)*single_deduction)
236 // vx 为当前帧速度
237 // vl 即 max_speed, 最大限速
238 // 具体的系数公式待定,以下仅举例说明,由于公式不明确,暂时以一个
239 // 定值参数的形式从配置传入
240 // eg: 满分为120的情况下,频率100(间隔0.01s),距离600m的情况下
241 // single_deduction = (120 * k) / (600 * 100), k 为常数
242 // k为30则single_deduction为0.06,则通过扣分公式大概可得
243 // 平均速度超过60%之后可将分数扣完
244 // k为40则single_deduction为0.08,则通过扣分公式大概可得
245 // 平均速度超过43%之后可将分数扣完
246 // 调整k使用single_deduction可以让速度超过一定比例后将分数扣完
247 optional double single_deduction = 5 [default = 3];
248}
249
250message LimitedTimeParkingCondition {
251 optional apollo.hdmap.Polygon parking_lot = 1;
252 // 转变time to 次数
253 // eg: 90s内限时停车,频率10ms刷新一次 9000次
254 optional bool use_score = 2 [default = false];
255 optional double single_deduction = 3 [default = 5];
256}
257
258message FollowAndBypassCondition {
259 optional apollo.hdmap.Polygon test_range = 1;
260 optional double divide_speed = 2 [default = 3.0]; // 3
261 optional string obstacle_id = 3; // 1372
262 optional apollo.hdmap.LineSegment end_line = 4;
263 optional bool use_score = 5 [default = false];
264 // no single deduction only 100 or 0
265}
266
267message ObstacleBypassCondition {
268 optional apollo.hdmap.Polygon test_range = 1;
269 optional string obstacle_id = 2;
270 optional double min_lateral_distance = 3 [default = 1.0];
271 optional double max_speed = 4 [default = 5.0];
272 optional bool use_score = 5 [default = false];
273 optional double single_deduction = 6 [default = 5];
274}
275
276message AntiCheatingCondition {
277 optional bool use_score = 1 [default = false];
278}
279
280message KeyPoint {
281 optional double x = 1;
282 optional double y = 2;
283 optional double z = 3 [default = 0.0];
284 optional double radius = 4 [default = 2.0];
285}
286
287// 这个条件是针对高速足跳变所设计,通过设置道路的检查点,看车辆是否保持合理的运
288// 行轨迹
289// TODO: 在解析评测配置的处增加根据路线生成检查点的逻辑
290message KeyPointCondition {
291 optional bool use_score = 1 [default = false];
292 optional bool in_order = 2 [default = true];
293 optional double radius = 3 [default = 2.0];
294 // 检查点,每个点都经过结果判定才会为真
295 repeated KeyPoint point = 4;
296}
apollo::hdmap
Definition map.proto:3
class register implement
Definition arena_queue.h:37