-
-
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
PCLVisualizer point picking weirdness #3954
Comments
Not a definitive answer, but from my experience I have a feeling VTK (our underlying gfx library) does some sort of approximation/heuristics when deciding which actor/primitive was poked. So if you have something in foreground, but click on background near it, then you may get the coordinates of the foreground object. |
I did try removing anything else being drawn by the application other than the point cloud and still got occasionally completely incorrect coordinate values. |
Update: I hacked some code to use vtkWorldPointPicker instead of the vtkPointPicker used by PCL. With vtkWorldPointPicker, the coordinates are indeed coming out right. So, the bug seems to be with either vtkPointPicker or in PCL's use of it. I was motivated to try this out by some old discussions of bugs involving vtkPointPicker that turned up while searching online. |
@victoryc I am facing the same issue. Regarding your fix, did you modified the sourcecode of PCL to use vtkWorldPointPicker instead of vtkPointPick or you did something else? Have you created a stash/shelveset of the changes? Thanks. |
I am having the same issue where the x, y and z coordinates of the picked point do not even belong to my point cloud. |
I also am frequently confused by some points seemingly attracting the viewer, and being unable to pick the one actually under the cursor. Something in the foreground while picking background is a problem, but it even happens at other times. Currently I'm noticing this behaviour when the data in |
I am noticing a weird behavior with point picking in PCLVisualizer. For some clicks, it returns the correct x,y,z coordinates. But, some times, the returned coordinate values are not at all in the area I am clicking; they are way off. Any idea why this could be happening?
I don't expect this to be related to the NaN issue because (a) I am not using the point index in the PointPickingEvent. Instead, I am just using the x,y,z values provided by the getPoint method of the event. (b) The point cloud I am rendering doesn't have NaN values.
I did notice that whenever the returned coordinates are wrong, the corresponding point index in the PointPickingEvent is a single digit incorrect value such as 0, 1, 3 etc. But, as I said, I am not using the point index value.
Once in a while, it returns coordinate values so incorrect that the reported pick point is not even within the bounding box of the point cloud.
PCL version: 1.10.1 on Windows 10
Number of points in the cloud: About 4 million
Thanks.
The text was updated successfully, but these errors were encountered: