# Franka Emika Panda Documentation
**TESTED ON UBUNTU 20.04 LTS with Dell Precision 5520**
Source:https://frankaemika.github.io/docs/installation_linux.html
## 1.Linux Realtime kernel

### **Troubleshooting(RT Kernel)**
If you have trouble running with your own kernel-compatible(check uname -r) files, plz follow the doc to use 5.9.1(default)
**(remember to replace all the version to 5.9.1-compatible in the later setting,too)**

### 1.1 Fail to verfiy
If you have problem running the following command
```
gpg2 --verify linux-*.tar.sign
gpg2 --verify patch-*.patch.sign
```
Just make sure the .xz or .sign you downloaded, can be verified,in this case
`gpg2 --verify linux-5.9.1.tar.sign`...
Check this site for more detail about how to solve the warning
https://www.kernel.org/signature.html
```
unxz linux-(the version you download in the previous step).tar.xz
gpg2 --verify linux-(the version you download in the previous step).tar.sign
```
### 1.2 Fail to make
`make -j$(nproc) deb-pkg`
if you have trouble running this command like i did:
**make[2]: *** [debian/rules:6: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:77: deb-pkg] Error 2
make: *** [Makefile:1523: deb-pkg] Error 2**
Please follow the following step:
**1.** Make sure you have set to rt kernel by using `make menuconfig`
in linux.5.9.1/ folder
**2.** you can run this `make -j$(nproc)` instead of `make -j$(nproc) deb-pkg`
**3.** Update mudules
`cd linux-5.9.1/`
`sudo make modules_install`
and it will put the kernel modules under /lib/modules/<kernel-version>.
**4.** Make sure it looks like this in this directory"/lib/modules":
`5.15.0-139-generic 5.15.0-67-generic 5.9.1-rt20`
**5.** Build only the kernel image
`sudo apt update`
`sudo apt install zstd`
`cd ~/linux-5.9.1`
`make -j$(nproc) bzImage`
`sudo make modules_install`
`sudo make install`
`sudo update-grub`
`sudo reboot`
**3.** Long Press "left shift" to get into Grub menu to switch to ubuntu-rt kernel option when Dell icon pops out.
**(when you get into Grub menu, select ubuntu advanced mode=> select rt-kernel)**
When you get into the system, check `uname -r` ,it should show 5.9.1-rt
## 2.Frankx installation
Tested on
frankx:0.2.0
https://github.com/pantor/frankx.git
libfranka: 0.10.0
https://github.com/frankaemika/libfranka.git
Eigen v3.3.7
https://github.com/libigl/eigen.git
Pybind11 v2.9.1
https://github.com/pybind/pybind11.git
Catch2 v2.13 (only for testing)
https://github.com/catchorg/Catch2.git
(Above depencies should be built from source,recommend)
**PLEASE MAKE SURE THE ABOVE VERSION IS CORRECT!!!**
### Remember to add 172.16.0.1 to IPv4

You can check the connection afterward
`ping 172.16.0.2`
If you have this problem below
ping 172.16.0.2
PING 172.16.0.2 (172.16.0.2) 56(84) bytes of data.
From 172.16.1.1 icmp_seq=1 Time to live exceeded
From 172.16.1.1 icmp_seq=2 Time to live exceedeed
You can add ip manually:
`sudo ip addr add 172.16.0.1/24 dev enxc4411e75389a`
Before heading to run frankx example code:
```
from frankx import Affine, LinearRelativeMotion, Robot
robot = Robot("172.16.0.2")
robot.set_dynamic_rel(0.05)
motion = LinearRelativeMotion(Affine(0.2, 0.0, 0.0))
robot.move(motion)
```
Please make sure you have connect ethernet cable to your Window PC, and run this site(FCI):
https://172.16.0.2
And Make sure your ubuntu pc can ping 172.16.0.2, and your kernel is 5.9.1-rt
**And on your Window PC, you should press activate FCI
Before turning off your franka, please make sure, you deactivate FCI, and shut down before turning off the computer of franka!!!**