Deploy Drift Correction Feature in Solution
This section provides instructions on deploying the drift correction feature in the solution of an EIH vision system.
Deployment Process Overview
The deployment process of this feature is shown below.
-
Learn about the deployment prerequisites: Learn about the prerequisites for the deployment of “Auto-correct accuracy drift in EIH vision system” in the solution.
-
Complete the preparations: Prepare all the necessary materials.
-
Collect workstation data: Collect the calibration board poses on different target object layers, facilitating the calculation of required image-capturing points.
-
Fasten calibration spheres: Based on the calibration board’s location and the recommended robot flange pose, determine the recommended locations to fasten the calibration spheres, and fasten the calibration spheres as required.
-
Validate image-capturing points: Calculate the repeatability of calibration sphere poses from each image-capturing point to ensure accurate and reliable data for accuracy drift correction.
-
Enable auto-correction: Export the robot auto-correction program, configure pose correction or point cloud correction as needed, and test the program to periodically correct accuracy drift during production.
-
Check deployment result: Check the deployment result of the “Auto-correct accuracy drift in EIH vision system” feature in the solution.
Deployment Prerequisites
The following prerequisites should be met before proceeding with the deployment:
-
Ensure that the vision solution for picking has been deployed for the workstation.
-
Ensure that the camera, robot, and extrinsic parameter accuracy checks have been completed, and that the robot is able to pick target objects successfully. Please refer to Error Analysis Tool for specific instructions.
-
Ensure that space has been reserved at the workstation for fastening the calibration spheres.
Preparations
If all the prerequisites can be met, you can start to prepare the materials.
-
Prepare the calibration board.
Prepare a suitable calibration board to collect target object layer poses and determine the image-capturing points for calibration spheres.
-
Check the materials.
Open the EIH kit packaging box and ensure it contains calibration spheres, mounting brackets, and other components.
-
Warm up the camera.
Use the Warm Up Tool to warm up the camera and prevent temperature increases during data acquisition from affecting intrinsic parameter accuracy.
Start Deployment
-
Open the Auto-correct accuracy drift in EIH vision system tool.
After completing the preparations, select on the menu bar to open the deployment tool.
-
Start deployment.
Click Start deployment in the lower right corner of the tool’s home page to enter the deployment process.
|
Here, we use a 60 mm-diameter calibration sphere as an example to illustrate the deployment process of the “Auto-Correct Accuracy Drift in EIH Vision System” solution. |
Collect Workstation Data
This step automatically calculates the image-capturing points for calibration spheres by collecting the workstation data.
Connect to a Camera
-
Connect to the camera.
Click Select camera to select and connect to the camera used in the picking project.
-
Select the project and parameter groups.
Select the picking project that requires drift correction and the corresponding Calibration parameter group and Configuration parameter group to specify the project and camera configuration for this deployment.
Check Site Condition
-
Check the calibration board model and calibration sphere fastening status.
Select the calibration board model according to the on-site conditions and confirm whether the calibration sphere has been fastened so that the tool can determine the subsequent deployment operations.
|
If “Fastened” is selected, you will only need to set the diameter of the calibration sphere in the “Fasten calibration spheres” step. |
Locate Calibration Board
After completing the above steps, please locate the calibration board according to the illustration and requirements below and collect the calibration board poses of each target object layer in the workstation.
|
To ensure accurate calibration board localization, it is necessary to ensure that there is only one calibration board in the camera’s field of view. |
If the target objects are arranged neatly, click here to learn how to locate the calibration board.
-
Place the calibration board on the highest layer.
Place the calibration board at the center of the highest target object layer to collect the pose of that layer.
For large target objects, the calibration board should be placed on the specific features of the object, namely the areas used for point cloud model matching.
-
Move the robot to the production image-capturing point.
Move the robot to the image-capturing point above the target object layer. This point must be the same as the one used during actual production.
-
Add a target object layer.
Click + Add to add the layer whose pose needs to be collected.
-
Locate the calibration board on the current layer.
Click Locate to capture an image, locate the calibration board on the current layer, and collect its pose.
If the localization succeeds, the message Located successfully will occur. Click View image to check the successfully located calibration board, as shown below.
If the localization fails, the message Failed to locate will occur. You can click Outline calibration board to outline the calibration board in the pop-up window, or try again after adjusting the camera parameter group.
-
Collect information on the remaining layers.
Place the calibration board on each remaining layer in turn. Repeat the robot movement, layer addition, and localization operations until information on all layers has been collected.
If the target objects are stacked randomly, click here to learn how to locate the calibration board.
-
Place the calibration board on the lowest layer.
Place the calibration board at the center of the lowest target object layer to start collecting calibration board poses from the bottom layer.
For large target objects, the calibration board should be placed on the specific features of the object, namely the areas used for point cloud model matching.
-
Move the robot to the production image-capturing point.
Move the robot to the image-capturing point above the target object layer. This point must be the same as the one used during actual production.
-
Add a target object layer.
Click + Add to add the layer whose pose needs to be collected.
-
Locate the calibration board on the current layer.
Click Locate to capture an image, locate the calibration board on the current layer, and collect its pose.
If the localization succeeds, the message Located successfully will occur. Click View image to check the successfully located calibration board, as shown below.
If the localization fails, the message Failed to locate will occur. You can click Outline calibration board to outline the calibration board in the pop-up window, or try again after adjusting the camera parameter group.
-
Locate the calibration board on the layer above.
Place the calibration board 20 cm above the previously located target object layer and locate it again.
-
Collect information over the entire target object height range.
Repeat the board placement, layer addition, and localization operations until information on all layers within the height range has been collected.
After the workstation data is collected, click Nextto fasten calibration spheres.
Fasten Calibration Spheres
In this step, the recommended locations to fasten the calibration spheres can be obtained based on the calibration board’s location and the recommended robot flange pose. Then you should fasten the calibration spheres as required.
Place Calibration Board
-
Place the calibration board according to the requirements.
Place the calibration board on the area where the calibration spheres will be arranged according to the following requirements.
-
Ensure that the area for placing the calibration board is within the robot’s reachable range and that the robot will not collide with surrounding objects.
-
Place the calibration board horizontally with its front side up and leave space around it for calibration spheres.
-
Typically, an object is needed to support the calibration board from the bottom, ensuring that the calibration board is as level as possible with the center of the sphere.
-
No obstacles should be present above the calibration board to ensure the robot can move freely over it.
-
-
Locate the calibration board.
Move the robot to bring the camera to an appropriate height, ensuring that the calibration board is clearly visible within the camera’s field of view and at the center of the field of view, and then click Locate.
-
After the localization succeeds, the message Located successfully will occur on the left side of the Locate button, and the image of calibration board will be displayed. At this time, the current robot flange pose should be entered into the frames on the interface.
It is necessary to check the Euler angle convention, ensuring the selection is right.
-
If localization fails, Failed to locate is displayed to the left of Locate. Check whether the calibration board image quality meets the requirements. If not, adjust the camera parameters. If the image quality is acceptable, click Outline calibration board to outline the calibration board in the pop-up window.
-
-
Calculate the image-capturing points.
When the calibration board is located successfully, click Calculate image-capturing points to automatically calculate the image-capturing points, i.e. the robot flange poses during image capturing.
Fasten Calibration Spheres
|
If the calibration sphere is fastened according to the on-site situation during the “Collect workstation data” step, you only need to set the diameter of the calibration sphere in this step. |
-
Move the robot.
After robot flange poses are obtained in the “Place calibration board” step, the flange pose closest to the calibration sphere is displayed on the current page as the recommended value. Move the robot to this pose for subsequent continuous image acquisition of the calibration sphere.
Please ensure that no collisions occur during the robot’s movement to this pose. It is recommended to jog the robot to the target pose at a low speed and observe whether there will be any collisions.
If there is a possibility of collision in the robot path, the image-capturing point can be lifted appropriately, but it is necessary to ensure that the image-capturing point is lifted within 100 mm. If the lifting distance exceeds 100 mm, a supportive base should be added beneath the calibration sphere.
-
Set the dimensions of the calibration sphere.
Set the diameter of the calibration sphere according to the actual calibration sphere.
-
Fasten the calibration spheres.
Click Acquire continuously and fasten the calibration spheres at the recommended positions (in the green dots).
When fastening the calibration sphere to the green dot, the calibration sphere does not need to be perfectly centered on the green dot.
-
Mount the calibration sphere.
Fasten the calibration sphere securely to the ground. Avoid accidentally touching it during production.
-
Mark the relative positions of the sphere and its mount.
Use a marker to draw a line across the sphere and its mount to check later whether their relative positions have changed.
-
Confirm fastening.
After fastening the calibration sphere, click Confirm fastening to complete this operation.
-
When the calibration sphere is fastened, click Next to validate image-capturing points for calibration spheres.
Validate Image-Capturing Points
This step calculates the repeatability of calibration sphere poses from each image-capturing point to ensure accurate and reliable data for accuracy drift correction.
-
Move the robot and record the image-capturing point pose.
Move the robot to the flange pose corresponding to the image-capturing point and manually record it in the robot program for subsequent auto-correction.
Please ensure that no collisions occur during the robot’s movement to this pose. It is recommended to jog the robot to the target pose at a low speed and observe whether there will be any collisions.
If there is a possibility of collision in the robot path, the image-capturing point can be lifted appropriately, but it is necessary to ensure that the image-capturing point is lifted within 100 mm. If the lifting distance exceeds 100 mm, a supportive base should be added beneath the calibration sphere.
-
Outline the calibration sphere and validate the image-capturing point.
Click Outline and validate to outline the calibration sphere at each point, then click Validate to check the repeatability of the sphere poses.
The ROI must fully enclose the calibration sphere, leaving a margin equal to the sphere’s diameter on all sides (top, bottom, left, and right). If “Failed to locate” occurs after setting the ROI, check whether the calibration sphere diameter set in the “Fasten calibration spheres” step is correct.
After validating all image-capturing points, click the Save button to save the deployment. Now projects for drift correction will be automatically generated in the current solution.
-
Drift_Collection_EIH: This project collects the calibration sphere poses at each image-capturing point.
-
Drift_Calculation: The project generates the drift correction data based on the calibration sphere poses collected by the “Drift_Collection_EIH” project.
|
Do not modify the two drift correction projects or any related parameters. At the same time, during subsequent drift correction processes, ensure that the names and numbers of the drift correction projects remain unchanged. When the drift correction projects are generated, a point cloud model of the calibration sphere will be automatically generated in the target object editor as well. Please do not modify the name or other configuration of this point cloud model. |
Enable Auto-Correction
After validating the image-capturing points, obtain the robot auto-correction program, configure pose correction or point cloud correction as needed, and set the auto-correction interval.
Generate Robot Program
Select the robot brand from the drop-down list, then click Export. The exported program automatically collects calibration sphere poses and generates drift correction data. The robot flange poses required for writing the program can be viewed in the deployment result.
If your robot brand is listed, you can export and use its program directly.
If it is not listed, export the program for any brand and use it as a reference to write a program for your robot. View the robot flange poses required by the program on the Check Deployment Result page.
|
After deployment, you can also select the robot brand and export the program on the Check Deployment Result page. |
Adjust Robot Program
If the robot program needs adjustment, refer to the following workflow and FANUC example program.
Click here to view the program workflow and FANUC example program.
Step 1: Determine the robot reference frame and tool reference frame.
Step 2: Move the robot to the Home position.
Step 3: Move the robot to the calculated image-capturing point 1.
Step 4: Once the robot reaches the image-capturing point 1, switch the parameter recipe in the project for collecting calibration sphere poses (Drift_Collection_EIH) to the one corresponding to the image-capturing point.
Step 5: Once the parameter recipe is switched, trigger the “Drift_Collection_EIH” project to run and collect the calibration sphere poses at image-capturing point 1.
Step 6: Follow steps 3 to 5 for image-capturing points on other layers to collect the calibration sphere poses at each point.
Step 7: After completing the pose collection for all image-capturing points, switch the parameter recipe of the project for generating drift correction data (Drift_Calculation).
Step 8: Trigger the “Drift_Calculation” project to run and generate the drift correction data.
Step 9: Move the robot to the Home position.
The following auto-correction program, developed based on the workflow outlined above, uses a FANUC robot. In this example program, the number of image-capturing points for the calibration sphere is 2, the index of the project for collecting the calibration sphere poses is 2, and the index of the project for generating drift correction data is 3.
UFRAME_NUM=0 ;
UTOOL_NUM=1 ;
J P[1] 100% FINE ;
CALL MM_INIT_SKT('8','192.168.10.22',50000,5) ;
L P[2] 1000mm/sec FINE ;
WAIT 2.00(sec) ;
CALL MM_SET_MOD(2,1) ;
CALL MM_START_VIS(2,0,2,10) ;
WAIT 1.00(sec) ;
L P[3] 1000mm/sec FINE ;
WAIT 2.00(sec) ;
CALL MM_SET_MOD(2,2) ;
CALL MM_START_VIS(2,0,2,10) ;
WAIT 1.00(sec) ;
CALL MM_SET_MOD(3,1) ;
CALL MM_START_VIS(3,0,2,10) ;
J P[1] 100% FINE ;
END ;
Key statements in the auto-correction program are summarized in the following table.
|
This table only explains the key statements; for detailed explanations of each statement in the FANUC robot auto-correction program, refer to the example program for FANUC robots. |
| Workflow | Code and description | ||
|---|---|---|---|
Set the reference frame |
Define the world reference frame as the robot reference frame and the flange reference frame as the tool reference frame. |
||
Move the robot to the Home position |
Move the robot to the Home position where the robot is away from target objects and the surrounding equipment.
|
||
Initialize communication parameters |
Set the robot port number to 8, with the IP address of the IPC set to 192.168.10.22. The port number used for communication between the IPC and the robot is 50000, and the timeout period is 5 minutes. |
||
Move the robot to the image-capturing point 1 |
The robot moves to the image-capturing point 1 in linear motion, with a velocity of 1000 mm/sec. You can check the information of this image-capturing point in the deployment result. |
||
Switch the parameter recipe of the project for collecting the calibration sphere poses |
Switch the parameter recipe of the project for collecting calibration sphere poses (Drift_Collection_EIH) to parameter recipe 1. |
||
Trigger the project for collecting calibration sphere poses |
Trigger the Drift_Collection_EIH project to collect calibration sphere poses at each image-capturing point. |
||
Switch the parameter recipe of the project for generating the drift correction data |
After collecting calibration sphere poses at all image-capturing points, switch the parameter recipe of the project for generating drift correction data (Drift_Calculation) to parameter recipe 1.
|
||
Trigger the project for generating the drift correction data to run |
Trigger the “Drift_Calculation” project to run and generate drift correction data based on the collected calibration sphere poses. |
||
Move the robot to the Home position |
Move the robot to the Home position where the robot is away from target objects and the surrounding equipment. |
Load Robot Program
After obtaining and adjusting the program, load it to the robot for subsequent testing and production auto-correction.
|
For instructions on loading the auto-correction program, refer to “Standard Interface Communication Configuration” for the corresponding robot brand in Standard Interface Communication. |
Teach the Home Position
Teach the Home position to ensure that the point in the program matches the actual workstation and prevent abnormal operation or collisions.
Refer to Teach Calibration Starting Point in the automatic calibration instructions to teach the Home position.
During teaching, check and adjust the Home position according to the actual installation. If the environment or equipment positions have shifted, teach the position again to ensure stable and safe program operation.
Correct Poses and Point Clouds (Optional)
-
To correct picking poses, perform the following steps:
-
Test the robot program.
Follow Test Robot Program to run the auto-correction program and confirm that it runs properly.
-
Enable pose correction.
In the Output or Path Planning Step of the picking project, select Auto-Correct Accuracy Drift in Vision System to correct picking poses.
-
Set the auto-correction interval.
Set the auto-correction interval in the robot program according to the on-site conditions to correct accuracy drift periodically.
-
-
To correct point clouds, perform the following steps:
-
Export the point cloud correction Procedure.
In the Point cloud correction area, click Export procedure to export the point cloud correction Procedure.
-
Load the Procedure into the picking project.
Right-click a blank area in the picking project, select Load Procedure from File, and select the exported Procedure file. The point cloud correction Procedure is inserted into the project.
The Load Procedure from File option is displayed only when developer mode is enabled.
-
Connect the point cloud correction Procedure.
Manually connect the input and output of the point cloud correction Procedure according to the project’s point cloud acquisition and processing workflow. The input point cloud must be in the camera reference frame. If it contains points that do not belong to the target objects, remove them by setting an ROI or using another suitable method.
-
Test the robot program.
Follow Test Robot Program to run the auto-correction program and confirm that it runs properly.
-
Set the auto-correction interval.
Set the auto-correction interval in the robot program according to the on-site conditions to correct accuracy drift periodically.
-
Test Robot Program
Run the robot auto-correction program after loading it to the robot. After running the program, the robot will move to the corresponding image-capturing points. Then the program will trigger the Mech-Vision project to run, capture images of the calibration spheres, and collect the poses of the calibration spheres. The generated drift correction data is then used to correct accuracy drift.
|
According to the robot brand used in your project, you can select and test the robot auto-correction program by referring to the “Set up Standard Interface Communication” guide for the corresponding robot brand in Standard Interface Communication. |
After running the robot auto-correction program, correction records will be generated and can be viewed on the Data monitoring dashboard.
Test Picking the Target Objects
Run the robot picking program and check the picking results. If the robot can pick target objects accurately, the deployment is successful.
Note that after the test picking is complete, to ensure long-term stability in actual production, you must configure the alert threshold on the Data monitoring dashboard. The threshold is typically recommended to be set at 10 mm. If the drift compensation exceeds this threshold, verify that the camera and robot tool are securely mounted and check whether the robot’s zero position has been lost.
Determine the Correction Cycle
Set the auto-correction interval in the robot program according to the on-site conditions to collect calibration sphere poses periodically and correct accuracy drift.
Now you have completed the deployment of “Auto-correct accuracy drift in EIH vision system” in the solution. Click the Finish button to return to the tool’s home page.
|
After deployment, it is recommended to export the current configuration parameter group of the camera to a local backup. This ensures that if the camera is damaged and needs to be replaced, the configuration parameter group can still be retrieved. |
Check Deployment Result
-
Check the camera deployment information.
After deployment, click Check deployment at the bottom of the tool’s home page and select the camera to view the corresponding image-capturing point and recipe information.
-
Export the robot program again as needed.
Only if the previously exported auto-correction program is lost or needs to be exported again, select the corresponding brand from the robot brand drop-down list and click Export. A previously exported program that works properly does not need to be exported again.
|
To correct point clouds, follow Correct Poses and Point Clouds to export and configure the point cloud correction Procedure. |