small_gicp
|
Incremental voxelmap. This class supports incremental point cloud insertion and LRU-based voxel deletion that removes voxels that are not recently referenced. More...
#include <incremental_voxelmap.hpp>
Public Types | |
using | Ptr = std::shared_ptr< IncrementalVoxelMap > |
using | ConstPtr = std::shared_ptr< const IncrementalVoxelMap > |
Public Member Functions | |
IncrementalVoxelMap (double leaf_size) | |
Constructor. More... | |
size_t | size () const |
Number of points in the voxelmap. More... | |
template<typename PointCloud > | |
void | insert (const PointCloud &points, const Eigen::Isometry3d &T=Eigen::Isometry3d::Identity()) |
Insert points to the voxelmap. More... | |
size_t | nearest_neighbor_search (const Eigen::Vector4d &pt, size_t *index, double *sq_dist) const |
Find the nearest neighbor. More... | |
size_t | knn_search (const Eigen::Vector4d &pt, size_t k, size_t *k_indices, double *k_sq_dists) const |
Find k nearest neighbors. More... | |
size_t | calc_index (const size_t voxel_id, const size_t point_id) const |
Calculate the global point index from the voxel index and the point index. More... | |
size_t | voxel_id (const size_t i) const |
Extract the point ID from a global index. More... | |
size_t | point_id (const size_t i) const |
Extract the voxel ID from a global index. More... | |
void | set_search_offsets (int num_offsets) |
Set the pattern of the search offsets. (Must be 1, 7, or 27) More... | |
Public Attributes | |
const double | inv_leaf_size |
Inverse of the voxel size. More... | |
size_t | lru_horizon |
LRU horizon size. Voxels that have not been accessed for lru_horizon steps are deleted. More... | |
size_t | lru_clear_cycle |
LRU clear cycle. Voxel deletion is performed every lru_clear_cycle steps. More... | |
size_t | lru_counter |
LRU counter. Incremented every step. More... | |
std::vector< Eigen::Vector3i > | search_offsets |
Voxel search offsets. More... | |
VoxelContents::Setting | voxel_setting |
Voxel setting. More... | |
std::vector< std::shared_ptr< std::pair< VoxelInfo, VoxelContents > > > | flat_voxels |
Voxel contents. More... | |
std::unordered_map< Eigen::Vector3i, size_t, XORVector3iHash > | voxels |
Voxel index map. More... | |
Static Public Attributes | |
static constexpr int | point_id_bits = 32 |
Use the first 32 bits for point id. More... | |
static constexpr int | voxel_id_bits = 64 - point_id_bits |
Use the remaining bits for voxel id. More... | |
Incremental voxelmap. This class supports incremental point cloud insertion and LRU-based voxel deletion that removes voxels that are not recently referenced.
using small_gicp::IncrementalVoxelMap< VoxelContents >::ConstPtr = std::shared_ptr<const IncrementalVoxelMap> |
using small_gicp::IncrementalVoxelMap< VoxelContents >::Ptr = std::shared_ptr<IncrementalVoxelMap> |
|
inlineexplicit |
Constructor.
leaf_size | Voxel size |
|
inline |
Calculate the global point index from the voxel index and the point index.
|
inline |
Insert points to the voxelmap.
points | Point cloud |
T | Transformation matrix |
|
inline |
Find k nearest neighbors.
pt | Query point |
k | Number of neighbors |
k_indices | Indices of nearest neighbors |
k_sq_dists | Squared distances to nearest neighbors (sorted in ascending order) |
|
inline |
Find the nearest neighbor.
pt | Query point |
index | Index of the nearest neighbor |
sq_dist | Squared distance to the nearest neighbor |
|
inline |
Extract the voxel ID from a global index.
|
inline |
Set the pattern of the search offsets. (Must be 1, 7, or 27)
|
inline |
Number of points in the voxelmap.
|
inline |
Extract the point ID from a global index.
std::vector<std::shared_ptr<std::pair<VoxelInfo, VoxelContents> > > small_gicp::IncrementalVoxelMap< VoxelContents >::flat_voxels |
Voxel contents.
const double small_gicp::IncrementalVoxelMap< VoxelContents >::inv_leaf_size |
Inverse of the voxel size.
size_t small_gicp::IncrementalVoxelMap< VoxelContents >::lru_clear_cycle |
LRU clear cycle. Voxel deletion is performed every lru_clear_cycle steps.
size_t small_gicp::IncrementalVoxelMap< VoxelContents >::lru_counter |
LRU counter. Incremented every step.
size_t small_gicp::IncrementalVoxelMap< VoxelContents >::lru_horizon |
LRU horizon size. Voxels that have not been accessed for lru_horizon steps are deleted.
|
staticconstexpr |
Use the first 32 bits for point id.
std::vector<Eigen::Vector3i> small_gicp::IncrementalVoxelMap< VoxelContents >::search_offsets |
Voxel search offsets.
|
staticconstexpr |
Use the remaining bits for voxel id.
VoxelContents::Setting small_gicp::IncrementalVoxelMap< VoxelContents >::voxel_setting |
Voxel setting.
std::unordered_map<Eigen::Vector3i, size_t, XORVector3iHash> small_gicp::IncrementalVoxelMap< VoxelContents >::voxels |
Voxel index map.