using only teleop camera for now

This commit is contained in:
apirrone 2024-11-26 10:44:28 +01:00
parent 81fadfb569
commit b0d05080e0
3 changed files with 18 additions and 14 deletions

View File

@ -70,9 +70,11 @@ class ReachyCamera:
if self.name == "teleop" and hasattr(self.cam_manager, "teleop"):
if self.image_type == "left":
return self.cam_manager.teleop.get_compressed_frame(CameraView.LEFT)
return self.cam_manager.teleop.get_frame(CameraView.LEFT)
# return self.cam_manager.teleop.get_compressed_frame(CameraView.LEFT)
elif self.image_type == "right":
return self.cam_manager.teleop.get_compressed_frame(CameraView.RIGHT)
return self.cam_manager.teleop.get_frame(CameraView.RIGHT)
# return self.cam_manager.teleop.get_compressed_frame(CameraView.RIGHT)
else:
return None
elif self.name == "depth" and hasattr(self.cam_manager, "depth"):
@ -80,7 +82,8 @@ class ReachyCamera:
if self.image_type == "depth":
return self.cam_manager.depth.get_depth_frame()
elif self.image_type == "rgb":
return self.cam_manager.depth.get_compressed_frame()
return self.cam_manager.depth.get_frame()
# return self.cam_manager.depth.get_compressed_frame()
else:
return None
return None

View File

@ -25,12 +25,13 @@ from reachy2_sdk import ReachySDK
from lerobot.common.robot_devices.cameras.utils import Camera
@dataclass
class ReachyRobotConfig:
robot_type: str | None = "Reachy2"
cameras: dict[str, Camera] = field(default_factory=lambda: {})
# ip_address: str | None = "172.17.135.207"
ip_address: str | None = "localhost"
ip_address: str | None = "172.17.135.207"
# ip_address: str | None = "localhost"
class ReachyRobot:

View File

@ -13,8 +13,8 @@ cameras:
head_left:
_target_: lerobot.common.robot_devices.cameras.reachy2.ReachyCamera
name: teleop
# host: 172.17.135.207
host: localhost
host: 172.17.135.207
# host: localhost
port: 50065
image_type: left
# head_right:
@ -23,13 +23,13 @@ cameras:
# host: 172.17.135.207
# port: 50065
# image_type: right
torso_rgb:
_target_: lerobot.common.robot_devices.cameras.reachy2.ReachyCamera
name: depth
# host: 172.17.135.207
host: localhost
port: 50065
image_type: rgb
# torso_rgb:
# _target_: lerobot.common.robot_devices.cameras.reachy2.ReachyCamera
# name: depth
# host: 172.17.135.207
# # host: localhost
# port: 50065
# image_type: rgb
# torso_depth:
# _target_: lerobot.common.robot_devices.cameras.reachy2.ReachyCamera
# name: depth