Pythonic wrapper for Piper robotic arm control with automatic CAN device setup and intuitive API.
from easy_piper import EasyPiper
# That's it! Automatic CAN detection and configuration
arm = EasyPiper()
# Use the arm
arm.enable(wait=True)
arm.switch_mode_joint(speed_percent=30)
arm.go_zero_joints()- ✅ Automatic CAN Setup - Detects and configures CAN devices automatically
- ✅ Unit Conversion - Use degrees, mm, N·m (not 0.001× units)
- ✅ Pythonic API - Clear, intuitive method names
- ✅ Multiple Control Modes - Joint space, Cartesian space, teach mode
- ✅ Gripper Control - Position and force control
- ✅ Comprehensive Feedback - Read joints, TCP pose, gripper state, and more
- 🎥 PiperRecorder - Record trajectories for imitation learning
- 📊 LeRobot Compatible - HDF5 format compatible with LeRobot library
- 📈 Visualization Tools - Plot and analyze recorded data
# Clone with submodules
git clone --recursive https://github.com/<YOUR_USERNAME>/easy_piper.git
cd easy_piper
# Install piper_sdk submodule
cd piper_sdk
pip install -e .
cd ..
# Install EasyPiper
pip install -e .
# Or with recording support
pip install -e .[recorder]# Clone the repository
git clone https://github.com/<YOUR_USERNAME>/easy_piper.git
cd easy_piper
# Initialize submodules
git submodule update --init --recursive
# Install dependencies
pip install -r requirements.txt
# Install piper_sdk
cd piper_sdk
pip install -e .
cd ..
# Install EasyPiper
pip install -e .For detailed setup instructions, see SETUP_GUIDE.md.
from easy_piper import EasyPiper
# Initialize (automatic CAN detection)
arm = EasyPiper()
# Enable the arm
arm.enable(wait=True)
# Joint space control
arm.switch_mode_joint(speed_percent=30)
arm.move_joints([0, 30, -60, 0, 90, 0]) # degrees
# Cartesian space control
arm.switch_mode_cartesian(speed_percent=20)
arm.move_tcp_pose([300, 0, 400, 180, 0, 0]) # mm and degrees
# Gripper control
arm.gripper_open()
arm.gripper_close()
arm.gripper_set_position(50) # mm
# Disable when done
arm.disable()from easy_piper import LeRobotDataRecorder
# Initialize recorder
recorder = LeRobotDataRecorder(can_name="can_piper", output_dir="./recordings")
# In your control loop
recorder.start_episode("episode_001")
for step in range(1000):
# Get robot state
joints = arm.read_joints()
gripper = arm.read_gripper_angle()
# Record frame
recorder.record_frame(joints, gripper)
recorder.stop_episode()Or use the interactive CLI:
python3 -m piper_recorder
# Then use commands: start, stop, status, quiteasy_piper/
├── src/
│ └── easy_piper/ # Main package
│ ├── __init__.py # Package initialization
│ ├── easy_piper.py # Core EasyPiper class
│ └── piper_recorder.py # Data recorder for imitation learning
├── examples/ # Example scripts
│ ├── simple_example.py
│ ├── easy_piper_demo.py
│ ├── load_recording_example.py
│ └── quick_start_recorder.py
├── scripts/ # Utility scripts
│ ├── can_activate.sh
│ └── find_all_can_port.sh
├── docs/ # Documentation
│ ├── EASY_PIPER_README.md
│ ├── EASY_PIPER_CHEATSHEET.md
│ ├── PIPER_RECORDER_README.md
│ ├── CAN_SETUP_GUIDE.md
│ └── MODE_SWITCH_CHEATSHEET.md
├── tests/ # Unit tests
├── notebooks/ # Jupyter notebooks
├── piper_sdk/ # Git submodule (Piper SDK)
├── piper_sdk_gui/ # Git submodule (UI, optional)
├── setup.py # Package setup
├── requirements.txt # Python dependencies
├── LICENSE # MIT License
└── CONTRIBUTING.md # Contribution guidelines
- User Guide - Complete guide with all features
- API Cheatsheet - Quick reference for all methods
- Quick Card - Ultra-condensed reference
- Recorder Guide - Data recording documentation
- CAN Setup - Detailed CAN configuration guide
- Mode Switching - SDK mode control reference
EasyPiper automatically detects and configures CAN devices. For manual setup:
# Find available CAN devices
./scripts/find_all_can_port.sh
# Activate a specific device
./scripts/can_activate.sh can_piperSee docs/CAN_SETUP_GUIDE.md for detailed instructions.
- Robotics Research - Control Piper arms with Pythonic interface
- Imitation Learning - Collect demonstration data in LeRobot format
- Automation - Build automated pick-and-place systems
- Education - Teach robotics programming with intuitive API
- Prototyping - Quickly test robot behaviors
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
pip install -e .[dev]pytest tests/black .
flake8 .- Python 3.7+
- Linux (tested on Ubuntu 20.04+)
- CAN-bus hardware
- Piper robotic arm
piper_sdk- Official Piper SDK (included as submodule)numpy- Numerical operationspython-can- CAN bus communicationh5py- HDF5 file format (for recording)matplotlib- Visualization (optional)
This project is licensed under the MIT License - see the LICENSE file for details.
- Built on top of Agilex Robotics Piper SDK
- Compatible with LeRobot for imitation learning
- Author: Charith Munasinghe
- Issues: GitHub Issues
- Follow the SETUP_GUIDE.md
- Run
python3 examples/simple_example.py - Read the User Guide
- Check out more examples
Happy robot controlling! 🤖