29 {
31 return true;
32 }
33
34 std::string config_file = FLAGS_scene_manager_file;
35 if (!options.config_file.empty()) {
36 config_file = options.config_file;
37 }
39 SceneManagerConfig config;
42 for (int i = 0; i < config.service_name_size(); ++i) {
43 const auto& name = config.service_name(i);
44 SceneServicePtr service(SceneServiceRegisterer::GetInstanceByName(name));
45 if (service == nullptr) {
46 AINFO <<
"Failed to find scene service: " << name <<
", skipped";
47 continue;
48 }
49 if (!service->Init()) {
50 AINFO <<
"Failed to init scene service: " << name <<
", skipped";
51 continue;
52 }
54 AINFO <<
"Scene manager add service: " << name;
55 }
57 return true;
58}
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,...
std::shared_ptr< SceneService > SceneServicePtr
std::string GetCommonConfigFile(const std::string &config_file)
Get the perception common config path