Calibration Procedures
This section contains step by step instructions for calibrating each of the camera installations.
Calibration Procedure: Mobile Camera
Mobile camera calibration will allow you to search for objects from a camera mounted on a robot joint and get their coordinates in the robot coordinate system.
Preparation 1: Mount the camera to the robot
Mount the camera to the robot. You can mount the camera at any rotational angle. The camera must be aligned vertically with the Z axis of the local coordinate system you will be using.
Preparation 2: Decide on reference point type
There are the following three choices to set the reference point:
- Auto reference
- Using manually taught point
- Using a point that is found with an upward camera
To use auto reference, set the AutoReference property to True. For best accuracy, set AutoRefMode to Fine.
KEY POINTS
By using Auto reference, move a robot and acquire reference point coordinate automatically when performing calibration. Be careful of interference between the robot and peripherals. Be careful especially when using the Fine mode for the calibration of the camera mounted on the Joint #2 of the SCARA robot since robot orientation moves largely (switching posture of left end effector and right end effector) during calibration. Also, use with avoiding singularity nearby posture that each axis extends to prevent an error during processing of Auto reference function.
For greatest accuracy, you should use an upward camera to find the reference target. See the procedure for Calibration Procedure: Fixed Upward Camera later in this chapter.
If you are not using auto reference or an upward camera to find the reference point, then use one of the following for training the reference point:
- Use a rod mounted to the U axis that extends through the center of the axis.
- Use the tool that is being used to pick up parts if it can be aligned with the calibration reference point.
If you define a tool (using TLSet command) for the calibration rod of pick up tool, then you will not have to teach zero and 180o reference point(s) during calibration.
Preparation 3: Create vision sequence to find dot grid pattern (When performing distortion correction)
- Create a calibration plate.
- Create a vision sequence by referring the following section.
Creating Vision Sequences for Calibration
Preparation 4: Create vision sequence to find calibration reference target
Create a vision sequence by referring to the following section.
Creating Vision Sequences for Calibration
When preparation is completed, run the calibration wizard to configure necessary settings.
Step 1: Run Calibration wizard
Click the [New Calibration] button on the Vision Guide toolbar.
Enter the name for calibration in [Enter name for new calibration].
Select a camera for calibration in [Select camera for new calibration].
Settings can be copied by selecting a source calibration data in [Copy from existing calibration].
Click the [Next] button to proceed to Step 2.
Step 2: Setting for calibration type and camera direction
Click [Robot Camera].
Select a robot on which a camera is mounted in [Select Robot].
Select a camera mount position from the following in [Mounting & Orientation].
For horizontal articulated (SCARA) robot:
Mobile J2. | Camera is mounted on the Arm #2 of horizontal articulated (SCARA) robot or Joint #2 of Cartesian coordinate robot. |
Mobile J4 (Mobile camera: mounted on Joint #4) | Camera is mounted on the Arm #4 of horizontal articulated (SCARA) robot or Joint #4 of Cartesian coordinate robot. |
For 6-axis robot:
Mobile J5 (Mobile camera: mounted on Joint #5) | Camera is mounted on the Arm #5 of vertical 6-axis robot. |
Mobile J6 (Mobile camera: mounted on Joint #6) | Camera is mounted on the Arm #6 of vertical 6-axis robot. |
After selecting the camera mount type, click the [Next] button.
Step 3: Specify a target sequence
Specify a target sequence.
Select a vision sequence created in Preparation 4: Create vision sequence to find calibration reference target from the list.
In this step, vision sequences for the camera specified in Step 1 are only displayed in the list.
After selecting the target sequence, click the [Next] button.
Step 4: Setting a local
Select a local you will be using for vision calibration.
In this dialog box, you can run the local wizard to define local coordinate system to the local number. To run the wizard, select a local number other than “0”, then click [Local Wizard...] button. Details of local setting using a camera are described in 7.7 Local setting using a camera.
After selecting the local coordinate, click the [Next] button.
Step 5: Setting for reference point type
Set a type of reference point you will be using for calibration.
The reference point used for calibration is a point specified by the robot coordinate.
When [Taught Point] is selected: If Auto Reference is checked, the reference will be found automatically. Otherwise, you need to jog the robot and teach the reference point manually.
It is necessary to specify a tool number and an arm number, which will be a reference point for an end effector attached at the end of the robot arm. (Setting for additional arm is available only for SCARA robots.)
Setting of tool and arm for a camera mounted on either of Joint #2, #4, or #6 can be omitted by selecting the [Auto Reference] checkbox. If setting is skipped, calculation for arm and tool is automatically performed and specifies the reference point automatically.
You can also run the tool wizard and define the tool by selecting a tool number other than “0” and clicking the [Tool Wizard...] button in this step.
In addition, you can run the arm wizard and define the arm for camera by selecting an arm number other than “0” and clicking the [Arm Wizard...] button.
For how to define the tool and arm for camera, see the following.
Detecting Mobile Camera Mount Position
Tips: When performing the calibration with omitting the teaching of reference point by Auto Reference function and cannot acquire required calibration accuracy, accuracy may increase when performing the calibration without Auto Reference function.
When [Upward Camera] is selected: You can detect a reference point accurately by using a fixed upward camera which has been calibrated.
If [Upward Camera] is selected for a type of reference point, also select a vision sequence which will be used for detection in [Upward target sequence]. The vision sequences where the selected camera is specified are only displayed in the list.
When [Two point reference] is selected: The second reference point, that U is rotated 180°, will be used for calibration. This setting can be omitted when the tool is used.
After setting the reference point type, click the [Next] button.
Step6: Setting for AutoReference Parameters
Sets the parameter used when automatically finding the reference point. This step will appear if you selected the [Auto Reference] check box in Step 5.
Sets the mode used when automatically finding the reference point. Note that robot movement will vary according to the position in which the camera is installed.
When [Rough] is selected: Used for small robot movement with rough positioning. With a MobileJ2 camera, this setting will move the arm in small increments. With a MobileJ4 or J6 camera, this setting will rotate the tool in small increments.
When [Fine] is selected: Used for large robot movements with precise positioning. With a MobileJ2 camera, the arm will move according to changes in the right/ left orientation of the robot. With a MobileJ4 or J6 camera, this setting will rotate the tool in large increments.
When [Manual] is selected: This setting allows the user to enter in the angle of robot movement and the target tolerance manually. Select [Manual] to reduce robot movement if you feel the robot moves too great a distance even when [Rough] mode is selected. The arm will not move according to changes in the right/ left orientation.
For the MobileJ6 camera, you can also set the robot movement mode when automatically finding the calibration reference point.
When [Tool] mode is selected: The robot moves in the XY plane of the Tool 0 coordinate system. The camera should be mounted so that the optical axis is approximately parallel to the Z-axis direction (perpendicular to the 6th joint flange plane) of the tool 0 coordinate system.
When [Local] mode is selected: The robot moves in the XY plane of the local coordinate system specified in Step4. Unlike the Tool, the camera can be mounted at any angle. However, it must be specified in the local coordinates system so that the XY plane of the local coordinate system is approximately parallel to the image plane of the camera.
After setting is completed, click the [Next] button.
Step7: Setting for camera points
Specify whether to generate camera points automatically when executing a calibration.
When [Automatically generate camera points] is selected: Multiple camera points are generated automatically by operating the robot automatically while detecting a target object in the FOV of the camera. The position of the target object in the FOV is detected for each camera point. When using the auto generation, it is necessary to teach a point where the target object is placed near the center of the FOV.
When [Automatically generate camera points] is not selected: It is necessary to jog the robot manually to teach a necessary number of camera points before executing a calibration.
After setting the auto camera point generation, click the [Next] button.
Step8: Setting for correction of lens distortion and camera installation distortion
Specify whether to correct lens distortion and installation distortion of the camera.
Selecting the checkbox enables correction. To correct distortion, it is necessary to create a target sequence for distortion correction in advance and specify it in this step.
After setting the distortion correction, click the [Next] button.
Step9: Setting for lighting control
Set the control for lighting used for calibration. If the lighting control is not necessary, setting is not necessary to be changed.
If you use lighting for the camera, specify a wait time before the lighting turns ON in milliseconds. Also, specify an output bit for turning ON the lighting.
If [Upward Camera] is selected for the reference point type in Step 5, the output bit for turning ON the lighting of the upward camera can also be specified.
After setting the lighting control, click the [Next] button.
Step10: Setting for robot motion
Configure the settings for robot motion.
Set a speed and acceleration, and settling time after the robot motion (wait time before image capturing). To perform a fine calibration, set a slow speed and acceleration to ensure enough settling time.
An approach point can also be specified. If the approach point is specified, the robot always moves to the calibration point from the specified approach point. This allows the robot to approach to the calibration point in a fixed direction, and the robot position will be stabilized.
How to configure the approach point: Select the [Use Approach Point] checkbox, then click the [Teach] button. Teach the approach point in the displayed point teach dialog box.
After setting the approach point, click the [Next] button
Step11: Confirmation of settings
The configured items are displayed. Check the settings.
Click the [Finish] button to finish the wizard.
Detecting distortion correction (When distortion correction is enabled)
- Select the created calibration in the sequence or calibration tree.
- Place the dot grid pattern on the work plane.
- Select the Cal property below the DistCorrect property in the property list to execute detection of the dot grid pattern.
By selecting the created calibration scheme for the Calibration property (a sequence for positioning the calibration target), you can check the image which is corrected lens distortion and camera tilt. Even when this setting is omitted, distortion will be corrected automatically when executing the calibration.
Teach points
- Click the [Teach Points] button. The [Teach Calibration Points] dialog box appears.
- Follow the instructions displayed in the message box at the bottom of the dialog box. A necessary number of camera points and details of reference point teaching vary depending on types of camera mount and reference point, and other settings.
- Teach camera points. If the auto camera point generation is enabled, teach one camera position. If the auto camera point generation is disabled, teach nine camera positions. The camera positions indicate nine robot positions. Teach the first point so that the target comes to the upper left corner, and then teach the second point so that the target comes to the center of the image display area. Teach the remaining points accordingly at any places in the field of view. For greatest results, teach the points so as to spread them all over the field of view.
When using the vertical 6-axis robot, the V coordinate of the camera point is normally zero, and the W coordinate is either zero or 180 depending on the direction of the local. It is not necessary to change the V and W coordinates when teaching the calibration points. This is for setting the camera positions to be relatively on the same lines as the locals of the camera point. - When “Teach Points” is selected for reference point type. Teach the reference point. Teach the reference point to the robot so that the tool used for picking up a workpiece comes right above the workpiece. (This is same as teaching points as destinations of robot motion.)
Calibration
Click the [Calibrate] button to start the calibration cycle.
Robot moves to each camera position and executes the calibration target vision sequence. After moving to all nine positions, the system determines the calibration parameters and repeats the cycle in order to collect the statistical data.
Clicking [Cancel] button stops the calibration.
Calibration Procedure: Fixed Downward Camera
This calibration will allow you to search for objects from a fixed camera looking down into the robot work envelope and get their positions in the robot coordinate system. In this section, the procedure to plate the calibration on the work plane will be described. For details of the calibration procedure when using the target on the tool attached to the end effector as a reference point, refer to “Calibration Procedure: Fixed Upward Camera”.
Preparation 1: Mount the camera
Mount the camera so that it will be looking down into the robot envelope. Make sure that the robot does not touch the camera.
Preparation 2: Prepare for distortion correction (when performing distortion correction)
- Create a pattern for detecting distortion. Refer to the following.
Correction of Lens Distortion and Camera Tilt
The optional calibration plate can also be used. - Create a vision sequence. Refer to the following.
Creating Vision Sequences for Calibration
Preparation 3: Make a calibration plate
Make a plate with nine holes or targets that span the field of view of the camera.
Preparation 4: Create vision sequence to find calibration reference targets
Create a vision sequence. Refer to the following.
Creating Vision Sequences for Calibration
When preparation is completed, run the calibration wizard to configure necessary settings.
Step 1: Start the calibration wizard
Click the [New Calibration] button on the Vision Guide toolbar.
Enter the name for calibration in [Enter name for new calibration].
Select a camera for calibration in [Select camera for new calibration].
Settings can be copied by selecting a source calibration data in [Copy from existing calibration].
Click the [Next] button to proceed to Step 2.
Step 2: Setting for calibration type and camera direction
Click [Robot Camera].
Select a robot on which a camera is mounted in [Select Robot].
Select [Fixed looking downward] in [Mounting & Orientation].
After selecting the camera mount type, click the [Next] button.
Step 3: Specify a target sequence
Specify a target sequence.
Select a vision sequence created in Preparation 4: Create vision sequence to find calibration reference target from the list.
In this step, vision sequences for the camera specified in Step 1 are only displayed in the list.
After selecting the target sequence, click the [Next] button.
Step 4: Setting a local
Select a local you will be using for vision calibration.
In this dialog box, you can run the local wizard to define local coordinate system to the local number. To run the wizard, select a local number other than “0”, and then click the [Local Wizard...] button. Details of local setting using a camera are described in 7.7 Local setting using a camera.
After selecting the local, click the [Next] button.
Step 5: Setting for reference point type
Set a type of reference point you will be using for calibration.
The reference point used for calibration is a point specified by the robot coordinate.
Select [Taught Points]. You need to jog the robot and teach the reference point manually.
It is necessary to specify a tool number and an arm number, which will be a reference point for an end effector attached at the end of the robot arm. (Setting for additional arm is available only for SCARA robots.)
You can also run the tool wizard and define the tool by selecting a tool number other than “0” and clicking the [Tool Wizard...] button in this step.
In addition, you can run the arm wizard and define the arm for camera by selecting an arm number other than “0” and clicking the [Arm Wizard...] button.
For how to define the tool and arm for camera, see the following.
Detecting Mobile Camera Mount Position
When [End Effector] is selected, see “Calibration Procedure: Fixed Upward Camera”.
When [Two point reference] is selected: Two reference points will be used for the calibration.
After setting the reference point type, click the [Next] button.
Step 6: Setting for correction of lens distortion and camera installation distortion
Specify whether to correct lens distortion and installation distortion of the camera.
Selecting the checkbox enables correction. To correct distortion, it is necessary to create a target sequence for distortion correction in advance and specify it in this step.
After setting the distortion correction, click the [Next] button.
Step 7: Setting for lighting control
Set the control for lighting used for calibration. If the lighting control is not necessary, setting is not necessary to be changed.
If you use lighting controls, specify a wait time before the lighting turns ON in milliseconds. Also, specify an output bit for turning ON the lighting.
After setting the lighting control, click the [Next] button.
Step 8: Setting for robot motion
Configure the settings for robot motion.
Set a speed and acceleration, and settling time after the robot motion (Motion Delay). To perform a fine calibration, set a slow speed and acceleration to ensure enough settling time.
An approach point can also be specified. If the approach point is specified, the robot always moves to the camera point from the specified approach point. This allows the robot to approach to the camera point in a fixed direction, and the robot position will be stabilized.
How to configure the approach point: Select the [Use Approach Point] checkbox, then click the [Teach Points] button. Teach the approach point in the displayed point teach dialog box.
After setting the approach point, click the [Next] button.
Step 9: Confirmation of settings
The configured items are displayed. Check the settings.
Click the [Finish] button to finish the wizard.
Detecting distortion correction (When distortion correction is enabled)
- Select the created calibration in the sequence or calibration tree.
- Place the dot grid pattern on the work plane.
- Select the Cal property below the DistCorrect property in the property list to execute detection of the dot grid pattern.
By selecting the created calibration scheme for the Calibration property (a sequence for positioning the calibration target), you can check the image which is corrected lens distortion and camera tilt. Even when this setting is omitted, distortion will be corrected automatically when executing the calibration.
Teach points
- Click the [Teach Points] button. The [Teach Calibration Points] dialog box appears.
- Follow the instructions displayed in the message box at the bottom of the dialog box to teach reference points.
You will be prompted to teach the point if TwoRefPoints is “True”, you must move the Joint #4 180o to teach the point again. When the tool is used, this step can be skipped. To skip the step, click the [Next] button to move to the next step.
Calibration
Click the [Calibrate] button to start the calibration cycle.
The calibration software positions the nine targets and then determines the calibration parameters after positioning the targets again to collect the statistic data.
Clicking [Cancel] button stops the calibration.
Calibration Procedure: Fixed Upward Camera
This calibration will allow you to search for objects from a fixed camera looking up and get their positions in the robot coordinate system.
The same calibration is possible for a fixed downward camera by setting the reference point type to “EndEffector”.
Preparation 1: Mount the camera
Mount the camera so that it will be looking up into the robot envelope.
Preparation 2: Create vision sequence to find calibration end effector target
- Create a sequence to locate the target on the end effector. Create one or more objects in the sequence to locate the target. The calibration software will use the last step in the sequence to get the location of the target. The last step results for X and Y should be the center of the target.
- During calibration, the end effector will be move to nine different points in the field of view of the camera and search for the target. Also, at each position, the calibration software will turn the U axis 180° and search for the target again. This allows the software to determine the center of the U axis for each point. For best results, use a round target.
When preparation is completed, run the calibration wizard to configure necessary settings.
Step 1: Run the Calibration wizard
Click the [New Calibration] button on the Vision Guide toolbar.
Enter the name for calibration in [Enter name for new calibration].
Select a camera for calibration in [Select camera for new calibration].
Settings can be copied by selecting a source calibration data in [Copy from existing calibration].
Click the [Next] button to proceed to Step 2.
Step 2: Setting for calibration type and camera direction
Click [Robot Camera].
Select a robot on which a camera is mounted in [Select Camera].
Select [Fixed looking upward] or [Fixed looking downward] in [Mounting & Orientation].
After selecting the Mounting & Orientation, click the [Next] button.
Step 3: Specify a target sequence
Specify a target sequence.
Select a vision sequence created in Preparation 2: Create vision sequence to find calibration end effector target from the list.
In this step, vision sequences for the camera specified in Step 1 are only displayed in the list.
After selecting the target sequence, click the [Next] button.
Step 4: Setting a local
Select a local you will be using for vision calibration.
In this dialog box, you can run the local wizard to define local coordinate system to the local number. To run the wizard, select a local number other than “0”, then click [Local Wizard...] button. Details of local setting using a camera are described in the following.
Local Detection Using a Camera
After selecting the local, click the [Next] button.
Step 5: Setting for reference point type
Set a type of reference point you will be using for calibration.
The reference point type for the fixed upward camera is [End Effector]. The reference point is a target on the tool mounted to the robot end effector. The target needs to be seen from the camera. (Although [Reference type] can be selected in this step, select [End Effector] for the fixed downward camera)
You can also run the tool wizard and define the tool by selecting a tool number other than “0” and clicking the [Tool Wizard...] button in this step.
In addition, you can run the arm wizard and define the arm for camera by selecting an arm number other than “0” and clicking the [Arm Wizard...] button.
(Setting for additional arm is available only for SCARA robots.)
For how to define the tool and arm for camera, see the following.
Detecting Mobile Camera Mount Position
When [Two point reference] is selected: Two reference points will be used for the calibration.
After setting the reference point type, click the [Next] button.
Step 6: Setting for camera point
Specify whether to generate camera points automatically when executing a calibration.
When the checkbox is selected: Multiple camera points are generated automatically by operating the robot automatically while detecting a target object in the FOV of the camera.
The position of the target object in the FOV is detected for each camera point. With this method, we will place a target at near the center of the camera field of view, then teach a point. It is not necessary to teach other camera points by jogging the robot.
When the checkbox is not selected: It is necessary to jog the robot manually to teach a necessary number of camera points before executing a calibration.
After setting the auto camera point generation, click the [Next] button.
Step 7: Setting for correction of lens distortion and camera installation distortion
Specify whether to correct lens distortion and installation distortion of the camera.
Selecting the checkbox enables correction. To correct distortion, it is necessary to create a target sequence for distortion correction in advance and specify it in this step.
After setting the distortion correction, click the [Next] button.
Step 8: Setting for lighting control
Set the control for lighting used for calibration. If the lighting control is not necessary, setting is not necessary to be changed.
If you use lighting controls, specify a wait time before the lighting turns ON in seconds. Also, specify an output bit for turning ON the lighting.
After setting the lighting control, click the [Next] button.
Step 9: Setting for robot motion
Configure the settings for robot motion.
Set a speed and acceleration, and settling time after the robot motion (Motion Delay). To perform a fine calibration, set a slow speed and acceleration to ensure enough settling time.
An approach point can also be specified. If the approach point is specified, the robot always moves to the calibration point from the specified approach point. This allows the robot to approach to the calibration point in a fixed direction, and the robot position will be stabilized.
How to configure the approach point: Select the [Use Approach Point] checkbox, then click the [Teach] button. Teach the approach point in the displayed point teach dialog box.
After setting the approach point, click the [Next] button.
Step 10: Confirmation of settings
The configured items are displayed. Check the settings.
Click the [Finish] button to finish the wizard.
Teach points
- Click the [Teach Points] button.
The [Teach Calibration Points] dialog box appears. - Follow the instructions displayed in the message box at the bottom of the dialog box to teach reference points.
You will be prompted to teach the point if TwoRefPoints is “True”, you must move the Joint #4 180o to teach the point again. When the tool is used, this step can be skipped. To skip the step, click the [Next] button to move to the next step.
Calibration
Click the [Calibrate] button to start the calibration cycle.
The calibration software moves the robot to each camera position to search the target. When TwoRefPoints is set to “True”, the robot rotates the Joint #4 180o and searches the target again. It repeats the calibration to collect the statistic data.
Clicking the [Cancel] button stops the calibration.
Calibration Procedure: Standalone Camera
This calibration will allow you make physical measurements.
Any camera calibrated as a “Standalone” camera cannot be used to calculate robot coordinates. The standalone calibration returns CameraX and CameraY values in millimeters.
Step 1: Mount the camera
Mount the camera at an angle of 45 to 90° against the work plane.
Step 2: Make a dot grid pattern (When performing distortion correction)
Create a dot grid pattern which has more than 100 points. The grid pattern must cover the entire field of view with minimum distortion. Accuracy of the grid pattern affects accuracy of image processing.
Step 3: Make a calibration plate
Make a plate with nine holes or targets that span the field of view of the camera.
Step 4: Create vision sequence to find calibration reference targets (When performing distortion correction)
Create a sequence. Refer to the following.
Creating Vision Sequences for Calibration
Step 5: Create vision sequence to find calibration reference targets
Create a vision sequence. Refer to the following.
Creating Vision Sequences for Calibration
Step 6: Create a calibration scheme
- Click the [New Calibration] button on the Vision Guide toolbar.
- The calibration wizard is run. Select the name of calibration and a camera. Select a source calibration for copying settings as necessary.
- Select a standalone camera.
- Configure the vision sequence for detecting the calibration reference targets.
- Specify whether to enable distortion correction. If distortion correction is enabled, select a vision sequence for detecting the dot grid pattern.
- Configure the settings by following the steps to complete the wizard.
Step 7: Setting for correction of lens distortion and camera installation distortion
- Select the created calibration in the sequence or calibration tree.
- Place the dot grid pattern on the work plane.
- Select the Cal property below the DistCorrect property in the property list to execute detection of the dot grid pattern.
- By selecting the calibration scheme created in Step 6 for the Calibration property (a sequence for positioning the calibration target), you can check the image which is corrected lens distortion and camera tilt. Even when this setting is omitted, distortion will be corrected automatically when executing the calibration.
Step 8: Calibration
- Remove the dot grid pattern and place the calibration plate creates in Step 3.
- Click the [Teach Points] button to set the coordinates for the nine targets in the calibration plate.
- Click the [Calibrate] button to start the calibration cycle. The calibration software positions the nine targets and then determines the calibration parameters after positioning the targets again to collect the statistic data.