prediction_gflags.cc 6.1 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_period, 0.1, "Prediction period (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
// Map
42 43
DEFINE_double(lane_search_radius, 3.0, "Search radius for a candidate lane");
DEFINE_double(junction_search_radius, 1.0, "Search radius for a junction");
44 45

// Obstacle features
46
DEFINE_bool(enable_kf_tracking, false, "Use measurements with KF tracking");
K
kechxu 已提交
47 48
DEFINE_double(max_acc, 4.0, "Upper bound of acceleration");
DEFINE_double(min_acc, -4.0, "Lower bound of deceleration");
49
DEFINE_double(max_speed, 35.0, "Max speed");
K
kechxu 已提交
50 51 52
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 已提交
53
DEFINE_double(go_approach_rate, 0.995,
54
              "The rate to approach to the reference line of going straight");
K
kechxu 已提交
55
DEFINE_double(cutin_approach_rate, 0.9,
56
              "The rate to approach to the reference line of lane change");
57
DEFINE_int32(still_obstacle_history_length, 10,
58
             "Min # historical frames for still obstacles");
59
DEFINE_double(still_obstacle_speed_threshold, 1.0,
60
              "Speed threshold for still obstacles");
61
DEFINE_double(still_obstacle_position_std, 1.0,
62
              "Position standard deviation for still obstacles");
K
kechxu 已提交
63
DEFINE_double(max_history_time, 7.0, "Obstacles' maximal historical time.");
64
DEFINE_double(target_lane_gap, 2.0, "gap between two lane points.");
65
DEFINE_double(max_lane_angle_diff, M_PI / 4.0,
66
              "Max angle difference for a candiate lane");
67
DEFINE_bool(enable_pedestrian_acc, false, "Enable calculating speed by acc");
68
DEFINE_double(coeff_mul_sigma, 2.0, "coefficient multiply standard deviation");
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

97 98
// Obstacle trajectory
DEFINE_double(lane_sequence_threshold, 0.5,
99
              "Threshold for trimming lane sequence trajectories");
100
DEFINE_double(lane_change_dist, 10.0, "Lane change distance with ADC");
C
Calvin Miao 已提交
101 102
DEFINE_bool(enable_lane_sequence_acc, false,
            "If use acceleration in lane sequence.");
103 104 105
DEFINE_bool(enable_trim_prediction_trajectory, false,
            "If trim the prediction trajectory to avoid crossing"
            "protected adc planning trajectory.");
106
DEFINE_double(distance_beyond_junction, 0.5,
107 108
              "If the obstacle is in junction more than this threshold,"
              "consider it in junction.");
109 110
DEFINE_double(adc_trajectory_search_length, 10.0,
              "How far to search junction along adc planning trajectory");
111
DEFINE_double(virtual_lane_radius, 0.5, "Radius to search virtual lanes");
112 113

// move sequence prediction
114
DEFINE_double(time_upper_bound_to_lane_center, 5.0,
115 116 117 118 119
              "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 已提交
120 121 122
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");
123 124 125 126
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");