Apollo 11.0
自动驾驶开放平台
apollo::perception::lidar::PointCloudGroundDetectComponent类 参考

#include <pointcloud_ground_detection_component.h>

类 apollo::perception::lidar::PointCloudGroundDetectComponent 继承关系图:
apollo::perception::lidar::PointCloudGroundDetectComponent 的协作图:

Public 成员函数

 PointCloudGroundDetectComponent ()=default
 
virtual ~PointCloudGroundDetectComponent ()=default
 
bool Init () override
 Init pointcloud ground detection
 
bool Proc (const std::shared_ptr< LidarFrameMessage > &message) override
 Process of pointcloud ground detection
 
- Public 成员函数 继承自 apollo::cyber::Component< LidarFrameMessage >
 Component ()
 
 ~Component () override
 
bool Initialize (const ComponentConfig &config) override
 init the component by protobuf object.
 
bool Process (const std::shared_ptr< LidarFrameMessage > &msg0, const std::shared_ptr< NullType > &msg1, const std::shared_ptr< NullType > &msg2, const std::shared_ptr< NullType > &msg3)
 
- Public 成员函数 继承自 apollo::cyber::ComponentBase
virtual ~ComponentBase ()
 
virtual bool Initialize (const TimerComponentConfig &config)
 
virtual void Shutdown ()
 
template<typename T >
bool GetProtoConfig (T *config) const
 

额外继承的成员函数

- Public 类型 继承自 apollo::cyber::ComponentBase
template<typename M >
using Reader = cyber::Reader< M >
 
- Protected 成员函数 继承自 apollo::cyber::ComponentBase
virtual void Clear ()
 
const std::string & ConfigFilePath () const
 
void LoadConfigFiles (const ComponentConfig &config)
 
void LoadConfigFiles (const TimerComponentConfig &config)
 
- Protected 属性 继承自 apollo::cyber::ComponentBase
std::atomic< bool > is_shutdown_ = {false}
 
std::shared_ptr< Node > node_ = nullptr
 
std::string config_file_path_ = ""
 
std::vector< std::shared_ptr< ReaderBase > > readers_
 

详细描述

在文件 pointcloud_ground_detection_component.h 第 35 行定义.

构造及析构函数说明

◆ PointCloudGroundDetectComponent()

apollo::perception::lidar::PointCloudGroundDetectComponent::PointCloudGroundDetectComponent ( )
default

◆ ~PointCloudGroundDetectComponent()

virtual apollo::perception::lidar::PointCloudGroundDetectComponent::~PointCloudGroundDetectComponent ( )
virtualdefault

成员函数说明

◆ Init()

bool apollo::perception::lidar::PointCloudGroundDetectComponent::Init ( )
overridevirtual

Init pointcloud ground detection

返回
true
false

实现了 apollo::cyber::ComponentBase.

在文件 pointcloud_ground_detection_component.cc 第 27 行定义.

27 {
28 PointCloudGroundDetectComponentConfig comp_config;
29 if (!GetProtoConfig(&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 // groun detector
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
#define ACHECK(cond)
Definition log.h:80
#define AERROR
Definition log.h:44
#define AINFO
Definition log.h:42

◆ Proc()

bool apollo::perception::lidar::PointCloudGroundDetectComponent::Proc ( const std::shared_ptr< LidarFrameMessage > &  message)
override

Process of pointcloud ground detection

参数
messagelidar frame message
返回
true
false

在文件 pointcloud_ground_detection_component.cc 第 54 行定义.

55 {
57 // internal proc
58 bool status = InternalProc(message);
59 if (status) {
60 writer_->Write(message);
61 AINFO << "Send pointcloud ground detect output message.";
62 }
63 return true;
64}
#define PERF_FUNCTION(...)
Definition profiler.h:54

该类的文档由以下文件生成: