Open LHRaceIng opened 2 years ago
Try taking the pcl = o3d.geometry.PointCloud()
and the vis.add_geometry(pcl)
outside the while loop; execute them before the while loop. Let the while loop be only for updating the pointcloud. Also, which version of Python are you using?
Checklist
master
branch).My Question
Hi everyone, I am trying to display a constantly updating point cloud with the non-blocking open3d visualizer. For this I am using the following code, which I copied and modified from Carla video tutorials-An in depth look at CARLA's sensors -CODE :
This works just fine if I run this code on a single process/ main thread. However, since my program is getting more complex I need to use multiprocessing/ multithreading. The general structure consists of two processes p1 and p2 running in parallel where p1 is creating the point cloud and p2 is used to visualize it. On p2 there are multiple threads running since it not only displays the PCL but as well image data using OpenCV. Now I run into the problem that the visualization gets stuck, only displaying the very first instance of the point cloud received in the first timestep without updating. If I substitute vis.update_geometry(pcl) with vis.add_geometry(pcl) it just adds a new point cloud every timestep (without deleting the prior one). So, I am certain that I am receiving the updated point cloud, it just fails to update the visualizer and delete the old one. I already read in other issues (#1791, #389) that using the visualizer in multithreaded/ multiprocessor applications is somewhat problematic. However, I was not able to fix my problem with the solutions mentioned there. I am not very familiar with multiprocessor applications so I am grateful for any help. Thanks in advance.