From e099fc7b234ce16b37fae4440a9019b1d91d6556 Mon Sep 17 00:00:00 2001 From: Michel Aractingi Date: Thu, 4 Sep 2025 23:57:15 +0200 Subject: [PATCH] fix(tests) fixes for reachy2 tests; removing reachy2 references from the script --- docs/source/reachy2.mdx | 1 + src/lerobot/record.py | 2 -- tests/cameras/test_reachy2_camera.py | 2 ++ tests/robots/test_reachy2.py | 2 ++ tests/teleoperators/test_reachy2_teleoperator.py | 2 ++ 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/source/reachy2.mdx b/docs/source/reachy2.mdx index 6bdca59e3..7d3dc1b60 100644 --- a/docs/source/reachy2.mdx +++ b/docs/source/reachy2.mdx @@ -138,6 +138,7 @@ Reachy 2 is fully supported by LeRobot’s recording features. If you choose this option but still want to use the VR teleoperation application, select "Standard session" in the app. **Example: start a recording without the mobile base:** +First add reachy2 and reachy2_teleoperator to the imports of the record script. Then you can use the following command: ```bash python -m lerobot.record \ diff --git a/src/lerobot/record.py b/src/lerobot/record.py index 89a86552b..09fa33fe3 100644 --- a/src/lerobot/record.py +++ b/src/lerobot/record.py @@ -83,7 +83,6 @@ from lerobot.robots import ( # noqa: F401 hope_jr, koch_follower, make_robot_from_config, - reachy2, so100_follower, so101_follower, ) @@ -94,7 +93,6 @@ from lerobot.teleoperators import ( # noqa: F401 homunculus, koch_leader, make_teleoperator_from_config, - reachy2_teleoperator, so100_leader, so101_leader, ) diff --git a/tests/cameras/test_reachy2_camera.py b/tests/cameras/test_reachy2_camera.py index 66c7675a6..5a87ebeec 100644 --- a/tests/cameras/test_reachy2_camera.py +++ b/tests/cameras/test_reachy2_camera.py @@ -23,6 +23,8 @@ import pytest from lerobot.cameras.reachy2_camera import Reachy2Camera, Reachy2CameraConfig from lerobot.errors import DeviceNotConnectedError +pytest.importorskip("reachy2_sdk") + PARAMS = [ ("teleop", "left"), ("teleop", "right"), diff --git a/tests/robots/test_reachy2.py b/tests/robots/test_reachy2.py index c93fbeced..b861ac9bc 100644 --- a/tests/robots/test_reachy2.py +++ b/tests/robots/test_reachy2.py @@ -51,6 +51,8 @@ PARAMS = [ {"with_left_teleop_camera": False, "with_torso_camera": True}, ] +pytest.importorskip("reachy2_sdk") + def _make_reachy2_sdk_mock(): class JointSpy: diff --git a/tests/teleoperators/test_reachy2_teleoperator.py b/tests/teleoperators/test_reachy2_teleoperator.py index 5130de87d..15400bafc 100644 --- a/tests/teleoperators/test_reachy2_teleoperator.py +++ b/tests/teleoperators/test_reachy2_teleoperator.py @@ -28,6 +28,8 @@ from lerobot.teleoperators.reachy2_teleoperator import ( Reachy2TeleoperatorConfig, ) +pytest.importorskip("reachy2_sdk") + # {lerobot_keys: reachy2_sdk_keys} REACHY2_JOINTS = { **REACHY2_NECK_JOINTS,