Chapter 2 - Importing a Best Fit Calibrated Frame (CAD Import Utilities)
The Best Fit Calibration Frame allows users to calibrate workpieces so CAD entities can be adjusted to fit the real world points from the robot cell.
The required files for this tutorial can be downloaded here:
Let’s imagine we have our part mounted on a fixture, and we would like to calibrate the location of this part based on real-world measurements. Figure 1 shows an example of this scenario, where:
Origin: fixture’s reference frame (i.e. User Frame)
Orange part: virtual location of the part
Green part: real-world location of the part as seen by the robot (unknown, needs to be measured)
Figure 1: Workpiece to be calibrated.
Getting Started
Capturing the points
First, we will define some points on the virtual part and write down their coordinates.
We can define as many as we want (more points = more accurate calibration):
Figure 2: Workpiece with defined points.
Figure 3: Virtual Point's Coordinates.
Now, we will use the robot to touch these same points in the real part and write down their coordinates.
The virtual points and real-world points must be the same number of points otherwise an error will occur.
The virtual points and real-world points must be in the same order otherwise a large deviation will occur, that will break the best bit frame positioning.
Note: Some noise (error) was added to the points to imitate actual real-world measurements with errors.
Figure 4: Virtual and Real-world workpiece with defined points.
Figure 5: Real-world Point's Coordinates.
Creating the frame using virtual and real world points.
Now we must:
Launch Robotmaster
Import the virtual CAD model
Open the Best fit calibration frame command:
Figure 6: Best Fit Calibration Frame command.
We can now load both sets of points:
First set of points will be the Virtual Points (Theoretical points.txt)
Second set of points will be the Real-world Points as measured with the robot. (Measured Points.txt)
We can decide if we want to import the points, or just the calibration frame
Figure 7: Calibrated Frame Calculator.
The data will be imported:
Figure 8: Calibrated Frame on Robotmaster.
When importing a calibrated frame, a pop-up message will be displayed indicating the maximum point deviation after calibration, and the point number where this maximum deviation occurs. Just as Figure 9 shows.
Figure 9: Point of Maximum Deviation.
Aligning the virtual workpiece with the real-world workpiece.
Next, transform the Visor from the origin to the calibrated frame:
Move the visor to a new Task part (so we can transform it)
Figure 10: Moving Geometry to New Part.
2. Transform the part:
Figure 11: Transforming the Visor.
3. Place the gnomon at the origin, and attach it to the part
Figure 12: Attaching gnomon.
4. Move the origin to the origin of the calibrated frame
Figure 13: Moving the part to the calibrated frame.
5. Align the X axis to the X axis of the calibrated frame
Figure 14: Aligning the X axis.
6. Align the Y axis
Figure 15: Aligning the Y axis.
7. Done! The part placement will be calibrated.
Figure 16: Calibrated Workpiece.
Since the real-world measured points have some noise the virtual part corners will not coincide exactly with any of the real-world measured points, BUT the global average deviation will be minimized. This is the point of finding the “best fit” calibration frame.
If the real-world measured points had no noise, you would get a perfect transformation of the virtual part (i.e. all the green points would perfectly coincide with the part edges).