Apollo 10.0
自动驾驶开放平台
apollo::perception::camera::CameraDetectionSingleStageComponent类 参考final

#include <camera_detection_single_stage_component.h>

类 apollo::perception::camera::CameraDetectionSingleStageComponent 继承关系图:
apollo::perception::camera::CameraDetectionSingleStageComponent 的协作图:

Public 成员函数

 CameraDetectionSingleStageComponent ()
 
 ~CameraDetectionSingleStageComponent ()=default
 
bool Init () override
 Init for amera detection 3d compoment
 
bool Proc (const std::shared_ptr< apollo::drivers::Image > &msg) override
 Process of camera detection 2d compoment
 
- Public 成员函数 继承自 apollo::cyber::Component< apollo::drivers::Image >
 Component ()
 
 ~Component () override
 
bool Initialize (const ComponentConfig &config) override
 init the component by protobuf object.
 
bool Process (const std::shared_ptr< apollo::drivers::Image > &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< Nodenode_ = nullptr
 
std::string config_file_path_ = ""
 
std::vector< std::shared_ptr< ReaderBase > > readers_
 

详细描述

构造及析构函数说明

◆ CameraDetectionSingleStageComponent()

apollo::perception::camera::CameraDetectionSingleStageComponent::CameraDetectionSingleStageComponent ( )
inline

在文件 camera_detection_single_stage_component.h36 行定义.

36: timestamp_offset_(0) {}

◆ ~CameraDetectionSingleStageComponent()

apollo::perception::camera::CameraDetectionSingleStageComponent::~CameraDetectionSingleStageComponent ( )
default

成员函数说明

◆ Init()

bool apollo::perception::camera::CameraDetectionSingleStageComponent::Init ( )
overridevirtual

Init for amera detection 3d compoment

返回
true
false

实现了 apollo::cyber::ComponentBase.

在文件 camera_detection_single_stage_component.cc92 行定义.

92 {
93 CameraDetectionSingleStage detection_param;
94 if (!GetProtoConfig(&detection_param)) {
95 AERROR << "Load camera detection 3d component config failed!";
96 return false;
97 }
98
99 InitObstacleDetector(detection_param);
100
101 InitCameraFrame(detection_param);
102
103 InitTransformWrapper(detection_param);
104
105 writer_ = node_->CreateWriter<onboard::CameraFrame>(
106 detection_param.channel().output_obstacles_channel_name());
107 return true;
108}
bool GetProtoConfig(T *config) const
std::shared_ptr< Node > node_
#define AERROR
Definition log.h:44

◆ Proc()

bool apollo::perception::camera::CameraDetectionSingleStageComponent::Proc ( const std::shared_ptr< apollo::drivers::Image > &  msg)
override

Process of camera detection 2d compoment

参数
msgimage msg
返回
true
false

在文件 camera_detection_single_stage_component.cc137 行定义.

138 {
140 std::shared_ptr<onboard::CameraFrame> out_message(new (std::nothrow)
141 onboard::CameraFrame);
142 bool status = InternalProc(msg, out_message);
143 if (status) {
144 writer_->Write(out_message);
145 AINFO << "Send camera detection 3d output message.";
146 }
147
148 return status;
149}
#define AINFO
Definition log.h:42
Definition future.h:29
#define PERF_FUNCTION(...)
Definition profiler.h:54

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