Galaxis Codebase  1.0.0
Team Galaxis software stack for the Carolo Cup 2023 - ROS2 based software
PCLObjectDetector Class Referenceabstract

#include <PCLObjectDetector.hpp>

Inheritance diagram for PCLObjectDetector:

Public Member Functions

int filter_pcl (pclPtrType p_pclPtr, pclPtrType p_cloudFiltered, float p_leafsize, float y_min, float y_max)
 
virtual std::shared_ptr< std::vector< pcl::PointCloud< pcl::PointXYZ >::Ptr > > cluster_data (pclPtrType p_pclPtr, std::vector< Object > &p_objectsVecRef, float clusterTolerance, int minClusterSize, int maxClusterSize) const =0
 
std::string get_name (void)
 

Protected Attributes

std::string m_name = "none"
 

Private Member Functions

void passThroughFilter (pclPtrType p_inputCloudPtr, pclPtrType p_outputCloudPtr, float y_min, float y_max)
 
void downsampling (pclPtrType p_inputCloudPtr, pclPtrType p_outputCloudPtr, float p_leafSize)
 

Detailed Description

Definition at line 28 of file PCLObjectDetector.hpp.

Member Function Documentation

◆ cluster_data()

virtual std::shared_ptr<std::vector<pcl::PointCloud<pcl::PointXYZ>::Ptr> > PCLObjectDetector::cluster_data ( pclPtrType  p_pclPtr,
std::vector< Object > &  p_objectsVecRef,
float  clusterTolerance,
int  minClusterSize,
int  maxClusterSize 
) const
pure virtual

Implemented in EuclideanDetector.

◆ downsampling()

void PCLObjectDetector::downsampling ( pclPtrType  p_inputCloudPtr,
pclPtrType  p_outputCloudPtr,
float  p_leafSize 
)
private

Definition at line 101 of file PCLObjectDetector.cpp.

101  {
102  pcl::VoxelGrid<pcl::PointXYZ> sor;
103  sor.setInputCloud(p_inputCloudPtr);
104  sor.setLeafSize(p_leafSize, p_leafSize, p_leafSize);
105  sor.filter(*p_outputCloudPtr);
106 }

Referenced by filter_pcl().

Here is the caller graph for this function:

◆ filter_pcl()

int PCLObjectDetector::filter_pcl ( pclPtrType  p_pclPtr,
pclPtrType  p_cloudFiltered,
float  p_leafsize,
float  y_min,
float  y_max 
)
inline

Definition at line 38 of file PCLObjectDetector.hpp.

38  {
39  int ret = 0;
40 
41  if(p_pclPtr == nullptr) {
42  ret = -1;
43  } else {
44  downsampling(p_pclPtr, p_cloudFiltered, p_leafsize);
45 
46  passThroughFilter(p_cloudFiltered, p_cloudFiltered, y_min, y_max);
47 
48  ret = 0;
49  }
50 
51  return ret;
52  };

References downsampling(), and passThroughFilter().

Referenced by RealSenseNode::object_detection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_name()

std::string PCLObjectDetector::get_name ( void  )
inline

Definition at line 56 of file PCLObjectDetector.hpp.

56  {
57  return m_name;
58  };

References m_name.

◆ passThroughFilter()

void PCLObjectDetector::passThroughFilter ( pclPtrType  p_inputCloudPtr,
pclPtrType  p_outputCloudPtr,
float  y_min,
float  y_max 
)
private

Definition at line 108 of file PCLObjectDetector.cpp.

108  {
109  // pcl::PassThrough<pcl::PointXYZ> pass_z;
110  // pass_z.setInputCloud(p_inputCloudPtr);
111  // pass_z.setFilterFieldName("z");
112  // pass_z.setFilterLimits(0.18, 2.0);
113  // pass_z.filter(*p_outputCloudPtr);
114 
115  // pcl::PassThrough<pcl::PointXYZ> pass_y;
116  // pass_y.setInputCloud(p_inputCloudPtr);
117  // pass_y.setFilterFieldName("y");
118  // pass_y.setFilterLimits(y_min, y_max);
119  // pass_y.filter(*p_outputCloudPtr);
120 }

Referenced by filter_pcl().

Here is the caller graph for this function:

Member Data Documentation

◆ m_name

std::string PCLObjectDetector::m_name = "none"
protected

Definition at line 35 of file PCLObjectDetector.hpp.

Referenced by EuclideanDetector::EuclideanDetector(), and get_name().


The documentation for this class was generated from the following files:
PCLObjectDetector::downsampling
void downsampling(pclPtrType p_inputCloudPtr, pclPtrType p_outputCloudPtr, float p_leafSize)
Definition: PCLObjectDetector.cpp:101
PCLObjectDetector::m_name
std::string m_name
Definition: PCLObjectDetector.hpp:35
PCLObjectDetector::passThroughFilter
void passThroughFilter(pclPtrType p_inputCloudPtr, pclPtrType p_outputCloudPtr, float y_min, float y_max)
Definition: PCLObjectDetector.cpp:108