This repository contains the files to build and control a low-cost robot arm that costs about $250. You can also build a second robot arm (the leader arm) to control the other arm (the follower arm) that costs about $180, for a total of $430. The design of the leader is inspired by the GELLO project but is simpler to build. Such a robot arm is well suited for robot learning. Two of those arms are also capable of folding clothes.
This robot arm uses Dynamixel XL430 and Dynamixel XL330 servo motors. The XL430 motors are almost twice as strong and are used for the first two joints.
The XL330 motors are weaker but weigh only 18g each. This makes the arm very lightweight and fast.
Dynamixel sells the U2D2 adapter to connect the servos to a computer. However, this is very expensive and the latency is very high. This build uses another cheaper adapter board instead.
The robot arm can be controlled with the Dynamixel SDK: pip install dynamixel-sdk
Part | Cost | Buying link | Specs |
---|---|---|---|
2x Dynamixel XL430-W250 | $100 | https://www.robotis.us/dynamixel-xl430-w250-t/ | https://emanual.robotis.com/docs/en/dxl/x/xl430-w250/ |
4x Dynamixel XL330-M288 | $96 | https://www.robotis.us/dynamixel-xl330-m288-t/ | https://emanual.robotis.com/docs/en/dxl/x/xl330-m288/ |
XL330 Idler Wheel | $10 | https://www.robotis.us/fpx330-h101-4pcs-set/ | Note: pack of four; three needed for longer version pictured above (with elbow-to-wrist extension), two needed for shorter version shown in the assembly video |
XL430 Idler Wheel | $7 | https://www.robotis.us/hn11-i101-set/ | |
Waveshare Serial Bus Servo Driver Board | $10 | https://a.co/d/7C3RUYU | |
Voltage Reducer | $10 | https://a.co/d/cy02ADW | Note: pack of six, only one needed per follower arm |
12V Power Supply | $12 | https://a.co/d/40o8uMN | |
Table Clamp | $6 | https://a.co/d/4KEiYdV | |
Wires | $7 | https://a.co/d/hQfk2cb | |
Total | $258 |
There is usually a 10% discount code for the Robotis shop. It might also help to add some grip tape to the gripper (e.g. https://a.co/d/dW7BnEN). A USB-C cable is necessary to connect the servo driver board to a computer.
Video of the assembly: https://youtu.be/RckrXOEoWrk
- Print all parts with a 3D printer
- The STL files are in
hardware/follower/stl
- The parts are designed to be easy to print; only the moving part of the gripper needs supports
- The STL files are in
- Scanning motors
- Connect the driver board to a computer (should work with Linux and MacOS)
- Figure out the device name (e.g. tty.usbmodem57380045631 for MacOS):
ls /dev/tty.*
- Scan each motor individually with Dynamixel Wizard
- Set the baudrate to 1M for all motors
- Set the servo IDs to 1 for the shoulder to 5 (6 if using the elbow-to-wrist extension) for the gripper servo
- Assembly
- Assemble the arm without the base
- Make sure that the servos are fixed in the same position as in the CAD
- The servo horn should be in the default position when screwed in
- Solder wires onto voltage reducer; input should be connected to female connectors and the output to male connectors
- Screw the voltage reducer and the servo driver board onto the base
- Screw the base onto the arm
- Connect D, V, and G ports on the driver board to the shoulder rotation servo
- Connect the shoulder rotation servo to the shoulder lift servo
- Connect the input for the voltage reducer to V and G ports on the driver board
- Connect the output of the voltage reducer and the remaining D port of the driver board to the elbow servo
- Connect the driver board to the power supply
- Connect to an XL330 servo and view the input voltage on Dynamixel Wizard, then adjust the screw on the voltage reducer until the input voltage is 5V
- Assemble the arm without the base
Part | Cost | Buying link | Specs |
---|---|---|---|
6x Dynamixel XL330-M077 | $144 | https://www.robotis.us/dynamixel-xl330-m077-t/ | https://emanual.robotis.com/docs/en/dxl/x/xl330-m077/ |
XL330 Frame | $7 | https://www.robotis.us/fpx330-s101-4pcs-set/ | |
XL330 Idler Wheel | $10 | https://www.robotis.us/fpx330-h101-4pcs-set/ | Note: pack of four; three needed for longer version (with elbow-to-wrist extension), two needed for shorter version pictured below |
Waveshare Serial Bus Servo Driver Board | $10 | https://a.co/d/7C3RUYU | |
5V Power Supply | $6 | https://a.co/d/5u90NVp | |
Table Clamp | $6 | https://a.co/d/4KEiYdV | |
Total | $183 |
The assembly of the leader arm is simpler since all motors use 5V. The gripper is replace by a handle and a trigger. During use, a small torque can be applied to the trigger so that it opens by default. The GELLO design uses a spring for this purpose but it is much more difficult to assemble.
The teleoperation.py
script can be used to test the arms. However, the device names might have to be adjusted.
A basic simulation environment in MuJoCo is available by running simulation.py
.
Create conda environment
conda create --name act python=3.9
conda activate aloha
Install torch (for reference we add the versions we are using)
conda install pytorch==1.13.1 torchvision==0.14.1
You can now install the requirements:
pip install -r requirements.txt
Go to config/config.py
and change the paths of the ports that connect leader and follower robots to your computer.
In order to collect data simply run:
python record_episodes.py
You can select how many episodes you intend collecting in config/config.py
. Change the value of 'num_episodes'
(set to 1 by default). You should be turning on the volume of your pc-- data for each episode will be recorded after you hear "Go" and it will stop when you hear "Stop".
You will also need to connect a camera to your computer and point it towards the robot while collecting the data via teleoperation. It's important the camera doesn't move otherwise evaluation of the policy is likely to fail.
We slightly re-adapt Action Chunking Tranfosrmer to account for our setup. To start training simply run:
python train.py
The policy will be saved in checkpoints/
.
Make sure to keep the same setup while you were collecting the data. To evaluate the policy simply run:
python evaluate.py