diff --git a/airo-camera-toolkit/airo_camera_toolkit/cameras/opencv_videocapture/opencv_videocapture.py b/airo-camera-toolkit/airo_camera_toolkit/cameras/opencv_videocapture/opencv_videocapture.py index 7d30840..af09b3e 100644 --- a/airo-camera-toolkit/airo_camera_toolkit/cameras/opencv_videocapture/opencv_videocapture.py +++ b/airo-camera-toolkit/airo_camera_toolkit/cameras/opencv_videocapture/opencv_videocapture.py @@ -79,8 +79,8 @@ def intrinsics_matrix(self) -> CameraIntrinsicsMatrixType: def _grab_images(self) -> None: ret, image = self.video_capture.read() - if not ret: - raise RuntimeError("Can't receive frame (stream end?). Exiting...") + if not ret: # When streaming a video, we will at some point reach the end. + raise EOFError("Can't receive frame (stream end?). Exiting...") self._frame = image