This project builds on the code and hardware of Gello. We did not make changes to the hardware apart from building a different mount. Our code is split into a fork of the original Gello code and the Real Robot repository (private repository).
We modified the Gello code to only operate as a local server that allows to read the joint values instead of containing the main control loop. Therefore, we added the script experiments/launch_gello_server.py
, which starts this local server (Default: 127.0.0.1:6000
) and in case of bimanual control, two servers are started (Default: 127.0.0.1:6000
and 127.0.0.1:6001
).
For an example on how to use this server, check out the Real Robot repository where we added the scripts collect_data_gello.py
and collect_data_bimanual_gello.py
. These scripts can be used to start a recording session of unimanual or bimanual motions respectively.
In the following we document the assembly and installation process as well as how to use our setup to control a Franka Panda robot and collect data.
To assemble the hardware follow the instructions of the original project or look at the summary below of our building process. We also recorded a video of the assembly process:
Quick Summary:
- Add Idler to joints 2 and 4, use short motor screws instead of the shorter packaged screws to mount on the arm parts. Hint: Use tape to fixate Idler and remove later, makes screwing in easier.
- Screw motors and parts together (dont forget the spring for the gripper!)
- Attach cables from base to top (see section Initial Configuration)
- Assemble controller according to manual
- Attach 1 spring to joint 2 that pushes forward
- Create directory e.g.
~\gello
andcd gello
- Clone this repository
- Create Mamba / Conda environment e.g.
gello_env
with Python 3.10 conda activate gello_env
- Install with:
git submodule init git submodule update pip install -r requirements.txt pip install -e . pip install -e third_party/DynamixelSDK/python
- Install the submodule IRL Polymetis and its requirements to
gello_env
(you can change the first line inirl_polymetis/polymetis/environment.yaml
togello_env
) - Install Real Robot either independently or as submodule and its requirements to
gello_env
Follow the instructions of the original project to update the motor IDs using the Dynamixel Wizard and possibly test Gello in a simulation. There seems to be a bug that prevents the Franka gripper from working in a simulation (See this issue). Note that we changed the script gello_get_offset.py
. If you want to use it, check out the instruction on how to configure Gello below.
Summary:
- Start Pandas
- Start Gello
- Configure Gello
- Start Gello server
- Collect data
- Replay data
- Shutdown
- Login on real time PC
- Open the websites of the Pandas in use
- Open joints and activate FCI
- In a terminal go to:
cd ~/irl_polymetis/scripts
- Start Conda environment:
conda activate irl_polymetis
- Run start script for robot and gripper (See IRL GitHub)
./start_gripper.sh --pc-ip=10.10.10.110 --conda=irl_polymetis [Panda number e.g. 101]
./start_robot.sh --pc-ip=10.10.10.110 --conda=irl_polymetis [Panda number e.g. 101]
- If a script was stopped and there are problem starting it again, run
sudo pkill -9 run_server
- For a bimanual scenario use:
./start_gripper.sh --pc-ip=10.10.10.110 --port=50052 --conda=irl_polymetis 102
./start_robot.sh --pc-ip=10.10.10.110 --port=50051 --conda=irl_polymetis 102
./start_gripper.sh --pc-ip=10.10.10.110 --port=50054 --conda=irl_polymetis 101
./start_robot.sh --pc-ip=10.10.10.110 --port=50053 --conda=irl_polymetis 101
- Plugin the power cable
- Attach the USB cable to the normal PC
- Use switch on PCB to turn the Gello on
The following steps are required when setting up a new Gello. However, it can also happen that the script gello_get_offset.py
needs to be run again after a restart. This is probably caused by the way the Dynamixel motors initialize the rotation value.
- Go to:
cd ~/gello/gello_software
- Start Conda environment:
conda activate gello_env
- Determine the USB port of the Gellos with
ls /dev/serial/by-id/
and search for something similar tousb-FTDI_USB__-__Serial_Converter_[...]
. The current user needs access to the usb devices. - Move the Gello arm to a position where the joint values of the panda are known such as:
- Pick one of the following scripts depending on which Gello you are using:
- Left Gello:
python scripts/gello_get_offset.py --start-joints 0 0.3513 0 -2.7566 0 3.1154 -2.3368 --joint-signs 1 -1 1 -1 1 1 1 --port /dev/serial/by-id/usb-FTDI_USB__-__Serial_Converter_FT94ER3L-if00-port0
- Right Gello:
python scripts/gello_get_offset.py --start-joints 0 0.3513 0 -2.7566 0 3.1154 -2.3368 --joint-signs 1 -1 1 1 1 1 1 --port /dev/serial/by-id/usb-FTDI_USB__-__Serial_Converter_FT94EVRT-if00-port0
- Left Gello:
- Replace
start-joints
with the corresponding values from step 4. Note that a poor configuration can lead to the robot not being able to reach the table. We had the best results with the first start pose. In this pose the Gello should look similar to:
View from the side | View from the back | View from the top |
- If you are configuring a new Gello, you might have to try different values for the joint signs until no joint is inverted anymore, the signs of the joints depend on the orientation of the motor in the gello assembly.
- Run the script until you are satisfied with the configuration and press
y
to save the configuration inconfigurations/[Port Name]
. - If you are encountering a port permission error, try this:
sudo usermod -a -G dialout $USER
sudo usermod -a -G tty $USER
sudo chmod a+rw [Device Path]
- Go to:
cd ~/gello/gello_software
- Start Conda environment:
conda activate gello_env
- Run
python experiments/launch_gello_server.py
to start the server andpython experiments/launch_gello_server.py --robot=bimanual_panda
for a bimanual scenario. If your setup varies, you might have to pass the script different parameters.
- Go to:
cd ~/gello/real_robot
- Start Conda environment:
conda activate gello_env
- Run
python ./collect_data_gello.py
orpython ./collect_data_bimanual_gello.py
for bimanual control - If your setup looks different from ours, you have to adjust the main function of the script. For instance cameras can be enabled or disabled and the rest pose can be changed through the constant
RESPOSE
. - When the script is running, press
n
for a new recording, quickly pick up the Gello arm and hold it still until the robot reached its position - If you move the robot outside its threshold, it will try to recover by moving back inside inside its working area and then following Gello again. Therefore, move Gello carefully back inside the area and stop until the robot has caught up again.
- To stop the recording follow instructions in the terminal to save or discard the recording
- Go to:
cd ~/gello/real_robot
- Start Conda environment:
conda activate gello_env
- Replay recording with other script
python ./replay_data_gello.py
- The script will try to replay the latest recording per default. If your setup varies from ours, adjust the script to your needs.
- Close all open scripts
- Shutdown Pandas
- Turn off Gellos and remove cables