IOC Robotic's Lab

This page is dedicated to the KUKA Light Weight Robot (LWR) in the Robotics Laboratory.

thumb|alt=Example alt text|KUKA Light Weight Robot?

LASTS NEWS!! The KUKA is back! Though it\'s a noisy LWR now :( ...

Documentation

All documentation can be found in: /home/groups/robotica/Robots/Kuka:

  • ba_kr_c2_lr_en.pdf

:Data related to the hardware set up of the KUKA LWR (controller, security, etc.)

  • ba_lbr_4_en.pdf

:Basic technical data.

  • kss_53_lr_en.pdf

:The KUKA System Software manual, where all the information to operate and programm the KUKA Control Panel (KCP) is.

The Light Weight Robot: Set up and functioning

The KUKA LWR controller consists on an average computer that runs a simple version of Windows XP. This machine runs inside it a VxWorks operating system that controls the KUKA and its real-time cycle.

Access

The KUKA LWR can be accessed through:

 1) The Teach Pendant: kss_53_lr_en.pdf -> page 44: 4.1 KCP teach pendant.
 2) Pluging to the controller a keyboard and mouse and (optional) a screen. Both the mouse and the keyboard need to be plugged in before turning
    on the controller.
 3) Using rdesktop at 147.83.37.243 (needs password).

Changing the user group

Three user groups can be choosen: user, expert and administrator.

To change the user group: kss_53_lr_en.pdf -> page 46: 4.6 Changing user group.

Selecting the operation mode

There are four modes to operate the LWR, which can be selected using the key in the KCP:

  • Manual Reduced Velocity (T1)

:Test mode 1. :This is the safer mode. Velocity is very limited, and the Enabling Switch button needs to be pressed to move the robot, both manually or from a Kuka Robot Language program.

  • Manual High Velocity (T2)

:Test mode 2. :Velocity is not so limited, and the Enabling Switch button needs to be pressed to move the robot, both manually or from a Kuka Robot Language program.

  • Automatic (AUT)
  • Automatic External (AUT EXT)

More detailed information can be found in:

kss_53_lr_en.pdf -> page 20
3.3.3 Mode selector switch
kss_53_lr_en.pdf -> page 26
3.3.13 Overview of operating modes and active safety features
kss_53_lr_en.pdf -> page 47
4.8 Operating modes

Selecting the control mode

The LWR has 5 controllers that can be selected from the Kuka Control Panel (KCP):

  • Gravity Compensation

:The LWR can be moved by manually pulling and pushing its axis and links or the end-effector. It will behave as if there was no gravity.

  • Position

:The joints or the TCP can be moved using the right buttons or the mouse.

Velocity has to be set to a certain percentage of the maximum speed, which can be done as explained in kss_53_lr_en.pdf -> page 52
4.10.1 Setting the jog override (HOV).

:To change to joint position control or different reference frames of the end-effector position control press the buttonthumb|center|40px? until the desired one is selected.

  • Stiffness

:The joints or the TCP can be moved using the right buttons or the mouse and adding a stiffness and damping values to the joints or TCP, which adds them a spring behaviour. :Velocity and the reference frames can be selected as in the position controller.

The stiffness and damping parameters can be changed as explained in kss_53_lr_en.pdf -> page 99
6.1.2 Cartesian stiffness controller and kss_53_lr_en.pdf -> page 100: 6.1.3 Axis-specific stiffness controller via the $STIFFNESS variable (kss_53_lr_en.pdf -> page 101: 6.2 Configuring controllers via $STIFFNESS).
  • Txyz free

:This mode allows to move the TCP of the LWR only by position (keeping the orientation constant). The motion can be done manually (pulling or pushing) or using the KCP. :As what the LWR is doing with this controller is to permanently compute the inverse kinematics for the desired position of the TCP, bad behaviors may occur due to singularities. :In order to use this controller the reference frame has to be set to the TCP.

  • TxyzRz free

:This mode allows to move the TCP of the LWR only by position and the Z axis (keeping the X and Y axis orientation constant). The motion can be done manually (pulling or pushing) or using the KCP. :As what the LWR is doing with this controller is to permanently compute the inverse kinematics for the desired position of the TCP, bad behaviors may occur due to singularities. :In order to use this controller the reference frame has to be set to the TCP.

To change the controller: kss_53_lr_en.pdf -> page 59: 4.1 Manually selecting controllers.

Calibration of the joint positions and torques

First check that the tool is properly selected. In the KUKA Teach Pendant: Configure->Set Tool/Base: Set tool nº 1 (Tool nº 1 is a 0.2 Kg tool that seems to fit well with the LWR dynamics when it has no real tool. In order to add and configure tools do, in the TCP: Setup->Measure->Tool->Payload data: add or modify an existing tool).

To set the joint positions and torques to zero: kss_53_lr_en.pdf -> page 79: 5.5 Mastering the lightweight robot.

Running a Kuka Robot Language program

 1) If needed, switch to Position Control.
 2) Select the program.
 3) While pressing the Dead Man button on the back of the TCP press the green button with a '+'('-') sign to run forward(backward) the program.

The Fast Research Interface

The Fast Research Interface (FRI) allows low level control of the KUKA LWR. When the FRI are used the KUKA LWR controller becomes a client, which connects to a computer (server). When the connection is done the LWR starts sending UDP packages to the server, which in turn also sends another UDP packages to the client.

This packages have all the information of the robot (measured values of the robot, and commanded values), and it is defined in the friComm.h file.

Each package is sent at a certain frequency. This frequency can be set from 1ms to 100ms. The way to specify this frequency will be showed later on this document.

Set connection

The FRI can be accessed by connecting through the 3COM card in the controller, which is directly connected to the VxWorks on the controller.

