Industrial robots are highly repeatable but not accurate, therefore the accuracy of an industrial robot can be improved through robot calibration. Without calibration, robot accuracy highly depends on the robot brand and model. With robot calibration you can accurately calculate the tool center point (TCP) and calibrate the robot kinematic parameters. Robot accuracy can be improved by a factor of 2 to 10.
RoboDK can be used to calibrate the robot, the tool center point (TCP) and to generate accurate robot programs. RoboDK can also be used to test the accuracy of a robot.
Robot calibration can remarkably improve robot accuracy when programming robots offline (also known as Off-Line Programming, or OLP).
The automatic robot calibration solution can accurately calibrate the robot and the tool center point (TCP) for tools with spherical or conical geometries.
1.Spherical tools➔The center of the tool is calibrated
2.Conical tools➔ The tip of the tool is calibrated
It is required to install the RoboDK Automatic Calibration App and have a compatible sensor to perform the automated robot calibration.
Make sure to have the following:
1.One or more industrial robot arms.
2.A compatible dial indicator (also known as LVDT or linear gage).
3.RoboDK software must be installed and an appropriate license for automated robot calibration must be available.
4.You need compatible robot drivers for your robot controller.
5.Install the Automatic Calibration RoboDK App:
a.Download the RoboDK App for Automatic Calibration.
b.Double click the file to install the app and open it in RoboDK.
c.Alternatively, you can unzip the contents in C:/RoboDK/Apps/.
d.Select Tools➔Apps and double click on Automatic Calibration to see the toolbar and menu for Automatic Calibration on the right.
To calibrate the robot using the linear gage sensor we need to load the robot in RoboDK and make sure the sensor and the robot are connected. We can optionally model the cell by adding the 3D models of objects and tools. This will allow to automatically avoid collisions.
1.Load the robot:
a.Select File➔Open online library. The online library will show up in RoboDK.
b.Use the filters to find your robot.
c.Select Download to automatically load the robot in your RoboDK station.
d.Alternatively, download the robot file directly from the online library (https://robodk.com/library) and open the file with RoboDK (.robot file).
2.Connect the sensor:
a.Connect the sensor to your computer.
b.Select Automatic Calibration➔ Measure.
c.Make sure the sensor is measuring and measurements are stable.
3.Connect the robot:
a.Select Connect➔Connect robot.
b.Enter the robot IP and port.
c.Select Connect.
4.Select Get Position from the robot connection panel. This step will update the position of the robot in RoboDK.
If you don’t have objects near the measurement sensor you can start the calibration procedure. Simply select Automatic Calibration➔ Calibrate Robot to start the robot calibration sequence.
You can optionally follow these steps to properly model the 3D environment of you cell.
1.Load the 3D model of your tool and create a tool in RoboDK. More information in the create tool section.
2.Load any 3D files to model the cell. You can load 3D STEP, IGES, STL files. More information in the getting started section.
After the robot calibration sequence completes, we’ll see a chart showing the calibration results. RoboDK calculates the tool center point (TCP) with and without robot calibration.
1.TCP without robot calibration: The TCP is calculated using the nominal robot kinematics.
2.TCP with robot calibration: The TCP is calculated using accurate robot kinematics. The measurements are used to calibrate the robot and an accurate robot TCP. This method can provide better accuracy results but requires program filtering to accurately account for robot errors. More information in the Program Filtering section.
Once we have run the calibration sequence, we can run some validation tests. These validation tests can be in the same location of the sensor or different locations.
Select Update TCP from the Robot Panel to calibrate the tool only. The calibration data will be used to calculate the TCP (excluding robot calibration).
The calculated TCP will be displayed, and some statistics will provide estimated errors for the calculated TCP.
Select Validate from the toolbar to start the validation sequence (you can also select it from the menu or the Calibration panel).
Select Show Statistics to display a summary and some statistics about the results. These statistics correspond to the planar errors detected by the sensor.
Select Update Robot & TCP from the Robot Panel to calibrate the tool only. The calibration data will be used to calculate the TCP (excluding robot calibration).
The calculated TCP will be displayed. Some statistics will provide estimated errors for the calculated TCP.
Select Show Statistics to display a summary and some statistics about the results. These statistics correspond to the planar errors detected by the sensor.
This section describes additional settings and options that you can modify to better customize your calibrations and test the robot accuracy.
Select Automatic Calibration➔ Calibration Panel to open the robot calibration panel. This panel allows you to specify the tool you want to calibrate. You can also select the calibration target to use as a reference point.
You can preview the targets that will be used for calibration and run simulations.
You can select Show data to display current measurements and/or previous measurements.
Select Automatic Calibration➔Calibration Settings to open the settings window shown in the following image.
Among other things, you can change the approach speed, approach distance and measurement speed.
Once the robot has been calibrated, we need to make sure we generate filtered programs or account for calibrated robot parameters to make sure we take advantage of the robot calibration.
We should follow one and only one of the following methods to program robots accurately after calibration:
1.Use RoboDK for Offline Programming to generate accurate programs (generated programs are already filtered). This is the recommended offline programming option for optimal accuracy results.
2.Calibrate robot controller parameters (such as link lengths, DH-DHM parameters and/or mastering parameters).
3.Filter programs: all the robot targets inside a program are modified to improve the accuracy of the robot.
4.Filter targets or programs using the RoboDK API.
When a robot has been calibrated with RoboDK we have the option to activate accurate kinematics by right clicking the robot and selecting Use accurate kinematics.
If accuracy is active, we will see a green dot, if it is not active, we will see a red dot.
This is the recommended option to have optimal accuracy results. With the robot accuracy option activated in RoboDK, all programs generated by RoboDK will be automatically filtered. This means that all Cartesian coordinates will be slightly modified to compensate robot errors.
This is the most suitable option if you are planning to use your robots for robot machining, program robots from NC files or use any of RoboDK’s supported CAD/CAM plugins.
You can access the calibrated parameters in the Parameters menu once a robot has been calibrated. Some robot controllers allow modifying certain robot parameters.
You can drag & drop robot programs in RoboDK to filter them (or select File➔Open). Select Filter only to automatically create an accurate program in the same folder. The program will be filtered and saved in the same folder.
The filter summary will mention if there were any problems using the filter algorithm. We also have the option to import a program if we want to simulate it inside RoboDK. If the program has any dependencies (tool frame or base frame definitions, subprograms, ...) they must be in the same directory where the first program is imported.
If we choose to import a program inside RoboDK we can regenerate it with or without absolute accuracy. In the main accuracy settings of RoboDK (Tools➔Options➔Accuracy) we can choose if we want to always generate the programs using accurate kinematics, if we want to ask every time or if we want to use the current robot kinematics.
It is possible to filter Cartesian targets or filter a program as described in the previous section using RoboDK API.
The following code is an example Python script that uses the RoboDK API to filter a target (pose target or joint target), using the FilterTarget command:
pose_filt, joints = robot.FilterTarget(nominal_pose, estimated_joints)
This example is useful if a 3rd party application (other than RoboDK) generates the robot program using pose targets (Cartesian data).
from robolink import*# API to communicate with RoboDK
from robodk import*# basic matrix operations
defXYZWPR_2_Pose(xyzwpr):
return KUKA_2_Pose(xyzwpr) # Convert X,Y,Z,A,B,C to a pose
defPose_2_XYZWPR(pose):
return Pose_2_KUKA(pose) # Convert a pose to X,Y,Z,A,B,C
# Start the RoboDK API and retrieve the robot:
RDK = Robolink()
robot = RDK.Item('', ITEM_TYPE_ROBOT)
ifnot robot.Valid():
raise Exception("Robot not available")
pose_tcp = XYZWPR_2_Pose([0,0,200,0,0,0]) # Define the TCP
pose_ref = XYZWPR_2_Pose([400,0,0,0,0,0]) # Define the Ref Frame
# Update the robot TCP and reference frame
robot.setTool(pose_tcp)
robot.setFrame(pose_ref)
# Very important for SolveFK and SolveIK (Forward/Inverse kinematics)
robot.setAccuracyActive(False)# Accuracy can be ON or OFF
# Define a nominal target in the joint space:
joints =[0,0,90,0,90,0]
# Calculate the nominal robot position for the joint target:
pose_rob = robot.SolveFK(joints) # robot flange wrt the robot base
# Calculate pose_target: the TCP with respect to the reference frame
pose_target = invH(pose_ref)*pose_rob*pose_tcp
print('Target not filtered:')
print(Pose_2_XYZWPR(pose_target))
joints_approx = joints # joints_approx must be within 20 deg
pose_target_filt, real_joints = robot.FilterTarget(pose_target, joints)
print('Target filtered:')
print(real_joints.tolist())
print(Pose_2_XYZWPR(pose_target_filt))
It is possible to triggergiven a calibrated robot and the robot program using the FilterProgram call:
robot.FilterProgram(file_program)
An example script called FilterProgram is available in the Macros section of the library. The following code is an example Python script that uses the RoboDK API to filter a program.
from robolink import*# API to communicate with RoboDK
from robodk import*# basic matrix operations
import os # Path operations
# Get the current working directory
CWD = os.path.dirname(os.path.realpath(__file__))
# Start RoboDK if it is not running and link to the API
RDK = Robolink()
# optional: provide the following arguments to run behind the scenes
#RDK = Robolink(args='/NOSPLASH /NOSHOW /HIDDEN')
# Get the calibrated station (.rdk file) or robot file (.robot):
# Tip: after calibration, right click a robot and select "Save as .robot"
calibration_file = CWD +'/KUKA-KR6.rdk'
# Get the program file:
file_program = CWD +'/Prog1.src'
# Load the RDK file or the robot file:
calib_item = RDK.AddFile(calibration_file)
ifnot calib_item.Valid():
raise Exception("Something went wrong loading "+ calibration_file)
# Retrieve the robot (no popup if there is only one robot):
robot = RDK.ItemUserPick('Select a robot to filter', ITEM_TYPE_ROBOT)
ifnot robot.Valid():
raise Exception("Robot not selected or not available")
# Activate accuracy
robot.setAccuracyActive(1)
# Filter program: this will automatically save a program copy
# with a renamed file depending on the robot brand
status, summary = robot.FilterProgram(file_program)
if status ==0:
print("Program filtering succeeded")
print(summary)
calib_item.Delete()
RDK.CloseRoboDK()
else:
print("Program filtering failed! Error code: %i"% status)
print(summary)
RDK.ShowRoboDK()
RoboDK provides some utilities to calibrate reference frames and tool frames. These tools can be accessed from Utilities➔Calibrate Reference frame and Utilities➔Calibrate Tool frame respectively.
To calibrate a reference frame or a tool that has not been automatically calibrated (also known as User frame and TCP respectively) we need some robot configurations touching 3 or more points, these robot configurations can either be joint values or Cartesian coordinates (with orientation data in some cases). It is recommended to use the joint values instead of the Cartesian coordinates as it is easier to check the real robot configuration in RoboDK (by copy-pasting the robot joints to the RoboDK main screen).
Select Utilities➔Calibrate tool to calibrate the TCP using RoboDK. We can use as many points as desired, using different orientations. More points and larger orientation changes is better as we will get a better estimate of the TCP as well as a good estimate of the TCP error.
Select Utilities➔Calibrate reference to calibrate a reference frame. It is possible to set a reference frame using different methods. In the example of the figure, a reference frame is defined by three points: point 1 and 2 define the X axis direction and point 3 defines the positive Y axis.