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

#include <camera_location_estimation_component.h>

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

Public 成员函数

bool Init () override
 Init for camera location estimatation component.
 
bool Proc (const std::shared_ptr< onboard::CameraFrame > &msg) override
 Process of camera location estimatation component.
 
- Public 成员函数 继承自 apollo::cyber::Component< onboard::CameraFrame >
 Component ()
 
 ~Component () override
 
bool Initialize (const ComponentConfig &config) override
 init the component by protobuf object.
 
bool Process (const std::shared_ptr< onboard::CameraFrame > &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_
 

详细描述

在文件 camera_location_estimation_component.h30 行定义.

成员函数说明

◆ Init()

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

Init for camera location estimatation component.

返回
true
false

实现了 apollo::cyber::ComponentBase.

在文件 camera_location_estimation_component.cc39 行定义.

39 {
40 CameraLocationEstimation location_estimation_param;
41 if (!GetProtoConfig(&location_estimation_param)) {
42 AERROR << "Load camera location estimation component config failed!";
43 return false;
44 }
45
46 InitTransformer(location_estimation_param);
47
48 writer_ = node_->CreateWriter<onboard::CameraFrame>(
49 location_estimation_param.channel().output_obstacles_channel_name());
50 return true;
51}
bool GetProtoConfig(T *config) const
std::shared_ptr< Node > node_
#define AERROR
Definition log.h:44

◆ Proc()

bool apollo::perception::camera::CameraLocationEstimationComponent::Proc ( const std::shared_ptr< onboard::CameraFrame > &  msg)
override

Process of camera location estimatation component.

参数
msgimage msg
返回
true
false

在文件 camera_location_estimation_component.cc53 行定义.

54 {
56 std::shared_ptr<onboard::CameraFrame> out_message(new (std::nothrow)
57 onboard::CameraFrame);
58 out_message->frame_id = msg->frame_id;
59 out_message->timestamp = msg->timestamp;
60 out_message->data_provider = msg->data_provider;
61 out_message->detected_objects = msg->detected_objects;
62 out_message->feature_blob = msg->feature_blob;
63 out_message->camera_k_matrix = msg->camera_k_matrix;
64 out_message->camera2world_pose = msg->camera2world_pose;
65
66 PERF_BLOCK("location_estimation_transform")
67 if (!transformer_->Transform(out_message.get())) {
68 AERROR << "Failed to transform.";
69 return false;
70 }
72
73 writer_->Write(out_message);
74 return true;
75}
Definition future.h:29
#define PERF_FUNCTION(...)
Definition profiler.h:54
#define PERF_BLOCK_END
Definition profiler.h:53
#define PERF_BLOCK(...)
Definition profiler.h:52

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