We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec0927c commit d0da85fCopy full SHA for d0da85f
src/modules/imaging/camera.py
@@ -27,7 +27,7 @@ def capture(self) -> Image.Image:
27
# Should be implemented by deriving classes.
28
raise NotImplementedError()
29
30
- def caputure_to(self, path: str | pathlib.Path):
+ def capture_to(self, path: str | pathlib.Path):
31
"""
32
Captures a single image and saves it to `path`.
33
src/sim_scripts/gazebo_camera_test.py
@@ -1,5 +1,13 @@
1
from src.modules.imaging.camera import GazeboCamera
2
+import os
3
+
4
5
cam = GazeboCamera()
6
-cam.show_images()
7
+os.makedirs("tmp/log", exist_ok=True)
8
+dirs = os.listdir("tmp/log")
9
+ft_num = len(dirs)
10
+os.makedirs(f"tmp/log/{ft_num}") # no exist_ok bc. this folder should be new
11
12
13
+cam.capture_to(f"tmp/log/{ft_num}/gazebocamera.png")
0 commit comments