- I would recommend using PCLVisualizer for what you want to do.
It has non blocking rendering/update methods you can use.
- PCLVisualizar (and I assume CloudViewer is the same) are not
multithread safe, as you can see here.
My gut feeling was that the viewer and the main thread each have pointers to
the same point cloud and so the simply changing the points in the cloud in
the main thread should change it in the viewer on the next frame. It also
makes sense that it doesn't.
I'm going a little bit out of my comfort zone here but this
assumption might not exacly be true. A native vtk object is
generated with the point cloud data and I'm not fully sure if this
is indeed a copy or some wrapping mechanism around the PointCloud
data. Give it a try if it's quick, but I'm most sure that you
really need to invoke updatePointCloud() in order to
update that data that is being rendered.
Is there a nice simple way to get this asynchronous behaviour?