Setting the connection

When the FRI are used, the LWR becomes the client, and needs to be connected to a computer, where all the commands are generated. That means that the LWR needs the IP of the server/host. There are two ways to set this.

By default the server IP and port are set in the controller computer in the file: "C:/KRC/ROBOTER/INIT/Dlrcc.ini". FRIHOST is the server IP.

The server IP can also be changed from a KRL (KUKA Robot Language) program by using the sentence:

  retval=friSetup("147.83.37.26",49938,49938)

The first port is the client port, while the second is the server port. If the second port is set to 0, the server port is the same as the client's.

Check connection

Before starting to use the FRI check the connection with the 3COM card:

 1) Check that the ethernet cable from the 3COM is properly connected: orange light ON. If it's OFF push the cable harder, as sometimes its connection 
    is not very good.
 2) $ ping 147.83.37.241

Running the KUKA LWR OROCOS/ROS node

The lwr_fri_orocos OROCOS package

This OROCOS component creates a UDP server that connects to the 3COM card of the KUKA LWR controller.

This component reads the data coming from the LWR (joints positions, torques, jacobian, mass matrix, etc.) and writes the UDP package that command the LWR. The package architecture is defined in the C file friComm.h that comes with the KUKA LWR license.

This node can be found in: [http://wris.ioc.upc.es/wiki/index.php/The_lwr_fri_orocos_OROCOS_package The lwr_fri_orocos OROCOS package]

The firsts steps to be done, never-minding the node used, are:

 1) Switch ON the LWR.
 2) Switch ON the FRI in MONITOR mode. Now you can read the LWR values.
 3) Release the brakes by pressing the Dead-Man button and (in position control) manually command, after three seconds, any of the joints of the 
    robot. A sound in the brakes will sound and the breaks will be freed.
 4) Run the Orocos, ROS or any node that will read from or command the LWR.
 5) Turn the LWR to COMMAND mode when you want to command it.

The lwr_fri_ros ROS package

This ROS node connects to the LWR FRI OROCOS component (lwr_fri_orocos) and allows the user to write to its Input, Output Ports and Properties through ROS Topics and Services.

This node can be found in: [http://wris.ioc.upc.es/wiki/index.php/The_lwr_fri_ros_ROS_package The lwr_fri_ros ROS package]

The lwr_fri_ros Control ROS package

This section is about the lwr_fri_ctrl node in iocros svn repository.

This node implements a simple planner in order to test a position control of the LWR. Since the robot understands that any commanded joint positions given to him needs to be solved in one cycle, it is totally necessary to divide the path and give him little steps.

Position Control

This is the default control.

In order to run the LWR in position control do:

 $ roslaunch lwr_fri_ctrl kukalwr_ctrl.launch

The topic to publish the joints is: /dsdJntPosCtrl

Example

To do a test run:

 1) $ roslaunch lwr_fri_ctrl kukalwr_ctrl.launch
 2) In another window:
    $ rostopic pub /dsdJntPosCtrl sensor_msgs/JointState '[0, now, base_link]' '[name]' '[1.5, -0.7, 0.6, 1, -1, -1, -0.5]' '[]' '[]'
 3) In the same window, after 'Ctrl+C':
    $ rostopic pub /dsdJntPosCtrl sensor_msgs/JointState '[0, now, base_link]' '[name]' '[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]' '[]' '[]'
 4) Switch between those to positions to check the robot motion.

Torque Control

In order to use the torque control some things need to be done.

First of all it is very important to do a good calibration. Otherwise the robot may behave strangely and unexpectedly, which may cause dangerous motions.

Second it is necessary to put the LWR in joint impedance control mode, which can only be done from the TCP. That means running a KRL program that sets the LWR in joint impedance mode.

Second it is necessary to set the joint stiffness (k_j) to zero, as the control law for the torque is:

thumb|upright=3.0|center?

This sets the LWR behaving like in Gravity Compensation.

Then it is necessary to open the FRI (Monitor mode), start and configure the [http://wris.ioc.upc.es/wiki/index.php/The_lwr_fri_ros_ROS_package lwr_fri_ros] package and set the FRI in Command mode. At this point the LWR can be commanded by torque values.

Step by step the procedure is:

 1) Calibrate and check the payload data of the robot.
 2) In the Teach Pendant (TP), in Position Control: Open the EJES.SRC program and run it until the 'halt' command. This sets the LWR in Joint
    Impedance Control and sets all the joint stiffness to 0.
 3) In the TP: FRI -> Open. This sets the FRI in Monitor Mode.
 4) In the PC, open the ROS node: ('$roscore' in a new window, if needed) $rosrun lwr_fri_ros lwr_fri_ros-gnulinux
 5) Set the ROS node in Joint Stiffness mode: In a new window do: $rosservice call /control_mode '[3]'. A 3 must be returned.
 6) In the TP: FRI -> Start. This sets the FRI in Command Mode.
 7) Send values to the /addJntTrq ROS topic!
Example

To do a test run, after the steps shown before do, in a new window:

 $ rosrun lwr_fri_trqctrl_cmd lwr_fri_trqctrl

With this ROS node you can command the joint by increasing/decreasing its torque values using the keyboard.

Watch out and stay close to the Emergency Stop as it is easy to achieve fast and unexpected motions in really short time!!!

Watch out not to add torque to joint limits, as the actuators may get damaged!!!

Problems and solutions

  • Message: LoadData FT6
    1) Switch to position control. 2) Monitor -> 1 Rob. Position -> 1 Axis Specific 3) Move the joint J2 to around 120º and J3 to 70º (approximatelly). 4) Ackn. All

Under construction