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
voxelGrid filter in PCL 1.8.1 produces slightly different coordinates than in PCL 1.7.2 #2375
Comments
The library evolves and the implementations change. There is no guarantee or commitment that different versions should output exactly the same values. You admit that the differences are "somewhat small". Why does this bother you then? |
Thanks, that's good to know. I looked through the change-log, and did not find anything on the voxel grid filter - though I might have overlooked something - and thought that this change in behaviour might be unintended. So I posted this here :)
Well relatively speaking. It seems to be in the area of 1*10^-6... but it is enough, that the code of my project behaves significantly different. Btw: You can check out the point coordinates, I uploaded the filtered clouds in those repos.
Since you asked: For my masters thesis I am extending an existing code-framework, which originally uses ROS indigo with PCL 1.7.2, and part of its function is to downsample pointclouds. Subsequently, the downsampled cloud's diameter is approximated, and used for an object detection algorithm. Now, for my extensions of the original code, I'd like to use the CUDA support of PCL 1.8.1. But switching to 1.8.1 causes slightly different downsampling results, which in turn lead to slightly different cloud diameters. Furthermore, the slight differences in the point coordinates don't only influence the cloud diameter, but also cause differing quantization-results when I quantize the distance between two points in distinct steps. All in all, those differences yield significantly different recognition rates. :-/ |
I'd say it's a pretty bad sign if variations on the level of machine precision cause the behavior of your code to deviate significantly.
I might be wrong, but I think there were no significant new additions to CUDA support for a very long while. Are you sure 1.7.2 does not provide the functions you need?
I think it's absolutely fair to compare to the results that the original algorithm outputs now, with slightly different downsampling. So I wouldn't be too much concerned about reproducing the exact recognition rate the authors reported. (What if they had a randomized algorithm and through excessive experimentation found a seed that gives a high recognition rate on a particular dataset? You don't have to use that same seed!) |
Closing this since we are not going to revert |
Your Environment
Context
I'm loading .ply and .pcd files and apply the voxelGrid filter onto them. Doing simple downsampling. Both PCL versions should yield the same downsampled point clouds.
Expected Behavior
The filter should behave the same in both PCL versions, i.e. resulting in the same points.
Current Behavior
I filtered the same point cloud with both PCL versions, but some of the resulting points differ in their x,y,z-coordinates. The differences are somewhat small. When visualizing both downsampled point clouds within the same pcl_viewer, i.e. overlaying them, one can not really see the difference. (see screenshot of the result in my git repository)
Code to Reproduce
You need a system with ROS Indigo. And PCL 1.8.1 installed as 'standalone' on the same system as well. Such that you can use both: ROS_PCL and PCL 1.8
Then follow the steps from the following repos, I created specifically for this bug report:
https://github.com/philRudd69/voxelGrid_filter_PCL_1.8
https://github.com/philRudd69/voxelGrid_filter_PCL_1.7
Possible Solution
The text was updated successfully, but these errors were encountered: