How to calibrate the SCARA robot
Atanas Georgiev
Version 1
This version performs calibration at only one level which is very close
to the turntable's surface (approx. 5mm above it). All scans are taken
at that level and you need not move the cube.
These are the steps to perform the calibration:
- Define the environmental variable:
If you use C-shell, type:
setenv CALIBRATION_DIR /proj/ect/atanas/scara/bin
If you use K-shell, type:
export CALIBRATION_DIR=/proj/ect/atanas/scara/bin
- Turn the robot and the laser on.
- Change to the directory where you want the transformation matrix saved.
If you already have the file turntbl.trn there, the new transformation
matrix will be inserted at the beginning of this file; all your previous
transformations will be kept. If this file doesn't exist, it will be created.
- Put the big cube on the turntable, so that one of its vertical
edges faces the center of the turntable (there is a hole there) and
the opposite vertical edge faces the range finder. This is the
approximate initial position.
- Run the program calscan to take the calibration scans:
$CALIBRATION_DIR/calscan
- This program will create the files scan0, scan90, scan180 and scan270.
You may delete them after the calibration is over.
- Start Mathematica 3.0 and run the second program to obtain the
transformation matrix:
mathematica30 $CALIBRATION_DIR/Calibration.nb &
- Press Shift+Enter to compile the program. It will take a
little while.
- Type
Calibrate[]
and press Shift+Enter again to run the calibration procedure.
- When the procedure terminates, the transformation matrix will appear
at the beginning of the file turntbl.trn.
- Exit Mathematica. You don't need (and you should not be allowed)
to save the modifications.
Version 2
This version performs calibration at two levels which are furthest apart.
Thus it takes into account the deviation of the turntable's normal from
the perfectly vertical line going up from the turntable's center. This
calibration works a little better for very tall objects. For normal sized
objects it performs almost the same as version 1.
These are the steps to follow:
- Define the environmental variable:
If you use C-shell, type:
setenv CALIBRATION_DIR /proj/ect/atanas/scara/bin
If you use K-shell, type:
export CALIBRATION_DIR=/proj/ect/atanas/scara/bin
- Turn the robot and the laser on.
- Change to the directory where you want the transformation matrix saved.
If you already have the file turntbl.trn there, the new transformation
matrix will be inserted at the beginning of this file; all your previous
transformations will be kept. If this file doesn't exist, it will be created.
- Run the program calscan2 to take the calibration scans:
$CALIBRATION_DIR/calscan2
- The program will notify you that it starts scanning the bottom
level. Put the big cube on the turntable, so that one of its vertical
edges faces the center of the turntable (there is a hole there) and
the opposite vertical edge faces the range finder. The cube should be
placed directly on the turntable. This is the approximate initial position.
When ready, press Enter.
- When the program takes all the bottom level scans it will notify you
that it starts scanning the top level. Place the big cube according to the
same guidelines as in the previous step, but approximately 13 centimeters
higher (it doesn't have to be the same position, just follow the same
principles). For this purpose you may use the metal tiles in our lab.
The cube should be perfectly horizontal!. This level is almost the
top range of the robot's arm. When ready, press Enter. The program will
take all the necessary top level scans.
- The program will create the files scan_lo0, scan_lo90, scan_lo180,
scan_lo270, and the corresponding '*_hi' files. You may delete them
after the calibration is over.
- Start Mathematica 3.0 and run the second program to obtain the
transformation matrix:
mathematica30 $CALIBRATION_DIR/Calibration2.nb &
- Press Shift+Enter to compile the program. It will take a
little while.
- Type
Calibrate[]
and press Shift+Enter again to run the calibration procedure.
- When the procedure terminates, the transformation matrix will appear
at the beginning of the file turntbl.trn.
- Exit Mathematica. You don't need (and you should not be allowed)
to save the modifications.