提交 eab9ca81 编写于 作者: S siyangy 提交者: Jiangtao Hu

Replace config_file with flag_file

上级 2451c405
......@@ -46,9 +46,6 @@ bool ControlComponent::Init() {
AINFO << "Control init, starting ...";
AINFO << "Loading gflag from file: " << ConfigFilePath();
google::SetCommandLineOption("flagfile", ConfigFilePath().c_str());
CHECK(apollo::common::util::GetProtoFromFile(FLAGS_control_conf_file,
&control_conf_))
<< "Unable to load control conf file: " + FLAGS_control_conf_file;
......
......@@ -4,7 +4,7 @@ module_config {
class_name : "ControlComponent"
config {
name: "control"
config_file_path: "/apollo/modules/control/conf/control.conf"
flag_file_path: "/apollo/modules/control/conf/control.conf"
interval: 10
}
}
......
......@@ -5,7 +5,7 @@ module_config {
class_name : "DataComponent"
config {
name: "data"
config_file_path: "/apollo/modules/data/conf/data.conf"
flag_file_path: "/apollo/modules/data/conf/data.conf"
readers: [
{
channel: "/apollo/data"
......
......@@ -26,9 +26,6 @@ namespace apollo {
namespace data {
bool DataComponent::Init() {
AINFO << "Loading config from file: " << ConfigFilePath();
google::SetCommandLineOption("flagfile", ConfigFilePath().c_str());
CHECK(apollo::common::util::GetProtoFromFile(FLAGS_data_conf_file,
&data_conf_))
<< "Unable to load data conf file: " << FLAGS_data_conf_file;
......
......@@ -4,7 +4,7 @@ module_config {
class_name : "RelativeMapComponent"
config {
name: "relative_map"
config_file_path: "/apollo/modules/map/relative_map/conf/relative_map.conf"
flag_file_path: "/apollo/modules/map/relative_map/conf/relative_map.conf"
interval: 100
}
}
......
......@@ -26,9 +26,6 @@ using apollo::canbus::Chassis;
using apollo::localization::LocalizationEstimate;
bool RelativeMapComponent::Init() {
AINFO << "Loading gflag from file: " << ConfigFilePath();
google::SetCommandLineOption("flagfile", ConfigFilePath().c_str());
InitReaders();
return relative_map_.Init().ok() && relative_map_.Start().ok();
}
......
......@@ -31,8 +31,6 @@ uint32_t SegmentationComponent::s_seq_num_ = 0;
std::mutex SegmentationComponent::s_mutex_;
bool SegmentationComponent::Init() {
AINFO << "Loading gflag from file: " << ConfigFilePath();
google::SetCommandLineOption("flagfile", ConfigFilePath().c_str());
if (InitAlgorithmPlugin() != true) {
AERROR << "Failed to init segmentation component algorithm plugin.";
return false;
......
......@@ -4,7 +4,7 @@ module_config {
class_name : "PredictionComponent"
config {
name: "prediction"
config_file_path: "/apollo/modules/prediction/conf/prediction.conf"
flag_file_path: "/apollo/modules/prediction/conf/prediction.conf"
readers: [
{
channel: "/apollo/perception/obstacles"
......
......@@ -96,9 +96,6 @@ void PredictionComponent::ProcessOfflineData(const std::string& filename) {
}
bool PredictionComponent::Init() {
AINFO << "Loading gflag from file: " << ConfigFilePath();
google::SetCommandLineOption("flagfile", ConfigFilePath().c_str());
component_start_time_ = Clock::NowInSeconds();
// Load prediction conf
......
......@@ -5,7 +5,7 @@ module_config {
class_name : "RoutingComponent"
config {
name : "routing"
config_file_path: "/apollo/modules/routing/conf/routing.conf"
flag_file_path: "/apollo/modules/routing/conf/routing.conf"
readers: [
{
channel: "/apollo/routing_request"
......
......@@ -25,9 +25,6 @@ namespace apollo {
namespace routing {
bool RoutingComponent::Init() {
AINFO << "Loading gflag from file: " << ConfigFilePath();
google::SetCommandLineOption("flagfile", ConfigFilePath().c_str());
response_writer_ =
node_->CreateWriter<RoutingResponse>(FLAGS_routing_response_topic);
......
......@@ -4,7 +4,7 @@ module_config {
class_name : "ThirdPartyPerceptionComponent"
config {
name: "third_party_perception"
config_file_path: "/apollo/modules/third_party_perception/conf/third_party_perception.conf"
flag_file_path: "/apollo/modules/third_party_perception/conf/third_party_perception.conf"
interval: 100
}
}
......
......@@ -24,9 +24,6 @@ namespace apollo {
namespace third_party_perception {
bool ThirdPartyPerceptionComponent::Init() {
AINFO << "Loading gflag from file: " << ConfigFilePath();
google::SetCommandLineOption("flagfile", ConfigFilePath().c_str());
if (!perception_.Init().ok()) {
return false;
}
......
......@@ -59,9 +59,6 @@ DEFINE_double(traffic_light_distance, 1000.0,
class ManualTrafficLight final : public ::apollo::cybertron::TimerComponent {
public:
bool Init() {
AINFO << "Loading gflag from file: " << ConfigFilePath();
google::SetCommandLineOption("flagfile", ConfigFilePath().c_str());
localization_reader_ = node_->CreateReader<LocalizationEstimate>(
FLAGS_localization_topic,
[this](const std::shared_ptr<LocalizationEstimate> &localization) {
......
......@@ -5,7 +5,7 @@ module_config {
class_name : "ManualTrafficLight"
config {
name: "manual_traffic_light_componenet"
config_file_path: "/apollo/modules/tools/manual_traffic_light/manual_traffic_light.conf"
flag_file_path: "/apollo/modules/tools/manual_traffic_light/manual_traffic_light.conf"
interval: 200 # milliseconds
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册