mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-22 20:19:43 +00:00
Disconnect from camera
This commit is contained in:
@@ -133,6 +133,8 @@ class Reachy2Camera(Camera):
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
initialized_cameras.append(camera_info)
|
initialized_cameras.append(camera_info)
|
||||||
|
|
||||||
|
camera_manager.disconnect()
|
||||||
return initialized_cameras
|
return initialized_cameras
|
||||||
|
|
||||||
def read(self, color_mode: ColorMode | None = None) -> np.ndarray:
|
def read(self, color_mode: ColorMode | None = None) -> np.ndarray:
|
||||||
@@ -291,4 +293,7 @@ class Reachy2Camera(Camera):
|
|||||||
if self.thread is not None:
|
if self.thread is not None:
|
||||||
self._stop_read_thread()
|
self._stop_read_thread()
|
||||||
|
|
||||||
|
if self.cam_manager is not None:
|
||||||
|
self.cam_manager.disconnect()
|
||||||
|
|
||||||
logger.info(f"{self} disconnected.")
|
logger.info(f"{self} disconnected.")
|
||||||
|
|||||||
Reference in New Issue
Block a user