\documentstyle[12pt,final,twoside,times,sfheads]{rccldoc}
\begin{document}
\pagenumbering{roman}
\title{RCCL/RCI System Overview}
\author{John Lloyd and Vincent Hayward}
\date{July 1992}
\maketitle

\begin{abstract}
This is the principal ``overview'' document for RCCL/RCI.
It gives a brief introduction to the system, and then provides a short
description of each of the other system documents.

\par\vfill
\copyrightNotice
\end{abstract}

\parskip = 2ptplus3pt
\tableofcontents
\newpage
\pagenumbering{arabic}

\chapter{Introduction}

RCCL/RCI is a system for controlling robots using programs written in
the C language. Its main host systems presently consist of
UNIX workstations and the VxWorks real-time
programming environment.

Robot control programs consist of a parent task and one or more
real-time control tasks that are spawned by the parent.
These tasks execute in the background at high priority, 
and communicate with the parent task using shared memory.
On some UNIX implementations, the control tasks are not
UNIX tasks themselves and do not have access to regular
UNIX services. In most instances, the control tasks
execute on the same CPU as the parent task, but sometimes
(as is possible with the MicroVAX
implementation) they can be executed on auxiliary CPUs attached to the same
bus. The parent task is known as the {\it planning level},
while the set of control tasks is known
collectively as the
{\it control level}.

The control level tasks usually run at a fixed sample rate
and are responsible
for computing joint-level commands which are sent 
to the robots.
The robots in turn send joint positions and sensor feedback
back to the control tasks.
In most present applications, the control tasks compute joint-level
position commands, at rates of 50 to 100 Hz., which are handled
by the robots using internal PID servos running at a faster
rate (typically 1 KHz.). However, it is technically possible 
to do all the control calculations in the control tasks, bypass the robot
controller's own PID loop, and send current commands directly to the joints.
The limiting consideration in doing this is whether the host
system will allow the control tasks to be run fast enough.

\chapter{System Components}

The software architecture of the RCCL/RCI system is shown in Figure 
\ref{arch}, which should provide the reader with a qualitative feel
for what goes where.
\begin{figure}[p]
\boxedfullpagefig
{\psfig{figure=figs/rcclsys.idr}}%
{Software components of the RCCL/RCI system.}%
\label{arch}%
\end{figure}

\section{RCCL}

RCCL (Robot Control C Library) is a package that allows a programmer to 
control a robot arm in either Cartesian or joint coordinates. Its
principal features include:
\medskip
\begin{list}{}{}
\item[$\diamondsuit$]Data type definitions for objects commonly related to
robotics (such as vectors, homogeneous transforms, and quaternions) and
routines for manipulating these objects.

\item[$\diamondsuit$]A {\it position} data type for specifying 
transform equations.

\item[$\diamondsuit$]Primitives for issuing robot motion requests,
and a trajectory generator (implemented as one or more control
tasks) for servicing these requests.
Motion targets positions can be specified in either Cartesian
or joint coordinates. Cartesian targets are represented using transform
equations. Characteristics of the motion, such as acceleration,
velocity, and interpolation style, can also be specified.
Motion requests are generally asynchronous; the move 
simply queues requests for servicing by the trajectory generator
and returns.
Motion synchronization is effected using special primitives.

\item[$\diamondsuit$]The ability to set up monitor functions
that are executed in real-time at the control level and which communicate with
the planning level using shared memory. It is also possible to bind a 
homogeneous transform to a real-time function that continuously
updates it (using sensor data or predetermined path information). 
If the target
position for a robot motion contains one or more of these time-varying
transforms, the robot motion itself will track the changes. This provides a
convenient way of specifying adaptive, dynamic trajectories.

\item[$\diamondsuit$]A single RCCL program can control multiple robots.
It can also control a ``virtual'' robot, known also as an {\it object frame},
which is an imaginary coordinate frame in space, with
no robot attached, that can be moved around using
the motion control primitives. An object frame is useful because
it can be incorporated into the target position
for one or more real robots, causing the
motion of these robots to cooperatively track the single object frame.
\end{list}

\medskip
RCCL works by using a real-time control task to do
the trajectory generation. The control task also calls the monitor
and transform functions set up by the user. If RCCL is running on
several CPUs, a single control task is assigned to each CPU and they
are executed in lock-step at a single fixed sample rate. 
Parallelism is exploited by having different robots controlled on
different CPUs. 

The details of setting up the real-time task are hidden from the user, who
sees only primitives that enable the control of different robots and
turn the trajectory generator on. 

\section{RCI}

RCI stands for Real-time Control Interface (or, alternatively, 
Robot Control Interface). It is a package that allows the creation of
real-time control tasks attached to a host system process. 
Its principal features include:

