mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-15 08:39:49 +00:00
Use same ip for cameras
This commit is contained in:
@@ -32,86 +32,15 @@ class Reachy2RobotConfig(RobotConfig):
|
||||
use_external_commands: bool = False
|
||||
with_mobile_base: bool = True
|
||||
|
||||
# cameras
|
||||
cameras: dict[str, CameraConfig] = field(
|
||||
default_factory=lambda: {
|
||||
# "teleop_left": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="left",
|
||||
# fps=30,
|
||||
# width=640,
|
||||
# height=480,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "teleop_right": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="right",
|
||||
# fps=30,
|
||||
# width=640,
|
||||
# height=480,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "torso_rgb": Reachy2CameraConfig(
|
||||
# name="depth",
|
||||
# image_type="rgb",
|
||||
# fps=30,
|
||||
# width=640,
|
||||
# height=480,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "torso_depth": Reachy2CameraConfig(
|
||||
# name="depth",
|
||||
# image_type="depth",
|
||||
# fps=30,
|
||||
# width=640,
|
||||
# height=480,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION,
|
||||
# use_depth=True
|
||||
# )
|
||||
mock: bool = False
|
||||
|
||||
# # REAL ROBOT
|
||||
# "teleop_left": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="left",
|
||||
# ip_address="192.168.0.199",
|
||||
# # ip_address="172.18.131.66",
|
||||
# fps=30,
|
||||
# width=960,
|
||||
# height=720,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "teleop_right": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="right",
|
||||
# ip_address="192.168.0.199",
|
||||
# # ip_address="172.18.131.66",
|
||||
# fps=30,
|
||||
# width=960,
|
||||
# height=720,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "torso_rgb": Reachy2CameraConfig(
|
||||
# name="depth",
|
||||
# image_type="rgb",
|
||||
# ip_address="172.18.131.66",
|
||||
# fps=30,
|
||||
# width=1280,
|
||||
# height=720,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
|
||||
# # REAL ROBOT REDUCED IMAGE SIZE
|
||||
def __post_init__(self):
|
||||
# cameras
|
||||
self.cameras: dict[str, CameraConfig] = {
|
||||
"teleop_left": Reachy2CameraConfig(
|
||||
name="teleop",
|
||||
image_type="left",
|
||||
ip_address="192.168.0.199",
|
||||
ip_address=self.ip_address,
|
||||
fps=30,
|
||||
width=640,
|
||||
height=480,
|
||||
@@ -121,36 +50,134 @@ class Reachy2RobotConfig(RobotConfig):
|
||||
"teleop_right": Reachy2CameraConfig(
|
||||
name="teleop",
|
||||
image_type="right",
|
||||
ip_address="192.168.0.199",
|
||||
ip_address=self.ip_address,
|
||||
fps=30,
|
||||
width=640,
|
||||
height=480,
|
||||
color_mode=ColorMode.RGB,
|
||||
rotation=Cv2Rotation.NO_ROTATION
|
||||
),
|
||||
|
||||
# # Reduced size for testing
|
||||
# "teleop_left": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="left",
|
||||
# ip_address="172.18.131.66",
|
||||
# fps=30,
|
||||
# width=480,
|
||||
# height=360,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "teleop_right": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="right",
|
||||
# ip_address="172.18.131.66",
|
||||
# fps=30,
|
||||
# width=480,
|
||||
# height=360,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
}
|
||||
)
|
||||
super().__post_init__()
|
||||
|
||||
mock: bool = False
|
||||
|
||||
# # cameras
|
||||
# cameras: dict[str, CameraConfig] = field(
|
||||
# default_factory=lambda: {
|
||||
# "teleop_left": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="left",
|
||||
# fps=30,
|
||||
# width=640,
|
||||
# height=480,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "teleop_right": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="right",
|
||||
# fps=30,
|
||||
# width=640,
|
||||
# height=480,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "torso_rgb": Reachy2CameraConfig(
|
||||
# name="depth",
|
||||
# image_type="rgb",
|
||||
# fps=30,
|
||||
# width=640,
|
||||
# height=480,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "torso_depth": Reachy2CameraConfig(
|
||||
# name="depth",
|
||||
# image_type="depth",
|
||||
# fps=30,
|
||||
# width=640,
|
||||
# height=480,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION,
|
||||
# use_depth=True
|
||||
# )
|
||||
|
||||
# # REAL ROBOT
|
||||
# "teleop_left": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="left",
|
||||
# ip_address="192.168.0.199",
|
||||
# # ip_address="172.18.131.66",
|
||||
# fps=30,
|
||||
# width=960,
|
||||
# height=720,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "teleop_right": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="right",
|
||||
# ip_address="192.168.0.199",
|
||||
# # ip_address="172.18.131.66",
|
||||
# fps=30,
|
||||
# width=960,
|
||||
# height=720,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "torso_rgb": Reachy2CameraConfig(
|
||||
# name="depth",
|
||||
# image_type="rgb",
|
||||
# ip_address="172.18.131.66",
|
||||
# fps=30,
|
||||
# width=1280,
|
||||
# height=720,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
|
||||
# # REAL ROBOT REDUCED IMAGE SIZE
|
||||
# "teleop_left": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="left",
|
||||
# ip_address="192.168.0.199",
|
||||
# fps=30,
|
||||
# width=640,
|
||||
# height=480,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "teleop_right": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="right",
|
||||
# ip_address="192.168.0.199",
|
||||
# fps=30,
|
||||
# width=640,
|
||||
# height=480,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
|
||||
# # Reduced size for testing
|
||||
# "teleop_left": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="left",
|
||||
# ip_address="172.18.131.66",
|
||||
# fps=30,
|
||||
# width=480,
|
||||
# height=360,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# "teleop_right": Reachy2CameraConfig(
|
||||
# name="teleop",
|
||||
# image_type="right",
|
||||
# ip_address="172.18.131.66",
|
||||
# fps=30,
|
||||
# width=480,
|
||||
# height=360,
|
||||
# color_mode=ColorMode.RGB,
|
||||
# rotation=Cv2Rotation.NO_ROTATION
|
||||
# ),
|
||||
# }
|
||||
# )
|
||||
|
||||
Reference in New Issue
Block a user