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

Fix a bug in removed index extraction in UniformSampling #3323

Merged

Conversation

taketwo
Copy link
Member

@taketwo taketwo commented Sep 3, 2019

This PR fixes a bug in removed index extraction in UniformSampling. Points that were removed due to large distance to existing leaf were not recorded in the removed_indices_ vector. This was overlooked in #1902.

There were no unit tests at all for UniformSampling, so I added a new one that covers the functionality that this PR fixes.

Closes #2022

Copy link
Member

@SergioRAgostinho SergioRAgostinho left a comment

Choose a reason for hiding this comment

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

LGTM. I still need to investigate the connection between this PR and #2022

It's the same. Just found this. #2022 (comment)

I went digging for the issue myself and found the bug. The issue was that we were not adding the points in the condition that their distance was bigger than the one for the index already stored on the leaf. The snippet below should help to clarify my lousy explanation. Your tests (thank you for writing them btw), are running green.

@SergioRAgostinho SergioRAgostinho merged commit bb1abaf into PointCloudLibrary:master Sep 16, 2019
@taketwo taketwo deleted the fix-uniform-sampling branch September 17, 2019 09:24
@taketwo
Copy link
Member Author

taketwo commented Sep 17, 2019

Oh, I completely forgot about that PR. Should have merged it two years ago! But instead kept the bug open, bumped into it, and wasted time re-implementing the same fix. This is really embarrassing 😞

@wannesvanloock
Copy link
Contributor

Great. Sorry for not following up two years ago 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants