Automatic robot self-calibration