Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move NN search back to the VoxelHashMap #388

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

tizianoGuadagnino
Copy link
Collaborator

@tizianoGuadagnino tizianoGuadagnino commented Aug 8, 2024

I simply moved the functions related to the Nearest Neighbor search from Registration to VoxelHashMap, as this is the data structure that is used to compute the neighbors. This allows other people to use our same strategy of NN search without copy-pasting code from an unnamed namespace. I know that this is something we did a long time ago, but I changed my mind, and this makes much more sense, as now you can use our NN search decoupled from the registration module. Of course, performances are completely unaffected, as I can show here.

comparison

Ps: this change is propedeutic (io non parlo inglese) to a slightly more significant change that will remove a useless copy of points from the voxels during the NN search.

Related PRs

This PR basically shadows what we did in #290 when we refactored a bit the system to support different number of threads in #252

@tizianoGuadagnino tizianoGuadagnino changed the title Now we can search neighbors from the voxel hash Move NN search back to the VoxelHashMap Aug 8, 2024
@nachovizzo
Copy link
Collaborator

I can see us in 3 months going back to the old implementation. I guess we changed this five times already 😛 haha

Depending on how I wake up, I believe there is no optimal place for this function. I love or hate this change, so let's take it!

This is also a follow-up on #290 (comment)

I linked the related PR #290 in the description

nachovizzo
nachovizzo previously approved these changes Aug 8, 2024
Copy link
Collaborator

@nachovizzo nachovizzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

cpp/kiss_icp/core/VoxelHashMap.cpp Show resolved Hide resolved
cpp/kiss_icp/core/VoxelHashMap.cpp Outdated Show resolved Hide resolved
Co-authored-by: Ignacio Vizzo <[email protected]>
cpp/kiss_icp/core/VoxelHashMap.cpp Show resolved Hide resolved
@tizianoGuadagnino tizianoGuadagnino merged commit 624e46e into main Aug 8, 2024
19 checks passed
@tizianoGuadagnino tizianoGuadagnino deleted the tiziano/move_nn_where_it_belongs branch August 8, 2024 11:54
tizianoGuadagnino added a commit that referenced this pull request Aug 8, 2024
* Now we can search neighbors from the voxel hash

* Integrate Nacho's Comment

Co-authored-by: Ignacio Vizzo <[email protected]>

---------

Co-authored-by: Ignacio Vizzo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants