We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1636b72 commit e3d72ffCopy full SHA for e3d72ff
client/python/projectairsim/src/projectairsim/lidar_utils.py
@@ -1,5 +1,6 @@
1
from argparse import ArgumentError
2
import multiprocessing as mp
3
+import time
4
5
import numpy as np
6
import open3d as o3d
@@ -367,9 +368,15 @@ def display_loop(self):
367
368
369
# Do Open3D processing
370
if self.window_created:
- self.o3d_vis.poll_events()
371
+ # check if window is still open
372
+ if not self.o3d_vis.poll_events():
373
+ self.running = False
374
+ break
375
self.o3d_vis.update_renderer()
376
377
+ # Cap frame rate to reduce CPU usage and avoid issues with DWM/WGL on Windows
378
+ time.sleep(0.01)
379
+
380
except KeyboardInterrupt:
381
pass # Just exit normally
382
0 commit comments