29 AERROR <<
"Get LidarDetectionComponentConfig file failed";
32 AINFO <<
"Lidar Detection Component Configs: " << comp_config.DebugString();
44 std::string detector_name = plugin_param.
name();
46 BaseLidarDetectorRegisterer::GetInstanceByName(detector_name);
47 CHECK_NOTNULL(detector);
48 detector_.reset(detector);
52 detection_init_options.
config_path = plugin_param.config_path();
53 detection_init_options.
config_file = plugin_param.config_file();
54 ACHECK(detector_->Init(detection_init_options))
55 <<
"lidar detector init error";
58 FLAGS_logtostderr = 0;
61 if (use_object_builder_) {
66 AINFO <<
"Successfully init lidar detection component.";
71 const std::shared_ptr<LidarFrameMessage>& message) {
74 bool status = InternalProc(message);
76 writer_->Write(message);
77 AINFO <<
"Send Lidar detection output message.";
82bool LidarDetectionComponent::InternalProc(
83 const std::shared_ptr<LidarFrameMessage>& in_message) {
87 if (!detector_->Detect(detection_options, in_message->lidar_frame_.get())) {
88 AERROR <<
"Lidar detector detect error!";
95 if (use_object_builder_) {
96 ObjectBuilderOptions builder_options;
97 if (!builder_.
Build(builder_options, in_message->lidar_frame_.get())) {
98 AERROR <<
"Lidar detector, object builder error.";
bool GetProtoConfig(T *config) const
std::shared_ptr< Node > node_
bool Init() override
Init the Lidar Detection Component object
bool Proc(const std::shared_ptr< LidarFrameMessage > &message) override
Detect foreground obejcts using lidar detction models
bool Init(const ObjectBuilderInitOptions &options=ObjectBuilderInitOptions())
Init the Object Builder object with initialization options
bool Build(const ObjectBuilderOptions &options, LidarFrame *frame)
Calculate and fill object size, center, directions.
#define PERF_FUNCTION(...)
optional PluginParam plugin_param
optional string output_channel_name
optional bool use_object_builder
optional string sensor_name