A robot having a spindle is calibrated by disposing a calibration tool in the
robot
spindle. The position of the calibration tool is measured. An axis of the spindle
is determined based on the measured position. A calibration tool center point is
determined based on the measured position. A robot tool rotation axis is determined
based on the determined spindle axis, robot tool center point, the determined calibration
tool center point, and difference in length between the calibration tool and a
robot tool.