Using the ScanMatching (ICP) module in RawLogViewer

The “ScanMatching” module within RawLogViewer can be used to try the performance of the ICP algorithms as the parameters are changed, which is interesting to parameter tuning or just for didactic and teaching purposes.

Basically, this module takes two sensory frames mrpt::obs::CSensoryFrame or two single observations mrpt::obs::CObservation, builds a pointcloud from each of them, and then run mrpt::slam::CICP on them.

Experiments with videos

Note that in the “animate” mode the execution of ICP is intentionally carried out more slowly to ease the step-by-step visualization, though the normal operation usually takes just a few milliseconds.

In this first experiment we can see how the threshold value for the maximum distance for establishing a correspondence between the two maps strongly limits the attainable adjustment that the ICP algorithm can perform from the initial position: in a first trial, a threshold of 0.75m is not enough to lead the algorithm to convergence, but it does quickly by changing the threshold to 2.5m.

This second video demonstrates the two reference maps that our ICP implementation can handle: a map of points, or a grid map. In this later case, correspondences are established by matching laser points to occupied cells in the grid.


Finally, this video shows ICP for two Velodyne VLP16 scans: