Skip to content
Salvo Virga edited this page Jun 5, 2019 · 54 revisions

This wiki aims to give the information needed to use and extend the ROS packages for the KUKA iiwa LBR.

It is aimed to readers familiar with both ROS and KUKA's Sunrise Workbench and Robotics API. This wiki might briefly introduces some concepts from both frameworks, but it doesn't want to replace their original documentation. Therefore, please refer to their respective documentation if needed.

MIND YOUR SPEED: From iiwa_stack 1.2, when ROSSMartServo starts the robot will use some default values for its velocity and acceleration - 0.5 (50%) and 1.0 (100%) respectively. We provide a way to change the velocity and acceleration at runtime

Content

  1. Introduction
  2. Setup Guide
  3. Features
  4. Safety Configuration
  5. Using a tool
  6. Simulation
  7. FAQs / Troubleshooting
  8. Contacts

Introduction

The KUKA iiwa LBR redundant manipulator is programmed using the KUKA's Sunrise Workbench platform and its Java APIs.
A Sunrise project, containing one or more Robotic Application can be synchronized to the robot cabinet and executed from the SmartPad.

Within this software package, you will find a Robotic Application that can be used with the robot.
It establishes a connection to machines connected via Ethernet to the robot cabinet via ROS.
The machine(s), having ROS installed, will be able to send and receive ROS messages to and from the aforementioned Robotic Application.
We make use of ROS messages already available in a mint ROS distribution as well as custom ones, made to work with the KUKA arm (iiwa_msgs).
A user is able to manipulate the messages received from the robot and to send new ones as commands to it, simply within C++ or Python code, taking leverage of all the ROS functionalities.

In this wiki, we will refer as the ROS side for the machine equipped with ROS connected to the robot cabinet via the X66 port and the SUNRISE side for anything running on the cabinet itself. The following image shows a schematic overview of the system architecture :

system overview

Setup Guide

IMPORTANT : A version of Sunrise Workbench with the Sunrise.Servoing module is required to use this stack. If you don't have the Connectivity module, you might want to ask KUKA for it.

  1. Connect an ethernet cable between the X66 port of your SUNRISE Cabinet and your ROS machine
  2. By default the SUNRISE Cabinet IP address is 172.31.1.147. Setup the network interface on the ROS machine to be in the same subnet. (e.g. 172.31.1.150). Ping the SUNRISE Cabinet from your ROS machine to check that everything is fine.
  3. Clone, build and setup iiwa_stack on your ROS machine.
  4. Clone and setup a Sunrise Project with iiwa_stack on your SUNRISE Cabinet.
  5. Run a roscore on your ROS machine and then the Sunrise Application ROSSMartServo from your SmartPad.
  6. Done! The robot should be now connected to the ROS Master, you should have state and command topics (check rostopic list)

NOTE : As for any ROS workspace, remember to source the ROS workspace containing iiwa_stack with source devel/setup.bash for any new terminal window, or add that to your ~/.bashrc

Features

After the setup is done there should be (at least) a Robotics Application installed on the robot: ROSSmartServo. This application requires having an instance of ROS running on the machine connected to the cabinet. That basically means running a roscore or call a launch file on a terminal. If you start ROSSmartServo without a ROS Master being online, it will wait until one is started. It should not matter which one you start first, ROSSMartServo or the ROS Master.

iiwa_stack allows users to perform the following:

Safety Configuration

❗ SAFETY FIRST! ❗
An industrial robot is not a toy and you may harm yourself due to misuse. In general, it is a good practice to test your code in T1 mode and have your hand close to the emergency stop. More on safety can be found in the manuals given out by KUKA, you should read them carefully before using the robot.
Within a Sunrise Project is possible to set a Safety Configuration for the robot. This should be done properly, following the KUKA manuals and your needs.
In industrial scenario, a technician should be responsible for it.

We are no industrial safety experts and we don't take any responsibility about the Safety Configuration you are going to use. What we can do, however, is to show you what we use and why. You could use our settings as a starting point, but we don't guarantee it is optimal for you. The file for the Safety Configuration varies along different versions of Sunrise OS, so we are not able to share the file itself.

Our Safety Configuration

Using Tools

Since it's quite unlikely for any user to control the robot without attaching any tool to its flange, we show now how to extend iiwa_stack for that.
You will have to create small ROS packages that make use of iiwa_stack.
For educational purpose ONLY, we created an additional repository that simulates that.

HERE you can find the sample packages.

  • iiwa_tool_description: shows how to define a URDF to work with a robot equipped with a tool.
  • iiwa_tool_moveit: shows how to use the URDF defined above with MoveIt!
  • iiwa_tool_examples: contains small and trivial examples on how to control the robot.

Step-by-step, we will:
Attach a tool to the robot - Create a new robot definition
Create a MoveIt! package with the new robot definition (Optional - you don't need this if you don't want to use MoveIt!)

Simulation

Simulation with Gazebo is working for both iiwa models using Position controllers.
The inertia values in the URDF are not guaranteed to be accurate.
You can run :
roslaunch iiwa_gazebo iiwa_gazebo.launch model:=[iiwa7|iiwa14]
to load the robot into Gazebo with an empty world, you can follow the includes in the launch file to modify it to your needs.

FAQs / Troubleshooting

Which version of Sunrise.OS/Sunrise Workbench is supported?
I have Sunrise version x.x.x, can I downgrade to a previous version?
Is Gravity Compensation mode supported?
Are the inertia values in the URDF accurate?
Launching roscore or a launch file nothing happens
I can read the state of the robot, but it doesn't move when I send commands
Other useful Robotic Applications that you might want to have on the robot
Add a new message to iiwa_msgs

Contacts

Salvatore Virga : [email protected]
Marco Esposito : [email protected]

Clone this wiki locally