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

#include <pointcloud_semantic_component.h>

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

Public 成员函数

 PointCloudSemanticComponent ()
 
virtual ~PointCloudSemanticComponent ()
 
bool Init () override
 Init pointcloud semantic component
 
bool Proc (const std::shared_ptr< LidarFrameMessage > &message) override
 Process of pointcloud semantic component
 
- 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_semantic_component.h 第 35 行定义.

构造及析构函数说明

◆ PointCloudSemanticComponent()

apollo::perception::lidar::PointCloudSemanticComponent::PointCloudSemanticComponent ( )
inline

在文件 pointcloud_semantic_component.h 第 37 行定义.

37{}

◆ ~PointCloudSemanticComponent()

virtual apollo::perception::lidar::PointCloudSemanticComponent::~PointCloudSemanticComponent ( )
inlinevirtual

在文件 pointcloud_semantic_component.h 第 38 行定义.

38{}

成员函数说明

◆ Init()

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

Init pointcloud semantic component

返回
true
false

实现了 apollo::cyber::ComponentBase.

在文件 pointcloud_semantic_component.cc 第 25 行定义.

25 {
26 PointCloudSemanticComponentConfig comp_config;
27 if (!GetProtoConfig(&comp_config)) {
28 AERROR << "Get PointCloudSemanticComponentConfig file failed";
29 return false;
30 }
31 AINFO << "PointCloud semantic Component Configs: " << comp_config.DebugString();
32
33 // writer
34 output_channel_name_ = comp_config.output_channel_name();
35 writer_ = node_->CreateWriter<LidarFrameMessage>(output_channel_name_);
36
37 // init parser
38 auto plugin_param = comp_config.plugin_param();
39 std::string parser_name = plugin_param.name();
40 BasePointCloudParser* parser = BasePointCloudParserRegisterer::GetInstanceByName(parser_name);
41 CHECK_NOTNULL(parser);
42 parser_.reset(parser);
43 PointCloudParserInitOptions init_options;
44 init_options.config_path = plugin_param.config_path();
45 init_options.config_file = plugin_param.config_file();
46 ACHECK(parser_->Init(init_options)) << "PointCloud parser init error";
47
48 AINFO << "Successfully init pointcloud parser component.";
49 return true;
50}
bool GetProtoConfig(T *config) const
std::shared_ptr< Node > node_
#define ACHECK(cond)
Definition log.h:80
#define AERROR
Definition log.h:44
#define AINFO
Definition log.h:42

◆ Proc()

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

Process of pointcloud semantic component

参数
messagelidar frame message
返回
true
false

在文件 pointcloud_semantic_component.cc 第 52 行定义.

52 {
54 // internal proc
55 bool status = InternalProc(message);
56
57 if (status) {
58 writer_->Write(message);
59 AINFO << "Send PointCloud Semantic message.";
60 } else {
61 AERROR << "PointCloudSemanticComponent InternalProc error.";
62 }
63 return status;
64}
#define PERF_FUNCTION(...)
Definition profiler.h:54

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