Avoid rebuilding KD-trees
The goal is to avoid rebuilding KD-trees when its not necessary.
- In normal SLAM mode, the KD-tree is rebuilt only if a newframe has been added. Therefore, the same KDTree is used for all scans between 2 keyframes, as we expect all these scans to be similar and acquired from nearly the same pose. This behavior brings a common 10% speedup.
- In Localization only mode (
UpdateMap = false
): a KD-tree covering the entire map is built only once. This behavior leads to a common 20% speedup.
Edited by Nicolas Cadart