-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Convert test to benchmark (radius search) #5851
Conversation
|
@mvieth, I've made the changes you suggested in the previous comments:
The strange thing is that build formatting ran successfully for c16fd5c, but the regular build failed because I hadn't pushed the change in the benchmark's name ( However, in the subsequent commit (8834f04) and the latest one, the build formatting failed again. I tried running different shell commands mentioned in the comments of this script like I apologize for any inconvenience related to the multiple commits. I also apologize asking so many doubts in a Thank you for your assistance. |
I am not sure why |
@mvieth , I RAN the make_format code PROPERLY NOW,
So, I commented this line, and ran this code, it modified multiple files EXCEPT THE CHANGED .LANG_FORMAT, and I pushed the modified files, but still, the formatting code did not run. Could you suggest on how to fix this error, as by commenting it, the build_formatting didn't run |
Which version of clang-format are you using? You need at least version 12, because older versions do not understand |
@Zekrom-7780 Hi, I just wanted to ask whether you are still working on this pull request? Was my last comment helpful? |
@mvieth , I'm working on this issue, my college became pretty hectic for the last month |
@mvieth , the changes are made, updated So Sorry for all the trouble! |
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.
Can I take another issue up as well?
Since I've understood how to do this?
Sure, go ahead. If you would like my opinion on which issues are high priority, I am happy to suggest some 🙂
benchmarks/CMakeLists.txt
Outdated
@@ -25,3 +25,8 @@ PCL_ADD_BENCHMARK(filters_voxel_grid FILES filters/voxel_grid.cpp | |||
ARGUMENTS "${PCL_SOURCE_DIR}/test/table_scene_mug_stereo_textured.pcd" | |||
"${PCL_SOURCE_DIR}/test/milk_cartoon_all_small_clorox.pcd") | |||
|
|||
PCL_ADD_BENCHMARK(search_radius_search FILES search/radius_search.cpp | |||
LINK_WITH pcl_io pcl_search pcl_features |
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.
LINK_WITH pcl_io pcl_search pcl_features | |
LINK_WITH pcl_io pcl_search |
Linking the features lib should not be necessary here?
benchmarks/search/radius_search.cpp
Outdated
std::vector<int> k_indices; | ||
std::vector<float> k_sqr_distances; | ||
|
||
auto check_time = benchmark::Now(); |
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.
The compiler doesn't know benchmark::Now()
. Unless you have a better idea, I would suggest to simply use the default/automatic way and measure the duration of all functions in the for
loop.
benchmarks/search/radius_search.cpp
Outdated
for (auto _ : state) { | ||
organizedNeighborSearch.setInputCloud(cloudIn); | ||
|
||
int randomIdx = rand() % cloudIn->size(); |
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.
Wouldn't it make sense to use a set of fixed indexes and radiies?
Not sure if these rands can make it difficult to compare etc?
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.
Yeah, that is a good point. Random indices would at least add more noise in the time measurements, so that more iterations are necessary to reach a stable result. Alternatively, we could simply use every point from the input cloud once as the search point, and a fixed radius for all searches, e.g. 0.1 or 0.05?
Here are some issues that have, in my opinion, a nice and clear task description:
|
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 am fine with the proposed changes. Thanks!
what should I do in this PR?
All the checks have passed here
If Lars has any additional suggestions or requests, please address them, otherwise you are done here 😄 We will merge this pull request when we both approved
feature: Added benchmark for OrganizedNeighborSearch
Converted the existing test code for OrganizedNeighborSearch into a proper benchmark.
#4718 (comment) This benchmark measures the time needed for setInputCloud and radiusSearch operations with an organized point cloud. The brute force search part has been removed as it is not needed.
Should solve Issue 4718
Soo Sorry that I wasn't able to rebase the multiple commits into a single one