Feature/use kd tree for landmark map search - #579
Open
PaulVerhoeckx wants to merge 7 commits into
Open
Conversation
Signed-off-by: Paul Verhoeckx <paul.verhoeckx@nobleo.nl>
Signed-off-by: Paul Verhoeckx <paul.verhoeckx@nobleo.nl>
Signed-off-by: Paul Verhoeckx <paul.verhoeckx@nobleo.nl>
Signed-off-by: Paul Verhoeckx <paul.verhoeckx@nobleo.nl>
PaulVerhoeckx
force-pushed
the
feature/use-kd-tree-for-landmark-map-search
branch
from
August 19, 2026 09:51
4ce4fb8 to
2c0a8aa
Compare
Signed-off-by: Paul Verhoeckx <paul.verhoeckx@nobleo.nl>
Signed-off-by: Paul Verhoeckx <paul.verhoeckx@nobleo.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Implement efficient nearest-neighbor landmark search using per-category KD-trees with nanoflann. Provides O(log n) spatial queries instead of O(n) linear search for position-based landmark matching.
Tested for a particle filter with:
This reduced the filter update time from 1.4 seconds to 0.005 seconds. (12th Gen Intel® Core™ i7-1255U × 12)
Changes
find_nearest_landmark()using KD-tree queries for efficient position-based matchingType of change
Checklist
Put an
xin the boxes that apply. This is simply a reminder of what we will require before merging your code.Additional comments
Note on
find_closest_bearing_landmark()implementation:This method currently uses O(n) linear search instead of the KD-tree indices because bearing-based matching requires angular distance metrics, which are fundamentally incompatible with the Euclidean L2 distance metric used by the position-based KD-trees.