We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7aa3364 + 4971f5e commit 21d4931Copy full SHA for 21d4931
sr/robot3/simulator/camera.py
@@ -1,3 +1,4 @@
1
+import atexit
2
import struct
3
4
import cv2
@@ -39,6 +40,8 @@ def __init__(self, camera_info: BoardInfo) -> None:
39
40
self.image_size = tuple(map(int, response.split(b":")))
41
assert len(self.image_size) == 2, f"Invalid image dimensions: {self.image_size}"
42
43
+ atexit.register(self.close)
44
+
45
def read(self, fresh: bool = True) -> NDArray:
46
"""
47
The method for getting a new frame.
0 commit comments