[Documentation] [TitleIndex] [WordIndex

This package implements the NDT data structure. Several options for constructing an NDT map are available.


For detailed documentation of the API, please refer to the doxygen generated documentation. The main class of interest is NDTMap, which provides several methods of constructing an NDT, given a point cloud of the environment. A sample node that generates and saves NDT maps is also provided.

Spatial Indexing

NDT maps can be created either using a regular grid data structure (LazyGrid) or using an irregular grid (OcTree). The recommended mode is to use LazyGrid, as most of the subsequent algorithms have been optimized for that data structure.

NDT Cell

Each cell in the NDT map is stored as an NDTCell object, which stores the mean and covariance of the point distribution in the cell. Points used for computing the distribution are deleted after the cell is created. Several update methods are available for adapting to new measurements in the cell.

Class API and usage

An example of how to create an NDT map from a point cloud:

   1 #include <ndt_map.h>
   2 #include <lazy_grid.h>
   3 #include <pcl/point_cloud.h>
   5 int main() {
   6     //creates an empty grid with a resolution of 0.2 meters
   7     lslgeneric::LazyGrid<pcl::PointXYZ> grid(0.2);
   8     //the grid is only used as a prototype by the map
   9     //which will allocate a new empty grid
  10     lslgeneric::NDTMap<pcl::PointXYZ> nd(&grid);
  11     //create a pcl point cloud (and load data)
  12     pcl::PointCloud<pcl::PointXYZ> cloud;
  13     //load the point cloud in the ndt map, allocates memory for the grid 
  14     nd.loadPointCloud(cloud);
  15     //computes the distributions in each cell and deletes the points
  16     nd.computeNDTCells();
  17     //do something with the map ...
  18 }


2024-07-06 13:16