00001 #ifndef CAJUN_UC_PLANNER_PARAM_H 00002 #define CAJUN_UC_PLANNER_PARAM_H 00003 00004 //#include "stdlib.h" 00005 #include "planner_defs.H" 00006 #include <vector> 00007 00008 00009 namespace cajun 00010 { 00011 00012 class uc_planner_param_t 00013 { 00014 public: 00015 static const uc_planner_param_t* get_uc_planner_param (); 00016 00017 // ############## Graph search related ################# 00018 // Penalty for changing lane (in seconds) 00019 double m_change_lane_penalty; 00020 double m_uturn_penalty; 00021 double m_intersection_turning_penalty; // in seconds 00022 double m_stop_sign_penalty; // in seconds 00023 double m_zone_penalty; 00024 double m_parking_penalty; 00025 double m_unparking_penalty; 00026 00027 // Min distance between nodes on different lanes to be connected in 00028 // graph 00029 double m_min_distance_between_CL_graph_node; 00030 00031 // ############## state machine related ################# 00032 double m_confirm_blk_min_time; 00033 00034 // ############## IT related ################# 00035 00036 // If true then always wait at intersection (config parameter) 00037 bool m_always_wait; 00038 00039 // Minimum wait time (seconds) at intersection 00040 double m_min_intersection_wait; 00041 00042 // Min waiting after getting intersection precedence (seconds) 00043 double m_wait_after_inter_precedence; 00044 00045 // Min wait time after intersection path is unblocked 00046 double m_wait_after_unblocked_inter_path; 00047 00048 // Min speed through intersectoin (m/s) 00049 double m_min_intersection_speed; 00050 00051 // Max speed through intersectoin (m/s) 00052 double m_max_intersection_speed; 00053 00054 // Distance to maintain while queuing at intersection 00055 double m_intersection_queuing_distance; 00056 00057 double m_small_dis_from_blk_at_intersection; 00058 00059 00060 // ############## CL related ################# 00061 // Max xtrack between lanes for them to be in same direction 00062 double m_same_lane_max_xtrack; //meters 00063 00064 // Extra distance to drive on original lane after neighboring shorter 00065 // lane starts. 00066 double m_lane_clippage_extra_drive_dis; 00067 00068 00069 // Speed limit while changing lane 00070 double m_change_lane_min_speed; 00071 double m_change_lane_max_speed; 00072 00073 // Ratio between look ahead and xtrack dis while picking a point on 00074 // new lane at certain distance 00075 double m_look_ahead_ratio; 00076 00077 // Distance before lance change 00078 double dis_before_LC; 00079 double m_safe_cl_dis_on_org_lane; 00080 double m_safe_cl_ahead_dis_on_new_lane; 00081 double m_safe_cl_behind_dis_on_new_lane; 00082 00083 // ############## UT related ################# 00084 00085 // Minimum turn between lanes of same segment which are in opposite 00086 // direction to try using uturn. 00087 double m_min_orient_diff_for_uturn; 00088 00089 double m_time_for_uturn; 00090 double m_uturn_reverse_speed_limit; 00091 double m_uturn_forward_speed_limit; 00092 double m_uturn_path_interp_dist; 00093 double m_uturn_forward_path_copy_dist; 00094 double m_uturn_reverse_path_copy_dist; 00095 double m_uturn_reverse_path_pre_dist; 00096 double m_uturn_forward_path_pre_dist; 00097 00098 double m_uturn_front_radius; 00099 double m_uturn_reverse_radius; 00100 00101 double m_uturn_extended_front_path_length; 00102 double m_uturn_extended_reverse_path_length; 00103 00104 double m_uturn_front_turn_angle; 00105 double m_uturn_reverse_turn_angle; 00106 00107 double m_uturn_safe_dis_before_start_point; 00108 double m_uturn_safe_dis_after_start_point; 00109 00110 00111 // ############## PL related ################# 00112 double m_passing_lane_confirm_timeout; 00113 double m_passing_lane_wait_time; 00114 // Expected distance to pass a lane 00115 double m_dis_to_pass_lane; 00116 // Radius of un-parking curvature 00117 double m_unparking_rad; 00118 00119 bool m_dynamic_passing_lane_mode; 00120 00121 00122 // ############# Parking/Unparking related ####### 00123 double m_parking_interp_dist; 00124 double m_parking_path_width; 00125 double m_parking_min_speed; 00126 double m_parking_max_speed; 00127 double m_parking_wp_radius; 00128 double m_dis_after_blk; 00129 00130 double m_unpark_extra_initial_straight_leg; 00131 00132 00133 // ############## Traffic ###################### 00134 // Whether to check moving traffic when crossing traffic 00135 bool m_check_intersection_crossing_traffic; 00136 00137 //Seconds of gap for crossing traffic 00138 double m_crossing_traffic_window; 00139 00140 // Min distance from intersection within which bot should stop if found 00141 // a approaching traffic 00142 double m_inter_dis_for_stopping; 00143 00144 // whether to check for traffic before changing lane 00145 bool m_check_CL_traffic; 00146 00147 // Seconds of gap fro changing lane (onto lane in same direction) 00148 double m_CL_traffic_window; 00149 00150 // whether to check for traffic before uturn 00151 bool m_check_UT_traffic; 00152 00153 // Seconds of gap for uturn to be free of traffic 00154 double m_UT_traffic_window; 00155 00156 // whether to check for traffic for passing lane 00157 bool m_check_PL_traffic; 00158 00159 // Seconds of gap for uturn to be free of traffic 00160 double m_PL_traffic_window; 00161 00162 // Vehicle length used for computing convoy distance and other places 00163 double m_vehicle_length; 00164 00165 // Extra convoy distance can be specified here if speed based convoy 00166 // distance looks very close 00167 double m_convoy_extra_dis; 00168 00169 unsigned m_num_tps_check_for_traffic; 00170 00171 bool m_treat_dynamic_as_static; 00172 00173 00174 // ############## ZONE ################# 00175 double m_grid_cell_size; 00176 00177 // 0- basic, 1- 3 * 3 update, 2- 5 * 5 update 00178 unsigned m_grid_neighbor_mode; 00179 00180 unsigned m_grid_path_extraction_type; 00181 00182 // Speed limits for zone path 00183 double m_zone_min_speed; 00184 double m_zone_max_speed; 00185 00186 // Goal marking: radius for circular marking, should be atleast twice 00187 // of cell size 00188 double m_basic_PE_goal_radius; 00189 double m_curved_PE_goal_radius; 00190 00191 // Goal marking: length 00192 double m_grid_goal_length; 00193 00194 // Goal marking: width 00195 double m_grid_goal_width; 00196 00197 // Distance by which to jump to find a starting point which does not 00198 // fall on grid boundary cell 00199 double m_grid_non_blocking_start_find_step; 00200 00201 double m_obstacle_hard_expansion_radius; 00202 00203 double m_obstacle_soft_expansion_radius; 00204 00205 double m_obstacle_soft_expansion_min_value; 00206 00207 double m_obstacle_soft_expansion_max_value; 00208 00209 // grid markings 00210 // parking spot marking 00211 double m_parking_spot_grid_cost; 00212 00213 double m_bot_box_within; 00214 00215 double m_grid_entry_unblock_box_len; 00216 00217 // Use placing box around the path to make sure the path is free Fixme: 00218 // if disabled this feature need to increase the obstacle's hard and 00219 // soft expansion higher 00220 bool m_check_safety_region_around_box; 00221 00222 bool m_mark_grid_around_all_parking_spot; 00223 00224 // Length of the path to cut off before entering parking spot so that 00225 // parking task planner can take control from that 00226 double m_dis_from_parking_spot_for_PK_TP; 00227 00228 //----------- curved path extraction related --------- 00229 double m_vehicle_turn_radius; 00230 00231 // Distance (meters) between step points 00232 double m_curved_path_step_size; 00233 00234 // Number of steps to explore for curved path extraction in each 00235 // direction (left/right) 00236 unsigned m_curved_path_num_one_side_steps; 00237 00238 // Max depth to which to search for curved path 00239 unsigned m_curved_path_max_search_depth; 00240 00241 double m_min_cost_to_consider_reached_goal; 00242 00243 // ############## Rest ################# 00244 double m_min_dis_from_blk; 00245 00246 double m_min_dis_from_uturn_blk; 00247 00248 double m_LF_safety_blk_distance; 00249 00250 // Lane width multiplier to compute allowed xtrack distance to reach a 00251 // wp and to be next to a lane 00252 double m_width_multiplier; 00253 00254 // max xtrack distance from a path (previous) to be on it 00255 double m_off_path_distance; 00256 00257 // atrack distance before path (previous) to consider to be on it 00258 // double m_dis_before_path; 00259 00260 // atrack distance after path (previous) to consider to be on it 00261 // double m_dis_after_path; 00262 00263 // Max orientation diff between lanes for being to be in same direction 00264 double m_same_lane_max_orient_diff; // radians 00265 00266 // Max distance till which to generate path 00267 double m_max_path_length; 00268 00269 // Signal a turn signal if any turn within this distance 00270 double m_signal_lookahead_dis; 00271 00272 //Min angle (radians) in radians to consider and turn as a formal 00273 //turning 00274 double m_min_angle_for_turn; 00275 00276 // Path width to use when in situation where no rndf lane width is 00277 // relavent, like when switching lanes, free zones,etc. 00278 double m_path_width; 00279 00280 bool m_print_plan; 00281 bool m_verbose_printing; 00282 00283 double m_suggested_acceleration; // for convoy speed suggestion 00284 00285 00286 bool m_change_lane_allowed; 00287 bool m_passing_lane_allowed; 00288 bool m_uturn_allowed; 00289 00290 // Default min and max speeds of base path 00291 double m_base_path_default_min_speed; 00292 double m_base_path_default_max_speed; 00293 00294 00295 00296 00297 // ---------- Safety Regions -------------- 00298 //safety distance from intersection WITH stop sign 00299 double m_before_stop_intersection_safety_dis; 00300 00301 //safety distance from intersection WITHOUT stop sign 00302 double m_before_intersection_safety_dis; 00303 double m_after_intersection_safety_dis; 00304 00305 00306 double m_blocked_lane_timeout; 00307 double m_blocked_zone_timeout; 00308 double m_max_stop_speed; 00309 00310 // Radius around the bot looking for info 00311 double m_bubble_rad; 00312 00313 // Amount of distance bot can go out of lane for doing uturn (along the 00314 // lane) 00315 double m_uturn_dis_outside_lane; 00316 00317 // ------------ Sensor fusion config file parameters ------- 00318 double m_path_interpolation_distance; 00319 00320 double m_allowed_pre_lane_dis; 00321 double m_allowed_post_lane_dis; 00322 00323 // ------------------------------------------- 00324 bool m_use_parking_task_planner; 00325 00326 00327 // distance before chute point that bot can be 00328 double m_start_dis_before_start_chute; 00329 00330 double m_extra_dis_between_lanes_for_passing; 00331 00332 // Min atrack distance before which a waypoint is considered to be reached 00333 double m_min_atrack_for_wp_reach; 00334 00335 // Use radar data for intersection 00336 bool m_use_radar_data_for_intersection; 00337 00338 // Min speed of objects through radar that needs to can be trusted 00339 double m_radar_min_vehicle_speed; 00340 00341 // How many after radar stop seeing should system still use it 00342 double m_radar_object_time_out; 00343 00344 std::vector<radar_info_t> m_left_radars; 00345 std::vector<radar_info_t> m_right_radars; 00346 00347 bool m_nudge_path; 00348 unsigned m_nudge_path_scan_qid; 00349 private: 00350 uc_planner_param_t () 00351 { }; 00352 00353 bool load_param (); 00354 // static uc_planner_param_t *m_parameters; 00355 00356 }; 00357 }; 00358 00359 00360 00361 #endif
1.6.1