The Fast Robot Interface (FRI) library allows for hard real time communication to the KUKA LBR Med, see KUKA's paper. This folder contains the C++ client side library to setup the UDP connection to the LBR Med. However, hard real time is only supported if the FRI is compiled on a real time OS.
Other than what KUKA provides, our FRI comes with CMake support. This allows for cross-platform compatability, therefore, the Cross Platform Build and Installation instructions are the same for Linux and Windows. However, the prerequisites are differntly obtained. How to obtain the prerequisites is explained in Linux Prerequisites and Windows Prerequisites, respectively.
Skip any of these if already satisfied.
- Install Git. In a terminal, run
sudo apt install git
- Install CMake. In a terminal, run
sudo apt install cmake
Skip any of these if already satisfied.
- Install the new Windows Terminal. Search for
Microsoft Store
in Start and open it. Therein, search forWindows Terminal
, and install it - Install Chocolatey by following the instructions
- Install Git. In an administrative Windows Terminal, run
choco install git
. - Install CMake. In an administrative Windows Terminal, run
choco install cmake
. Add CMake to your Path. Therefore, search forEdit the system environment variables
in Start, and open it. OpenEnvironment Variables...
, and double click onPath
under System variables. Click onNew
, and addC:\Program Files\CMake\bin
(usually CMake is installed there, might differ)
Clone this repository
git clone https://github.com/KCL-BMEIS/FastRobotInterface.git
Build and install the FRI library
cd FastRobotInterface
mkdir build
cd build
cmake ..
cmake --build . --config Release --target install # builds and installs the FRI library in Release mode
The FRI comes with example apps. These apps require some prerequisites that are explained below.
Follow the Build and Installation instructions for your OS. Install Sunrise Workbench on your computer. This step requires Windows as OS.
Sunrise Workbench is KUKA's Java IDE that allows you to program the LBR Med.
- Download it from the RViM shared folder
- Extract the .zip file and run the Sunrise Workbench Setup
- Follow the install instructions
Exemplary applications for the C++ client side are located inside the apps folder. Each of these apps has a Java equivalent for the server side.
- Connect your laptop, therefore, establish an Ethernet connection to connector X66 at the KUKA controller
- The KUKA controller's default IP is 172.31.1.147. Configure the same network on your laptop, therefore
- On Windows
- Search for
View network connections
in Start and open it - Right click on the Ethernet connection and open
Properties
- Double click Internet Protocol Version 4 (TCP/IPv4) and set the IP address to
172.31.1.148
and the Subnet mask to255.255.0.0
- Search for
- On Ubuntu 16 (might differ for other Linux distributions)
- Search for
System Settings
and open it - Go to Network -> Wired -> Options
- Go to the IPv4 Settings tab and set the IP address to
172.31.1.148
and the Netmask to255.255.0.0
- Search for
- On Windows
You will have to follow the instructions in Connect Laptop. The FRI has to be installed on the controller. Therefore, the Sunrise Workbench IDE is used.
- Open the Sunrise Workbench
- Create a new project, therefore
- Click File -> New -> Sunrise project
- Leave the default IP (172.31.1.147) and click Next
- Give your project a name, e.g. FRI and click Next
- Select LBR Med 7 R800 and click Next
- Under Media Flange, select Medien-Flansch Inside elektrisch, and click Next
- Click Finish (might take some time). Select RoboticsAPI Application, and press Next
- Click Finish
- Setup the KUKA controller, therefore
- Double click the StationSetup.cat under FRI in the Package Explorer and add the LBR Med 7 R800 to the Topolgy (below left)
- Remove the LBR_Med_7_R800_2, which has no Media Flange, and which we are not using (below right)
- In the Software tab, make sure that the checker boxes for the FRI extensions are selected (below left)
- In the Configurations tab, make sure that the IP is set to 172.31.1.147 (below right)
- Save the StationSetup.cat via
Ctrl + s
- In the Installation tab, click Install (below left)
- Synchronize your project with the KUKA controller (below right)
You will have to follow the instructions in Connect Laptop, and make sure that the FRI was installed to the KUKA controller, according to Server Side - KUKA Controller. The client side requires to build the apps, which requires that the FRI was installed according to Build and Installation. Then, open a terminal and do
cd apps
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH='path/to/lib' .. # on Windows this should be 'C:\Program Files (x86)\FastRobotInterface'
# on Linux this should be '/usr/local'
cmake --build . --config Release # builds the apps in Release mode
To run one of the example apps, they have to be started on the smartHMI (KUKA's smartpad), as well as on the laptop.
- On the smartHMI
- Select an Application (left below), e.g. the LBRJointSineOverlay
- Press one of the enabling switches half way (grey buttons on the back of the smartHMI). The joint control A1-A7 will light up (center below)
- Press and hold the play button (below right), and the enabling switch
- On the laptop open a terminal, and run
cd apps/build # on Linux
cd apps/build/Release # on Windows
./lbrjointsineoverlay
The robot should now be controlled by your Laptop, well done 😄! For open questions please leave an Issue.