Skip to content

2. Basic Software Installation

Rachel Holladay edited this page Sep 10, 2023 · 6 revisions

In order to control the robot programmatically, you must install and set up the "Franka Control Interface" (FCI), along with a basic ROS setup. The general instructions for this are on the Franka website and are quite comprehensive: franka website.We can think of these in three major steps:

Setting up the Realtime Kernel

If the computer has already been set-up to use the robot and you are simply adding a new account or workspace, you can skip this step. Otherwise, see the franka website for instructions. Note that the realtime kernel is not compatible with any NVIDIA drivers. Hence, you must remove all NVIDIA drivers. If you would like your robot setup to use NVIDIA drivers, then what we historically have done is create a two-computer set-up where one computer serves as the "robot" computer which has the realtime kernel and ROS workspaces and one computer serves as the "vision/learning" computer which has NVIDIA drivers and usually, GPUs.

Building libfranka from source

We build a specific version of libfranka that is compatible with Franka 3 (Specifically we are using the commit Release 0.7.1.). It is not important where within the file system libfranka is built, although we will need to link it later, in creating the ROS workspace

Prior to installing, libfranka has the following dependencies:

sudo apt install build-essential cmake git libpoco-dev libeigen3-dev

Given this:

git clone -b 0.7.1 --recursive https://github.com/frankaemika/libfranka
cd libfranka
git submodule update
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake –-build .

If, in verifying the robot's connection, you are able to ping the robot but the network bandwidth, delay and jitter test or the communication test return the error: libfranka: Connection error: Connection refused, you may have forgotten to install the franka feature file on the Franka Desk. Specifically, log into the desk and under settings go to "System". Here you can upload the feature file, which, for us, was emailed to us when we purchased the robot.

Setting Up Catkin Workspace

We first create a catkin workspace:

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace

We then clone two key repos: franka_ros and this repo, franka_ros_interface. For franka_ros we again need to clone the Franka 3 version, specifically at this commit.

git clone -b 0.7.1 --recursive https://github.com/frankaemika/franka_ros
git clone -b melodic https://github.com/rachelholladay/franka_ros_interface.git

Note that franka_ros_interface requires the numpy-quaternion package (pip install numpy-quaternion). If you have issues with installing the proper version, please see the odd errors section.

Within LIS, we run Python 3 using virtual environments. First we must create the virtual environment and then set-up the catkin workspace to use Python 3. If you are not using Python 3 or have a different setup, skip this step.

# Create Virtual Environment, here called ros_env
cd ~
python3.7 -m venv ros_env
source ~/ros_env/bin/activate
export ROS_PYTHON_VERSION=3
python3.7 -m pip install catkin_pkg pyyaml rospkg empy
# Set-up workspace with Python 3. We have to build the geometry packages from source
cd ~/catkin_ws/src
git clone -b melodic-devel https://github.com/ros/geometry.git
git clone -b melodic-devel https://github.com/ros/geometry2.git
cd ..
catkin config --cmake-args -DPYTHON_EXECUTABLE=/home/<user>/ros_env/bin/python3.7

Once your workspace has been set-up (and any other packages have been cloned, we first link the libfranka build (setting insertyourpath to be the appropriate path):

catkin config --cmake-args -DFranka_DIR:PATH=/insertyourpath/libfranka/build` 

and then we build the workspace:

catkin build

Note that any time a package is added or C++ is changed, you will need to rebuild the workspace.

Clone this wiki locally