Wiki

Clone wiki

IIWA / Home

KUKA IIWA ROS Interface

This wiki explain the necessary steps to control IIWA robot through ROS. You first need to install ROS. The software has been tested on fuerte, hydro and indigo versions. For instructions about how to install them see fuerte installation, hydro installation, or indigo installation.

Install IIWA Node on Ubuntu

  • Go to your catkin workspace.
$ cd <your catkin folder>/src
  • If you follow the default instructions during ros installation, your catkin folder is at:
$  ~/catkin_ws
  • Getting the IIWA code from the repository:
git clone https://bitbucket.org/khansari/iiwa.git IIWA
  • Build IIWA Node on Ubuntu:
$ catkin_make 

Set-up the IIWA cabinet controller to accept ROS communications

  • You need to have login information to the IIWA cabinet in order to follow these procedures. If you do not have this information contact KUKA service support.
WARNING: The following instructions change the IIWA default configuration, and could potentially cause 
issues/conflicts with other applications running on the robot. 
WARNING: Follow these instructions at your own risk.
  • Login to the windows machine and open a terminal.

  • To enable ros communication, we need to take the reserve Ethernet Port out of VxWork control and install it directly in Windows. This should be done by executing:

C:\KUKA\Hardware\Manager>KUKAHardwareManager.exe -assign OptionNIC -os WIN
  • The NIC should now show up unassigned in the Device Manager.
A COMMON ISSUE: It is been reported by several users that the above command does not work in some new versions of
Sunrise OS, and gives the following error: "Assignment not possible while KS is running". To handle this issue you
need to remove KS from the windows auto startup. Restart the PC and now KUKA software should not be loaded. 
Now apply the command. After that, put back the KS in the windows auto startup. Restart the windows and you 
should be good to continue with the remaining steps 
  • Now install the windows driver that is found in C:\KUKA\Hardware\Drivers\Intel_82574L and reboot.

  • After rebooting, the port can be configured to freely communicate with ROS.

  • Go to "Control Panel", then "Network and Sharing Center", and then "Change adapter settings"

Network setting

  • Find the network card that is associated with the following hardware: "Intel(R) 82574L Gigabit Network Connection". Double click on it, verify if it is the correct hardware.

Network setup

  • Once you found the proper network connection, click on "Internet Protocol Version 4 (TCP/IPv4)", and then Properties. Make sure all the settings exactly match the picture above.

  • Plug an ethernet cable into the following ethernet port on the IIWA cabinet.

Ethernet cable plug

  • The other side of the cable should be plugged into the (Ubuntu) PC that will run roscore.

Remark

Due to this alteration, other applications using the KONI Ethernet Port of the Cabinet won't work anymore. For example, any application using the native KUKA's FRI library won't be functioning, as it uses the same Ethernet Port for communication. To revert the change execute:

C:\KUKA\Hardware\Manager>KUKAHardwareManager.exe -assign OptionNIC -os RTOS

Set-up a java project to install ROSCom application on IIWA

  • Open Sunrise Workbench

  • Create a new package with the name "ROScomPkg"

  • Copy the file ROSCom.java and paste it onto ROScomPkg. Note that "ROSCom.java" is at:

$ <your catkin folder>/src/IIWA/JavaNode/ROSCom.java
  • Create a new source folder in your sunrise project with the name ROSLib.

Sunrise Setting

  • Go to folder:
$ <your catkin folder>/src/IIWA/JavaNode/JavaLib
  • Copy all the the libraries inside this folder and paste it into ROSLib folder.

Sunrise Setting

  • Synchronize your project with the robot. You are all set!

Operating the Robot

  • On the ubuntu machine, open a terminal and type the following:
$ gedit ~/.bashrc &
  • Go to the last line of the opened file and add the following lines:
export ROS_MASTER_URI=http://192.168.168.1:11311
export ROS_IP=192.168.168.1
  • Open the network card setting, and make sure it has the following settings:
IP: 192.168.168.1
Netmask: 255.255.255.0
Gateway: 192.168.168.0
  • Open a new terminal and type
$ roscore
  • Take the IIWA control panel, click on Applications, and then on ROSCom

roscom

  • Put the robot on the "AUT" mode.

  • Click on play. This moves the robot to a good initial configuraton, and then start the communication with the ros server.

  • If you see the following message on the panel, you should be happy :-)

IIWA Ok

  • open a new terminal and type
$ rosrun IIWA IIWA-bin
  • The program should start the communication with the robot, and print the end-effector position. The robot is now in Cartesian impedance mode.

Updated