CalibrateHandEye

Navigation:  NxLib API > Commands >

CalibrateHandEye

Previous pageReturn to chapter overviewNext page

With this command you can calibrate the position of the camera with respect to a robot. The calibration routine currently supports two types of setups: either your camera is fixed with respect to the robot origin, or your camera mounted on the robot hand and is moving with the robot.

Fixed Setup

To calibrate a fixed camera you need to grab a calibration pattern with the robot, move the pattern with the robot and observe the pattern in these different poses with the camera. The exact position of the pattern on the robot hand does not need to be known, it will be calculated during calibration, along with the camera's pose relative to the robot origin.

Moving Camera

Similarly you can calibrate a moving camera on the robot hand. For this setup a calibration plate needs to be placed inside the robot's workspace, so that the camera can observe the calibration plate. Then you move the robot around and observe the pattern from different positions and angles. Again, the position of the calibration pattern does not need to be known and will be calculated during calibration, together with the camera's mounting position with respect to the robot hand.

Calibration Procedure

The overall calibration procedure is almost the same for both setups. Comments for moving/fixed setups are given in brackets:

Mount the camera (on the robot hand / inside the robot's workspace)

Place the calibration pattern (in the robot hand / beside the robot)

Move the robot into the start pose, i.e. a position and orientation such that the camera can detect the pattern well

Set GridSpacing to the correct value for your pattern. You might also use CollectPattern with DecodeData to obtain this information.

Make sure you don't have any collected patterns in the buffer yet (check PatternCount or execute DiscardPatterns)

Move the robot into different poses around the start pose. Random angle and position deltas work fairly well and are easy to implement.

oAt each generated position:

oStop for a while (0.5 - 2 seconds) to let the robot position settle. Most robots tend to oscillate around the target position a little, even after signaling that they reached the target pose. Small or no wait times can reduce the calibration accuracy significantly.

oCollect an observation of the pattern with the camera using CollectPattern. The observed pattern position will be stored in the pattern buffer, indicated by PatternCount.

oRetrieve the exact pose of the robot hand from your robot and store it in your program or in a temporary array inside NxLib's tree.

Call the CalibrateHandEye command and insert the stored robot poses into the Transformations parameter. Also specify your Setup.

Wait for CalibrateHandEye to finish. This might take approximately between 15 and 120 seconds to complete.

 
When the calibration is finished the command will set the Link node of the camera with which the patterns have been collected to the transformation between the camera and the robot hand (for the moving camera setup), or to the transformation between camera and robot origin (for fixed camera setup). The camera's Target system name will be set to the parameter Target given to CalibrateHandEye.

Additionally the computed PatternPose will be provided relative to the robot origin (for moving camera setup) or the robot hand (when using the fixed camera setup).

Note: The calibration data applied after the CalibrateHandEye command is not yet stored permanently on the camera! Use StoreCalibration to permanently store the link in the camera's eeprom.

Note: The calibration can be interrupted by the Break command.