6#include <gtsam_points/types/point_cloud.hpp>
11namespace gtsam_points {
18 using Ptr = std::shared_ptr<GaussianVoxelMap>;
19 using ConstPtr = std::shared_ptr<const GaussianVoxelMap>;
42double overlap(
const GaussianVoxelMap::ConstPtr& target,
const PointCloud::ConstPtr& source,
const Eigen::Isometry3d& T_target_source);
52 const std::vector<GaussianVoxelMap::ConstPtr>& targets,
53 const PointCloud::ConstPtr& source,
54 const std::vector<Eigen::Isometry3d>& Ts_target_source);
57template <
typename VoxelMapPtr>
58std::enable_if_t<!std::is_same_v<VoxelMapPtr, GaussianVoxelMap::ConstPtr>,
double>
59overlap(
const std::vector<VoxelMapPtr>& targets,
const PointCloud::ConstPtr& source,
const std::vector<Eigen::Isometry3d>& Ts_target_source) {
60 const std::vector<GaussianVoxelMap::ConstPtr> targets_(targets.begin(), targets.end());
61 return overlap(targets_, source, Ts_target_source);
73 const GaussianVoxelMap::ConstPtr& target,
74 const PointCloud::ConstPtr& source,
75 const Eigen::Isometry3f* T_target_source_gpu,
76 CUstream_st* stream = 0);
87 const GaussianVoxelMap::ConstPtr& target,
88 const PointCloud::ConstPtr& source,
89 const Eigen::Isometry3d& T_target_source,
90 CUstream_st* stream = 0);
94 const PointCloud::ConstPtr& target,
95 const PointCloud::ConstPtr& source,
96 const Eigen::Isometry3d& T_target_source,
97 CUstream_st* stream = 0);
108 const std::vector<GaussianVoxelMap::ConstPtr>& targets,
109 const PointCloud::ConstPtr& source,
110 const std::vector<Eigen::Isometry3d>& Ts_target_source,
111 CUstream_st* stream = 0);
121std::vector<double> overlap_gpu(
122 const std::vector<GaussianVoxelMap::ConstPtr>& targets,
123 const std::vector<PointCloud::ConstPtr>& sources,
124 const std::vector<Eigen::Isometry3d>& Ts_target_source,
125 CUstream_st* stream = 0);
128template <
typename VoxelMapPtr>
129std::enable_if_t<!std::is_same_v<VoxelMapPtr, GaussianVoxelMap::ConstPtr>,
double> overlap_gpu(
130 const std::vector<VoxelMapPtr>& targets,
131 const PointCloud::ConstPtr& source,
132 const std::vector<Eigen::Isometry3d>& Ts_target_source,
133 CUstream_st* stream = 0) {
134 const std::vector<GaussianVoxelMap::ConstPtr> targets_(targets.begin(), targets.end());
135 return overlap_gpu(targets_, source, Ts_target_source, stream);
139template <
typename VoxelMapPtr,
typename Po
intCloudPtr>
141 enable_if_t<!std::is_same_v<VoxelMapPtr, GaussianVoxelMap::ConstPtr> || !std::is_same_v<PointCloudPtr, PointCloud::ConstPtr>, std::vector<double>>
143 const std::vector<VoxelMapPtr>& targets,
144 const std::vector<PointCloudPtr>& sources,
145 const std::vector<Eigen::Isometry3d>& Ts_target_source,
146 CUstream_st* stream = 0) {
147 const std::vector<GaussianVoxelMap::ConstPtr> targets_(targets.begin(), targets.end());
148 const std::vector<PointCloud::ConstPtr> sources_(sources.begin(), sources.end());
149 return overlap_gpu(targets_, sources_, Ts_target_source, stream);
153double overlap_auto(
const GaussianVoxelMap::ConstPtr& target,
const PointCloud::ConstPtr& source,
const Eigen::Isometry3d& T_target_source);
156 const std::vector<GaussianVoxelMap::ConstPtr>& targets,
157 const PointCloud::ConstPtr& source,
158 const std::vector<Eigen::Isometry3d>& Ts_target_source);
160template <
typename VoxelMapPtr>
161std::enable_if_t<!std::is_same_v<VoxelMapPtr, GaussianVoxelMap::ConstPtr>,
double>
162overlap_auto(
const std::vector<VoxelMapPtr>& targets,
const PointCloud::ConstPtr& source,
const std::vector<Eigen::Isometry3d>& Ts_target_source) {
163 const std::vector<GaussianVoxelMap::ConstPtr> targets_(targets.begin(), targets.end());
164 return overlap_auto(targets_, source, Ts_target_source);
Gaussian distribution voxelmap.
Definition gaussian_voxelmap.hpp:16
virtual void insert(const PointCloud &frame)=0
Insert a point cloud frame into the voxelmap.
virtual void save_compact(const std::string &path) const =0
Save the voxelmap.
virtual double voxel_resolution() const =0
Voxel resolution.
Standard point cloud class that holds only pointers to point attributes.
Definition point_cloud.hpp:19