Remote Control of A Standard ABB Robot System in R
Remote Control of A Standard ABB Robot System in R
net/publication/238559146
Remote control of a standard ABB robot system in real time using the
Robot Application Protocol (RAP)
CITATIONS READS
12 1,254
3 authors, including:
Gunnar Bolmsjö
Linnaeus University
96 PUBLICATIONS 847 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Gunnar Bolmsjö on 22 January 2014.
possibly complex service). A special RAPID program asynchronous, there is need for a mechanism to be cer-
with a designated sequence of move instructions has to tain that a particular variable holds the data previously
be down-loaded to the controller. The RAPID program written to it. This handshaking problem has been re-
needs to be carefully designed to be able to let a remote solved by using busy wait (a polling method) in the
application control the robot’s motion in a master-slave RAPID code as well as in the router. The pnum vari-
fashion. The relevant part of the program consists of a able in the running RAPID program is continuously
loop where a set of move instructions continuously are monitored and when it eventually becomes updated in
executed as shown below. the RAPID program, the next robtarget structure update
is sent from the router to the robot controller.
!RAPID program executing on
!robot controller /* Router pseudo code to handle */
... /* routing of data and handshaking */
PERS num pnum := -1; /* between master and slave */
PERS num p0set := 0;
... static int pnum = -1;
PERS robtarget p0:=[...];
... int pnumChanged()
WHILE NOT aborted DO {
WaitUntil p1set <> 0; RAPVAR_DATA_TYPE data;
p1set := 0;
pnum := 0; readRAPIDVar("pnum", data);
MoveL p0, v, z, tool0; if (data.RAPVAR_DATA_TYPE_u.num != pNum) {
pNum = data.RAPVAR_DATA_TYPE_u.num;
WaitUntil p2set <> 0; return 1;
p2set := 0; }
pnum := 1; return 0;
MoveL p1, v, z, tool0; }
master is unable to send values upon a request, the slave used to send both single and array variables from the
robot will come to a temporary stop until the master is RAPID program to the client. To receive the values, the
ready to resume delivery of joint values. client has to act as a RPC server, either as a thread or as
a separate application. However, since the instruction
2.5 The router as a RAP application example
itself is asynchronous, it is not suited for handshaking
Some of the strengths of RAP are shown in the support- purposes.
ing parts of the router. Besides handling the real-time RAPID executes in a low prioritized thread on the ABB
issues of routing values from master to slave, the router robot controller. Latencies measured as time between
provides a RAPID compile environment within emacs, data request and response varies dependent of the task
a well known LISP based editor. By issuing a compile the robot currently handles. Latencies has not been
command in emacs, the RAPID program will get syntax specifically measured in this paper but [1] reports 15
checked and any errors will be shown with row, column to 20 ms on average.
and error message in a second window. By clicking on It is for some reason not possible to send jointtarget
the error, the cursor will mark the offending line in the structure values directly using RAP even though the
RAPID program, see Figure 3. structure is defined in the RAPID language. As a work
Behind the scene, the actual compilation is performed around, a kinematic model of the robot and some simple
remotely on the robot system. By using RAP, the calculations to represent the rotation with quarternions,
RAPID program is sent to the robot controller and is easily create a robtarget structure from joint values. A
loaded and checked. The errors are saved in a log file second method could be to define a jointtarget structure
on the robot controller and are transferred back to the in RAPID where the different joint values are simple
router and displayed to the user in an user-friendly fash- floating point variables, and make a RAP call for each
ion. If the RAPID program passes the syntax check, the of the individual variables. A third method might be
user may choose to automatically run it. to define an array of floats in RAPID and use the array
indices as the joint values in the jointtarget structure.
2.6 Using a virtual slave robot
This would be advantageous to the second method in
When a virtual robot is used as slave it is modeled in a that only one RAP call would be needed to send all six
CAR session and the same API (Application Program- array values. In this paper the first method has been
ming Interface) as for the physical slave is used. To used in order to minimize the number of RAP calls and
mimic the speed deficiencies caused by RAP-RAPID to add as little overhead as possible to the RAP server
interaction in the real system, latencies and speed limits and to the RAPID interpreter.
can be specified. Because of the precise timing needed in the handshak-
ing process, the choice of master becomes important.
3 RESULTS The master has to be able to provide new joint values
when asked for by the router. Since a CAR applica-
It is possible to control a standard robot system on-line tion normally defines simulated time, it has turned out
from a remote workstation using RAP, RPC and a care- to be difficult to correlate simulated time with “real”
fully designed rapid program and handshaking routines. time provided by the robot controller. As a result, the
A transfer limit of approximately 10 Hz has been mea- physical robot’s lag behind the virtual increased during
sured using a local Ethernet-based network. An envi- motion. The problem was eliminated using the simple
ronment for remote editing and compilation of RAPID master which provided joint values timely. Needless to
programs is provided as an example of benefits of RAP say, the difference between the router and the master is
utilization. purely conceptual; they could of course be built as one
application.
4 DISCUSSION Even if motion has been in focus in this paper, RAP of-
fers a wide range of other services such as reading and
RAP is an add-on to the robot control system that has writing of several variables using only one RAP call,
been designed for monitoring purposes more than heavy advanced file management services and device access.
interaction with the RAPID program. As mentioned be- Some services are missing, however. As mentioned be-
fore, when a robtarget structure is sent from the router fore, the RAPID variables of jointtarget structure type
to affect a variable in the RAPID program, the RAP cannot be read or written without a workaround. Also
call responds (with no error) at some time before the mentioned, the asynchronous RAPID function SCWrite
variable in the RAPID program is updated and useful cannot be used for effective handshaking purposes. Fur-
in a move instruction. In practice, neither RAP nor thermore, [12] states that the function might fail if the
RAPID give any choice but to use busy wait (a polling SCWrite messages comes “so close that they cannot be
method) to synchronize the router and the RAPID pro- sent to the external computer”, a characteristic that does
gram. Based on these prerequisites, a transfer limit of not relate well with performance. A more reliable write
approximately 10 Hz has been measured using our lo- function would be helpful. A third desirable function
cal network. The SCWrite RAPID instruction can be would be an atomic test and set. Then the two lines
Proceedings of the 33rd ISR (International Symposium on Robotics) October 7-11, 2002
Figure 3: The router provides an emacs compile environment which allows the user to remotely edit and execute RAPID
programs (the program in the figure is just provided as an example, please disregard from details). After an unsuccessful
compile, the error is shown in a second window. By clicking on the error, the cursor will mark the offending line in the
RAPID program.
Proceedings of the 33rd ISR (International Symposium on Robotics) October 7-11, 2002
ACKNOWLEDGMENTS
REFERENCES