33 {
34 PointCloudPreprocessComponentConfig comp_config;
36 AERROR <<
"Get PointCloudPreprocessComponentConfig file failed";
37 return false;
38 }
39 AINFO <<
"PointCloud Preprocess Component Configs: "
40 << comp_config.DebugString();
41
42 output_channel_name_ = comp_config.output_channel_name();
43 sensor_name_ = comp_config.sensor_name();
44
45
46 lidar2novatel_tf2_child_frame_id_ = comp_config.sensor_name();
47 lidar_query_tf_offset_ =
48 static_cast<float>(comp_config.lidar_query_tf_offset());
49
50 auto plugin_param = comp_config.plugin_param();
51 std::string cloud_preprocessor_name = plugin_param.name();
52 config_path_ = plugin_param.config_path();
53 config_file_ = plugin_param.config_file();
54 cloud_preprocessor_ = BasePointCloudPreprocessorRegisterer::GetInstanceByName(
55 cloud_preprocessor_name);
56 CHECK_NOTNULL(cloud_preprocessor_);
57
58 writer_ =
59 node_->CreateWriter<onboard::LidarFrameMessage>(output_channel_name_);
60
61 if (!InitAlgorithmPlugin()) {
62 AERROR <<
"Failed to init pointcloud preprocess component plugin.";
63 return false;
64 }
65
66 return true;
67}
bool GetProtoConfig(T *config) const
std::shared_ptr< Node > node_