27 {
28 PointCloudGroundDetectComponentConfig comp_config;
30 AERROR <<
"Get PointCloudGroundDetectComponentConfig file failed";
31 return false;
32 }
33 AINFO <<
"PointCloud Ground Detect Component Configs: "
34 << comp_config.DebugString();
35 output_channel_name_ = comp_config.output_channel_name();
36 writer_ =
37 node_->CreateWriter<onboard::LidarFrameMessage>(output_channel_name_);
38
39
40 auto plugin_param = comp_config.plugin_param();
41 std::string ground_detector_name = plugin_param.name();
42 ground_detector_ =
43 BaseGroundDetectorRegisterer::GetInstanceByName(ground_detector_name);
44 CHECK_NOTNULL(ground_detector_);
45
46 GroundDetectorInitOptions ground_detector_init_options;
47 ground_detector_init_options.config_path = plugin_param.config_path();
48 ground_detector_init_options.config_file = plugin_param.config_file();
49 ACHECK(ground_detector_->
Init(ground_detector_init_options))
50 << "Failed to init ground detection.";
51 return true;
52}
bool GetProtoConfig(T *config) const
std::shared_ptr< Node > node_
virtual bool Init(const GroundDetectorInitOptions &options=GroundDetectorInitOptions())=0
Init ground detector