\medskip
\begin{list}{}{}
\item[$\diamondsuit$]
Primitives for creating control tasks and specifying how they are to be
scheduled.

\item[$\diamondsuit$]
Primitives for allocating shared memory areas between various 
control tasks and the parent planning task.

\item[$\diamondsuit$] 
Simple support primitives for local memory allocation, diagnostic
printing, and sending messages between tasks.
\end{list}

\medskip
RCI tasks usually run on the host system CPU, but
can sometimes also be run on auxiliary CPUs attached
to the system backplane.

When originally written, the UNIX workstations on which
RCCL was based did not provide sufficient built in features
to create the real-time control tasks required by RCCL.
Instead, the necessary real-time support was added to the system
kernel, with RCI serving as a front end.

RCI also provides robot support data structures and
functions. These include:

\begin{list}{}{}
\item[$\diamondsuit$] Data structures defining the joint-level and kinematic
parameters for a robot. Information for these structures is kept in
separate files
for different robots and loaded dynamically into a program when it is run.

\item[$\diamondsuit$] Routines to do kinematic computations.

\item[$\diamondsuit$] A {\tt HOW} data structure which describes 
the run-time state of a robot, and a set of macros for sending
joint-level commands to the controller. 
This interface also handles
various sensor devices, such as force/torque sensors, joysticks,
parallel ports, analog-to-digital converters, and serial lines.

\end{list}

\section{The Robot Simulator}

The system contains a 3D graphical robot simulator (called
{\tt robotsim}) that can be used
in place of a real robot. It is useful for ``dry running'' programs,
or for developing applications when a physical robot/controller
is not available. An
RCCL/RCI program can be directed to connect to the simulator instead of to
real robots. 
Several robots may be ``simulated'' at once.
Currently, the simulator does {\it not}
do dynamic modeling or collision detection, although adding modules to
do these computations would be straightforward. 

{\tt robotsim} supports any robot known to the RCCL/RCI system.
A 3D graphic display of each robot is produced, along with other ``objects''
which can be defined in a configuration file. The graphic window contains
a small control menu for adjusting the view frame. A simple graphic
``teach pendant'' interface is also available.

The graphics is implemented using a generic graphic package called
Grf4 (written by the author) and 
can run under X11, SGI's GL, or SunView.
Grf4 permits the definition of lines, polygons, or convex objects, which are
rendered using either full shaded graphics (under GL), or as wireframes with 
backface removal (X11 and SunView).

RCCL/RCI programs connect to the simulator using Internet domain sockets. It
is therefore possible to run the simulator on a separate machine.

\section{CHASE}

CHASE is a small trajectory generator, built on top of RCI, that
is independent of RCCL.
It operates only at the joint-level, and does second order smoothing
of path segments using something similar to an adaptive chasing point
algorithm (RCCL, by comparison, uses path segment blending).

CHASE is mainly used to implement the various robot {\it utility}
programs described in the next section.

\section{Utility Programs}

RCCL/RCI comes with a small group of utility programs that allow the robot
to be calibrated and moved around; each of these can be run as
a command on the host operating system. A summary list is given below:

\refitem{\tt pumacal}
Program for calibrating robots.

\refitem{\tt move}
Moves the robot to various joint positions, in either relative or absolute
mode.

\refitem{\tt free}
Frees up the joints of a robot.

\refitem{\tt zerograv}
Frees up the joints of a robot, but applies a current to compensate for
the gravity loadings, making the arm appear ``weightless''. This only
works if a gravity model has been determined for the robot.

\refitem{\tt power}
Turn the arm power on or off.

\refitem{\tt primecal}
Make a primary measurement of the robot calibration point.

\refitem{\tt potcal}
Perform primary calibration of the potentiometer-encoder relationship
(for those robots, like the PUMA, which use potentiometers as an aid in
calibration).

\medskip
Each of these programs is described in detail in the {\it RCI
Reference Manual}.

\section{ARC}

Another useful program is {\tt arc}, the robotics desk calculator. {\tt arc}
is sort of a combination of an infix calculator, RCCL, and 
Matlab. It supports regular infix computations, base conversions,
matrix multiplication and inversion, and robot kinematic
and Jacobian calculations for any manipulator in the RCI database.
It may be run with the command 
\begin{verbatim}
        % arc
\end{verbatim}
and help may be obtained from
within the program using the command {\tt help}. 
Help on individual functions may be obtained with
\begin{verbatim}
        help <function>
\end{verbatim}
Keyword browsing on a topic
may be done with
\begin{verbatim}
        help key <keyword>
\end{verbatim}

\chapter{Present Scope of the System}

At the moment, RCCL/RCI has been installed on:

\begin{list}{}{}
\item[$\diamondsuit$] MicroVAX-II systems, including a multi-CPU
implementation using auxiliary KA630 or KA620 CPU boards attached to the
system Q-bus;

