Workstation set-up for Franka¶
Generally the set up procedure follows the guide provided on the FRANKA documentation website.
Requirements for FRANKA Workstation¶
It is recommended you follow the following guide to install Ubuntu alongside your current operating systems on Mac:
On Windows PC¶
To install Ubuntu alongside Windows, you must first shrink you current partitions down so there is space to create a new partition. To do this, follow this dual boot guide.
If you are unable to shrink a partition with free space available, you need to defrag you partition. Unfortunately this may, or may not work just using Windows’ built in application. If it doesn’t work, use a third party tool, like the free AOMEI Partition Assistant to shrink your drive with space.
After you have shrunk your drive and you have a suitable amount of space for Linux (50-100GB ideally) you need to check how many partitions you currently have. If you already have 4 partitions, e.g.:
- System (Windows)
Then you should delete the HP_RECOVERY partition using the disk management tool in Windows. This is because Master Boot Record (the partition map that Windows traditionally uses) only allows for a maximum of 4 partitions. (Also see: https://support.hp.com/gb-en/document/c00810279).
You should check if your partition map is MBR (Master Boot Record) or GUID/GPT. If it is GUID/GPT then you do not need to delete any partitions in order to create a new one.
You should download the latest Ubuntu LTS version from the official website, then use a tool like RUFUS to create a bootable USB. Follow this guide to create a bootable USB for Linux: https://www.howtogeek.com/howto/linux/create-a-bootable-ubuntu-usb-flash-drive-the-easy-way/
When you have created your bootable USB, restart your computer and (if on an HP computer) continually tap the F9 key. This will lead you to the boot menu allowing you to select the USB that you just made to boot Linux.
You can now continue with this guide as before to install Linux. Once it is completely installed, you can move to the next section.
Install the realtime kernel patch¶
Check you are running a real-time kernel with
If you are not,
- Restart the computer
- Select Advanced options for Ubuntu
- Select the kernel with
rtin the name.
Install ROS Kinetic¶
Follow the official installation guide to get ROS Kinetic at the following URL:
Install FRANKA Libraries¶
It is recommended that you DO NOT install from source. There are lots of problems with compiling versions which work with the current firmware version of the Franka Arm.
Option 1: Install binaries via
Franka Emika have updated the version of libfranka distributed by ROS from 0.1.0 to 0.2.0 which means it no longer supports the firmware version used in the lab. For more information on software versions, see Franka Emika Software. Unless the Franka’s firmware has been updated, you should now use Option 2: Install and compile from source.
Binary packages for
franka_ros are available from the ROS repositories. After setting up ROS Kinetic, execute:
sudo apt install ros-kinetic-libfranka sudo apt install ros-kinetic-franka-ros
Note that if you use
apt to install a package on Ubuntu, you can use
dpkg -L <packagename> to find where on the system the files for a particular package are installed.
Option 2: Install and compile from source¶
The following guide is based on a guide from Franka Emika (link).
Before building from source, please uninstall existing installations of
franka_ros to avoid conflicts:
sudo apt remove "*libfranka*"
libfranka, install the following dependencies from Ubuntu’s package manager:
sudo apt install build-essential cmake git libpoco-dev libeigen3-dev
Then, download the source code by cloning
libfranka from GitHub:
cd ~ git clone --recursive https://github.com/frankaemika/libfranka cd libfranka
By default, this will check out the newest release of
libfranka. If you want to build a particular version of
libfranka instead, check out the corresponding Git tag. At the time of writing the firmware of the Franka means we need version
0.1.0 so we do:
git checkout tags/0.1.0 git submodule update
git tag -l will list available tags.
In the source directory, create a build directory and run CMake:
mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. cmake --build .
You now need to add the path of this library to you system path so that libfranka can be found at runtime. To do this, when in the
This returns a path such as
/home/<username>/libfranka/build. We then add this to the end of our
~/.bashrc file, such an example is:
nano ~/.bashrc # add the following line to the end of the file export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/<username>/libfranka/build" # now save and exit the file source ~/.bashrc
Remember to put your own path to the build directory of
libfranka instead of
libfranka is now complete. If you now need to build the ros packages, you should use the guide found here.
Using the franka_ros library¶
This is only applicable is you installed
The Franka ROS packages are intiated using the launch xml files. To do this you need to adjust the default IP address in these launch files:
roscd franka_visualization cd launch/ nano franka_visualization.launch
Now change the value for
default=192.168.0.88. You can then launch the package with:
roslaunch franka_visualization franka_visualization.launch
You can swap out the ‘visualization’ term for any other franka_ros package.
You need to ensure you have set the correct permissions for libfranka. Run:
If this doesn’t run, you may not have installed ROS Kinetic properly. Check ROS Kinetic install here.
We then need to source ros for the root user so that libfranka has permissions to use the realtime kernel:
sudo bash source /opt/ros/kinetic/setup.bash
You now press Ctrl+D to exit out of sudo bash (the hash sign will change back to a dollar sign). You must also check that you have the correct realtime permissions for your own user. To do this, run:
If the results is
99 then you have nothing more to do, is the result is
0 then go back and check you completed the last section of the realtime kernel setup.
Remember you can check if you are running your realtime kernel at any time by typing
uname -r and looking for an
rt after the kernal version.
Test with examples¶
To start testing you should move to Controlling Franka & ROS page to test out the workstation set up.
Remember, for this to work, you need:
- The FRANKA Arm must be in movement mode (white light).
- The workstation PC must be connected to the shop floor controller by ethernet.
You can confirm that the workstation computer is able to communicate with the workshop controller by pinging the IP address from the terminal:
ping 192.168.0.88. For more information see the Franka Arm page.