diff --git a/scripts/perception_clients/test_only_camera.py b/scripts/perception_clients/test_only_camera.py index a89ccadd..8f1e3004 100644 --- a/scripts/perception_clients/test_only_camera.py +++ b/scripts/perception_clients/test_only_camera.py @@ -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() @@ -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() diff --git a/uavf_2024/imaging/camera_control.py b/uavf_2024/imaging/camera_control.py index 76c713c0..9daf0354 100644 --- a/uavf_2024/imaging/camera_control.py +++ b/uavf_2024/imaging/camera_control.py @@ -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