potcal(1)

NAME
potcal

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

DESCRIPTION
A program used for determining the relationship between joint potentiometer readings and encoder values on robots that support potentiometers.

The program produces a first order linear model of encoder values as a function of potentiometer readings. The model is described by a slope and intercept value for each joint. The model is used by the PUMA calibration program pumacal as part of the calibration process.

The information obtained from this program is used to fill in the potSlope and potIntercept fields of the JLS structure (q.v.) for the robot in question. This is done by entering the values into the robot's .jls file, located in the directory $RCCL/conf. The slope values are placed in the slot marked potSlope, and the intercept values are placed in the slot marked potIntercept (see makejls for more information). As a convenience, values computed by the program are written into a file called potcal.out.

The program is interactive. Commands are entered using the C-tree matcher, an automatic command completion utility. Full documentation on the C-tree matcher is given in the file doc/CtreeMatch.doc.

The basic action invoked by the program is the "calibration sweep", which is initiated by the command calibrate. When each joint is calibrated, it is swept through its range. During this time, a monitor function operating at the control level samples the potentiometer and encoder values for each control cycle. A linear model of the encoder values as a function of potentiometer readings is then created from this data using a least-squares fit.

The program calibrates the joints one at a time, except for the wrist, where all three joints may be calibrated together using the command calibrate wrist.

Before asking the program to calibrate a particular joint, the robot should be positioned so that the joint can be swept completely through its range without hitting anything. The interactive commands move and angle can be used to accomplish this.

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 basic interactive commands include the following:

help
    Tells you to look at this man page.

calibrate <jnt>
    Do a calibration sweep of the indicated joint, and then display the calculated slope and intercept of the pot/encoder relationship. This data will also be written into the file potcal.out. By default, the joint will be swept through its entire range. The joint ranges are displayed as part of the show command.

calibrate wrist
    Calibrate all wrist joints at once.

show
    Print the robot position, joint ranges, pot readings, and variable settings.

angle <jnt> [to|by] <angle>
    Move the indicated joint to or by angle degrees.

move to midpoint
    Move all the joints to the center of their range of travel.

stop
    Stop the robot.

set travel speed
    Set the speed at which the robot responds to motion commands (degrees per second).

set travel speed
    Set the speed at which the robot performs a calibration sweep (degrees per second).

set sweepAngle
    Set the size of the interval through which the next calibration sweep will be performed. The sweep will be made along an interval which extends sweepAngle degrees to either side of the joint's mid range value. The direction of travel will be assigned so that the encoder values are increasing. This command affects only the next calibration sweep.

unset sweepAngle
    Clear any sweep angle setting made by set sweepAngle.

quit
    Quit the program.

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).