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

#include <camera_location_refinement_component.h>

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

Public 成员函数

bool Init () override
 Init for camera location refinement component.
 
bool Proc (const std::shared_ptr< onboard::CameraFrame > &msg) override
 Process of camera location refinement 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_refinement_component.h34 行定义.

成员函数说明

◆ Init()

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

Init for camera location refinement component.

返回
true
false

实现了 apollo::cyber::ComponentBase.

在文件 camera_location_refinement_component.cc92 行定义.

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

◆ Proc()

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

Process of camera location refinement component.

参数
msgimage msg
返回
true
false

在文件 camera_location_refinement_component.cc109 行定义.

110 {
112 PostprocessorOptions obstacle_postprocessor_options;
113 obstacle_postprocessor_options.do_refinement_with_calibration_service =
114 calibration_service_ != nullptr;
115
116 std::shared_ptr<onboard::CameraFrame> out_message(new (std::nothrow)
117 onboard::CameraFrame);
118 out_message->frame_id = msg->frame_id;
119 out_message->timestamp = msg->timestamp;
120 out_message->data_provider = msg->data_provider;
121 out_message->detected_objects = msg->detected_objects;
122 out_message->feature_blob = msg->feature_blob;
123 out_message->camera_k_matrix = msg->camera_k_matrix;
124 out_message->camera2world_pose = msg->camera2world_pose;
125
126 // calibration_service_->Update(&frame);
127
128 PERF_BLOCK("location_refinement_postprocessor")
129 if (!postprocessor_->Process(obstacle_postprocessor_options,
130 out_message.get())) {
131 AERROR << "Failed to post process obstacles.";
132 return false;
133 }
135
136 writer_->Write(out_message);
137 return true;
138}
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)
Definition component.h:505
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

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