mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-26 14:09:47 +00:00
Use same ip for cameras
This commit is contained in:
@@ -32,9 +32,38 @@ class Reachy2RobotConfig(RobotConfig):
|
|||||||
use_external_commands: bool = False
|
use_external_commands: bool = False
|
||||||
with_mobile_base: bool = True
|
with_mobile_base: bool = True
|
||||||
|
|
||||||
|
mock: bool = False
|
||||||
|
|
||||||
|
def __post_init__(self):
|
||||||
# cameras
|
# cameras
|
||||||
cameras: dict[str, CameraConfig] = field(
|
self.cameras: dict[str, CameraConfig] = {
|
||||||
default_factory=lambda: {
|
"teleop_left": Reachy2CameraConfig(
|
||||||
|
name="teleop",
|
||||||
|
image_type="left",
|
||||||
|
ip_address=self.ip_address,
|
||||||
|
fps=30,
|
||||||
|
width=640,
|
||||||
|
height=480,
|
||||||
|
color_mode=ColorMode.RGB,
|
||||||
|
rotation=Cv2Rotation.NO_ROTATION
|
||||||
|
),
|
||||||
|
"teleop_right": Reachy2CameraConfig(
|
||||||
|
name="teleop",
|
||||||
|
image_type="right",
|
||||||
|
ip_address=self.ip_address,
|
||||||
|
fps=30,
|
||||||
|
width=640,
|
||||||
|
height=480,
|
||||||
|
color_mode=ColorMode.RGB,
|
||||||
|
rotation=Cv2Rotation.NO_ROTATION
|
||||||
|
),
|
||||||
|
}
|
||||||
|
super().__post_init__()
|
||||||
|
|
||||||
|
|
||||||
|
# # cameras
|
||||||
|
# cameras: dict[str, CameraConfig] = field(
|
||||||
|
# default_factory=lambda: {
|
||||||
# "teleop_left": Reachy2CameraConfig(
|
# "teleop_left": Reachy2CameraConfig(
|
||||||
# name="teleop",
|
# name="teleop",
|
||||||
# image_type="left",
|
# image_type="left",
|
||||||
@@ -108,26 +137,26 @@ class Reachy2RobotConfig(RobotConfig):
|
|||||||
# ),
|
# ),
|
||||||
|
|
||||||
# # REAL ROBOT REDUCED IMAGE SIZE
|
# # REAL ROBOT REDUCED IMAGE SIZE
|
||||||
"teleop_left": Reachy2CameraConfig(
|
# "teleop_left": Reachy2CameraConfig(
|
||||||
name="teleop",
|
# name="teleop",
|
||||||
image_type="left",
|
# image_type="left",
|
||||||
ip_address="192.168.0.199",
|
# ip_address="192.168.0.199",
|
||||||
fps=30,
|
# fps=30,
|
||||||
width=640,
|
# width=640,
|
||||||
height=480,
|
# height=480,
|
||||||
color_mode=ColorMode.RGB,
|
# color_mode=ColorMode.RGB,
|
||||||
rotation=Cv2Rotation.NO_ROTATION
|
# rotation=Cv2Rotation.NO_ROTATION
|
||||||
),
|
# ),
|
||||||
"teleop_right": Reachy2CameraConfig(
|
# "teleop_right": Reachy2CameraConfig(
|
||||||
name="teleop",
|
# name="teleop",
|
||||||
image_type="right",
|
# image_type="right",
|
||||||
ip_address="192.168.0.199",
|
# ip_address="192.168.0.199",
|
||||||
fps=30,
|
# fps=30,
|
||||||
width=640,
|
# width=640,
|
||||||
height=480,
|
# height=480,
|
||||||
color_mode=ColorMode.RGB,
|
# color_mode=ColorMode.RGB,
|
||||||
rotation=Cv2Rotation.NO_ROTATION
|
# rotation=Cv2Rotation.NO_ROTATION
|
||||||
),
|
# ),
|
||||||
|
|
||||||
# # Reduced size for testing
|
# # Reduced size for testing
|
||||||
# "teleop_left": Reachy2CameraConfig(
|
# "teleop_left": Reachy2CameraConfig(
|
||||||
@@ -150,7 +179,5 @@ class Reachy2RobotConfig(RobotConfig):
|
|||||||
# color_mode=ColorMode.RGB,
|
# color_mode=ColorMode.RGB,
|
||||||
# rotation=Cv2Rotation.NO_ROTATION
|
# rotation=Cv2Rotation.NO_ROTATION
|
||||||
# ),
|
# ),
|
||||||
}
|
# }
|
||||||
)
|
# )
|
||||||
|
|
||||||
mock: bool = False
|
|
||||||
|
|||||||
Reference in New Issue
Block a user