VGRHandEyeCalibration

The VGRHandEyeCalibration function allows you to configure hand-eye calibration parameters and store calibration data.

The VGR command that executes the hand-eye calibration process assigns a CalibID. The CalibID starts at 0. When a calibration is successful, the function stores the calibration data with the assigned CalibID. If a calibration is unsucessful, the function deletes the corresponding data with the assigned CalibID.

Note: You can only use one VGRHandEyeCalibration function at a time. If you add more than one VGRHandEyeCalibration function, the cell returns an error stating that a VGRHandEyeCalibration function already exists. Once a function returns the error, it does not return to a valid state even if you remove the previous VGRHandEyeCalibration function.

The VGRHandEyeCalibration function does not have a limit to the number of stored calibrations. You can use a VGRHandEyeCalibration function to store as many calibrations as the memory of your vision system allows.

You can export and import VGRHandEyeCalibration functions to share calibration data between jobs.

If you provide an input parameter with an incorrect value, the VGRHandEyeCalibration function returns an error stating that the cell input is invalid. If you correct the invalid parameter, the function returns to a valid state.

During auto-calibration, the part moves along the X and Y axes, and rotates along the Z axis based on the settings you specify in the AutoCalibration section of the VGRHandEyeCalibration property sheet.

Note: Make sure that the trained feature of the part is in the center of the training region when you begin the auto-calibration procedure. Manually moving the part away from the center of the region can cause auto-calibration to fail. Adjust the First Step Size parameter to make sure that the part does not move outside the field of view.

VGRHandEyeCalibration Inputs

Syntax:VGRHandEyeCalibration(MovingCam,FirstStepSize,NumberOfStepsX,NumberOfStepsY,NumberOfStepsRotated, AngleMin,AngleMax,CantileverCompensation,AutoStepSize,RegionDiameter, MovingRangeXMin,MovingRangeXMax,MovingRangeYMin,MovingRangeYMax,ClearData)

Parameter Description
MovingCam Enable if the vision system is mounted to the robot arm. Disable if vision system is stationary. If you change the MovingCam parameter, it applies to all existing calibration data.
AutoCalibration First Step Size

Specifies the distance of the first step for Auto Step Size when the vision system is calculating the optimal step size for field of view. The default is 1.

Range: 0.001-100

Number of Steps X

Specifies the number of steps to move along the X axis. The default is 5.

Range: 3 - 16

Number of Steps Y

Specifies the number of steps to move along the Y axis. The default is 5.

Range: 3 - 16

Number of Steps Rotated

Specifies the number of steps to rotate. The default is 3.

Range: 2 - 16

Angle Min

Specifies the minimum degree of the rotation range based on the starting pose provided to the ACB command to initialize the auto-calibration. The default is -15.

Range: -360 - 0

Angle Max

Specifies the maximum degree of the rotation range based on the starting pose provided to the ACB command to initialize the auto-calibration. The default is 15.

Range: 0-360

Cantilever Compensation Check this checkbox to automatically calculate and apply a translational movement to bring the trained feature back into the center of the field of view.
Auto Step Size Check this checkbox to automatically calculate the size of each moving step. Enabled by default. If you disable Auto Step Size, you have to manually specify the part moving range using the Moving Range X and Moving Range Y parameters.
RegionDiameter

Specifies the diameter of the trained feature. The parameter helps the Auto Step Size moving step calculation to make sure that the trained feature does not move out of the field of view.

Range: 1 - 10000

Moving Range X Min

You can manually specify the lower boundary of the moving range along the X axis based on the starting pose provided to the ACB command to initialize the auto-calibration. For example, if the X coordinate value of the pose provided to the ACB command is 10, and the value of the Moving Range X Min parameter is -20, then the lower boundary of the moving range is -10.

Note: If you have enabled Auto Step Size, the Moving Range X Min parameter is disabled.

Range: -10000 - 0

Moving Range X Max

You can manually specify the upper boundary of the moving range along the X axis based on the starting pose provided to the ACB command to initialize the auto-calibration. For example, if the X coordinate value of the pose provided to the ACB command is 10, and the value of the Moving Range X Max parameter is 20, then the upper boundary of the moving range is 30.

Note: If you have enabled Auto Step Size, the Moving Range X Max parameter is disabled.

Range: 0 - 10000

Moving Range Y Min

You can manually specify the lower boundary of the moving range along the Y axis based on the starting pose provided to the ACB command to initialize the auto-calibration. For example, if the Y coordinate value of the pose provided to the ACB command is 10, and the value of the Moving Range Y Min parameter is -20, then the lower boundary of the moving range is -10.

Note: If you have enabled Auto Step Size, the Moving Range Y Min parameter is disabled.

Range: -10000 - 0

Moving Range Y Max

You can manually specify the upper boundary of the moving range along the Y axis based on the starting pose provided to the ACB command to initialize the auto-calibration. For example, if the Y coordinate value of the pose provided to the ACB command is 10, and the value of the Moving Range Y Max parameter is 20, then the upper boundary of the moving range is 30.

Note: If you have enabled Auto Step Size, the Moving Range Y Max parameter is disabled.

Range: 0 - 10000

Clear Data Clears the trained robot pose and part pose data. Disabled by default. The function does not update with new hand-eye calibration data if Clear Data is enabled.

VGRHandEyeCalibration Outputs

Results

VGRHandEyeCalibration results table containing CalibID, Calibrated, FOV Width, FOV Height, Pixel Size X, Pixel Size Y, RMS in Image2D, and RMS in Home2D.

VGRHandEyeCalibration Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table.

GetNumOfCalibrated(VgrHandEyeCalib) Returns the number of successful calibrations with stored calibration data.
GetCalibId(VgrHandEyeCalib, Index)

Returns the CalibID of the calibration corresponding to the index.

Note: The index must be a numerical value, otherwise the cell returns an error stating that the input is invalid.
GetCalibrated(VgrHandEyeCalib, CalibID)

Returns the calibration status of the selected CalibID.

  • 0: not calibrated
  • 1: calibrated
Note: The CalibID must be a numerical value and assigned to existing calibration data, otherwise the cell returns an error stating that the input is invalid
GetFovWidth(VgrHandEyeCalib, CalibID)

Returns the vision system field of view width of the calibration corresponding to the CalibID.

Note:

The CalibID must be a numerical value and assigned to existing calibration data, otherwise the cell returns an error stating that the input is invalid.

If the status of the calibration is not calibrated, the cell returns an error stating that the calibration is not yet complete.

GetFovHeight(VgrHandEyeCalib, CalibID)

Returns the vision system field of view height of the calibration corresponding to the CalibID.

Note:

The CalibID must be a numerical value and assigned to existing calibration data, otherwise the cell returns an error stating that the input is invalid.

If the status of the calibration is not calibrated, the cell returns an error stating that the calibration is not yet complete.

GetPixelSizeX(VgrHandEyeCalib, CalibID)

Returns the vision system pixel size along the X axis of the calibration corresponding to the CalibID.

Note:

The CalibID must be a numerical value and assigned to existing calibration data, otherwise the cell returns an error stating that the input is invalid.

If the status of the calibration is not calibrated, the cell returns an error stating that the calibration is not yet complete.

GetPixelSizeY(VgrHandEyeCalib, CalibID)

Returns the vision system pixel size along the Y axis of the calibration corresponding to the CalibID.

Note:

The CalibID must be a numerical value and assigned to existing calibration data, otherwise the cell returns an error stating that the input is invalid.

If the status of the calibration is not calibrated, the cell returns an error stating that the calibration is not yet complete.

GetRmsImage2D(VgrHandEyeCalib, CalibID)

Returns the Root Mean Square (RMS) error of the calibration corresponding to the CalibID in Image2D coordinates. RMS measures the accuracy of the detected image compared to the expected position based on the calibration position coordinates. A lower score indicates a better calibration result.

Note:

The CalibID must be a numerical value and assigned to existing calibration data, otherwise the cell returns an error stating that the input is invalid.

If the status of the calibration is not calibrated, the cell returns an error stating that the calibration is not yet complete.

GetRmsHome2D(VgrHandEyeCalib, CalibID)

Returns the Root Mean Square (RMS) error of the calibration corresponding to the CalibID in Home2D coordinates. RMS measures the accuracy of the detected image compared to the expected position based on the calibration position coordinates. A lower score indicates a better calibration result.

Note:

The CalibID must be a numerical value and assigned to existing calibration data, otherwise the cell returns an error stating that the input is invalid.

If the status of the calibration is not calibrated, the cell returns an error stating that the calibration is not yet complete.