# Hand-eye Calibration Loop Task

The purpose of the hand-eye calibration loop task is to move a motion device to various poses and at each pose to execute the hand-eye calibration task to extract, accumulate and finally compute the hand-eye calibration results. The task is executed when the application receives a command string with command key HEB or ACB, with a suitably EncodeID.

## Calibration Loop

The hand-eye calibration loop task has only one subtask called CalibrationLoop. The subtask has two blocks of significance. The first block, the CalibrationLoopBlock, is responsible for initializing the hand-eye calibration process and for locating and accumulating all calibration features and stage poses. A user sets the properties for the block that include the range of motion for each degree of freedom of the motion device, and parameters that control how this range is sampled. The block first initializes the hand-eye calibration task by executing it with the HEB command. It extracts and accumulates calibration target features by executing the hand-eye calibration task with the HE command. Once all the features are accumulated, the second block in the CalibrationLoop subtask, called the Compute Results block, computes the hand-eye calibration results by executing the hand-eye calibration task with the HEE command.

## Stage Move

The stage is moved before any image is acquired during the hand-eye calibration process. A script <StageName>Move is called by the Acquisition subtask in the hand-eye calibration task before the images are acquired. See more information about this in How to Command Stage to Move.