6#include <gtsam_points/util/runnning_statistics.hpp>
7#include <gtsam_points/ann/incremental_voxelmap.hpp>
8#include <gtsam_points/ann/incremental_covariance_container.hpp>
10namespace gtsam_points {
47 double max_sq_dist = std::numeric_limits<double>::max())
const override;
50 size_t knn_search_force(
const double* pt,
size_t k,
size_t* k_indices,
double* k_sq_dists,
double max_sq_dist = std::numeric_limits<double>::max())
56 std::vector<Eigen::Vector4d>
voxel_points(
const std::vector<size_t>& indices)
const;
58 std::vector<Eigen::Vector4d>
voxel_normals(
const std::vector<size_t>& indices)
const;
60 std::vector<Eigen::Matrix4d>
voxel_covs(
const std::vector<size_t>& indices)
const;
63 virtual std::vector<Eigen::Vector4d>
voxel_points()
const override;
67 virtual std::vector<Eigen::Matrix4d>
voxel_covs()
const override;
78 std::deque<RunningStatistics<Eigen::Array3d>>
eig_stats;
Incremental voxelmap with online covariance and normal estimation.
Definition incremental_covariance_voxelmap.hpp:13
size_t knn_search_force(const double *pt, size_t k, size_t *k_indices, double *k_sq_dists, double max_sq_dist=std::numeric_limits< double >::max()) const
Find k-nearest neighbors. This finds neighbors regardless of the validity of covariances.
virtual std::vector< Eigen::Vector4d > voxel_points() const override
Get voxel points.
virtual std::vector< Eigen::Vector4d > voxel_normals() const override
Get voxel normals.
double eig_stddev_thresh_scale
Threshold scale for normal validation.
Definition incremental_covariance_voxelmap.hpp:75
std::vector< Eigen::Vector4d > voxel_points(const std::vector< size_t > &indices) const
Get points from indices.
std::vector< size_t > valid_indices(int num_threads=-1) const
Get valid point indices. If num_threads is -1, the member variable num_threads is used.
int remove_invalid_age_thresh
Age threshold for removing invalid points.
Definition incremental_covariance_voxelmap.hpp:74
void set_num_threads(int num_threads)
Set the number of threads for normal estimation.
void set_lowrate_cycles(int lowrate_cycles)
Set the number of lowrate update cycles. Covariances of invalid points are re-evaluated every this pe...
void set_min_num_neighbors(int min_num_neighbors)
Set the minimum number of neighbors for covariance estimation.
int warmup_cycles
Number of cycles for covariance warmup.
Definition incremental_covariance_voxelmap.hpp:72
void set_eig_stddev_thresh_scale(double eig_stddev_thresh_scale)
Set the threshold scale for normal validation.
void set_remove_invalid_age_thresh(int remove_invalid_age_thresh)
Set the age threshold for removing invalid points. Invalid points older than this are removed.
virtual std::vector< Eigen::Matrix4d > voxel_covs() const override
Get voxel covariances.
void set_warmup_cycles(int warmup_cycles)
Set the number of warmup cycles. Covariances of new points in this period are not re-evaluated every ...
virtual void clear() override
Clear the voxelmap.
virtual size_t knn_search(const double *pt, size_t k, size_t *k_indices, double *k_sq_dists, double max_sq_dist=std::numeric_limits< double >::max()) const override
Find k-nearest neighbors. This only finds neighbors with valid covariances.
std::vector< Eigen::Matrix4d > voxel_covs(const std::vector< size_t > &indices) const
Get covariances from indices.
virtual void insert(const PointCloud &points) override
Insert point into the voxelmap.
int min_num_neighbors
Minimum number of neighbors for covariance estimation.
Definition incremental_covariance_voxelmap.hpp:71
std::deque< RunningStatistics< Eigen::Array3d > > eig_stats
Running statistics for eigenvalues.
Definition incremental_covariance_voxelmap.hpp:78
void set_num_neighbors(int num_neighbors)
Set the number of neighbors for covariance estimation.
IncrementalCovarianceVoxelMap(double voxel_resolution)
Constructor.
int lowrate_cycles
Number of cycles for lowrate covariance estimation.
Definition incremental_covariance_voxelmap.hpp:73
int num_threads
Number of threads for normal estimation.
Definition incremental_covariance_voxelmap.hpp:76
int num_neighbors
Number of neighbors for covariance estimation.
Definition incremental_covariance_voxelmap.hpp:70
std::vector< Eigen::Vector4d > voxel_normals(const std::vector< size_t > &indices) const
Get normals from indices.
Incremental voxelmap. This class supports incremental point cloud insertion and LRU-based voxel delet...
Definition incremental_voxelmap.hpp:35
Standard point cloud class that holds only pointers to point attributes.
Definition point_cloud.hpp:19
Definition frame_traits.hpp:17