Hi all, we have an experimental implementation of the Aloha 2 Gripper installed on Stretch 3, and we were also able to do Dex teleop with it. Here are the hardware and software instructions for installing and using the Aloha gripper on a Stretch.
Hardware Setup
The Aloha gripper body could be built using their official build guide.
Additionally, the gripper mount must be installed with the Stretch 3 quick-release compatible mount, which can be 3D-printed using this stl file.
Then, install a long 3-PIN Dynamixel cable from the Gripper Dynamixel motor to the 3-PIN port behind the roll joint.
Software Setup
- Uninstall existing Stretch Body
pip3 uninstall hello-robot-stretch-body
- Install Stretch Body Locally from the branch
feature/aloha_gripper
cd ~/repos
git clone https://github.com/hello-robot/stretch_body
cd stretch_body
git checkout feature/aloha_gripper
pip3 install -e body/
- Configure the Aloha Gripper Dynamixel Motor (XM430-W350)
- Scan and make sure the gripper Dynamixel Motor is reachable using the tool
REx_dynamixel_id_scan.py
. You will also have to note its current servo ID. A total of 4 servos must be present on the wrist, and the servo IDs 13, 15, and 16 are exclusive to dex wrist joints.
REx_dynamixel_id_scan.py /dev/hello-dynamixel-wrist
# Expected Output:
Scanning bus /dev/hello-dynamixel-wrist
Checking ID 0
Checking ID 1
[Dynamixel ID:01] ping Succeeded. Dynamixel model : XM430-W350. Baud 115200 # This is the newly added servo
.
.
Checking ID 13
[Dynamixel ID:013] ping Succeeded. Dynamixel model : XC430-W240. Baud 115200
Checking ID 14
Checking ID 15
[Dynamixel ID:015] ping Succeeded. Dynamixel model : XM540-W270. Baud 115200
Checking ID 16
[Dynamixel ID:016] ping Succeeded. Dynamixel model: XM430-W350. Baud 115200
.
.
Found 4 servos on bus /dev/hello-dynamixel-wrist
- Use the tool’ REx_dynamixel_id_change.py’ to set a non-conflicting servo ID for the newly added gripper dynamixel. In our case, we will change the ID from
1
to17
.
REx_dynamixel_id_change.py /dev/hello-dynamixel-wrist 1 17
- Configure Parameters
- All the Aloha gripper parameters are defined within the param dictionary
aloha_gripper
. You can check out all the pre-defined parameters using the commandstretch_params.py | grep param.aloha_gripper
- Set the param
robot.tool
toeoa_wrist_dw3_aloha_gripper
- Manually Calibrate the Zero pose and Range parameters of the Gripper
- This is an essential step for the gripper to function. You will use the
REx_dynamixel_jog.py
tool to note down the internal servo position in ticks while the Gripper is wide open and fully closed. Here are the steps to get the values.- Enter the dynamixel jog cli tool
REx_dynamixel_jog.py /dev/hello-dynamixel-wrist 17
- Enter
h
show the current homing offset and verify if it is Zero, if not entero
to set it to zero. - Enter
d
to disable the torque, allowing you to back drive the gripper. Enterj
to show the current ticks position of the servo. - Note down the ticks position when the Gripper is fully open and fully closed.
- The Zero pose, which is basically the gripper’s homing pose, can be any value between the Fully Open and Fully Closed position ticks, depending on the user’s requirements.
- Enter the dynamixel jog cli tool
- This is an essential step for the gripper to function. You will use the
robot:
tool: eoa_wrist_dw3_aloha_gripper
aloha_gripper:
range_t: [<fully-closed-ticks>, <fully-open-ticks>]
zero_t: <homing-ticks>
Robot API
As per the current Aloha 2 gripper design, the total rotation range of ~75 deg (1.3 rad) from the servo motor translates to the total linear range of motion of the parallel gripper. By providing radians within this range, you can control the gripper position using the standard Robot API.
from stretch_body.robot import Robot
robot = Robot()
robot.end_of_arm.move_to('aloha_gripper', 0) # Close
robot.end_of_arm.move_to('aloha_gripper', 1.3) # Open
You could also try the gamepad teleop to verify the working of the gripper.
stretch_gamepad_teleop.py
Dex Teleop Setup
For dex teleop you will have to use the branch feature/aloha_gripper in the Stretch Dex Teleop repository.
More Background on Stretch Body software setup for custom grippers
- You can checkout this branch comparison to see the changes in Stretch Body it takes to add your own external standard end of arm gripper to the robot like this in the future.
- Added dynamixel joint class AlohaGripper, EOA tool class EOA_Wrist_DW3_Aloha_Gripper,
- In robot_params_SE3.py , added tool definition dictionary SE3_wrist_dw3_aloha_gripper, added aloha gripper device param dictionary SE3_aloha_gripper
- Integrated the new gripper to be used with gamepad teleop by adding CommandAlohaGripperPosition class to gamepad_joints.py.