|
| 1 | +/* |
| 2 | + * PointXYZRGBICO.hpp |
| 3 | + * |
| 4 | + * Created on: July 1, 2021 |
| 5 | + * Author: Peter XU |
| 6 | + * Institute: ZJU, Robotics 104 |
| 7 | + */ |
| 8 | + |
| 9 | +#define PCL_NO_PRECOMPILE |
| 10 | + |
| 11 | +#include <pcl/pcl_macros.h> |
| 12 | +#include <pcl/point_cloud.h> |
| 13 | +#include <pcl/point_types.h> |
| 14 | +#include <pcl/impl/instantiate.hpp> |
| 15 | + |
| 16 | +#include <pcl/filters/voxel_grid.h> |
| 17 | +#include <pcl/filters/impl/voxel_grid.hpp> |
| 18 | +#include <pcl/filters/passthrough.h> |
| 19 | +#include <pcl/filters/impl/passthrough.hpp> |
| 20 | +#include <pcl/kdtree/kdtree.h> |
| 21 | +#include <pcl/kdtree/kdtree_flann.h> |
| 22 | +#include <pcl/kdtree/impl/kdtree_flann.hpp> |
| 23 | +#include <pcl/search/impl/kdtree.hpp> |
| 24 | +#include <boost/shared_ptr.hpp> |
| 25 | + |
| 26 | +struct PointXYZRGBICO |
| 27 | +{ |
| 28 | + PCL_ADD_POINT4D; |
| 29 | + PCL_ADD_RGB; |
| 30 | + |
| 31 | + float covariance; |
| 32 | + float intensity; |
| 33 | + float obstacle; |
| 34 | + |
| 35 | + PointXYZRGBICO() {} |
| 36 | + PointXYZRGBICO(const PointXYZRGBICO& input) |
| 37 | + { |
| 38 | + this->x = input.x; |
| 39 | + this->y = input.y; |
| 40 | + this->z = input.z; |
| 41 | + this->rgb = input.rgb; |
| 42 | + this->intensity = input.intensity; |
| 43 | + this->covariance = input.covariance; |
| 44 | + this->obstacle = input.obstacle; |
| 45 | + } |
| 46 | + |
| 47 | + EIGEN_MAKE_ALIGNED_OPERATOR_NEW; |
| 48 | +} EIGEN_ALIGN16; |
| 49 | + |
| 50 | +POINT_CLOUD_REGISTER_POINT_STRUCT (PointXYZRGBICO, |
| 51 | + (float, x, x) |
| 52 | + (float, y, y) |
| 53 | + (float, z, z) |
| 54 | + (float, rgb, rgb) |
| 55 | + (float, intensity, intensity) |
| 56 | + (float, covariance, covariance) |
| 57 | + (float, obstacle, obstacle) |
| 58 | +); |
| 59 | + |
| 60 | +PCL_INSTANTIATE(VoxelGrid, PointXYZRGBICO); |
| 61 | +PCL_INSTANTIATE(KdTree, PointXYZRGBICO); |
| 62 | +PCL_INSTANTIATE(KdTreeFLANN, PointXYZRGBICO); |
| 63 | + |
| 64 | +typedef pcl::PointCloud<PointXYZRGBICO> PointCloudXYZRGBICO; |
0 commit comments