Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
jsk_pcl_ros::EuclideanClustering Class Reference

#include <euclidean_cluster_extraction_nodelet.h>

Inheritance diagram for jsk_pcl_ros::EuclideanClustering:
Inheritance graph
[legend]

Public Types

typedef message_filters::sync_policies::ApproximateTime< jsk_recognition_msgs::ClusterPointIndices, sensor_msgs::PointCloud2 > ApproximateSyncPolicy
 
typedef jsk_pcl_ros::EuclideanClusteringConfig Config
 
typedef message_filters::sync_policies::ExactTime< jsk_recognition_msgs::ClusterPointIndices, sensor_msgs::PointCloud2 > SyncPolicy
 
typedef std::vector< Eigen::Vector4f, Eigen::aligned_allocator< Eigen::Vector4f > > Vector4fVector
 

Public Member Functions

 EuclideanClustering ()
 
virtual ~EuclideanClustering ()
 

Protected Member Functions

virtual std::vector< int > buildLabelTrackingPivotTable (double *D, Vector4fVector cogs, Vector4fVector new_cogs, double label_tracking_tolerance)
 
virtual void clusteringClusterIndices (pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, std::vector< pcl::PointIndices::Ptr > &cluster_indices, std::vector< pcl::PointIndices > &clustered_indices)
 
virtual void computeCentroidsOfClusters (Vector4fVector &ret, pcl::PointCloud< pcl::PointXYZ >::Ptr cloud, std::vector< pcl::PointIndices > cluster_indices)
 
virtual void computeDistanceMatrix (double *D, Vector4fVector &old_cogs, Vector4fVector &new_cogs)
 
void configCallback (Config &config, uint32_t level)
 
void downsample_cloud (const pcl::PointCloud< pcl::PointXYZ >::Ptr &original_cloud, pcl::PointCloud< pcl::PointXYZ >::Ptr &sampled_cloud, std::vector< std::vector< int > > &sampled_to_original_indices, std::vector< int > &original_to_sampled_indices, double leaf_size)
 
virtual void extract (const sensor_msgs::PointCloud2ConstPtr &input)
 
virtual void multi_extract (const jsk_recognition_msgs::ClusterPointIndices::ConstPtr &cluster_indices, const sensor_msgs::PointCloud2::ConstPtr &input)
 
virtual void onInit ()
 
virtual std::vector< pcl::PointIndices > pivotClusterIndices (std::vector< int > &pivot_table, std::vector< pcl::PointIndices > &cluster_indices)
 
virtual void removeDuplicatedIndices (pcl::PointIndices::Ptr indices)
 
bool serviceCallback (jsk_recognition_msgs::EuclideanSegment::Request &req, jsk_recognition_msgs::EuclideanSegment::Response &res)
 
virtual void subscribe ()
 
virtual void unsubscribe ()
 
virtual void updateDiagnostic (diagnostic_updater::DiagnosticStatusWrapper &stat)
 

Protected Attributes

bool approximate_sync_
 
boost::shared_ptr< message_filters::Synchronizer< ApproximateSyncPolicy > > async_
 
jsk_recognition_utils::Counter cluster_counter_
 
int cluster_filter_type_
 
ros::Publisher cluster_num_pub_
 
Vector4fVector cogs_
 
bool downsample_
 
std::vector< std::vector< int > > downsample_to_original_indices_
 
jsk_topic_tools::TimeAccumulator kdtree_acc_
 
double label_tracking_tolerance
 
double leaf_size_
 
int maxsize_
 
int minsize_
 
bool multi_
 
boost::mutex mutex_
 
std::vector< int > original_to_downsample_indices_
 
int queue_size_
 
ros::Publisher result_pub_
 
jsk_topic_tools::TimeAccumulator segmentation_acc_
 
ros::ServiceServer service_
 
boost::shared_ptr< dynamic_reconfigure::Server< Config > > srv_
 
message_filters::Subscriber< jsk_recognition_msgs::ClusterPointIndices > sub_cluster_indices_
 
ros::Subscriber sub_input_
 
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_point_cloud_
 
