This is a software package used for controlling and learning skills on the Franka Emika Panda Research Robot Arm.
Installation Instructions and Network Configuration Instructions are also available here: https://iamlab-cmu.github.io/frankapy
To join the Discord community, click the link here.
This library is intended to be installed on any computer in the same ROS network with the computer that interfaces with the Franka (we call the latter the Control PC). FrankaPy
will send commands to franka-interface, which actually controls the robot.
This is only needed if you plan to modify the proto messages. You don't need to install or compile protobuf for using frankapy
We use both C++ and Python versions of protobufs so you would need to install Protobufs from source.
Do nproc
to find out how many cores you have, and use that as the N
number in the make
command below:
sudo apt-get install autoconf automake libtool curl make g++ unzip
wget https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-all-21.8.zip
unzip protobuf-all-21.8.zip
cd protobuf-21.8
./configure
make -jN
make check -jN
sudo make install
sudo ldconfig
See detailed instructions here
Clone Repo and its Submodules:
git clone --recurse-submodules git@github.com:iamlab-cmu/frankapy.git
All directories below are given relative to /frankapy
.
First source into your virtualenv or conda env (should be Python 3.6). Then:
pip install -e .
To compile the catkin_ws use the following script:
./bash_scripts/make_catkin.sh
To allow asynchronous gripper commands, we use the franka_ros package, so install libfranka and franka_ros using the following command (Change melodic to noetic if you are on Ubuntu 20.04:
sudo apt install ros-melodic-libfranka ros-melodic-franka-ros
To make the protobufs use the following script (you don't need to do this if you haven't modified the proto messages):
./bash_scripts/make_proto.sh
ifconfig
in order to get the wifi ip address of both computers and note them down.sudo gedit /etc/hosts
# The following lines are desirable for IPv6 capable hosts
:
192.168.1.2 [frankapy-pc-name]
Otherwise substitute 192.168.1.2 with the ip address of the FrankaPy PC that you discovered using the command ifconfig
.sudo gedit /etc/hosts
and add the line:
192.168.1.3 [control-pc-name]
Otherwise substitute 192.168.1.3 with the ip address of the Control PC that you discovered using the command ifconfig
.ssh [control-pc-username]@[control-pc-name]
Input password to control-pc.
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
[Press enter]
[Press enter]
[Press enter]
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
ssh [control-pc-username]@[control-pc-name]
Input password to control-pc.
vim ~/.ssh/authorized_keys
vim ~/.ssh/id_rsa.pub
ssh -X [control-pc-username]@[control-pc-name]
firefox
Make sure that both the user stop and the brakes of the Franka robot have been unlocked in the Franka Desk GUI.
Open up a new terminal and go to the frankapy directory.
bash ./bash_scripts/start_control_pc.sh -i [control-pc-name]
Please see the start_control_pc.sh
bash script for additional arguments, including specifying a custom directory for where franka-interface
is installed on the Control PC as well as the username of the account on the Control PC. By default the username is iam-lab
.
Open up a new terminal and go to the frankapy directory. Do:
source catkin_ws/devel/setup.bash
Be in the same virtualenv or Conda env that FrankaPy was installed in. Place your hand on top of the e-stop. Reset the robot pose with the following command.
python scripts/reset_arm.py
See example scripts in the examples/
and scripts/
to learn how to use the FrankaPy
python package.
If this library proves useful to your research, please cite the paper below::
@article{zhang2020modular,
title={A modular robotic arm control stack for research: Franka-interface and frankapy},
author={Zhang, Kevin and Sharma, Mohit and Liang, Jacky and Kroemer, Oliver},
journal={arXiv preprint arXiv:2011.02398},
year={2020}
}