prediction_gflags.cc 6.6 KB
Newer Older
D
Dong Li 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/******************************************************************************
 * Copyright 2017 The Apollo Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *****************************************************************************/

K
kechxu 已提交
17 18
#include <cmath>

D
Dong Li 已提交
19 20 21 22
#include "modules/prediction/common/prediction_gflags.h"

// System gflags
DEFINE_string(prediction_module_name, "prediction",
23
              "Default prediciton module name");
C
Calvin Miao 已提交
24
DEFINE_string(prediction_conf_file,
25 26
              "modules/prediction/conf/prediction_conf.pb.txt",
              "Default conf file for prediction");
S
siyangy 已提交
27 28
DEFINE_string(prediction_adapter_config_filename,
              "modules/prediction/conf/adapter.conf",
29
              "Default conf file for prediction");
K
kechxu 已提交
30

31
DEFINE_double(prediction_duration, 5.0, "Prediction duration (in seconds)");
32
DEFINE_double(prediction_freq, 0.1, "Prediction frequency (in seconds");
K
kechxu 已提交
33
DEFINE_double(double_precision, 1e-6, "precision of double");
C
Calvin Miao 已提交
34
DEFINE_double(min_prediction_length, 50.0,
35
              "Minimal length of prediction trajectory");
36

37 38 39 40
// Bag replay timestamp gap
DEFINE_double(replay_timestamp_gap, 10.0,
              "Max timestamp gap for rosbag replay");

41 42 43 44
// Map
DEFINE_double(search_radius, 3.0, "Search radius for a candidate lane");

// Obstacle features
45
DEFINE_bool(enable_kf_tracking, false, "Use measurements with KF tracking");
K
kechxu 已提交
46 47
DEFINE_double(max_acc, 4.0, "Upper bound of acceleration");
DEFINE_double(min_acc, -4.0, "Lower bound of deceleration");
48
DEFINE_double(max_speed, 35.0, "Max speed");
K
kechxu 已提交
49 50 51
DEFINE_double(q_var, 0.01, "Processing noise covariance");
DEFINE_double(r_var, 0.25, "Measurement noise covariance");
DEFINE_double(p_var, 0.1, "Error covariance");
K
kechxu 已提交
52
DEFINE_double(go_approach_rate, 0.995,
53
              "The rate to approach to the reference line of going straight");
K
kechxu 已提交
54
DEFINE_double(cutin_approach_rate, 0.9,
55
              "The rate to approach to the reference line of lane change");
56
DEFINE_int32(still_obstacle_history_length, 10,
57
             "Min # historical frames for still obstacles");
58
DEFINE_double(still_obstacle_speed_threshold, 1.0,
59
              "Speed threshold for still obstacles");
60
DEFINE_double(still_obstacle_position_std, 1.0,
61
              "Position standard deviation for still obstacles");
K
kechxu 已提交
62
DEFINE_double(max_history_time, 7.0, "Obstacles' maximal historical time.");
63
DEFINE_double(target_lane_gap, 2.0, "gap between two lane points.");
K
kechxu 已提交
64
DEFINE_double(max_lane_angle_diff, M_PI / 2.0,
65
              "Max angle difference for a candiate lane");
66
DEFINE_bool(enable_pedestrian_acc, false, "Enable calculating speed by acc");
67
DEFINE_double(coeff_mul_sigma, 2.0, "coefficient multiply standard deviation");
K
kechxu 已提交
68
DEFINE_double(pedestrian_min_speed, 0.1, "min speed for still pedestrian");
69 70
DEFINE_double(pedestrian_max_speed, 10.0, "speed upper bound for pedestrian");
DEFINE_double(pedestrian_max_acc, 2.0, "maximum pedestrian acceleration");
K
kechxu 已提交
71
DEFINE_double(prediction_pedestrian_total_time, 10.0,
72
              "Total prediction time for pedestrians");
