primecal(1)

NAME
primecal -- primary robot calibration.

USAGE
primecal [<robotName>] [-sim[=<simaddr>]] [-on]

ARGUMENTS

DESCRIPTION
This program is used for doing primary calibration on a robot that calibrates using encoder index referencing (such the PUMA robots).

Prime calibration is the "initial" calibration which sets the relationship of the robot's joint angles to the outside world. What is done is this: The robot is put in a known position (by means of a jig, by prepositioning using the manufacturer-supplied language, or simply by moving the joints and reading their locations precisely).

Once the robot's absolute position is known, the angleToEncoder() routine for that robot can be called to determine the corresponding encoder values, and the encoders themselves are set to these values. The robot has now been calibrated by "brute force". What we do next, essentially, is obtain extra information so that the calibration can be done more easily.

Assume the encoder values at the known position are denoted by E_1. Each joint is then put into calibration mode and moved through increasing encoder values until the first zero index location is found; at this point motion stops. Denote the encoder values at this position by E_2. Since the number of encoder counts between zero index locations is constant (and known), the difference between E_1 and E_2 can be used to determine the zero index locations closest to some standard reference value (like 0). For historical reasons, this program, and software based on it, uses 32768 (0100000) for all reference values.

The output of the program is the set of encoder values corresponding to the nearest zero index locations greater than or equal to 32768. These values are printed to the file primecal.out, and should be used to instantiate the encCalvec field in the JLS structure for the robot in question.

ARGUMENTS

robotName --
    Optional robot name. If absent, the name is obtained from the system file $RCCL/conf/defaultRobot.

-sim --
    Causes the program to be run in simulator mode, in which it will attempt to connect to a robot simulator program (see robotsim) instead of connecting to a real robot.

    If unqualified, the -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 <simaddr>, as in -sim=<simaddr>. For the format of this address string, see simAddress(5).

-on --
    Leave the robot arm power on after the program has exited.

OPERATION
The program first enters into an interactive mode that allows the user to move the arm into a known location, if necessary. This interaction is driven by the automatic command completion utility known as the C-tree matcher. Full documentation on the C-tree matcher is given in the file doc/CtreeMatch.doc.

Once the arm is in a known position, the user can enter the command primecal. The program will then ask for the values of the robot angles corresponding to the present robot position. It then performs the primary calibration sequence described above, printing out the encCalvec vector (and writing it to the file primecal.out) when done.

C-tree matcher commands include the following:

primecal
    Exit interactive mode and do primary calibration.

quit
    Quit the program.

show
    Print the robot encoder values and the values associated with other program variables.

angle <jnt> (to|by) <angle>
    Move the specified joint to or by angle degrees (program must be in angle mode).

encoder <jnt> (to|by) <encoder>
    Move the specified joint to or by encoder counts (program must be in encoder mode).

move to encoders
    The program asks for a vector of encoder values, and the arm is moved to the corresponding location (program must be in encoder mode).

move to angles
    The program asks for a vector of angle values, and the arm is moved to the corresponding location (program must be in angle mode).

stop
    Stop the robot.

set speed
    Set the robot travel speed (degrees/sec.).

set angle mode
    Put the program into angle mode.

set encoder mode
    Put the program into encoder mode.

BUGS
Some of the code in the program assumes, at the moment, that the robot has 6 rotary joints. This is mostly C-tree matcher code.

SEE ALSO
JLS(3), makejls(1).

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.