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

#include <projection_cache.h>

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

Public 类型

template<class EigenType >
using EigenVector = apollo::common::EigenVector< EigenType >
 

Public 成员函数

 ProjectionCache ()
 
 ProjectionCache (std::string sensor_id, double timestamp)
 
void Reset (std::string sensor_id, double timestamp)
 
Eigen::Vector2d * GetPoint2d (size_t ind)
 
size_t GetPoint2dsSize () const
 
void AddPoint (const Eigen::Vector2f &pt)
 
ProjectionCacheObject * BuildObject (const std::string &measurement_sensor_id, double measurement_timestamp, const std::string &projection_sensor_id, double projection_timestamp, int lidar_object_id)
 
ProjectionCacheObject * QueryObject (const std::string &measurement_sensor_id, double measurement_timestamp, const std::string &projection_sensor_id, double projection_timestamp, int lidar_object_id)
 

详细描述

在文件 projection_cache.h 第 90 行定义.

成员类型定义说明

◆ EigenVector

在文件 projection_cache.h 第 93 行定义.

构造及析构函数说明

◆ ProjectionCache() [1/2]

apollo::perception::fusion::ProjectionCache::ProjectionCache ( )
inline

在文件 projection_cache.h 第 96 行定义.

96 : measurement_sensor_id_(""), measurement_timestamp_(0.0) {
97 // 300,000 pts is 2 times of the size of point cloud of ordinary frame of
98 // velodyne64
99 point2ds_.reserve(300000);
100 }

◆ ProjectionCache() [2/2]

apollo::perception::fusion::ProjectionCache::ProjectionCache ( std::string  sensor_id,
double  timestamp 
)
inline

在文件 projection_cache.h 第 101 行定义.

102 : measurement_sensor_id_(sensor_id), measurement_timestamp_(timestamp) {
103 // 300,000 pts is 2 times of the size of point cloud of ordinary frame of
104 // velodyne64
105 point2ds_.reserve(300000);
106 }

成员函数说明

◆ AddPoint()

void apollo::perception::fusion::ProjectionCache::AddPoint ( const Eigen::Vector2f &  pt)
inline

在文件 projection_cache.h 第 123 行定义.

123 {
124 point2ds_.emplace_back(pt.x(), pt.y());
125 }

◆ BuildObject()

ProjectionCacheObject * apollo::perception::fusion::ProjectionCache::BuildObject ( const std::string &  measurement_sensor_id,
double  measurement_timestamp,
const std::string &  projection_sensor_id,
double  projection_timestamp,
int  lidar_object_id 
)
inline

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

131 {
132 if (!VerifyKey(measurement_sensor_id, measurement_timestamp)) {
133 return nullptr;
134 }
135 ProjectionCacheFrame* frame =
136 QueryFrame(projection_sensor_id, projection_timestamp);
137 if (frame == nullptr) {
138 frame = BuildFrame(projection_sensor_id, projection_timestamp);
139 }
140 if (frame == nullptr) {
141 return nullptr;
142 }
143 return frame->BuildObject(lidar_object_id);
144 }

◆ GetPoint2d()

Eigen::Vector2d * apollo::perception::fusion::ProjectionCache::GetPoint2d ( size_t  ind)
inline

在文件 projection_cache.h 第 115 行定义.

115 {
116 if (ind >= point2ds_.size()) {
117 return nullptr;
118 }
119 return &(point2ds_[ind]);
120 }

◆ GetPoint2dsSize()

size_t apollo::perception::fusion::ProjectionCache::GetPoint2dsSize ( ) const
inline

在文件 projection_cache.h 第 121 行定义.

121{ return point2ds_.size(); }

◆ QueryObject()

ProjectionCacheObject * apollo::perception::fusion::ProjectionCache::QueryObject ( const std::string &  measurement_sensor_id,
double  measurement_timestamp,
const std::string &  projection_sensor_id,
double  projection_timestamp,
int  lidar_object_id 
)
inline

在文件 projection_cache.h 第 146 行定义.

150 {
151 if (!VerifyKey(measurement_sensor_id, measurement_timestamp)) {
152 return nullptr;
153 }
154 ProjectionCacheFrame* frame =
155 QueryFrame(projection_sensor_id, projection_timestamp);
156 if (frame == nullptr) {
157 return nullptr;
158 }
159 return frame->QueryObject(lidar_object_id);
160 }

◆ Reset()

void apollo::perception::fusion::ProjectionCache::Reset ( std::string  sensor_id,
double  timestamp 
)
inline

在文件 projection_cache.h 第 108 行定义.

108 {
109 measurement_sensor_id_ = sensor_id;
110 measurement_timestamp_ = timestamp;
111 point2ds_.clear();
112 frames_.clear();
113 }

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