Introduction
In the field of robotics, particularly for LiDAR-based navigation and mapping, K-D trees serve as the fundamental data structure for nearest neighbor searches. These searches are critical for matching new sensor scans against an existing map. However, traditional K-D trees are static; they require a full rebuild whenever new data is added to maintain balance and search efficiency. As a robot explores larger environments, this rebuilding process becomes a significant computational bottleneck, often forcing a compromise between map update frequency and search accuracy.
The ikd-Tree addresses this challenge by providing a dynamic, incremental K-D tree that supports on-the-fly updates without sacrificing the search performance of a balanced static tree.
Methodology and Data Structure
The core innovation of the ikd-Tree lies in its ability to handle incremental updates—inserting and deleting single points or entire spatial "boxes"—while maintaining structural integrity through a dual-thread re-balancing mechanism.
Node Structure and Lazy Deletion
Unlike standard K-D trees, the ikd-Tree node includes additional metadata to support incremental operations. This includes flags for "lazy deletion," where nodes are marked as deleted rather than immediately removed, and range information for spatial queries.
The "lazy delete" strategy allows the system to avoid the immediate cost of restructuring the tree. Deleted nodes are only physically removed during a re-balancing phase, which is triggered when the tree exceeds specific imbalance thresholds (the $\alpha$-balanced and $\alpha$-deleted criteria).
Box-wise Operations
A key feature for robotics is the ability to perform operations on 3D volumes. The ikd-Tree can efficiently delete or re-insert all points within a specified box, which is essential for tasks like clearing dynamic obstacles or maintaining a sliding window of the environment.
Parallel Re-balancing
To ensure real-time performance, the ikd-Tree employs a dual-thread approach. When a sub-tree becomes unbalanced, it is rebuilt in a separate parallel thread. This allows the main navigation thread to continue querying the existing tree structure, preventing the "rebuild spikes" common in static implementations.
Evaluation and Results
The ikd-Tree was rigorously tested using both synthetic datasets and real-world LiDAR data integrated into the FAST-LIO framework.
Performance Benchmarks
In SLAM applications, the ikd-Tree demonstrated a nearly constant update time of approximately 1.6 ms. In contrast, the standard static K-D tree from the Point Cloud Library (PCL) exhibited linear growth in update time, exceeding 10 ms as the map size increased. Overall, the ikd-Tree consumed only 4% of the computation time required by state-of-the-art static implementations.
Robotics-Specific Features
The tree also integrates voxel-based down-sampling directly into its structure. By only keeping the point closest to the center of a specified voxel grid, the ikd-Tree manages point cloud density automatically, further reducing the computational load for downstream tasks.
Conclusion and Future Work
The ikd-Tree represents a significant advancement for real-time robotic mapping. By prioritizing incremental updates and parallel re-balancing, it removes a major bottleneck in LiDAR SLAM. While the extra metadata leads to a slightly higher memory footprint and individual queries may be marginally slower due to lazy flag checks, the overall system efficiency is vastly improved. Future work may explore further parallelization of search queries to leverage multi-core processors even more effectively.
Summary updated