26 {
27 PointCloudMapROIComponentConfig comp_config;
29 AERROR <<
"Get PointCloudMapROIComponentConfig file failed";
30 return false;
31 }
32 AINFO <<
"PointCloud map based roi Component Configs: "
33 << comp_config.DebugString();
34
35 output_channel_name_ = comp_config.output_channel_name();
36 writer_ =
node_->CreateWriter<LidarFrameMessage>(output_channel_name_);
37
38
40
41
42 use_map_manager_ =
43 comp_config.use_map_manager() && comp_config.enable_hdmap();
44 if (use_map_manager_) {
45 MapManagerInitOptions map_manager_init_options;
46 map_manager_init_options.config_path =
47 comp_config.map_manager_config_path();
48 map_manager_init_options.config_file =
49 comp_config.map_manager_config_file();
50 if (!map_manager_.
Init(map_manager_init_options)) {
51 AINFO <<
"Failed to init map manager.";
52 use_map_manager_ = false;
53 }
54 }
55
56
57 auto& plugin = comp_config.plugin_param();
61
62 CHECK_NOTNULL(roi_filter_);
63 ROIFilterInitOptions roi_filter_init_options;
64 roi_filter_init_options.config_path = plugin.config_path();
65 roi_filter_init_options.config_file = plugin.config_file();
66 ACHECK(roi_filter_->Init(roi_filter_init_options))
67 << "Failed to init roi filter.";
68
69 return true;
70}
bool GetProtoConfig(T *config) const
std::shared_ptr< Node > node_
static PluginManager * Instance()
get singleton instance of PluginManager
std::shared_ptr< Base > CreateInstance(const std::string &derived_class)
create plugin instance of derived class based on Base
static std::string GetFullClassName(const std::string &class_name)
Given the class name of perception module, combine the namespace "apollo::perception::lidar::" with i...
bool Init(const MapManagerInitOptions &options=MapManagerInitOptions())
Init of Map Manager
bool Init() override
Init of Point Cloud Map ROI Component object
static SceneManager & Instance()