文件
Evo-RL/tests/utils/test_control_utils.py
Elvin cb29370c78 feat(piper): add bimanual PiPER/PiPER-X support and refresh docs
- add bi_piper/bi_piperx follower and leader implementations with configs

- wire bimanual Piper types into factories, scripts, and async inference mappings

- add pairing validation and bimanual parsing/teleop test coverage

- update README news and AgileX teleop/data-collection command templates
2026-03-07 22:27:09 +08:00

42 行
1.3 KiB
Python

from types import SimpleNamespace
import pytest
from lerobot.utils.control_utils import sanity_check_bimanual_piper_pair
@pytest.mark.parametrize(
("robot_type", "teleop_type"),
[
("bi_piper_follower", "bi_piper_leader"),
("bi_piperx_follower", "bi_piperx_leader"),
("so101_follower", "so101_leader"),
],
)
def test_sanity_check_bimanual_piper_pair_accepts_valid_pairs(robot_type, teleop_type):
sanity_check_bimanual_piper_pair(
SimpleNamespace(type=robot_type),
SimpleNamespace(type=teleop_type),
)
def test_sanity_check_bimanual_piper_pair_accepts_missing_teleop():
sanity_check_bimanual_piper_pair(SimpleNamespace(type="bi_piperx_follower"), None)
@pytest.mark.parametrize(
("robot_type", "teleop_type"),
[
("bi_piper_follower", "bi_piperx_leader"),
("bi_piperx_follower", "bi_piper_leader"),
("so101_follower", "bi_piperx_leader"),
("so101_follower", "bi_piper_leader"),
],
)
def test_sanity_check_bimanual_piper_pair_rejects_mixed_pairs(robot_type, teleop_type):
with pytest.raises(ValueError, match="must be paired"):
sanity_check_bimanual_piper_pair(
SimpleNamespace(type=robot_type),
SimpleNamespace(type=teleop_type),
)