19#include "modules/perception/common/lidar/scene_manager/proto/scene_manager_config.pb.h"
21#include "modules/perception/common/proto/perception_config_schema.pb.h"
34 std::string config_file = FLAGS_scene_manager_file;
42 for (
int i = 0; i < config.service_name_size(); ++i) {
44 SceneServicePtr service(SceneServiceRegisterer::GetInstanceByName(name));
45 if (service ==
nullptr) {
46 AINFO <<
"Failed to find scene service: " << name <<
", skipped";
49 if (!service->Init()) {
50 AINFO <<
"Failed to init scene service: " << name <<
", skipped";
54 AINFO <<
"Scene manager add service: " << name;
61 std::lock_guard<std::mutex> lock(
mutex_);
67 std::lock_guard<std::mutex> lock(
mutex_);
SceneServicePtr Service(const std::string &name)
bool InitInternal(const SceneManagerInitOptions &options=SceneManagerInitOptions())
std::map< std::string, SceneServicePtr > services_
bool Reset(const SceneManagerInitOptions &options=SceneManagerInitOptions())
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::string GetAbsolutePath(const std::string &prefix, const std::string &relative_path)
Get absolute path by concatenating prefix and relative_path.
std::shared_ptr< SceneService > SceneServicePtr
std::string GetCommonConfigFile(const std::string &config_file)
Get the perception common config path
repeated string service_name