Controlling Kuka Industrial Robots Flexible Communication Interface Jopenshowvar
Controlling Kuka Industrial Robots Flexible Communication Interface Jopenshowvar
Controlling Kuka Industrial Robots Flexible Communication Interface Jopenshowvar
net/publication/286490138
CITATIONS READS
28 8,462
5 authors, including:
Some of the authors of this publication are also working on these related projects:
A Novel Integrated Anti-sway System for Rolls-Royce Marine Shipboard Cranes (2012-2013) View project
All content following this page was uploaded by Filippo Sanfilippo on 16 December 2015.
(a)
(b)
Fig. 4: (a) The user program utilises JOpenShowVar to set the desired end-effector position and then the robot joints are
calculated by the KRC using the standard kinematic model, (b) a custom control algorithm can be implemented by the user
to calculate the joint values for the robot and then send these angles to the KRC to be actuated.
try (CrossComClient client = new CrossComClient(" if operating in position control mode, or by:
robotIPaddress", 7000)) {
//JOpenShowVar v0.1 reading xt = xa + ẋd Dt, (2)
Callback readRequest = client.sendRequest(new
Request(0, "$OV_JOG")); if operating in velocity control mode, where Dt is the esti-
System.out.println(readRequest);
//JOpenShowVar v0.1 writing mated time interval between two successive iterations. As al-
Callback writeRequest = client.sendRequest(new ready mentioned, JOpenShowVar cannot provide a real-time
Request(1, "$OV_JOG", "100")); access to the robot’s data. Only soft real-time applications
System.out.println(writeRequest);
//JOpenShowVar v0.2 reading can be realised. It takes a non-deterministic time to access a
KRLReal jog = KRLVariable.OV_JOG(); specific variable. According to our experiments, reported in
client.readVariable(jog); Section V, the average access time is about 5 ms. Therefore
System.out.println(jog);
//JOpenShowVar v0.2 writing Dt can be approximated to a slightly bigger factor of the
jog.setValue(10); the average access time. To achieve better performance, the
client.writeVariable(jog); average access time should be continuously monitored and
System.out.println(jog);}
updated. Perhaps, this may be a price to high to pay for some
Algorithm 1: A use-case example that highlights the applications with real-time requirements but JOpenShowVar
differences between the new methods and the deprecated still provides great advantages in terms of flexibility.
sendRequest method. Alternatively, when a custom control algorithm is needed,
the target joint configuration is given by:
for velocity control, where qa is the the actual joint angles Algorithm 3: Reading the actual torque for each axis, Java
vector that can be retrieved by using the readVariable method side.
of JOpenShowVar. These values are then forwarded to a
KRL program where the standard KRC functions are used E. Terminal and Graphical user interface
to actuate the robot. Another useful tool that comes with JOpenShowVar is a
Note that the possibility of implementing certain control console terminal that provides read-write text-based access
features does not influence the design for the presented to the robot’s data. It is particularly useful for system
interface. Instead, JOpenShowVar extends the functionalities administration and debugging purposes. To read a variable,
of the KRL language. it is sufficient to type the name of the desired variable and
press enter. From an implementation point of view, it uses the
D. Additional functions new simpleRead and simpleWrite methods. Fig. 5-a shows a
To simplify the low level communication protocol and simple use-case.
improve reliability, some additional methods are provided Besides, JOpenShowVar also offers a useful GUI that can
with the CrossComClient class: be used to monitor the robot’s state, visualise and manually
set variables. A screen shot of this convenient tool is shown
• the simpleRead and the simpleWrite methods are simpler
in Fig. 5-b. This interface is very intuitive for the user.
versions of the sendRequest function. In particular, these
methods do not execute any data parsing as opposed to IV. C ASE STUDIES
the sendRequest method. They allow for an easier and In this section, four case studies are presented to demon-
faster access, as shown in the Algorithm 2 sketch box. strate the potential of JOpenShowVar. The first two case
The two new methods return a raw string without parsing studies are open-loop applications, while the last two case
the information. The aim of these two new methods is studies describe the possibility of implementing closed-loop
to provide an easy way to monitor the status of the robot applications.
making it possible to print the raw information returned
from the KRC; A. Case study 1: controlling the Kuka KR 6 R900 SIXX
• the readJointAngles method uses the readVariable manipulator with an Android mobile device
method retrieve the actual joint angles vector, qa , of the To show the potential of the presented interface in control-
controlled robot, all at once; ling a Kuka industrial robot from an alternative input device,
• the readJointTorques method allows for monitoring the as a first case study, JOpenShowVar is used to control a
load of each joint actuator by retrieving the current Kuka KR 6 R900 SIXX manipulator with an Android mobile
torque of each axis of the arm, all at once. In particular, device. In this case, an open-loop application is implemented
readJointTorques retrieves the global KRL array variable by using the standard kinematics provided with the KRC. The
$TORQUE AXIS ACT and returns the current torque of Kuka KR 6 R900 SIXX, shown in Fig. 6-a, is a 6 DOFs robotic
each axis. This feedback signal is very important in order arm with a slim design and a small footprint.
to improve manipulator dexterity and to achieve crucial According to the operational scenario, an Android mobile
functions like sensitive collision detection and compliant application whose Graphic User Interface (GUI) is shown
control actions. In the Algorithm 3 sketch box, a possible in Fig. 6-b, is used to set the target position xt . By using
use-case is shown. the writeVariable method of JOpenShowVar this vector is
In addition to these methods, some other high-level func- forwarded to the KUKAVARPROXY and stored as a global
tions can be implemented by the user on top of the JOpen- value in a data structure. Finally, a KRL actuator program
ShowVar communication protocol. The implementation of iteratively retrieves the new global data and uses the KRC
some other possible high-level applications is included as a kinematics to actuate the robot. The code of the KRL
technical document in the public repository of JOpenShow- actuator program is shown in the Algorithm 4 sketch box.
Var. For Kuka industrial robots, the idle time between motions
(a) (b)
(a)
0.6 12
10
Delay [ms]
Position [m]
0.55 8
4
0.5
2
0
0.45 0 2 4 6 8 10 12 14 16 18 20
0 2 4 6 8 10 12 14 16 18 20 Time [s]
Time [s]
(a) Fig. 12: Case study 3: time-delay analysis for the correspond-
ing Cartesian paths shown in Fig. 11.
End−effector tracking, Y axis
0.6
Actual Moreover, to assess the communication delay of JOpen-
0.4
Desired
ShowVar, a time-delay analysis is carried out.
0.2
The considered time-delay represents the time for each
message to be received, performed and notified to the client
Position [m]
0
by the KRC. Particularly, this time-delay is obtained by
−0.2 considering the exact instant in which the request is dis-
−0.4
patched from the client and the exact instant in which
the information is received back from the client. It is not
−0.6
possible to exactly determine the time-delay mainly because
−0.8
0 2 4 6 8 10 12 14 16 18 20 Kuka has not released any information about it. During our
Time [s]
experiments, a deterioration of the time-delay has usually
(b) been noticed when making the selection of a program and
End−effector tracking, Z axis
when the robot is engaged in some movements or there are
1
Actual several active interrupts. When considering the causes of the
0.9 Desired
delay, it is possible to distinguish two main components that
0.8
affect the access time for a variable to be either read or
0.7
written from the client side:
Position [m]
0.6
• the time interval that is required for the TCP/IP protocol
0.5
to transfer the information from the client to the server
0.4
0.3
and then back to the client. This time component is non-
0.2
deterministic;
0.1
• the time interval that is required for the Kuka controller
0 2 4 6 8 10
Time [s]
12 14 16 18 20
to acquire the information from the robot. Also this time
component is non-deterministic.
(c)
As already mentioned in Section III, the time-delay is not
Fig. 11: Case study 3: path tracking for (a) the X coordinate, affected by the kind of access to be performed (whether
(b) the Y coordinate and (c) the Z coordinate. it is a reading or a writing operation) or by the length of
the message. Therefore, it is beneficial to aggregate several
variables in logical structures when reading or writing data.
This position error could be reduced even more by increasing By using data structures it is possible to simultaneously
the sampling resolution of the detected traversable path. access several variables, thereby minimising the access time.
Considering the third case study, a time-delay analysis
is carried out for the same Cartesian paths as shown in
B. Performances
Fig. 12. Even though there are a few spikes with a larger
Within the particular case study of the Leap Motion time interval, an average access time of 4.27 ms is obtained
Controller (case study 3), a real-time path tracking analysis of in this case. It should be noted that all the considered case
the Cartesian paths for X, Y and Z coordinates is performed, studies are equally affected by similar communication delays
measuring the difference between the desired and actual except for the second case study which is performed off-line
position of the robot’s end-effector. The results are shown and therefore not presenting any run-time delays.
in Fig. 11. To further assess the performances of the proposed inter-
C. Effectiveness
Concerning the fourth case study, the aim is to show
the possibility of operating the robot and transferring the
corresponding force feedback to the operator. The plots in
Fig. 14-a and Fig. 14-b show the actual position for the X, Y
and Z axes as a result of the haptic input device’s movements,
operated by the user, and the corresponding joint angles,
respectively. In this particular case, the operator manoeuvres
the robot to lift the end effector up at first, then down again
with a displacement also in the X and Y axes. In this case
study, the input signal is not scaled to the robot’s workspace
since the haptic device is only used to set the direction of
movement for the robot and to transfer the corresponding
force feedback to the operator. Even though there is a delay
between the input signal and the actual position, the results
show that the system is quite responsive to the user’s inputs.
Fig. 14-c and Fig. 14-d show the torques applied to the
robot’s joints and the corresponding forces applied to the
robot’s end-effector, respectively. The operator also perceives
Fig. 13: Target and response of the adopted PID controller
a force feedback that is proportional to forces applied to the
for all the joints of the robot.
robot’s end-effector.