I am running pcl 1.8 and having trouble getting correct cloud normals from PointXYZ. The resultant normals are always vertical (within floating point error, probably). The curvature is consistently 0. Attached is a sample point cloud and the script I am using for normal estimation. I have tried many point clouds and radii, but keep experiencing the same problem. My method is very similar to that of the example in the docs. Is there an obvious reason why my normal estimation is not performing?
Thanks in advance
EDIT: I have tried the normal_estimation.cpp tool that is provided with PCL and get similarly bad results.
I have some updates, which might prove useful in finding the source of the error.
I have tried a normal calculation on single individual points using pcl::computePointNormal and am getting the same result -- the normal is consistently vertical (first image).
I then made a local transform to put the points near the origin <0,0,0> rather than far out in space ~<536000, 7358000, 115> and I get the correct normals (second image).
So the translation towards the origin gives me a solution for now, though it remains an undesirable one. Hopefully the solution suggested by gcasey on GitHub can be pulled into the trunk soon (pull 1407).
Bad normal when points are far from the origin
Good normal when points are close to the origin