Skip to content

Commit

Permalink
make camera work and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
EricPedley committed Jun 25, 2024
1 parent 397b912 commit 163af08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions scripts/perception_clients/test_only_camera.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from uavf_2024.imaging import Camera
import time
import cv2 as cv
import os
from tqdm import tqdm

cam = Camera()
cam.start_recording()

cam.setAbsoluteZoom(1)
cam.request_center()
Expand All @@ -17,5 +19,8 @@
img = cam.get_latest_image()
if img is not None:
img.save(f"snapshots/img_{i}.jpg")
else:
print("image is none")
time.sleep(0.1)

cam.disconnect()
3 changes: 2 additions & 1 deletion uavf_2024/imaging/camera_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from pathlib import Path
import threading
import time
from siyi_sdk import MockSIYISTREAM as SIYISTREAM, MockSIYISDK as SIYISDK
# from siyi_sdk import MockSIYISTREAM as SIYISTREAM, MockSIYISDK as SIYISDK
from siyi_sdk import SIYISTREAM, SIYISDK
from uavf_2024.imaging.imaging_types import Image, HWC
from scipy.spatial.transform import Rotation
import numpy as np
Expand Down

0 comments on commit 163af08

Please sign in to comment.