Point container with a flat vector.
More...
#include <flat_container.hpp>
|
| FlatContainer () |
| Constructor. More...
|
|
size_t | size () const |
| Number of points. More...
|
|
template<typename PointCloud > |
void | add (const Setting &setting, const Eigen::Vector4d &transformed_pt, const PointCloud &points, size_t i, const Eigen::Isometry3d &T) |
| Add a point to the container. If there is a point that is too close to the input point, or there are too many points in the cell, the input point will not be ignored. More...
|
|
void | finalize () |
| Finalize the container (Nothing to do for FlatContainer). More...
|
|
size_t | nearest_neighbor_search (const Eigen::Vector4d &pt, size_t *k_index, double *k_sq_dist) const |
| Find the nearest neighbor. More...
|
|
size_t | knn_search (const Eigen::Vector4d &pt, int k, size_t *k_indices, double *k_sq_dists) const |
| Find k nearest neighbors. More...
|
|
template<typename Result > |
void | knn_search (const Eigen::Vector4d &pt, Result &result) const |
| Find k nearest neighbors. More...
|
|
|
std::vector< Eigen::Vector4d > | points |
| Points. More...
|
|
std::conditional_t< HasNormals, std::vector< Eigen::Vector4d >, Empty > | normals |
| Normals (Empty if HasNormals is false) More...
|
|
std::conditional_t< HasCovs, std::vector< Eigen::Matrix4d >, Empty > | covs |
| Covariances (Empty if HasCovs is false) More...
|
|
template<bool HasNormals = false, bool HasCovs = false>
struct small_gicp::FlatContainer< HasNormals, HasCovs >
Point container with a flat vector.
- Note
- IncrementalVoxelMap combined with FlastContainer is mostly the same as linear iVox. Bai et al., "Faster-LIO: Lightweight Tightly Coupled Lidar-Inertial Odometry Using Parallel Sparse Incremental Voxels", IEEE RA-L, 2022
-
This container stores only up to max_num_points_in_cell points and avoids insertings points that are too close to existing points (min_sq_dist_in_cell).
- Template Parameters
-
HasNormals | If true, store normals. |
HasCovs | If true, store covariances. |
◆ FlatContainer()
template<bool HasNormals = false, bool HasCovs = false>
◆ add()
template<bool HasNormals = false, bool HasCovs = false>
template<typename PointCloud >
Add a point to the container. If there is a point that is too close to the input point, or there are too many points in the cell, the input point will not be ignored.
- Parameters
-
setting | Setting |
transformed_pt | Transformed point (== T * points[i]) |
points | Point cloud |
i | Index of the point |
T | Transformation matrix |
◆ finalize()
template<bool HasNormals = false, bool HasCovs = false>
◆ knn_search() [1/2]
template<bool HasNormals = false, bool HasCovs = false>
size_t small_gicp::FlatContainer< HasNormals, HasCovs >::knn_search |
( |
const Eigen::Vector4d & |
pt, |
|
|
int |
k, |
|
|
size_t * |
k_indices, |
|
|
double * |
k_sq_dists |
|
) |
| const |
|
inline |
Find k nearest neighbors.
- Parameters
-
pt | Query point |
k | Number of neighbors |
k_index | Indices of nearest neighbors |
k_sq_dist | Squared distances to nearest neighbors (sorted in ascending order) |
- Returns
- Number of found points
◆ knn_search() [2/2]
template<bool HasNormals = false, bool HasCovs = false>
template<typename Result >
Find k nearest neighbors.
- Parameters
-
pt | Query point |
k | Number of neighbors |
k_index | Indices of nearest neighbors |
k_sq_dist | Squared distances to nearest neighbors (sorted in ascending order) |
- Returns
- Number of found points
◆ nearest_neighbor_search()
template<bool HasNormals = false, bool HasCovs = false>
size_t small_gicp::FlatContainer< HasNormals, HasCovs >::nearest_neighbor_search |
( |
const Eigen::Vector4d & |
pt, |
|
|
size_t * |
k_index, |
|
|
double * |
k_sq_dist |
|
) |
| const |
|
inline |
Find the nearest neighbor.
- Parameters
-
pt | Query point |
k_index | Index of the nearest neighbor |
k_sq_dist | Squared distance to the nearest neighbor |
- Returns
- Number of found points (0 or 1)
◆ size()
template<bool HasNormals = false, bool HasCovs = false>
◆ covs
template<bool HasNormals = false, bool HasCovs = false>
Covariances (Empty if HasCovs is false)
◆ normals
template<bool HasNormals = false, bool HasCovs = false>
Normals (Empty if HasNormals is false)
◆ points
template<bool HasNormals = false, bool HasCovs = false>
The documentation for this struct was generated from the following file: