58 const std::string& config_path, T* config);
72 const std::string& config_path, T* config);
77 const std::string& config_path, T* config) {
78 CHECK_NOTNULL(config);
81 if (!apollo::cyber::common::LoadConfig<T>(default_config_path, config)) {
82 AERROR <<
"Failed to load default config file:" << default_config_path;
86 if (!apollo::cyber::common::LoadConfig<T>(config_path, &spcific_config)) {
87 AWARN <<
"can not load user defined config file[" << config_path
88 <<
"], use default config instead";
91 config->MergeFrom(spcific_config);
97 const std::string& config_path,
99 CHECK_NOTNULL(config);
106 AERROR <<
"Failed to load config file using the default config:"
107 << default_config_path;
static bool LoadMergedConfig(const std::string &default_config_path, const std::string &config_path, T *config)
Load the config and merge the default and user defined config.
static std::string TransformToPathName(const std::string &name)
Tranform the name to part of path.
static std::string GetFullPlanningClassName(const std::string &class_name)
Given the class name of planning module, combine the namespace "apollo::planning::" with it to create...
static bool LoadOverridedConfig(const std::string &default_config_path, const std::string &config_path, T *config)
Load the config and override the default config by the user defined one.
Planning module main class.
bool GetProtoFromFile(const std::string &file_name, google::protobuf::Message *message)
Parses the content of the file specified by the file_name as a representation of protobufs,...