using only teleop camera for now
This commit is contained in:
parent
81fadfb569
commit
b0d05080e0
|
@ -70,9 +70,11 @@ class ReachyCamera:
|
||||||
|
|
||||||
if self.name == "teleop" and hasattr(self.cam_manager, "teleop"):
|
if self.name == "teleop" and hasattr(self.cam_manager, "teleop"):
|
||||||
if self.image_type == "left":
|
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":
|
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:
|
else:
|
||||||
return None
|
return None
|
||||||
elif self.name == "depth" and hasattr(self.cam_manager, "depth"):
|
elif self.name == "depth" and hasattr(self.cam_manager, "depth"):
|
||||||
|
@ -80,7 +82,8 @@ class ReachyCamera:
|
||||||
if self.image_type == "depth":
|
if self.image_type == "depth":
|
||||||
return self.cam_manager.depth.get_depth_frame()
|
return self.cam_manager.depth.get_depth_frame()
|
||||||
elif self.image_type == "rgb":
|
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:
|
else:
|
||||||
return None
|
return None
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -25,12 +25,13 @@ from reachy2_sdk import ReachySDK
|
||||||
from lerobot.common.robot_devices.cameras.utils import Camera
|
from lerobot.common.robot_devices.cameras.utils import Camera
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class ReachyRobotConfig:
|
class ReachyRobotConfig:
|
||||||
robot_type: str | None = "Reachy2"
|
robot_type: str | None = "Reachy2"
|
||||||
cameras: dict[str, Camera] = field(default_factory=lambda: {})
|
cameras: dict[str, Camera] = field(default_factory=lambda: {})
|
||||||
# ip_address: str | None = "172.17.135.207"
|
ip_address: str | None = "172.17.135.207"
|
||||||
ip_address: str | None = "localhost"
|
# ip_address: str | None = "localhost"
|
||||||
|
|
||||||
|
|
||||||
class ReachyRobot:
|
class ReachyRobot:
|
||||||
|
|
|
@ -13,8 +13,8 @@ cameras:
|
||||||
head_left:
|
head_left:
|
||||||
_target_: lerobot.common.robot_devices.cameras.reachy2.ReachyCamera
|
_target_: lerobot.common.robot_devices.cameras.reachy2.ReachyCamera
|
||||||
name: teleop
|
name: teleop
|
||||||
# host: 172.17.135.207
|
host: 172.17.135.207
|
||||||
host: localhost
|
# host: localhost
|
||||||
port: 50065
|
port: 50065
|
||||||
image_type: left
|
image_type: left
|
||||||
# head_right:
|
# head_right:
|
||||||
|
@ -23,13 +23,13 @@ cameras:
|
||||||
# host: 172.17.135.207
|
# host: 172.17.135.207
|
||||||
# port: 50065
|
# port: 50065
|
||||||
# image_type: right
|
# image_type: right
|
||||||
torso_rgb:
|
# torso_rgb:
|
||||||
_target_: lerobot.common.robot_devices.cameras.reachy2.ReachyCamera
|
# _target_: lerobot.common.robot_devices.cameras.reachy2.ReachyCamera
|
||||||
name: depth
|
# name: depth
|
||||||
# host: 172.17.135.207
|
# host: 172.17.135.207
|
||||||
host: localhost
|
# # host: localhost
|
||||||
port: 50065
|
# port: 50065
|
||||||
image_type: rgb
|
# image_type: rgb
|
||||||
# torso_depth:
|
# torso_depth:
|
||||||
# _target_: lerobot.common.robot_devices.cameras.reachy2.ReachyCamera
|
# _target_: lerobot.common.robot_devices.cameras.reachy2.ReachyCamera
|
||||||
# name: depth
|
# name: depth
|
||||||
|
|
Loading…
Reference in New Issue