42 #include <pcl/gpu/containers/device_array.h>
44 #include <pcl/point_cloud.h>
58 using Ptr = shared_ptr<TsdfVolume>;
66 enum { DEFAULT_CLOUD_BUFFER_SIZE = 10 * 1000 * 1000 };
90 const Eigen::Vector3f&
94 const Eigen::Vector3i&
152 Eigen::Vector3f size_;
155 Eigen::Vector3i resolution_;
PointCloud represents the base class in PCL for storing collections of 3D points.
void setTsdfTruncDist(float distance)
Sets Tsdf truncation distance.
shared_ptr< TsdfVolume > Ptr
DeviceArray2D< int > data() const
Returns tsdf volume container that point to data in GPU memory.
TsdfVolume(const Eigen::Vector3i &resolution)
Constructor.
shared_ptr< const TsdfVolume > ConstPtr
void setSize(const Eigen::Vector3f &size)
Sets Tsdf volume size for each dimension.
DeviceArray< PointType > fetchCloud(DeviceArray< PointType > &cloud_buffer) const
Generates cloud using GPU in connected6 mode only.
const Eigen::Vector3f getVoxelSize() const
Returns volume voxel size in meters.
const Eigen::Vector3f & getSize() const
Returns volume size in meters.
void reset()
Resets tsdf volume data to uninitialized state.
void fetchNormals(const DeviceArray< PointType > &cloud, DeviceArray< NormalType > &normals) const
Computes normals as gradient of tsdf for given points.
float getTsdfTruncDist() const
Returns tsdf truncation distance in meters.
void fetchCloudHost(PointCloud< PointType > &cloud, bool connected26=false) const
Generates cloud using CPU (downloads volumetric representation to CPU memory)
const Eigen::Vector3i & getResolution() const
Returns volume resolution.
void downloadTsdfAndWeighs(std::vector< float > &tsdf, std::vector< short > &weights) const
Downloads TSDF volume and according voxel weights from GPU memory.
void downloadTsdf(std::vector< float > &tsdf) const
Downloads tsdf volume from GPU memory.
void fetchNormals(const DeviceArray< PointType > &cloud, DeviceArray< PointType > &normals) const
Computes normals as gradient of tsdf for given points.
Defines all the PCL implemented PointT point type structures.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Defines functions, macros and traits for allocating and using memory.
float distance(const PointT &p1, const PointT &p2)
Defines all the PCL and non-PCL macros used.
A point structure representing normal coordinates and the surface curvature estimate.
A point structure representing Euclidean xyz coordinates.