Skip to content

Commit 1636b72

Browse files
committed
relaxing open3d version requirement
1 parent 8905953 commit 1636b72

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

client/python/projectairsim/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies = [
3636
"jsonlines",
3737
"Shapely",
3838
"azure-storage-blob",
39-
"open3d==0.16.*"
39+
"open3d>=0.16.0"
4040
]
4141

4242
[project.optional-dependencies]

client/python/projectairsim/src/projectairsim/lidar_utils.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def __init__(self):
2424
class SetViewBoundsRequest:
2525
"""Class for requesting the display loop recalculate the view bounds"""
2626

27-
def __init__(self):
28-
pass
27+
def __init__(self, view_bounds):
28+
self.view_bounds = view_bounds
2929

3030
class ViewChangeRequest:
3131
"""Class for making a view change request to the display loop"""
@@ -96,7 +96,7 @@ def __init__(
9696
if (view == self.VIEW_CUSTOM) and (
9797
not lookat_xyz or not view_front or not view_up
9898
):
99-
raise ArgumentError(
99+
raise ValueError(
100100
"LidarDisplay: View is VIEW_CUSTOM but one or more of lookat_xyz,"
101101
" view_front, or view_up arguments are missing"
102102
)
@@ -116,7 +116,7 @@ def __init__(
116116
self.PLASMA_PALLETE.shape[0],
117117
)
118118
else:
119-
raise ArgumentError("LidarDisplay: Invalid color_intensity_range")
119+
raise ValueError("LidarDisplay: Invalid color_intensity_range")
120120

121121
def set_view_preset(self, view: int, lookat_xyz=None):
122122
if view == self.VIEW_TOPDOWN:
@@ -138,11 +138,11 @@ def set_view_preset(self, view: int, lookat_xyz=None):
138138
self.lookat_xyz = [0.0, 0.0, 5.0] if not lookat_xyz else lookat_xyz
139139
self.view = view
140140
elif view == self.VIEW_CUSTOM:
141-
raise ArgumentError(
141+
raise ValueError(
142142
"VIEW_CUSTOM is not valid here--call set_view_custom() instead"
143143
)
144144
else:
145-
raise ArgumentError(f"Unrecognized preset view ID {view}")
145+
raise ValueError(f"Unrecognized preset view ID {view}")
146146

147147
if self.running:
148148
self.control_q.put(
@@ -366,13 +366,16 @@ def display_loop(self):
366366
self.set_view()
367367

368368
# Do Open3D processing
369-
self.o3d_vis.poll_events()
370-
self.o3d_vis.update_renderer()
369+
if self.window_created:
370+
self.o3d_vis.poll_events()
371+
self.o3d_vis.update_renderer()
371372

372373
except KeyboardInterrupt:
373374
pass # Just exit normally
374375

375376
finally:
377+
if self.window_created:
378+
self.o3d_vis.destroy_window()
376379
self.window_created = False
377380

378381
def receive(self, lidar_data):

0 commit comments

Comments
 (0)