\input manualMacros.tex
\manBegin
\manPageInfo{RCI Reference Manual}{}{}
\manTitle{pumacal}{1}
\manSection{NAME}
{\tt \manName{pumacal}}
-- program for calibrating the PUMA robot.
\manSection{USAGE}
\cverbatim
pumacal [<robotName>] [-v] [-nest] [-pots] [-atpark] [-park]
        [-nopark] [-on] [-sim[=<simaddr>]]
@endcverbatim

\manSection{DESCRIPTION}
Program to calibrate the PUMA robot.

There are several calibrating options. It is possible to calibrate from
a nest position, from the park position, or using the 
potentiometers (pots). These options 
are restricted depending on the type of robot: the PUMA 260 has a nest
but no pots; the other PUMAs do not have a nest but {\it do} have pots. The
essential idea behind calibrating is to estimate roughly where the
robot is (within an encoder shaft revolution), and then seek for a
special ``zero index'' mark on the encoder shaft to find exactly 
where the robot is.
Both the {\TT nest} and {\TT atpark} options do the rough
estimating by brute force: the nest or park positions are known, 
and the robot is assumed to be close to them. The {\TT pots} option uses
potentiometers to obtain a rough estimate of position from wherever
the robot happens to be.

The program was written for PUMA robots, but should be adaptable
to other robot types. Calibration and park angle
information is obtained from
the joint level structure (see {\tt JLS(3)}) for the robot in
question.
\manSection{ARGUMENTS}
Arguments may be given in any order.

\manItem{{\tt robotName}}
Optional robot name. If absent, the name is obtained from the system file
{\filefont \$RCCL/conf/defaultRobot}.
\manItem{{\tt -nest}}
Calibrate from the nest. Valid for the PUMA 260 only, and is the default
case for the PUMA 260.
\manItem{{\tt -pots}}
Calibrate using potentiometers. Valid only for non-PUMA 260's, and
is the default case for these robots.
\manItem{{\tt -atpark}}
Calibrate by making the assumption the robot is very close to the
``park'' position defined in the robot's {\tt JLS} structure.
\manItem{{\tt -park}}
Move to the park position after calibration. Default case for the
PUMA 260 only.
\manItem{{\tt -nopark}}
Do not move to the park position after calibration. Default case
for non-PUMA 260s.
\manItem{{\tt -v}}
Verbose -- prints out pot readings (if relevant), estimated encoder
positions, calculated actual encoder positions, and the number `N'
representing how many encoder shaft revolutions this actual position is 
from the principal calibration values (the smallest zero index locations
greater than or equal to 32768).
\manItem{{\tt -sim} --}
Causes the program to be run in simulator mode, in which it will attempt to 
connect to a robot simulator program (see {\tt robotsim}) instead of 
connecting to a real robot.
\manItem{}
If unqualified, the {\tt -sim} option causes the program to seek a simulator
running on the same machine under the same user name. A different simulator
can be specified by adding an address string {\tt <simaddr>},
as in {\tt -sim=<simaddr>}. For the format of this
address string, see {\tt simAddress(5)}.

\manItem{{\tt -on} --}
Leave the robot arm power on after the program has exited.

\manSection{SEE ALSO}
{\raggedright
{\tt JLS(3)}.

}
\medskip
The calibration of the puma robot is well described in the article 
``Breaking away from Val'', an document that originated at Stanford
University in the early days.
\manEnd
\end
