Skip to content

Commit

Permalink
using only teleop camera for now
Browse files Browse the repository at this point in the history
  • Loading branch information
apirrone committed Nov 26, 2024
1 parent 81fadfb commit b0d0508
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
9 changes: 6 additions & 3 deletions lerobot/common/robot_devices/cameras/reachy2.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,20 @@ def read(self) -> np.ndarray:

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"):

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
5 changes: 3 additions & 2 deletions lerobot/common/robot_devices/robots/reachy2.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
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:
Expand Down
18 changes: 9 additions & 9 deletions lerobot/configs/robot/reachy2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit b0d0508

Please sign in to comment.