\item[$\diamondsuit$] Sun 4 SPARC systems running SunOS 3.2 through 4.2;

\item[$\diamondsuit$] SGI Iris systems running IRIX 4.0;

\item[$\diamondsuit$] A dedicated real-time VME environment running VxWorks.
This has some restrictions compared to
the UNIX systems, due mainly to the fact that VxWorks cannot not offer
complete UNIX functionality.

\end{list}

The main robots that have been interfaced to the system include
the Unimation PUMA 260, 560, and 760, running with the Mark I, II,
or III controllers. Built-in support is also
provided for the Stanford arm and the ``elbow'' manipulator,
and these can be run using the simulator. It is straightforward
to connect RCCL/RCI to any 6 DOF serial link manipulator, 
providing you have a low level controller interface that can
receive joint-level setpoints (and return the current joint
positions) at a fast rate of around 50 Hz. or more.
Interfacing the system to robots with more degrees of freedom is equally
easy from RCI's point of view, but a little bit more work would be
required to teach RCCL (which understands  Cartesian coordinates) how
to handle the redundant kinematics.

The names of the principal sites using RCCL/RCI are listed in the
file {\filefont doc/siteList}. Unfortunately, this information may not always
be accurate, since ``sites come and sites go''. Corrections or 
modifications to the information in this file is welcome.

\chapter{Description of Supporting Documentation}

The different documents currently available describing the RCCL/RCI system
include:

\subsubsection*{RCCL/RCI Update Notes}
\begin{list}{}{}
\item[]
If present, this document describes changes to the system, and/or
new features that have been added, which may not yet be properly described
in the main documentation. In general, the information provided in this
document should take precedence over the information provided in other
documents.
\end{list}

\subsubsection*{Multi-RCCL User's Guide}
\begin{list}{}{}
\item[]
The main introductory tutorial guide to Multi-RCCL, with lots of 
discussion and examples.
\end{list}

\subsubsection*{Multi-RCCL Reference Manual}
\begin{list}{}{}
\item[]
The reference manual for all the RCCL
functions and data structures. These ``man pages''
are also available online through the UNIX {\tt man} command.
\end{list}

\subsubsection*{RCCL/RCI Startup and Installation Guide}
\begin{list}{}{}
\item[]
This describes, first, what the typical user has to do to be able to run
RCCL/RCI programs, and second, what a system programmer has to do to install
the system and customize it.
\end{list}

\subsubsection*{RCCL/RCI on VxWorks}
\begin{list}{}{}
\item[]
Discusses specific details pertaining to the implementation
of RCCL/RCI on VxWorks.
\end{list}

\subsubsection*{RCCL/RCI Hardware Installation Manual}
\begin{list}{}{}
\item[] 
Describes the hardware work that needs to be done to configure RCCL/RCI for
a MicroVAX or Sun 4 host system, connected to a Unimation Mark X robot
controller. This includes adding communication devices, the possibility of
adding auxiliary CPUs to a MicroVAX system, and optionally adding
some hardware ``hooks'' to the Unimate controller.
\end{list}

\subsubsection*{RCI User's Guide}
\begin{list}{}{}
\item[]
A tutorial guide to the RCI system, with lots of program examples and
explanations.
\end{list}

\subsubsection*{RCI Reference Manual}
\begin{list}{}{}
\item[]
The reference manual for RCI, also available online through 
the UNIX {\tt man} command.
\end{list}

\subsubsection*{Extending the RCCL Programming Environment to Multiple Robots
and Processors}
\begin{list}{}{}
\item[]
This is a long version of a paper that was presented at the 1988
IEEE Robotics and Automation Conference in Philadelphia.
It describes some of the details of this most recent version
of the RCI/RCCL system, focusing on the changes that were introduced
to make the system
capable of handling multiple robots and processors. There are a few
discrepancies
between this paper and the other documentation, for which 
the other documentation should take precedence.
\end{list}

\subsubsection*{MicroVAX-II Kernel Support for RCI}
\begin{list}{}{}
\item[]
This document describes the software changes that need to be incorporated into
the uVAX BSD UNIX kernel to allow it to run RCI control tasks.
\end{list}

\subsubsection*{Real Time Control Under UNIX for RCCL}
\begin{list}{}{}
\item[]
This is a paper that was presented to the 3rd International Symposium on
Robotics and Manufacturing (Vancouver, Canada, July 1990),
which gives a conceptual description of RCI and its implementation.
\end{list}

\subsubsection*{Trajectory Generation in Multi-RCCL}
\begin{list}{}{}
\item[]
This paper gives an overview of the internals of the RCCL
trajectory generator, and specifically the code contained in the
file {\filefont rccl/traject.c}.
\end{list}
\end{document}
