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

#include <spp_engine.h>

apollo::perception::lidar::SppEngine 的协作图:

Public 成员函数

 SppEngine ()=default
 
 ~SppEngine ()=default
 
void Init (size_t width, size_t height, float range, const SppParams &param=SppParams(), const std::string &sensor_name="velodyne64")
 
size_t ProcessForegroundSegmentation (const base::PointFCloudConstPtr point_cloud)
 
size_t RemoveGroundPointsInForegroundCluster (const base::PointFCloudConstPtr full_point_cloud, const base::PointIndices &roi_indices, const base::PointIndices &roi_non_ground_indices)
 
const SppClusterList & clusters () const
 
SppClusterList & clusters ()
 
SppData & GetSppData ()
 
const SppData & GetSppData () const
 

详细描述

在文件 spp_engine.h 第 33 行定义.

构造及析构函数说明

◆ SppEngine()

apollo::perception::lidar::SppEngine::SppEngine ( )
default

◆ ~SppEngine()

apollo::perception::lidar::SppEngine::~SppEngine ( )
default

成员函数说明

◆ clusters() [1/2]

SppClusterList & apollo::perception::lidar::SppEngine::clusters ( )
inline

在文件 spp_engine.h 第 63 行定义.

63{ return clusters_; }

◆ clusters() [2/2]

const SppClusterList & apollo::perception::lidar::SppEngine::clusters ( ) const
inline

在文件 spp_engine.h 第 60 行定义.

60{ return clusters_; }

◆ GetSppData() [1/2]

SppData & apollo::perception::lidar::SppEngine::GetSppData ( )
inline

在文件 spp_engine.h 第 65 行定义.

65{ return data_; }

◆ GetSppData() [2/2]

const SppData & apollo::perception::lidar::SppEngine::GetSppData ( ) const
inline

在文件 spp_engine.h 第 67 行定义.

67{ return data_; }

◆ Init()

void apollo::perception::lidar::SppEngine::Init ( size_t  width,
size_t  height,
float  range,
const SppParams &  param = SppParams(),
const std::string &  sensor_name = "velodyne64" 
)

在文件 spp_engine.cc 第 26 行定义.

27 {
28 // initialize connect component detector
29 detector_2d_cc_.Init(static_cast<int>(height), static_cast<int>(width));
30 detector_2d_cc_.SetData(data_.obs_prob_data_ref, data_.offset_data,
31 static_cast<float>(height) / (2.f * range),
33 // initialize label image
34 labels_2d_.Init(width, height, sensor_name);
35 labels_2d_.InitRangeMask(range, param.confidence_range);
36 // set parameters of dynamic map
37 params_ = param;
38
39 // initialize feature size
40 width_ = width;
41 height_ = height;
42 range_ = range;
43 // bind worker
44 worker_.Bind([&]() {
48 data_.height_pt_blob->cpu_data();
49 return true;
50 });
51 worker_.Start();
52}
const Dtype * cpu_data() const
Definition blob.cc:137
void Bind(const std::function< bool()> &func)
void SetData(const float *const *prob_map, const float *offset_map, float scale, float objectness_threshold)
void Init(size_t width, size_t height, const std::string &sensor_name="velodyne64")
void InitRangeMask(float range, float boundary_distance)
uint32_t height
Height of point cloud
uint32_t width
Width of point cloud
base::Blob< float > * heading_pt_blob
Definition spp_struct.h:36
base::Blob< float > * classify_pt_blob
Definition spp_struct.h:35
base::Blob< float > * height_pt_blob
Definition spp_struct.h:37
base::Blob< float > * confidence_pt_blob
Definition spp_struct.h:34

◆ ProcessForegroundSegmentation()

size_t apollo::perception::lidar::SppEngine::ProcessForegroundSegmentation ( const base::PointFCloudConstPtr  point_cloud)

在文件 spp_engine.cc 第 125 行定义.

126 {
127 mask_.clear();
128 ProcessConnectedComponentCluster(point_cloud, mask_);
129 AINFO << "Foreground: " << clusters_.size() << " clusters";
130 return clusters_.size();
131}
#define AINFO
Definition log.h:42

◆ RemoveGroundPointsInForegroundCluster()

size_t apollo::perception::lidar::SppEngine::RemoveGroundPointsInForegroundCluster ( const base::PointFCloudConstPtr  full_point_cloud,
const base::PointIndices &  roi_indices,
const base::PointIndices &  roi_non_ground_indices 
)

在文件 spp_engine.cc 第 133 行定义.

136 {
137 mask_.Set(full_point_cloud->size(), 0);
138 mask_.AddIndices(roi_indices);
139 mask_.RemoveIndicesOfIndices(roi_indices, roi_non_ground_indices);
140 mask_.Flip();
141 // at this time, all ground points has mask value 0
142 for (size_t i = 0; i < clusters_.size(); ++i) {
143 clusters_[static_cast<int>(i)]->RemovePoints(mask_);
144 }
145 clusters_.RemoveEmptyClusters();
146 return clusters_.size();
147}
void AddIndices(const base::PointIndices &indices, int value=1)
Definition cloud_mask.cc:66
void Set(size_t size, int init_value)
Definition cloud_mask.h:34
void RemoveIndicesOfIndices(const base::PointIndices &indices, const base::PointIndices &indices_of_indices)
Definition cloud_mask.cc:82

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