nanoflann: A Header-Only KD-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds
nanoflann:仅标头的 KD 树库,用于编译时乘积流形上的精确最近邻搜索
José Luis Blanco-Claraco · arXiv:2610.15215 · 2026-10-10 · cs.RO
最近邻 (NN) 搜索是无数机器人算法的基础,但许多状态空间不是欧几里德空间:方向位于 SO(2) 或 SO(3) 上,姿势位于 SE(2) 或 SE(3) 上,并且原始坐标上的欧几里德 KD 树返回错误的邻居。我们提出了一个仅头文件、无依赖的 C++ KD 树库,用于在编译时声明的用户定义的乘积流形上进行精确的 NN 搜索:该空间由具有单一类型别名的基本流形 (mathbb{R}n, SO(2), SO(3), Sn;乘积 SE(2), SE(3), tori) 组成,并且该库合成了一个其剪枝可证明的度量可接受的,循环坐标的环绕感知
中文为机器翻译节选,以英文原文为准。
English abstract
Nearest-neighbor (NN) search underlies countless robotics algorithms, but many state spaces are not Euclidean: orientations live on SO(2) or SO(3) and poses on SE(2) or SE(3), and a Euclidean KD-tree on their raw coordinates returns wrong neighbors. We present a header-only, dependency-free C++ KD-tree library for exact NN search on user-defined product manifolds declared at compile time: the space is composed from base manifolds (mathbb{R}n, SO(2), SO(3), Sn; products SE(2), SE(3), tori) with a single type alias, and the library synthesizes a metric whose pruning is provably admissible, wrap-aware for circular coordinates and double-cover-aware for unit quaternions. Experiments confirm exactness (recall 1.0 vs an exhaustive scan under the same product metric), where the Euclidean-on-raw shortcut collapses to recall approx 0.5m for m rotation blocks,…