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

#include <sensor_frame.h>

apollo::perception::fusion::SensorFrame 的协作图:

Public 成员函数

 SensorFrame ()
 
 SensorFrame (const base::FrameConstPtr &base_frame_ptr)
 Construct a new Sensor Frame object
 
void Initialize (const base::FrameConstPtr &base_frame_ptr)
 Initialize sensor frame
 
void Initialize (const base::FrameConstPtr &base_frame_ptr, const SensorPtr &sensor)
 Initialize sensor frame
 
double GetTimestamp () const
 Get the timestamp of the sensor frame
 
bool GetPose (Eigen::Affine3d *pose) const
 Get the pose of the sensor frame
 
std::vector< SensorObjectPtr > & GetForegroundObjects ()
 Get the Foreground Objects object
 
const std::vector< SensorObjectPtr > & GetForegroundObjects () const
 Get the Foreground Objects object
 
std::vector< SensorObjectPtr > & GetBackgroundObjects ()
 Get the Background Objects object
 
const std::vector< SensorObjectPtr > & GetBackgroundObjects () const
 Get the Background Objects object
 
std::string GetSensorId () const
 Get the sensor id
 
base::SensorType GetSensorType () const
 Get the sensor type
 
SensorFrameHeaderConstPtr GetHeader () const
 Get sensor frame header
 

详细描述

在文件 sensor_frame.h 第 45 行定义.

构造及析构函数说明

◆ SensorFrame() [1/2]

apollo::perception::fusion::SensorFrame::SensorFrame ( )

在文件 sensor_frame.cc 第 22 行定义.

22{ header_.reset(new SensorFrameHeader()); }

◆ SensorFrame() [2/2]

apollo::perception::fusion::SensorFrame::SensorFrame ( const base::FrameConstPtr &  base_frame_ptr)
explicit

Construct a new Sensor Frame object

参数
base_frame_ptr

在文件 sensor_frame.cc 第 24 行定义.

24 {
25 Initialize(base_frame_ptr);
26}
void Initialize(const base::FrameConstPtr &base_frame_ptr)
Initialize sensor frame

成员函数说明

◆ GetBackgroundObjects() [1/2]

std::vector< SensorObjectPtr > & apollo::perception::fusion::SensorFrame::GetBackgroundObjects ( )
inline

Get the Background Objects object

返回
std::vector<SensorObjectPtr>&

在文件 sensor_frame.h 第 118 行定义.

118 {
119 return background_objects_;
120 }

◆ GetBackgroundObjects() [2/2]

const std::vector< SensorObjectPtr > & apollo::perception::fusion::SensorFrame::GetBackgroundObjects ( ) const
inline

Get the Background Objects object

返回
const std::vector<SensorObjectPtr>&

在文件 sensor_frame.h 第 127 行定义.

127 {
128 return background_objects_;
129 }

◆ GetForegroundObjects() [1/2]

std::vector< SensorObjectPtr > & apollo::perception::fusion::SensorFrame::GetForegroundObjects ( )
inline

Get the Foreground Objects object

返回
std::vector<SensorObjectPtr>&

在文件 sensor_frame.h 第 100 行定义.

100 {
101 return foreground_objects_;
102 }

◆ GetForegroundObjects() [2/2]

const std::vector< SensorObjectPtr > & apollo::perception::fusion::SensorFrame::GetForegroundObjects ( ) const
inline

Get the Foreground Objects object

返回
const std::vector<SensorObjectPtr>&

在文件 sensor_frame.h 第 109 行定义.

109 {
110 return foreground_objects_;
111 }

◆ GetHeader()

SensorFrameHeaderConstPtr apollo::perception::fusion::SensorFrame::GetHeader ( ) const
inline

Get sensor frame header

返回
SensorFrameHeaderConstPtr

在文件 sensor_frame.h 第 150 行定义.

150{ return header_; }

◆ GetPose()

bool apollo::perception::fusion::SensorFrame::GetPose ( Eigen::Affine3d *  pose) const
inline

Get the pose of the sensor frame

参数
pose
返回
true
false

在文件 sensor_frame.h 第 86 行定义.

86 {
87 if (pose == nullptr) {
88 AERROR << "pose is not available";
89 return false;
90 }
91 *pose = header_->sensor2world_pose;
92 return true;
93 }
#define AERROR
Definition log.h:44

◆ GetSensorId()

std::string apollo::perception::fusion::SensorFrame::GetSensorId ( ) const

Get the sensor id

返回
std::string

在文件 sensor_frame.cc 第 55 行定义.

55 {
56 if (header_ == nullptr) {
57 return std::string("");
58 }
59
60 return header_->sensor_info.name;
61}

◆ GetSensorType()

base::SensorType apollo::perception::fusion::SensorFrame::GetSensorType ( ) const

Get the sensor type

返回
base::SensorType

在文件 sensor_frame.cc 第 63 行定义.

63 {
64 if (header_ == nullptr) {
66 }
67
68 return header_->sensor_info.type;
69}

◆ GetTimestamp()

double apollo::perception::fusion::SensorFrame::GetTimestamp ( ) const
inline

Get the timestamp of the sensor frame

返回
double

在文件 sensor_frame.h 第 77 行定义.

77{ return header_->timestamp; }

◆ Initialize() [1/2]

void apollo::perception::fusion::SensorFrame::Initialize ( const base::FrameConstPtr &  base_frame_ptr)

Initialize sensor frame

参数
base_frame_ptr

在文件 sensor_frame.cc 第 28 行定义.

28 {
29 header_.reset(new SensorFrameHeader(base_frame_ptr->sensor_info,
30 base_frame_ptr->timestamp,
31 base_frame_ptr->sensor2world_pose));
32
33 lidar_frame_supplement_ = base_frame_ptr->lidar_frame_supplement;
34 radar_frame_supplement_ = base_frame_ptr->radar_frame_supplement;
35 camera_frame_supplement_ = base_frame_ptr->camera_frame_supplement;
36
37 const auto& base_objects = base_frame_ptr->objects;
38 foreground_objects_.reserve(base_objects.size());
39
40 for (const auto& base_obj : base_objects) {
41 SensorObjectPtr obj(new SensorObject(base_obj, header_));
42 if (base_obj->lidar_supplement.is_background) {
43 background_objects_.emplace_back(obj);
44 } else {
45 foreground_objects_.emplace_back(obj);
46 }
47 }
48}
std::shared_ptr< SensorObject > SensorObjectPtr

◆ Initialize() [2/2]

void apollo::perception::fusion::SensorFrame::Initialize ( const base::FrameConstPtr &  base_frame_ptr,
const SensorPtr &  sensor 
)

Initialize sensor frame

参数
base_frame_ptr
sensor

在文件 sensor_frame.cc 第 50 行定义.

51 {
52 Initialize(base_frame_ptr);
53}

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