-
Notifications
You must be signed in to change notification settings - Fork 354
Minor modifications for better usuability #184
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
Changes from 8 commits
6fdd962
3702c72
de7a6ae
e4375d9
6f98c3b
e71de4d
a1a0ec9
7275ee8
e33d700
0383de1
6b60fdb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ teaser::FPFHCloudPtr teaser::FPFHEstimation::computeFPFHFeatures( | |
const teaser::PointCloud& input_cloud, double normal_search_radius, double fpfh_search_radius) { | ||
|
||
// Intermediate variables | ||
pcl::PointCloud<pcl::Normal>::Ptr normals(new pcl::PointCloud<pcl::Normal>); | ||
teaser::FPFHCloudPtr descriptors(new pcl::PointCloud<pcl::FPFHSignature33>()); | ||
pcl::PointCloud<pcl::PointXYZ>::Ptr pcl_input_cloud(new pcl::PointCloud<pcl::PointXYZ>); | ||
for (auto& i : input_cloud) { | ||
|
@@ -25,16 +24,17 @@ teaser::FPFHCloudPtr teaser::FPFHEstimation::computeFPFHFeatures( | |
} | ||
|
||
// Estimate normals | ||
pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> normalEstimation; | ||
normals_->clear(); | ||
pcl::NormalEstimationOMP<pcl::PointXYZ, pcl::Normal> normalEstimation; | ||
normalEstimation.setInputCloud(pcl_input_cloud); | ||
normalEstimation.setRadiusSearch(normal_search_radius); | ||
pcl::search::KdTree<pcl::PointXYZ>::Ptr kdtree(new pcl::search::KdTree<pcl::PointXYZ>); | ||
normalEstimation.setSearchMethod(kdtree); | ||
normalEstimation.compute(*normals); | ||
normalEstimation.compute(*normals_); | ||
|
||
// Estimate FPFH | ||
setInputCloud(pcl_input_cloud); | ||
setInputNormals(normals); | ||
setInputNormals(normals_); | ||
setSearchMethod(kdtree); | ||
setRadiusSearch(fpfh_search_radius); | ||
compute(*descriptors); | ||
|
@@ -59,3 +59,5 @@ void teaser::FPFHEstimation::compute(pcl::PointCloud<pcl::FPFHSignature33>& outp | |
fpfh_estimation_->compute(output_cloud); | ||
} | ||
void teaser::FPFHEstimation::setRadiusSearch(double r) { fpfh_estimation_->setRadiusSearch(r); } | ||
|
||
pcl::PointCloud<pcl::Normal> teaser::FPFHEstimation::getNormals() { return *normals_; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need to add a new line at the end of the file (I think clang format can do this automatically?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, there's
option. May I add that option to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But I've noticed that other files also have no blank line; could you tell me why the new line at the end is needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes about clang format. If the other files do not have newline character at the end, then we should also add them. See https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this header always there? Will there be any PCL installation that does not have this header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I double-checked it, and I found that it is stabilized since PCL 1.8 version as follow:
https://github.com/PointCloudLibrary/pcl/releases/tag/pcl-1.8.1
Thus, I think it's fine because in our CMakelLists.txt, we mention "1.8" version when finding the package.
In addition, until the latest version (1.14), the PCL library still supports
normal_3d_omp
as follows:https://pcl-docs.readthedocs.io/en/latest/api/program_listing_file_pcl_features_include_pcl_features_normal_3d_omp.h.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