# Vision Guided Hand-eye Calibration Commands

In vision guided hand-eye calibration, the motion system acts in response to the vision system's result string after a hand-eye calibration begins: after receiving hand-eye calibration start command, the vision system is responsible for computing the next target pose and send it back to the motion system. In response, motion system would move the stage to the requested target pose and return a command to the vision system with updated stage pose. When all poses are walked through, the vision system will run hand-eye calibration computation and then send an end status in the result string to the motion system, so that the motion system knows the hand-eye calibration is finished.

## ACB

ACB stands for auto calibration begins. It initiates a vision guided hand-eye calibration.

### Command String

ACB,<EncodedID>

Field | Arguments
--- | ---
<EncodedID> | EncodedID = StepID of hand-eye calibration loop task + Process Tag(2000)

### Result String

When requested task runs successfully:

ACB,<Status>, <X>,<Y>,<Z>,<A>,<B>,<C>CR/LF

Field | Arguments
--- | ---
<Status> | 2 : Success, return the next position
<X> | The X-coordinate of the next position for the motion system
<Y> | The Y-coordinate of the next position for the motion system
<Z> | 0 (not used)
<A> | The theta-value(in Degree) of the next position for the motion system
<B> | 0 (not used)
<C> | 0 (not used)

When fails:

ACB,<Status>

Field | Arguments
--- | ---
<Status> | ErrorCode : Fail

## AC

Executes a hand-eye calibration task to acquire images and accumulate extracted features of the calibration target at a certain stage pose.

### Command String

AC,<EncodedID>,<TargetID>,<X>,<Y>,<Z>,<A>,<B>,<C>

Field | Description
--- | ---
<EncodedID> | StepID of hand-eye calibration loop task
<TargetID> | 0 (not used)
<X> | The X-coordinate of the current position of the motion system
<Y> | The Y-coordinate of the current position of the motion system
<Z> | 0 (not used)
<A> | The theta(in Degree) of the current position of the motion system
<B> | 0 (not used)
<C> | 0 (not used)

### Result String

When the whole hand-eye calibration process is to be continued and the current calibration step runs successfully:

AC,<Status>,<X>,<Y>,<Z>,<A>,<B>,<C>CR/LF

Field | Arguments
--- | ---
AC | Command Key
<Status> | 2 : Success, return the next position
<X> | The X-coordinate of the next position of the motion system
<Y> | The Y-coordinate of the next position of the motion system
<Z> | 0 (not used)
<A> | The theta(in Degree) of the next position of the motion system
<B> | 0 (not used)
<C> | 0 (not used)

When the whole hand-eye calibration process is to be continued but current calibration step fails:

Field | Arguments
--- | ---
AC | Command Key
<Status> | ErrorCode

When the whole hand-eye calibration process is finished:

AC,<Status>CR/LF

Field | Arguments
--- | ---
AC | Command Key
<Status> | The result status 1 : Hand-eye calibration is done successfully ErrorCode : Hand-eye calibration fails