-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
571 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
#pragma once | ||
|
||
#include <pcl/point_types.h> | ||
#include <pcl/point_cloud.h> | ||
#include <pcl/point_types.h> | ||
|
||
#include <vision_msgs/msg/detection3_d_array.hpp> | ||
|
||
#include <vector> | ||
|
||
class Cluster | ||
{ | ||
class Cluster { | ||
public: | ||
// makes a cloud from all points `in_cloud_ptr` that are indexed by `in_cluster_indices` | ||
Cluster( | ||
const pcl::PointCloud<pcl::PointXYZ>::Ptr& in_cloud_ptr, | ||
const std::vector<int>& in_cluster_indices); | ||
// makes a cloud from all points `in_cloud_ptr` that are indexed by | ||
// `in_cluster_indices` | ||
Cluster(const pcl::PointCloud<pcl::PointXYZ>::Ptr &in_cloud_ptr, | ||
const std::vector<int> &in_cluster_indices); | ||
|
||
pcl::PointXYZ getCentroid() { return centroid_; } | ||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr getCloud() { return cloud_; } | ||
vision_msgs::msg::BoundingBox3D getBoundingBox(); | ||
pcl::PointXYZ getCentroid() { return centroid_; } | ||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr getCloud() { return cloud_; } | ||
vision_msgs::msg::BoundingBox3D getBoundingBox(); | ||
|
||
bool isValid(); | ||
int size() { return cloud_->size(); } | ||
bool isValid(); | ||
int size() { return cloud_->size(); } | ||
|
||
private: | ||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_; | ||
pcl::PointXYZ centroid_; | ||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_; | ||
pcl::PointXYZ centroid_; | ||
|
||
pcl::PointXYZ max_point_; | ||
pcl::PointXYZ min_point_; | ||
pcl::PointXYZ max_point_; | ||
pcl::PointXYZ min_point_; | ||
|
||
static int color_index; | ||
static std::vector<std::vector<int>> colors; | ||
static int color_index; | ||
static std::vector<std::vector<int>> colors; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.