K
kechxu 已提交
73
DEFINE_double(still_speed, 0.01, "speed considered to be still");
C
Calvin Miao 已提交
74
DEFINE_string(evaluator_vehicle_mlp_file,
75
              "modules/prediction/data/mlp_vehicle_model.bin",
C
Calvin Miao 已提交
76 77 78 79
              "mlp model file for vehicle evaluator");
DEFINE_string(evaluator_vehicle_rnn_file,
              "modules/prediction/data/rnn_vehicle_model.bin",
              "rnn model file for vehicle evaluator");
80
DEFINE_int32(max_num_obstacles, 100,
81
             "maximal number of obstacles stored in obstacles container.");
K
kechxu 已提交
82 83
DEFINE_double(valid_position_diff_thred, 0.5,
              "threshold of valid position difference");
84

C
Calvin Miao 已提交
85 86 87 88
// evaluator
DEFINE_double(rnn_min_lane_relatice_s, 5.0,
              "Minimal relative s for RNN model.");

89
DEFINE_double(perception_confidence_threshold, 0.4,
90 91
              "Skip the perception obstacle if its confiderence is lower than "
              "this threshold.");
92 93 94 95
DEFINE_bool(enable_adjust_velocity_heading, true,
            "adjust velocity heading to lane heading");
DEFINE_double(heading_diff_thred, M_PI / 6.0,
              "Threshold for adjusting on-lane obstacle heading");
96
DEFINE_bool(enable_rnn_acc, false, "If use acceleration from RNN model.");
97

98 99
// Obstacle trajectory
DEFINE_double(lane_sequence_threshold, 0.5,
100
              "Threshold for trimming lane sequence trajectories");
101
DEFINE_double(lane_change_dist, 10.0, "Lane change distance with ADC");
C
Calvin Miao 已提交
102 103
DEFINE_bool(enable_lane_sequence_acc, false,
            "If use acceleration in lane sequence.");
104 105 106 107
DEFINE_bool(enable_trim_prediction_trajectory, false,
            "If trim the prediction trajectory to avoid crossing"
            "protected adc planning trajectory.");
DEFINE_double(adc_time_step, 0.1, "Time step to search ADC trajectory point");
108
DEFINE_double(distance_to_adc_trajectory_thred, 2.0,
109 110 111 112
               "Distance threshold to determine if intersect with"
               "ADC planning trajectory");
DEFINE_double(time_to_adc_trajectory_thred, 2.0,
              "Time threshold to trim prediction trajectory");
113 114
DEFINE_double(junction_distance_thred, 0.25,
              "Threshold of radius to search junction.");
115 116 117
DEFINE_double(ahead_junction_thred, 0.5,
              "If the obstacle is in junction more than this threshold,"
              "consider it in junction.");
118 119 120
DEFINE_double(adc_trajectory_search_length, 10.0,
              "How far to search junction along adc planning trajectory");
DEFINE_double(junction_search_radius, 1.0, "Radius to search junctions");
121 122

// move sequence prediction
123
DEFINE_double(time_upper_bound_to_lane_center, 5.0,
124 125 126 127 128
              "Upper bound of time to get to the lane center");
DEFINE_double(time_lower_bound_to_lane_center, 1.0,
              "Lower bound of time to get to the lane center");
DEFINE_double(sample_time_gap, 0.2,
              "Gap of time to sample time to get to the lane center");
S
siyangy 已提交
129 130 131
DEFINE_double(motion_weight_a, 1.2, "A parameter of motion weight function");
DEFINE_double(motion_weight_b, 5.0, "A parameter of motion weight function");
DEFINE_double(motion_weight_c, 1.2, "A parameter of motion weight function");
132 133 134 135
DEFINE_double(cost_alpha, 0.1,
              "The coefficient of time to lane center in cost function");
DEFINE_double(default_time_to_lane_center, 2.0,
              "The default time to lane center");