4. Error Analysis and Calibration¶
The gantry robot system includes a calibration solution that leverages an existing OptiTrack motion capture system to measure and compensate for systematic positioning errors caused by minor structural deviations in the robot. This calibration system enables the gantry robot to achieve sub-centimeter precision across its entire work envelope.
Important
It is assumed that the gantry data is the commanded position of the gantry robot and the OptiTrack data is the actual position of the gantry robot. After the calibration is complete it can be evaluated with several scripts, which correct the OptiTrack data with the calibration parameters and compare the obtained positions with the reference gantry data.
The error analysis and calibration system consists of several scripts to process and analyze the data collected from both the gantry robot and the OptiTrack motion capture system:
Raw Data Visualization:
plot_movement_gantry.pyandplot_movement_optitrack.pyscripts to visualize the raw gantry and OptiTrack data before calibration.Calibration:
run_calibration.pyis the script that processes the raw data, performing the following steps:Alignment: Temporal and spatial alignment of OptiTrack and gantry robot coordinate systems using translation, rotation, and time shift transformations.
Correction: Non-orthogonal and non-linear transformation of the OptiTrack data to correct errors intrinsic to the gantry robot.
Analysis: Various scripts for plotting and analyzing the gantry and OptiTrack data, which can be executed after the calibration is complete:
check_params.py: Check the calibration parameters.print_calibxyzkins_config.py: Print the HAL configuration for thecalibxyzkinsmodule.plot_movement.py: Visualize the gantry and OptiTrack path.plot_errors.py: Plot positioning errors over time.plot_errors_scatter.py: Plot positioning errors scatter plots.plot_errors_probability.py: Plot positioning errors probability distributions.
After the calibration is performed, the calibration parameters can be used to correct the gantry position data with the calibxyzkins module of LinuxCNC included in this project (see calibxyzkins - Calibrated XYZ Kinematics Module for LinuxCNC).
Table of Contents
- 4.1. Installation and Basic Usage
- 4.2. Data and Calibration
- 4.3. Usage
- 4.3.1. Raw Gantry and OptiTrack Path Visualization
- 4.3.2. Calibration Configuration
- 4.3.3. Run the Calibration
- 4.3.4. Run the Parameters Validation
- 4.3.5. LinuxCNC Configuration for the
calibxyzkinsmodule - 4.3.6. Gantry and Calibrated OptiTrack Path Visualization
- 4.3.7. Plot Positioning Errors Over Time
- 4.3.8. Plot Positioning Errors Scatter
- 4.3.9. Plot Positioning Errors Probability Distributions