The hierarchical model of metric maps

1. About maps in the MRPT

All metric maps have a common interface to ease polymorphism and generic programming. To see these common methods, refer to the C++ class CMetricMap. All the map classes are within the namespace mrpt::slam, which is omitted here for readability.
See also the documentation of the library mrpt-maps.

To ease even more the implementation of generic algorithms, there exists one very important kind of map, the multi-metric map.
This class offers the interface of a normal metric map, but it holds internally an arbitrary number of other metric maps.

To realize of the power and simplicity of this approach, imagine programming a method which insert scans from 3 laser range finders into a 3D point map (so, a point cloud is built incrementally).
By just replacing the point map by a multi-metric map, we can now build the point cloud and, at our choice, three occupancy grid maps, once for each height. The original code would need no changes at all.

This is the reason of calling the MRPT map model “hierarchical”, in the sense that one map (the “multi-metric map”) propagates all the calls to the “child maps”.

2. The maps

2.1. The generic map container: “Multi-metric map”

See the reference for CMultiMetricMap.

2.2. Beacon maps

A map of 3D beacons with an ID, used for range-only localization and SLAM.

See the reference for CBeaconMap.

2.3. 2D gas concentration maps

A planar lattice of gas concentrations, used for gas concentration mapping.

See the reference for CGasConcentrationGridMap2D.

2.4. 2D Height (or elevation) maps

A lattice where each cells keep the average elevation (”z” coordinate) of the points sensed within its square area.

See the reference for CHeightGridMap2D.

2.5. Landmark maps

A set of 3D landmarks with IDs and a 3D Gaussian distribution for its position. Used mainly for visual SLAM.

See the reference for CLandmarksMap.

2.6. Occupancy grid maps

A planar occupancy grid map. See this page for more details on its implementation and offered operations. It is used in many SLAM and particle filter-based localization programs.

See the reference for COccupancyGridMap2D.

2.7. Point maps

A virtual class for maps of 2D or 3D points. It implements efficient look-up methods based on KD-trees (see CPointsMap::kdTreeClosestPoint3D).

Point maps use mrpt::math::KDTreeCapable to provide efficient KDTree-based search of points in either 2D or 3D. There are plans to also implement QuadTrees and OctTrees.

See the reference for CPointsMap.

2.7.1. Simple point maps

A type of point map where each point only have (x,y,z) coordinates.

See the reference for CSimplePointsMap.

2.7.2. Colored point maps

A type of point map where each point have (x,y,z) coordinates, plus RGB color data.

See the reference for CColouredPointsMap.

3. Configuration block for a multi-metric map

Typically, all the parameters to configure a multi-metric map can be loaded from a INI-like configuration file
(or any other textual input, such as an input box in a GUI). Of course, they can be also hard-coded.

The key structure here is TSetOfMetricMapInitializers.

The format of the configuration files will be always explained and up-to-date in TSetOfMetricMapInitializers::loadFromConfigFile.

For practical examples, refer to the .ini files in MRPT/share/mrpt/config_files/*-slam [Examples for icp-slam, rbpf-slam].