LeRobot integration for AgileX Piper arms. It supports single-arm and bimanual teleoperation, dataset recording, ACT/pi05 training, and real-robot deployment.
piper_followerandbi_piper_followerrobot configurations- Bimanual leader/follower control with optional EMA smoothing
- Asynchronous video encoding during dataset recording
- CAN setup, camera setup, gripper calibration, and safe-disable utilities
- Local, RTC, and asynchronous policy inference
Use a dedicated Conda environment and install this checkout once in editable
mode. After this, lerobot resolves to src/lerobot without setting
PYTHONPATH for every command.
conda create -n piper-lerobot python=3.10 -y
conda activate piper-lerobot
cd /path/to/piper_lerobot
python -m pip install -e .
python -c "import lerobot; print(lerobot.__file__)"Install pyAgxArm in the same environment according to the AgileX Piper SDK
instructions.
# Prepare the four CAN interfaces and stable camera names.
bash utils/activate_all_can.sh
sudo bash utils/setup_camera_symlinks.sh
# Record and upload a dataset.
bash record_bimanual.sh <repo_id> <task> <num_episodes>Prepare the matching follower and leader CAN interfaces, then run the recorder for the left or right arm:
bash record_single_arm.sh left <repo_id> <task> <num_episodes>
bash record_single_arm.sh right <repo_id> <task> <num_episodes>The single-arm recorder uses the matching wrist camera and the top camera,
saves locally under dataset/<repo_id>/, and does not upload to the Hub. Its
datasets contain one Piper arm (7 action/state values), so they are intended
for a single-arm policy and are not directly compatible with the current
14-value bimanual policy.
Recording keys: Space starts an episode, Right Arrow finishes it,
Left Arrow retries it, and Esc ends the session.
A deployed policy drives the follower while the leader mirrors it; press
Space to take over with the leader, Space again to hand back. Every episode
is saved with a success/failure label and a per-frame control flag for
Recap-style training. The recorder lives in the
deploy_piper repo
(branch hil, checked out here as deploy_piper_hil/):
cd deploy_piper_hil
python -m deploy.server --config pi05_long_horizon_plate --checkpoint=<ckpt> # env lerobot_pi05
python -m deploy.hil_record --config pi05_long_horizon_plate --task="..." \
--teleop.type=piper_leader --teleop.id=left_leader --teleop.can_name=left_leader \
--dataset.repo_id=<repo_id> --dataset.root=../dataset/<repo_id> # env piper_sdkSee HIL quick start and the full reference (options, keys, saved data, troubleshooting).
Do not disable or power off a raised arm directly—it can fall. Use the soft disable utility:
python utils/gentle_disable_arm.pyConnect high-bandwidth cameras to separate USB buses. Use
python utils/capture_cameras.py to verify the configured camera feeds.
activate_all_can.sh— activate all configured Piper CAN interfacesfind_all_can_port.sh— find connected CAN adapterscan_activate.sh— activate one CAN interfacecan_health.sh— inspect CAN interface healthsetup_camera_symlinks.sh— install stable camera device names using99-camera-symlinks.rulescapture_cameras.py— capture test frames from the camerasgentle_disable_arm.py— lower and safely disable Piper armsgripper_zero_calibration.py— calibrate a gripper's closed positionpush_dataset.py— upload a local dataset to Hugging Face Hub
- Environment and hardware setup
- Teleoperation
- Dataset recording
- HIL data collection — policy-driven recording with leader takeover (full reference)
- Hugging Face upload
- Training
- Inference and deployment
- Arm utilities