Apollo 10.0
自动驾驶开放平台
prediction_system_gflags.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 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
18
19#include <limits>
20
21// System gflags
22DEFINE_string(prediction_module_name, "prediction",
23 "Default prediction module name");
24DEFINE_string(prediction_conf_file,
25 "modules/prediction/conf/prediction_conf.pb.txt",
26 "Default conf file for prediction");
27DEFINE_string(prediction_adapter_config_filename,
28 "modules/prediction/conf/adapter.conf",
29 "Default conf file for prediction");
30DEFINE_string(prediction_data_dir,
31 "modules/prediction/data/prediction/",
32 "Prefix of files to store feature data");
33DEFINE_string(offline_feature_proto_file_name, "",
34 "The bin file including a series of feature proto messages");
35DEFINE_string(output_filename, "", "The filename for offline process.");
36DEFINE_string(extract_feature_type, "",
37 "The extract feature type, either cruise or junction");
38
39DEFINE_bool(prediction_test_mode, false, "Set prediction to test mode");
41 prediction_test_duration, std::numeric_limits<double>::infinity(),
42 "The runtime duration in test mode (in seconds). Negative value will not "
43 "restrict the runtime duration.");
44
46 prediction_offline_bags, "",
47 "a list of bag files or directories for offline mode. The items need to be "
48 "separated by colon ':'. If this value is not set, the prediction module "
49 "will use the listen to published ros topic mode.");
50DEFINE_int32(prediction_offline_mode, 0,
51 "0: online mode, no dump file"
52 "1: dump feature proto to feature.*.bin"
53 "2: dump data for learning to datalearn.*.bin"
54 "3: dump predicted trajectory to predict_result.*.bin"
55 "4: dump frame environment info to frame_env.*.bin"
56 "5: dump data for tuning to datatuning.*.bin");
57DEFINE_bool(enable_multi_agent_pedestrian_evaluator, true, "If enable multi agent pedestrian evaluator.");
58DEFINE_bool(enable_multi_agent_vehicle_evaluator, true, "If enable multi agent vehicle evaluator.");
59DEFINE_bool(prediction_eval_mode, false, "Set prediction to eval mode");
60DEFINE_bool(enable_multi_thread, true, "If enable multi-thread.");
61DEFINE_int32(max_thread_num, 8, "Maximal number of threads.");
62DEFINE_int32(max_caution_thread_num, 2,
63 "Maximal number of threads for caution obstacles.");
64DEFINE_bool(enable_async_draw_base_image, true,
65 "If enable async to draw base image");
66DEFINE_bool(use_cuda, true, "If use cuda for torch.");
67
68// Bag replay timestamp gap
69DEFINE_double(replay_timestamp_gap, 10.0,
70 "Max timestamp gap for rosbag replay");
71DEFINE_int32(max_num_dump_feature, 10000, "Max number of features to dump");
72DEFINE_int32(max_num_dump_dataforlearn, 5000,
73 "Max number of dataforlearn to dump");
74
75// Submodules
76DEFINE_bool(use_lego, false, "If use lego architecture");
77DEFINE_string(container_topic_name, "/apollo/prediction/container",
78 "Container topic name");
79DEFINE_string(adccontainer_topic_name, "/apollo/prediction/adccontainer",
80 "ADC Container topic name");
81DEFINE_string(evaluator_topic_name, "/apollo/prediction/evaluator",
82 "Evaluator topic name");
83DEFINE_string(container_submodule_name, "container_submodule",
84 "Container submodule name");
85DEFINE_string(evaluator_submodule_name, "evaluator_submodule",
86 "Evaluator submodule name");
87DEFINE_string(perception_obstacles_topic_name,
88 "/apollo/prediction/perception_obstacles",
89 "Internal topic of perception obstacles");
90
91// VectorNet
92DEFINE_string(prediction_target_file, "data/train/test.pb.txt",
93 "VectorNet target pb file name");
94DEFINE_string(world_coordinate_file, "data/world_coord.bin",
95 "VectorNet world coordinate file name");
96DEFINE_string(prediction_target_dir, "data/train/",
97 "VectorNet target dir");
98DEFINE_double(obstacle_x, 0.0, "obstacle position x");
99DEFINE_double(obstacle_y, 0.0, "obstacle position y");
100DEFINE_double(obstacle_phi, 0.0, "obstacle heading phi");
101DEFINE_double(road_distance, 100.0,
102 "road distance within which the points are got");
103DEFINE_double(point_distance, 5.0,
104 "sampling distance of two points");
DEFINE_string(prediction_module_name, "prediction", "Default prediction module name")
DEFINE_double(prediction_test_duration, std::numeric_limits< double >::infinity(), "The runtime duration in test mode (in seconds). Negative value will not " "restrict the runtime duration.")
DEFINE_int32(prediction_offline_mode, 0, "0: online mode, no dump file" "1: dump feature proto to feature.*.bin" "2: dump data for learning to datalearn.*.bin" "3: dump predicted trajectory to predict_result.*.bin" "4: dump frame environment info to frame_env.*.bin" "5: dump data for tuning to datatuning.*.bin")
DEFINE_bool(prediction_test_mode, false, "Set prediction to test mode")