41#include <pcl/gpu/kinfu_large_scale/tsdf_volume.h>
42#include <pcl/gpu/kinfu_large_scale/tsdf_buffer.h>
45#include <cuda_runtime.h>
46#include <pcl/gpu/kinfu_large_scale/point_intensity.h>
48#include <pcl/gpu/kinfu_large_scale/world_model.h>
51#include <pcl/io/pcd_io.h>
137 distance_threshold_ = threshold;
154 void setVolumeSize (
const double size_x,
const double size_y,
const double size_z)
156 buffer_.volume_size.x = size_x;
157 buffer_.volume_size.y = size_y;
158 buffer_.volume_size.z = size_z;
166 buffer_.volume_size.x = size;
167 buffer_.volume_size.y = size;
168 buffer_.volume_size.z = size;
186 buffer_.tsdf_memory_start = &(
localVolume.ptr (0)[0]);
187 buffer_.tsdf_memory_end = &(
localVolume.ptr (buffer_.voxels_size.y * (buffer_.voxels_size.z - 1) + (buffer_.voxels_size.y - 1) )[buffer_.voxels_size.x - 1]);
188 buffer_.tsdf_rolling_buff_origin = buffer_.tsdf_memory_start;
196 buffer_.origin_GRID.x = 0; buffer_.origin_GRID.y = 0; buffer_.origin_GRID.z = 0;
197 buffer_.origin_GRID_global.x = 0.f; buffer_.origin_GRID_global.y = 0.f; buffer_.origin_GRID_global.z = 0.f;
198 buffer_.origin_metric.x = 0.f; buffer_.origin_metric.y = 0.f; buffer_.origin_metric.z = 0.f;
207 return (&world_model_);
220 double distance_threshold_;
Iterator class for point clouds with or without given indices.
CyclicalBuffer implements a cyclical TSDF buffer.
void computeAndSetNewCubeMetricOrigin(const pcl::PointXYZ &target_point, int &shiftX, int &shiftY, int &shiftZ)
Computes and set the origin of the new cube (relative to the world), centered around a the target poi...
void setVolumeSize(const double size)
Set the physical size represented by the default TSDF volume.
pcl::kinfuLS::WorldModel< pcl::PointXYZI > * getWorldModel()
Return a pointer to the world model.
void resetBuffer(TsdfVolume::Ptr tsdf_volume)
Reset buffer structure.
void setDistanceThreshold(const double threshold)
Sets the distance threshold between cube's center and target point that triggers a shift.
bool checkForShift(const TsdfVolume::Ptr volume, const Eigen::Affine3f &cam_pose, const double distance_camera_target, const bool perform_shift=true, const bool last_shift=false, const bool force_shift=false)
Check if shifting needs to be performed, returns true if so.
CyclicalBuffer(const double distance_threshold, const double volume_size_x, const double volume_size_y, const double volume_size_z, const int nb_voxels_x, const int nb_voxels_y, const int nb_voxels_z)
Constructor for a non-cubic CyclicalBuffer.
float getDistanceThreshold()
Returns the distance threshold between cube's center and target point that triggers a shift.
tsdf_buffer * getBuffer()
get a pointer to the tsdf_buffer structure.
void initBuffer(TsdfVolume::Ptr tsdf_volume)
Initializes memory pointers of the cyclical buffer (start, end, current origin)
void performShift(const TsdfVolume::Ptr volume, const pcl::PointXYZ &target_point, const bool last_shift=false)
Perform shifting operations: Compute offsets.
void setVolumeSize(const double size_x, const double size_y, const double size_z)
Set the physical size represented by the default TSDF volume.
CyclicalBuffer(const double distance_threshold, const double cube_size=3.f, const int nb_voxels_per_axis=512)
Constructor for a cubic CyclicalBuffer.
shared_ptr< TsdfVolume > Ptr
WorldModel maintains a 3D point cloud that can be queried and updated via helper functions.
Defines all the PCL implemented PointT point type structures.
A point structure representing Euclidean xyz coordinates.
Structure to handle buffer addresses.
short2 * tsdf_memory_start
Address of the first element of the TSDF volume in memory.
short2 * tsdf_memory_end
Address of the last element of the TSDF volume in memory.
short2 * tsdf_rolling_buff_origin
Memory address of the origin of the rolling buffer.
int3 voxels_size
Number of voxels in the volume, per axis.
int3 origin_GRID
Internal cube origin for rollign buffer.
float3 origin_GRID_global
Cube origin in world coordinates.