Apollo  6.0
Open source self driving car software
planning_gflags.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2017 The Apollo Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *****************************************************************************/
16 
17 #pragma once
18 
19 #include "gflags/gflags.h"
20 
21 DECLARE_bool(planning_test_mode);
22 
23 DECLARE_int32(history_max_record_num);
24 DECLARE_int32(max_frame_history_num);
25 
26 // scenarios related
27 DECLARE_string(scenario_bare_intersection_unprotected_config_file);
28 DECLARE_string(scenario_emergency_pull_over_config_file);
29 DECLARE_string(scenario_emergency_stop_config_file);
30 DECLARE_string(scenario_lane_follow_config_file);
31 DECLARE_string(scenario_lane_follow_hybrid_config_file);
32 DECLARE_string(scenario_learning_model_sample_config_file);
33 DECLARE_string(scenario_narrow_street_u_turn_config_file);
34 DECLARE_string(scenario_park_and_go_config_file);
35 DECLARE_string(scenario_pull_over_config_file);
36 DECLARE_string(scenario_stop_sign_unprotected_config_file);
37 DECLARE_string(scenario_traffic_light_protected_config_file);
38 DECLARE_string(scenario_traffic_light_unprotected_left_turn_config_file);
39 DECLARE_string(scenario_traffic_light_unprotected_right_turn_config_file);
40 DECLARE_string(scenario_valet_parking_config_file);
41 DECLARE_string(scenario_yield_sign_config_file);
42 
43 DECLARE_bool(enable_scenario_bare_intersection);
44 DECLARE_bool(enable_scenario_emergency_pull_over);
45 DECLARE_bool(enable_scenario_emergency_stop);
46 DECLARE_bool(enable_scenario_park_and_go);
47 DECLARE_bool(enable_scenario_pull_over);
48 DECLARE_bool(enable_scenario_stop_sign);
49 DECLARE_bool(enable_scenario_traffic_light);
50 DECLARE_bool(enable_scenario_yield_sign);
51 
52 DECLARE_bool(enable_scenario_side_pass_multiple_parked_obstacles);
53 DECLARE_bool(enable_force_pull_over_open_space_parking_test);
54 
55 DECLARE_string(traffic_rule_config_filename);
56 DECLARE_string(smoother_config_filename);
57 DECLARE_int32(planning_loop_rate);
58 DECLARE_string(rtk_trajectory_filename);
59 DECLARE_uint64(rtk_trajectory_forward);
60 DECLARE_double(rtk_trajectory_resolution);
61 DECLARE_bool(enable_reference_line_stitching);
62 DECLARE_double(look_forward_extend_distance);
63 DECLARE_double(reference_line_stitch_overlap_distance);
64 
65 DECLARE_bool(enable_smooth_reference_line);
66 
67 DECLARE_bool(prioritize_change_lane);
68 DECLARE_double(change_lane_min_length);
69 
70 DECLARE_bool(publish_estop);
71 DECLARE_bool(enable_trajectory_stitcher);
72 
73 // parameters for trajectory stitching and reinit planning starting point.
74 DECLARE_double(replan_lateral_distance_threshold);
75 DECLARE_double(replan_longitudinal_distance_threshold);
76 
77 // parameter for reference line
78 DECLARE_bool(enable_reference_line_provider_thread);
79 DECLARE_double(default_reference_line_width);
80 DECLARE_double(smoothed_reference_line_max_diff);
81 
82 // parameters for trajectory planning
83 DECLARE_double(planning_upper_speed_limit);
84 DECLARE_double(trajectory_time_length);
85 DECLARE_double(trajectory_time_min_interval);
86 DECLARE_double(trajectory_time_max_interval);
87 DECLARE_double(trajectory_time_high_density_period);
88 
89 // parameters for trajectory sanity check
90 DECLARE_bool(enable_trajectory_check);
91 DECLARE_double(speed_lower_bound);
92 DECLARE_double(speed_upper_bound);
93 
94 DECLARE_double(longitudinal_acceleration_lower_bound);
95 DECLARE_double(longitudinal_acceleration_upper_bound);
96 
97 DECLARE_double(longitudinal_jerk_lower_bound);
98 DECLARE_double(longitudinal_jerk_upper_bound);
99 DECLARE_double(lateral_jerk_bound);
100 
101 DECLARE_double(kappa_bound);
102 
103 // STBoundary
104 DECLARE_double(st_max_s);
105 DECLARE_double(st_max_t);
106 
107 // Decision Part
108 DECLARE_bool(enable_nudge_slowdown);
109 DECLARE_double(static_obstacle_nudge_l_buffer);
110 DECLARE_double(nonstatic_obstacle_nudge_l_buffer);
111 DECLARE_double(lane_change_obstacle_nudge_l_buffer);
112 DECLARE_double(lateral_ignore_buffer);
113 DECLARE_double(min_stop_distance_obstacle);
114 DECLARE_double(max_stop_distance_obstacle);
115 DECLARE_double(follow_min_distance);
116 DECLARE_double(follow_min_obs_lateral_distance);
117 DECLARE_double(yield_distance);
118 DECLARE_double(follow_time_buffer);
119 DECLARE_double(follow_min_time_sec);
120 DECLARE_double(signal_expire_time_sec);
121 
122 // Path Deciders
123 DECLARE_bool(enable_skip_path_tasks);
124 DECLARE_bool(enable_reuse_path_in_lane_follow);
125 
126 DECLARE_double(obstacle_lat_buffer);
127 DECLARE_double(obstacle_lon_start_buffer);
128 DECLARE_double(obstacle_lon_end_buffer);
129 DECLARE_double(static_obstacle_speed_threshold);
130 DECLARE_double(lane_borrow_max_speed);
131 DECLARE_int32(long_term_blocking_obstacle_cycle_threshold);
132 
133 DECLARE_string(destination_obstacle_id);
134 DECLARE_double(destination_check_distance);
135 
136 DECLARE_double(virtual_stop_wall_length);
137 DECLARE_double(virtual_stop_wall_height);
138 
139 DECLARE_double(prediction_total_time);
140 DECLARE_bool(align_prediction_time);
141 DECLARE_int32(trajectory_point_num_for_debug);
142 DECLARE_double(lane_change_prepare_length);
143 DECLARE_double(min_lane_change_prepare_length);
144 DECLARE_double(allowed_lane_change_failure_time);
145 DECLARE_bool(enable_smarter_lane_change);
146 
147 DECLARE_double(turn_signal_distance);
148 
149 // QpSt optimizer
150 DECLARE_double(slowdown_profile_deceleration);
151 
152 DECLARE_bool(enable_sqp_solver);
153 
155 DECLARE_bool(use_multi_thread_to_add_obstacles);
156 DECLARE_bool(enable_multi_thread_in_dp_st_graph);
157 
158 DECLARE_double(numerical_epsilon);
159 DECLARE_double(default_cruise_speed);
160 
161 DECLARE_double(trajectory_time_resolution);
162 DECLARE_double(trajectory_space_resolution);
163 DECLARE_double(lateral_acceleration_bound);
164 DECLARE_double(speed_lon_decision_horizon);
165 DECLARE_uint64(num_velocity_sample);
166 DECLARE_bool(enable_backup_trajectory);
167 DECLARE_double(backup_trajectory_cost);
168 DECLARE_double(min_velocity_sample_gap);
169 DECLARE_double(lon_collision_buffer);
170 DECLARE_double(lat_collision_buffer);
171 DECLARE_uint64(num_sample_follow_per_timestamp);
172 
173 DECLARE_bool(lateral_optimization);
174 DECLARE_double(weight_lateral_offset);
175 DECLARE_double(weight_lateral_derivative);
176 DECLARE_double(weight_lateral_second_order_derivative);
177 DECLARE_double(weight_lateral_third_order_derivative);
178 DECLARE_double(weight_lateral_obstacle_distance);
179 DECLARE_double(lateral_third_order_derivative_max);
180 DECLARE_double(lateral_derivative_bound_default);
181 
182 // Lattice Evaluate Parameters
183 DECLARE_double(weight_lon_objective);
184 DECLARE_double(weight_lon_jerk);
185 DECLARE_double(weight_lon_collision);
186 DECLARE_double(weight_lat_offset);
187 DECLARE_double(weight_lat_comfort);
188 DECLARE_double(weight_centripetal_acceleration);
189 DECLARE_double(cost_non_priority_reference_line);
190 DECLARE_double(weight_same_side_offset);
191 DECLARE_double(weight_opposite_side_offset);
192 DECLARE_double(weight_dist_travelled);
193 DECLARE_double(weight_target_speed);
194 DECLARE_double(lat_offset_bound);
195 DECLARE_double(lon_collision_yield_buffer);
196 DECLARE_double(lon_collision_overtake_buffer);
197 DECLARE_double(lon_collision_cost_std);
198 DECLARE_double(default_lon_buffer);
199 DECLARE_double(time_min_density);
200 DECLARE_double(comfort_acceleration_factor);
201 DECLARE_double(polynomial_minimal_param);
202 DECLARE_double(lattice_stop_buffer);
203 DECLARE_double(max_s_lateral_optimization);
204 DECLARE_double(default_delta_s_lateral_optimization);
205 DECLARE_double(bound_buffer);
206 DECLARE_double(nudge_buffer);
207 
208 DECLARE_double(fallback_total_time);
209 DECLARE_double(fallback_time_unit);
210 
211 DECLARE_double(speed_bump_speed_limit);
212 DECLARE_double(default_city_road_speed_limit);
213 DECLARE_double(default_highway_speed_limit);
214 
215 // navigation mode
216 DECLARE_bool(enable_planning_pad_msg);
217 
218 // open space planner
219 DECLARE_string(planner_open_space_config_filename);
220 DECLARE_double(open_space_planning_period);
221 DECLARE_double(open_space_prediction_time_horizon);
222 DECLARE_bool(enable_perception_obstacles);
223 DECLARE_bool(enable_open_space_planner_thread);
224 DECLARE_bool(use_dual_variable_warm_start);
225 DECLARE_bool(use_gear_shift_trajectory);
226 DECLARE_uint64(open_space_trajectory_stitching_preserved_length);
227 DECLARE_bool(enable_smoother_failsafe);
228 DECLARE_bool(use_s_curve_speed_smooth);
229 DECLARE_bool(use_iterative_anchoring_smoother);
230 DECLARE_bool(enable_parallel_trajectory_smoothing);
231 
232 DECLARE_bool(enable_osqp_debug);
233 DECLARE_bool(export_chart);
234 DECLARE_bool(enable_record_debug);
235 
236 DECLARE_double(default_front_clear_distance);
237 
238 DECLARE_double(max_trajectory_len);
239 DECLARE_bool(enable_rss_fallback);
240 DECLARE_bool(enable_rss_info);
241 DECLARE_double(rss_max_front_obstacle_distance);
242 
243 DECLARE_bool(enable_planning_smoother);
244 DECLARE_double(smoother_stop_distance);
245 
246 DECLARE_double(side_pass_driving_width_l_buffer);
247 
248 DECLARE_bool(enable_parallel_hybrid_a);
249 
250 DECLARE_double(open_space_standstill_acceleration);
251 
252 DECLARE_bool(enable_dp_reference_speed);
253 
254 DECLARE_double(message_latency_threshold);
255 DECLARE_bool(enable_lane_change_urgency_checking);
256 DECLARE_double(short_path_length_threshold);
257 
258 DECLARE_uint64(trajectory_stitching_preserved_length);
259 
260 DECLARE_bool(use_st_drivable_boundary);
261 
262 DECLARE_bool(use_smoothed_dp_guide_line);
263 
264 DECLARE_bool(use_soft_bound_in_nonlinear_speed_opt);
265 
266 DECLARE_bool(use_front_axe_center_in_path_planning);
267 
268 DECLARE_bool(use_road_boundary_from_map);
269 
270 // learning related
271 DECLARE_bool(planning_offline_learning);
272 DECLARE_string(planning_data_dir);
273 DECLARE_string(planning_offline_bags);
274 DECLARE_int32(learning_data_obstacle_history_time_sec);
275 DECLARE_int32(learning_data_frame_num_per_file);
276 DECLARE_string(planning_birdview_img_feature_renderer_config_file);
277 DECLARE_int32(min_past_history_points_len);
278 
279 // hybrid model
280 DECLARE_bool(skip_path_reference_in_side_pass);
281 DECLARE_bool(skip_path_reference_in_change_lane);
DECLARE_int32(history_max_record_num)
DECLARE_string(scenario_bare_intersection_unprotected_config_file)
DECLARE_double(rtk_trajectory_resolution)
DECLARE_uint64(rtk_trajectory_forward)
DECLARE_bool(planning_test_mode)