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

support arbitrary search method in fast_gicp #120

Merged
merged 9 commits into from
Oct 1, 2023

Conversation

themightyoarfish
Copy link
Contributor

@themightyoarfish themightyoarfish commented Mar 23, 2023

There is nothing in the code that assumes more than the pcl::search::Search interface of the search objects. So one might use others such as OrganizedNeighbor which is much faster for organized clouds.

The code distinguishes between source and target methods, but since swap() is called on their pointers, I think in practice only PointSource == PointTarget is supported.

@themightyoarfish themightyoarfish changed the title support arbitrary search method in fast_gicp. de facto will only work… support arbitrary search method in fast_gicp Mar 23, 2023
@koide3
Copy link
Owner

koide3 commented Mar 24, 2023

Thanks for your PR! I think this functionality is reasonable and nice. I'll take a quick look at the updates.

CMakeLists.txt Outdated
else()
add_definitions(-msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2)
set(CMAKE_C_FLAGS "-msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")
set(CMAKE_CXX_FLAGS "-msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")
set(CMAKE_C_FLAGS "-msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -march=native")
Copy link
Owner

Choose a reason for hiding this comment

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

Because PCL installed via apt-get causes segfaults with march=native (Possibly, the CI failure is caused by this flag), I would like to make this optional like:
https://github.com/koide3/ndt_omp/blob/0852c95360d1b0d29745e7eae7a57c0950de695b/CMakeLists.txt#L7

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually i think we should use PCL_DEFINITIONS here instead of manually specifying any flags, as any PCL client project has to be compiled with the same flags to prevent such crashes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added that in 672e71f

src/align.cpp Outdated Show resolved Hide resolved
src/align.cpp Outdated Show resolved Hide resolved
src/align.cpp Outdated Show resolved Hide resolved
@themightyoarfish
Copy link
Contributor Author

I've restored align.cpp and added the SMID flags based on PCL, which I believe is necessary as you don't know how the user installed PCL.

I also realized that OrganizedNeighbour does not in fact work for all organized point clouds, but just for image-like ones such as from depth cameras. Still useful to have this templated though I think, hopefully some day PCL will add an organized search method for rotating LIDARs.

@koide3
Copy link
Owner

koide3 commented Oct 1, 2023

Thanks a lot for your contribution. All changes look good now. I'll merge this PR once the small conflict caused by #134 is resolved.

@themightyoarfish
Copy link
Contributor Author

Fixed.

@koide3
Copy link
Owner

koide3 commented Oct 1, 2023

Thank you a lot!

@koide3 koide3 merged commit 6d99a9c into koide3:master Oct 1, 2023
7 checks passed
@themightyoarfish themightyoarfish deleted the template-search-method branch October 1, 2023 14:50
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.

2 participants