boost::shared_ptr< message_filters::Synchronizer< SyncPolicy > > sync_
 
double tolerance
 

Detailed Description

Definition at line 103 of file euclidean_cluster_extraction_nodelet.h.

Member Typedef Documentation

◆ ApproximateSyncPolicy

typedef message_filters::sync_policies::ApproximateTime< jsk_recognition_msgs::ClusterPointIndices, sensor_msgs::PointCloud2> jsk_pcl_ros::EuclideanClustering::ApproximateSyncPolicy

Definition at line 144 of file euclidean_cluster_extraction_nodelet.h.

◆ Config

typedef jsk_pcl_ros::EuclideanClusteringConfig jsk_pcl_ros::EuclideanClustering::Config

Definition at line 146 of file euclidean_cluster_extraction_nodelet.h.

◆ SyncPolicy

typedef message_filters::sync_policies::ExactTime< jsk_recognition_msgs::ClusterPointIndices, sensor_msgs::PointCloud2> jsk_pcl_ros::EuclideanClustering::SyncPolicy

Definition at line 140 of file euclidean_cluster_extraction_nodelet.h.

◆ Vector4fVector

typedef std::vector<Eigen::Vector4f, Eigen::aligned_allocator<Eigen::Vector4f> > jsk_pcl_ros::EuclideanClustering::Vector4fVector

Definition at line 149 of file euclidean_cluster_extraction_nodelet.h.

Constructor & Destructor Documentation

◆ EuclideanClustering()

jsk_pcl_ros::EuclideanClustering::EuclideanClustering ( )
inline

Definition at line 150 of file euclidean_cluster_extraction_nodelet.h.

◆ ~EuclideanClustering()

jsk_pcl_ros::EuclideanClustering::~EuclideanClustering ( )
virtual

Definition at line 420 of file euclidean_cluster_extraction_nodelet.cpp.

Member Function Documentation

◆ buildLabelTrackingPivotTable()

std::vector< int > jsk_pcl_ros::EuclideanClustering::buildLabelTrackingPivotTable ( double *  D,
Vector4fVector  cogs,
Vector4fVector  new_cogs,
double  label_tracking_tolerance 
)
protectedvirtual

Definition at line 514 of file euclidean_cluster_extraction_nodelet.cpp.

◆ clusteringClusterIndices()

void jsk_pcl_ros::EuclideanClustering::clusteringClusterIndices ( pcl::PointCloud< pcl::PointXYZ >::Ptr &  cloud,
std::vector< pcl::PointIndices::Ptr > &  cluster_indices,
std::vector< pcl::PointIndices > &  clustered_indices 
)
protectedvirtual

Definition at line 81 of file euclidean_cluster_extraction_nodelet.cpp.

◆ computeCentroidsOfClusters()

void jsk_pcl_ros::EuclideanClustering::computeCentroidsOfClusters ( Vector4fVector ret,
pcl::PointCloud< pcl::PointXYZ >::Ptr  cloud,
std::vector< pcl::PointIndices >  cluster_indices 
)
protectedvirtual

Definition at line 584 of file euclidean_cluster_extraction_nodelet.cpp.

◆ computeDistanceMatrix()

void jsk_pcl_ros::EuclideanClustering::computeDistanceMatrix ( double *  D,
Vector4fVector old_cogs,
Vector4fVector new_cogs 
)
protectedvirtual

Definition at line 560 of file euclidean_cluster_extraction_nodelet.cpp.

◆ configCallback()

void jsk_pcl_ros::EuclideanClustering::configCallback ( Config config,
uint32_t  level 
)
protected

Definition at line 490 of file euclidean_cluster_extraction_nodelet.cpp.

◆ downsample_cloud()

void jsk_pcl_ros::EuclideanClustering::downsample_cloud ( const pcl::PointCloud< pcl::PointXYZ >::Ptr &  original_cloud,
pcl::PointCloud< pcl::PointXYZ >::Ptr &  sampled_cloud,
std::vector< std::vector< int > > &  sampled_to_original_indices,
std::vector< int > &  original_to_sampled_indices,
double  leaf_size 
)
protected

Definition at line 45 of file euclidean_cluster_extraction_nodelet.cpp.

◆ extract()

void jsk_pcl_ros::EuclideanClustering::extract ( const sensor_msgs::PointCloud2ConstPtr &  input)
protectedvirtual

Definition at line 222 of file euclidean_cluster_extraction_nodelet.cpp.

◆ multi_extract()

void jsk_pcl_ros::EuclideanClustering::multi_extract ( const jsk_recognition_msgs::ClusterPointIndices::ConstPtr &  cluster_indices,
const sensor_msgs::PointCloud2::ConstPtr &  input 
)
protectedvirtual

Definition at line 287 of file euclidean_cluster_extraction_nodelet.cpp.

◆ onInit()

void jsk_pcl_ros::EuclideanClustering::onInit ( )
protectedvirtual

Definition at line 393 of file euclidean_cluster_extraction_nodelet.cpp.

◆ pivotClusterIndices()

std::vector< pcl::PointIndices > jsk_pcl_ros::EuclideanClustering::pivotClusterIndices ( std::vector< int > &  pivot_table,
std::vector< pcl::PointIndices > &  cluster_indices 
)
protectedvirtual

Definition at line 503 of file euclidean_cluster_extraction_nodelet.cpp.

◆ removeDuplicatedIndices()

void jsk_pcl_ros::EuclideanClustering::removeDuplicatedIndices ( pcl::PointIndices::Ptr  indices)
protectedvirtual

Definition at line 575 of file euclidean_cluster_extraction_nodelet.cpp.

◆ serviceCallback()

bool jsk_pcl_ros::EuclideanClustering::serviceCallback ( jsk_recognition_msgs::EuclideanSegment::Request &  req,
jsk_recognition_msgs::EuclideanSegment::Response &  res 
)
protected

Definition at line 330 of file euclidean_cluster_extraction_nodelet.cpp.

◆ subscribe()

void jsk_pcl_ros::EuclideanClustering::subscribe ( )
protectedvirtual

Definition at line 432 of file euclidean_cluster_extraction_nodelet.cpp.

◆ unsubscribe()

void jsk_pcl_ros::EuclideanClustering::unsubscribe ( )
protectedvirtual

Definition at line 454 of file euclidean_cluster_extraction_nodelet.cpp.

◆ updateDiagnostic()

void jsk_pcl_ros::EuclideanClustering::updateDiagnostic ( diagnostic_updater::DiagnosticStatusWrapper stat)
protectedvirtual

Definition at line 464 of file euclidean_cluster_extraction_nodelet.cpp.

Member Data Documentation

◆ approximate_sync_

bool jsk_pcl_ros::EuclideanClustering::approximate_sync_
protected

Definition at line 176 of file euclidean_cluster_extraction_nodelet.h.

◆ async_

boost::shared_ptr<message_filters::Synchronizer<ApproximateSyncPolicy> > jsk_pcl_ros::EuclideanClustering::async_
protected

Definition at line 162 of file euclidean_cluster_extraction_nodelet.h.

◆ cluster_counter_

jsk_recognition_utils::Counter jsk_pcl_ros::EuclideanClustering::cluster_counter_
protected

Definition at line 185 of file euclidean_cluster_extraction_nodelet.h.

◆ cluster_filter_type_

int jsk_pcl_ros::EuclideanClustering::cluster_filter_type_
protected

Definition at line 178 of file euclidean_cluster_extraction_nodelet.h.

◆ cluster_num_pub_

ros::Publisher jsk_pcl_ros::EuclideanClustering::cluster_num_pub_
protected

Definition at line 159 of file euclidean_cluster_extraction_nodelet.h.

◆ cogs_

Vector4fVector jsk_pcl_ros::EuclideanClustering::cogs_
protected

Definition at line 188 of file euclidean_cluster_extraction_nodelet.h.

◆ downsample_

bool jsk_pcl_ros::EuclideanClustering::downsample_
protected

Definition at line 173 of file euclidean_cluster_extraction_nodelet.h.

◆ downsample_to_original_indices_

std::vector<std::vector<int> > jsk_pcl_ros::EuclideanClustering::downsample_to_original_indices_
protected

Definition at line 180 of file euclidean_cluster_extraction_nodelet.h.

◆ kdtree_acc_

jsk_topic_tools::TimeAccumulator jsk_pcl_ros::EuclideanClustering::kdtree_acc_
protected

Definition at line 184 of file euclidean_cluster_extraction_nodelet.h.

◆ label_tracking_tolerance

double jsk_pcl_ros::EuclideanClustering::label_tracking_tolerance
protected

Definition at line 170 of file euclidean_cluster_extraction_nodelet.h.

◆ leaf_size_

double jsk_pcl_ros::EuclideanClustering::leaf_size_
protected

Definition at line 174 of file euclidean_cluster_extraction_nodelet.h.

◆ maxsize_

int jsk_pcl_ros::EuclideanClustering::maxsize_
protected

Definition at line 172 of file euclidean_cluster_extraction_nodelet.h.

◆ minsize_

int jsk_pcl_ros::EuclideanClustering::minsize_
protected

Definition at line 171 of file euclidean_cluster_extraction_nodelet.h.

◆ multi_

bool jsk_pcl_ros::EuclideanClustering::multi_
protected

Definition at line 175 of file euclidean_cluster_extraction_nodelet.h.

◆ mutex_

boost::mutex jsk_pcl_ros::EuclideanClustering::mutex_
protected

Definition at line 154 of file euclidean_cluster_extraction_nodelet.h.

◆ original_to_downsample_indices_

std::vector<int> jsk_pcl_ros::EuclideanClustering::original_to_downsample_indices_
protected

Definition at line 181 of file euclidean_cluster_extraction_nodelet.h.

◆ queue_size_

int jsk_pcl_ros::EuclideanClustering::queue_size_
protected

Definition at line 177 of file euclidean_cluster_extraction_nodelet.h.

◆ result_pub_

ros::Publisher jsk_pcl_ros::EuclideanClustering::result_pub_
protected

Definition at line 157 of file euclidean_cluster_extraction_nodelet.h.

◆ segmentation_acc_

jsk_topic_tools::TimeAccumulator jsk_pcl_ros::EuclideanClustering::segmentation_acc_
protected

Definition at line 183 of file euclidean_cluster_extraction_nodelet.h.

◆ service_

ros::ServiceServer jsk_pcl_ros::EuclideanClustering::service_
protected

Definition at line 167 of file euclidean_cluster_extraction_nodelet.h.

◆ srv_

boost::shared_ptr<dynamic_reconfigure::Server<Config> > jsk_pcl_ros::EuclideanClustering::srv_
protected

Definition at line 153 of file euclidean_cluster_extraction_nodelet.h.

◆ sub_cluster_indices_

message_filters::Subscriber<jsk_recognition_msgs::ClusterPointIndices> jsk_pcl_ros::EuclideanClustering::sub_cluster_indices_
protected

Definition at line 164 of file euclidean_cluster_extraction_nodelet.h.

◆ sub_input_

ros::Subscriber jsk_pcl_ros::EuclideanClustering::sub_input_
protected

Definition at line 158 of file euclidean_cluster_extraction_nodelet.h.

◆ sub_point_cloud_

message_filters::Subscriber<sensor_msgs::PointCloud2> jsk_pcl_ros::EuclideanClustering::sub_point_cloud_
protected

Definition at line 165 of file euclidean_cluster_extraction_nodelet.h.

◆ sync_

boost::shared_ptr<message_filters::Synchronizer<SyncPolicy> > jsk_pcl_ros::EuclideanClustering::sync_
protected

Definition at line 161 of file euclidean_cluster_extraction_nodelet.h.

◆ tolerance

double jsk_pcl_ros::EuclideanClustering::tolerance
protected

Definition at line 169 of file euclidean_cluster_extraction_nodelet.h.


The documentation for this class was generated from the following files:


jsk_pcl_ros
Author(s): Yohei Kakiuchi
autogenerated on Tue Jan 7 2025 04:05:46