Robot kinematics calibration method and device, electronic equipment and readable storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING YUANLUO TECHNOLOGY CO LTD
- Filing Date
- 2026-05-08
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies struggle to ensure parameter consistency among kinematic chains in multi-chain robot kinematic calibration, and are highly dependent on the installation accuracy of external measuring equipment and calibration plates, resulting in low calibration accuracy.
By using the calibration error parameters of common joints as shared variables and the pose in the robot's base coordinate system as the optimization variable, an optimization objective function is constructed to simultaneously solve for the calibration error parameters of each joint and the pose in the base coordinate system.
It significantly improves the accuracy of robot kinematic calibration, reduces absolute positioning error and posture error, and enhances the operational accuracy of multi-chain robots.
Smart Images

Figure CN122165434A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotics, and more particularly to robot kinematics calibration methods, apparatus, electronic devices, and readable storage media. Background Technology
[0002] Robot kinematics calibration is a key technology for improving the absolute positioning accuracy of robots and is widely used in industrial robots, service robots, and humanoid robots. With the increasing complexity of robot applications, especially the emergence of multi-chain structures such as dual-arm humanoid robots, higher demands are being placed on the spatial consistency between kinematic chains.
[0003] Existing technologies primarily employ kinematic calibration methods for single-chain robots. These methods collect joint angle data using joint encoders and acquire the actual pose of the end effector using external measuring equipment. Joint parameters are then optimized using the least squares method to reduce the error between model predictions and actual measurements. However, when applied to multi-chain robots, these existing technologies struggle to ensure parameter consistency across different kinematic chains and are highly dependent on the accuracy of external measuring equipment and calibration plate installation, resulting in lower kinematic calibration accuracy. Summary of the Invention
[0004] In view of this, the embodiments of this application provide at least a robot kinematics calibration method, apparatus, electronic device and readable storage medium. By using the calibration error parameters of common joints as shared variables and the pose in the robot base coordinate system as the variable to be optimized, the accuracy of robot kinematics calibration is improved.
[0005] This application mainly includes the following aspects: In a first aspect, embodiments of this application provide a robot kinematics calibration method, the method comprising: Collect joint angle data of at least two kinematic chains of the robot to be calibrated, as well as the observation pose data of the target calibration object by the end sensors of each kinematic chain; the at least two kinematic chains share at least one common joint; Based on the joint angle data and the pre-constructed kinematic model, the predicted pose of the target calibration object in the sensor coordinate system at the end of each kinematic chain is determined; the kinematic model includes the nominal kinematic parameters of each joint and the error parameters to be calibrated, and the error parameters to be calibrated for the common joint are the shared variables of each kinematic chain corresponding to the common joint; Based on the residual between the predicted target pose and the observed pose data, an optimization objective function is constructed, and the pose of the target object in the robot base coordinate system is added to the objective function as a variable to be optimized. Solve the optimization objective function, and when the residual satisfies the convergence condition, obtain the calibration error parameters of each joint and the pose of the target calibration object in the robot base coordinate system, as the kinematic calibration result of the robot to be calibrated.
[0006] Secondly, embodiments of this application also provide a robot kinematics calibration device, the robot kinematics calibration device comprising: The data acquisition module is used to acquire joint angle data of at least two kinematic chains of the robot to be calibrated, as well as the observation pose data of the target calibration object by the end sensors of each kinematic chain; the at least two kinematic chains share at least one common joint; The pose prediction module is used to determine the predicted pose of the target calibration object in the sensor coordinate system at the end of each kinematic chain based on the joint angle data and the pre-built kinematic model. The kinematic model includes the nominal kinematic parameters of each joint and the error parameters to be calibrated. The error parameters to be calibrated for the common joints are the shared variables of each kinematic chain corresponding to the common joint. The target construction module is used to construct an optimization objective function based on the residual between the predicted target pose and the observed pose data, and to add the target pose in the robot base coordinate system as a variable to be optimized into the objective function; The optimization calibration module is used to solve the optimization objective function. When the residual satisfies the convergence condition, the calibration error parameters of each joint and the pose of the target calibration object in the robot base coordinate system are obtained as the kinematic calibration result of the robot to be calibrated.
[0007] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory through the bus, and the machine-readable instructions are executed by the processor to perform the steps of the robot kinematics calibration method as described above.
[0008] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the robot kinematics calibration method as described above.
[0009] The robot kinematic calibration method, apparatus, electronic device, and readable storage medium provided in this application collect joint angle data of at least two kinematic chains of the robot to be calibrated, as well as the observation pose data of the target calibration object by the end sensors of each kinematic chain. At least two kinematic chains share at least one common joint. Based on the joint angle data and a pre-constructed kinematic model, the predicted pose of the target calibration object in the coordinate system of the end sensors of each kinematic chain is determined. The kinematic model includes the nominal kinematic parameters of each joint and the error parameters to be calibrated. The error parameters to be calibrated for the common joint are shared variables of each kinematic chain corresponding to the common joint. Based on the residual between the predicted pose of the target calibration object and the observed pose data, an optimization objective function is constructed, and the pose of the target calibration object in the robot base coordinate system is added to the objective function as the variable to be optimized. The optimization objective function is solved, and when the residual satisfies the convergence condition, the error parameters to be calibrated for each joint and the pose of the target calibration object in the robot base coordinate system are obtained as the kinematic calibration result of the robot to be calibrated. In this way, by using the calibration error parameters of common joints as shared variables and solving the pose in the robot's base coordinate system as the variable to be optimized simultaneously, the accuracy of robot kinematic calibration is improved.
[0010] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A flowchart of a robot kinematics calibration method provided in an embodiment of this application is shown; Figure 2 This illustration shows one of the functional block diagrams of a robot kinematics calibration device provided in an embodiment of this application; Figure 3 This is a second functional block diagram of a robot kinematics calibration device provided in an embodiment of this application; Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0014] To enable those skilled in the art to use the content of this application, and in conjunction with the specific application scenario of "kinematic calibration of a dual-arm humanoid robot", the following implementation method is provided. For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios, such as kinematic calibration of robots with at least one common joint, such as three-armed robots, four-armed robots, and multi-armed robots, without departing from the spirit and scope of this application.
[0015] The methods, apparatus, electronic devices, or computer-readable storage media described in this application can be applied to any scenario requiring robot kinematic calibration. This application does not limit specific application scenarios, and any scheme using the robot kinematic calibration methods and apparatus provided in this application is within the protection scope of this application.
[0016] To facilitate understanding of this application, the technical solutions provided in this application will be described in detail below with reference to specific embodiments.
[0017] Please see Figure 1 , Figure 1 This is a flowchart illustrating a robot kinematics calibration method provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the robot kinematics calibration method includes the following steps: S101, Collect joint angle data of at least two kinematic chains of the robot to be calibrated and the observation pose data of the target calibration object by the end sensors of each kinematic chain; the at least two kinematic chains share at least one common joint.
[0018] Here, the robot to be calibrated has multiple kinematic chains, such as the left arm kinematic chain, right arm kinematic chain, and head kinematic chain of a dual-arm humanoid robot. These kinematic chains all originate from the robot's base and pass through their respective joint sequences before finally reaching the end-effectors. The waist joint is a common joint traversed by these multiple kinematic chains. Joint angle data is read by sensors at each kinematic chain joint to reflect the robot's current configuration. Observational pose data is obtained by sensors attached to the end of each kinematic chain, reflecting the relative position and orientation between the sensors and the calibration object. The calibration object is fixedly placed within the robot's workspace to ensure that it can be observed by all end-effectors.
[0019] In this embodiment, multiple sets of data are obtained through multiple acquisitions. During each acquisition, the joint angle data of all kinematic chains and the pose data of the calibration object observed by each end sensor are recorded simultaneously. Each set of data corresponds to a robot configuration.
[0020] S102, based on the joint angle data and the pre-constructed kinematic model, determine the predicted pose of the target calibration object in the sensor coordinate system at the end of each kinematic chain; the kinematic model includes the nominal kinematic parameters of each joint and the error parameters to be calibrated, and the error parameters to be calibrated for the common joint are the shared variables of each kinematic chain corresponding to the common joint.
[0021] Here, the kinematic model is a mathematical model describing the relative pose relationships between the links of the robot. The nominal kinematic parameters are derived from the robot's ideal geometric model, reflecting the robot's design dimensions. The error parameters to be calibrated are used to compensate for deviations between the actual robot and the ideal model. Since a common joint is traversed by multiple kinematic chains, its error parameters will affect the end-effector accuracy of all kinematic chains passing through that joint. Therefore, the error parameters to be calibrated for this common joint are set as shared variables across multiple kinematic chains to ensure that the error parameters of the same joint remain consistent across different kinematic chains.
[0022] In this embodiment of the application, for each kinematic chain, based on the joint angle data, nominal kinematic parameters and error parameters to be calibrated of each joint on the chain, the coordinate system is transformed from the base coordinate system to the end sensor coordinate system joint by joint through forward kinematics calculation, and finally the predicted pose of the calibrated object in the end sensor coordinate system is obtained.
[0023] S103, Based on the residual between the predicted target calibration pose and the observed pose data, an optimization objective function is constructed, and the pose of the target calibration object in the robot base coordinate system is added to the objective function as a variable to be optimized.
[0024] Here, residual refers to the deviation between the calibration object's pose predicted by the kinematic model and the actual pose observed by the sensor at the same sampling time. The optimization objective function is a mathematical expression constructed with the goal of minimizing the residual of all samples. Since the absolute pose of the calibration object in the robot's base coordinate system is difficult to measure accurately in practical applications, it is also included as a variable to be optimized in the objective function, and can be solved simultaneously during the optimization process.
[0025] In this embodiment, for each set of acquired joint angle data and its corresponding observed pose data, position residuals and attitude residuals are calculated based on the deviation between the predicted pose and the observed pose corresponding to that set of joint angle data. The position residuals and attitude residuals of all sets of data are combined in a preset manner to form a closed-loop error term, and a regularization term is added to form an optimization objective function.
[0026] S104, Solve the optimization objective function. When the residual satisfies the convergence condition, obtain the calibration error parameters of each joint and the pose of the target calibration object in the robot base coordinate system, as the kinematic calibration result of the robot to be calibrated.
[0027] Here, solving the objective function is an iterative optimization process. By continuously adjusting the variables to be optimized (including the calibration error parameters of each joint and the pose of the calibration object in the base coordinate system), the value of the objective function is gradually reduced. When the residuals meet the preset convergence conditions, it indicates that the current kinematic model can accurately describe the actual physical characteristics of the robot, and the calibration error parameters obtained at this time are the optimal compensation values.
[0028] In this embodiment, the objective function is solved by an iterative optimization algorithm. In each iteration, the variable to be optimized is updated according to the current value of the objective function and its changing trend. This process is repeated until the convergence condition is met, so as to obtain the calibration error parameters of each joint and the pose of the calibration object in the base coordinate system.
[0029] Taking a dual-arm wheeled humanoid robot as an example, this robot includes three kinematic chains: the left arm, the right arm, and the head. The left and right arms each have 7 joints, the waist has 3 joints, and the head has 2 joints. The waist is a common joint, and cameras are mounted at the ends of each kinematic chain. A ChArUco calibration plate (made of float glass, model ChArUco-400) is fixedly placed in the workspace in front of the robot, ensuring that all cameras can observe the calibration plate. The robot is driven to several different configurations. In each configuration, joint angle data is read through joint sensors, and images of the calibration plate are acquired through the end-effector cameras. The pose of the calibration plate in the camera coordinate system is calculated to obtain the observed pose data. A kinematic model containing the nominal kinematic parameters of each joint is constructed based on the robot's ideal geometric model, and error parameters to be calibrated are introduced for each joint. The error parameters of the waist joints are set as shared variables for the three kinematic chains. For each set of acquired data, the pose of the calibration plate in the camera coordinate system is predicted based on the joint angle data, and the residual is calculated with the observed pose. The residuals of all data are used to construct an optimization objective function according to a preset method, and the pose of the calibration plate in the base coordinate system is used as the variable to be optimized. An iterative optimization algorithm is used to solve this objective function. When the residuals converge, the error parameters of each joint and the pose of the calibration plate in the base coordinate system are obtained, completing the robot's kinematic calibration. After calibration, the absolute positioning error of the coordinated operation of the two arms is reduced from the initial 5 cm to less than 2 mm, and the posture error is reduced from 3 degrees to less than 0.5 degrees, significantly improving the robot's motion accuracy.
[0030] Furthermore, the acquisition of joint angle data of at least two kinematic chains of the robot to be calibrated, as well as the observation pose data of the target calibration object by the sensors at the end of each kinematic chain, includes: Step a1: Drive the robot to be calibrated to move sequentially to multiple preset configurations.
[0031] Here, preset configurations refer to different combinations of robot postures in space. By changing the angles of each joint, the end effector can observe the target calibration object from different perspectives. Multiple preset configurations cover different areas of the robot's workspace, providing diverse observation data for subsequent parameter optimization.
[0032] In this embodiment, a sequence of configurations covering the observation area of the calibration object is pre-planned based on the robot's joint range of motion and workspace. The robot is controlled to move sequentially to each configuration and remain stable, ensuring that each end sensor can clearly observe the target calibration object in each configuration. For example, for a dual-arm humanoid robot, 100 to 150 preset configurations can be planned to cover the typical range of motion of the waist, arms, and head joints.
[0033] Step a2: Under each preset configuration, the joint angles are read by the encoders of each kinematic chain joint to obtain the joint angle data.
[0034] Here, joint encoders are angle measurement sensors installed at each joint to acquire the actual rotation angle of the joint in real time. The joint angle data reflects the robot's current configuration and is the fundamental input for forward kinematics calculations.
[0035] In this embodiment, once the robot moves to a preset configuration and remains stable, the encoder values of each joint in all kinematic chains are read synchronously and recorded as joint angle data for that configuration. For common joints, the encoder readings are used simultaneously for the forward kinematics calculations of multiple kinematic chains. For example, the encoder readings of the waist joint are used simultaneously for the forward kinematics calculations of the left arm, right arm, and head kinematic chains.
[0036] Step a3: Under each preset configuration, images of the target calibration object are acquired by cameras at the ends of each motion chain, and the pose of the target calibration object in the camera coordinate system is calculated based on the images to obtain the observed pose data.
[0037] Here, the camera acts as an end-sensor, used to observe a fixed target calibration object. By capturing images of the calibration object, visual algorithms are used to extract feature points (such as checkerboard corners or ChArUco corners) on the calibration board. Combining the camera's intrinsic parameters and the world coordinates of the feature points, the position and orientation of the calibration object in the camera coordinate system can be calculated.
[0038] In this embodiment, under each preset configuration, cameras at the ends of each kinematic chain simultaneously capture images of the target calibration object. Each image is processed to extract feature points and solve a PnP problem to obtain the pose of the calibration object in the camera coordinate system, which serves as the observed pose data for that configuration. Joint angle data and observed pose data acquired at the same time constitute a set of corresponding samples. The calibration object can be a ChArUco calibration board, whose corner coordinates are known, facilitating rapid pose calculation.
[0039] In one possible implementation, the end effector is not limited to a camera. For example, a contact probe can be used as the end effector, acquiring positional constraints by contacting a reference point to achieve non-visual calibration data acquisition. Alternatively, a camera can be fixed to the external environment, forming an "eye outside the hand" configuration, with the robot's end effector holding a calibration board and obtaining the end effector's pose by observing the calibration board. Regardless of the type of end effector used, as long as the relative pose relationship between the end effector and the calibration object can be obtained, the technical solution of this application can be achieved.
[0040] In one possible implementation, the target calibration object is not limited to a single ChArUco calibration plate. For example, multiple calibration plates can be combined, and their relative positional relationships can be used to increase constraints and improve calibration accuracy. Alternatively, a laser tracker can be used in conjunction with a target ball to directly measure the absolute pose of the end effector, eliminating the need for a visual calibration plate. Alternatively, passive reflective markers from an optical motion capture system can be used as absolute position references. Regardless of the calibration object used, as long as a fixed reference point observable by the end sensor can be provided, the technical solution of this application can be achieved.
[0041] Further, the kinematic model is constructed according to the following steps: Step b1: Obtain the nominal origin coordinates and nominal Euler angles of each joint of the robot to be calibrated from the unified robot description format file, as the nominal kinematic parameters.
[0042] Here, the Unified Robot Description Format (URDF) is a standardized format for describing robot models, defining the robot's joints, links, and their connections. Nominal origin coordinates (origin xyz) and nominal Euler angles (origin rpy) describe the nominal position and orientation of each joint relative to its parent joint, reflecting the robot's ideal geometric design parameters.
[0043] In this embodiment, the nominal origin coordinates and nominal Euler angles of each joint are extracted by parsing the robot's unified robot description format file. For common joints, their nominal parameters are defined only once in the file, but the joint is referenced in multiple kinematic chains as the basis for the forward kinematics calculation of each kinematic chain.
[0044] Step b2 introduces error parameters to be calibrated for each joint; the error parameters include translational errors along three mutually perpendicular directions and rotational errors about three mutually perpendicular axes.
[0045] Here, due to unavoidable errors in robot manufacturing and assembly, the actual joint positions and orientations deviate slightly from their nominal values. The error parameters to be calibrated are used to describe these deviations, including offsets in three translational directions and angular offsets in three rotational directions, totaling six degrees of freedom, which can fully describe the joint's pose error in actual space.
[0046] In this embodiment of the application, for any joint in the robot's kinematic chain The transformation matrix of a link relative to its parent link is determined by the nominal geometric parameters and joint variables of the joint. To compensate for kinematic errors, error parameters are introduced into the nominal transformation matrix of each joint, resulting in a corrected homogeneous transformation matrix. Represented as: ; in, Based on nominal kinematic parameters and current joint angle The calculated nominal transformation matrix. Specifically, based on the joint origin coordinates and Euler angles defined in the unified robot description format file, and combined with the joint encoder angle values acquired in real time, the nominal homogeneous transformation matrix of each joint is constructed. It is determined by the error parameters to be calibrated. The constructed error transformation matrix describes the small pose offset of the actual joint relative to the nominal joint. During optimization, this is achieved by adjusting... The value of allows the error transformation matrix to compensate for the geometric deviation between the actual robot and the ideal model, thereby enabling the corrected kinematic model to more accurately reflect the pose relationship of the physical entity. Let be the six geometric parameters to be optimized for joint j, which correspond to the translational errors along the X, Y, and Z axes and the rotational errors about the X, Y, and Z axes (RPY Euler angles), respectively.
[0047] For a dual-arm wheeled humanoid robot, this application embodiment establishes three serial kinematic chains that start from the robot base link and end at each camera frame.
[0048] Left arm kinetic chain (left arm + waist chain) The transformation relationship of ) is expressed as: ; Right arm kinetic chain (right arm + waist chain) The transformation relationship of ) is expressed as: ; Head kinetic chain (head + waist chain) The transformation relationship of ) is expressed as: .
[0049] The trunk / waist joint is the common joint of the three kinetic chains mentioned above, and its transformation matrix... The error parameters are shared variables across the three motion chains.
[0050] Step b3: For any of the common joints, the calibration error parameter of the common joint is determined as a shared variable for all kinematic chains passing through the common joint.
[0051] Here, a common joint is traversed by multiple kinematic chains, and its geometric errors simultaneously affect the end-effector accuracy of all kinematic chains passing through it. Optimizing the error parameters of the common joint independently in different kinematic chains would result in multiple inconsistent error compensation values for the same joint, disrupting the spatial consistency between kinematic chains.
[0052] In this embodiment, when constructing the kinematic model of each kinematic chain, only one error parameter instance is defined for a common joint. This instance is shared by all kinematic chains passing through the common joint. During subsequent optimization, the value of this error parameter simultaneously affects the predicted pose of the end effector of all related kinematic chains, thereby ensuring that the error compensation value of the common joint remains consistent across multiple kinematic chains. For example, for the waist joint of a dual-arm humanoid robot, its error parameter shares the same set of variables to be optimized in the left arm kinematic chain, right arm kinematic chain, and head kinematic chain.
[0053] Taking a dual-armed wheeled humanoid robot as an example, the nominal origin coordinates and nominal Euler angles of each joint in the waist, left arm, right arm, and head are obtained from the robot's unified robot description format file. Six-degree-of-freedom error parameters to be calibrated are introduced for each joint, including translational errors along the X, Y, and Z axes and rotational errors about the X, Y, and Z axes. Based on the above formulas, a forward kinematic model of the kinematic chains for the left arm, right arm, and head is constructed, where the error parameters of the waist joints are used as shared variables in the transformation matrix calculation of all three kinematic chains.
[0054] In one possible implementation, the kinematic model is not limited to the geometric parameter correction method based on a unified robot description format. For example, the Denavit-Hartenberg parametric method can be used to build the kinematic model and optimize the joints. Four parameters. Alternatively, the Hayati parameter method can be used to solve the singularity problem of parallel joints. Alternatively, kinematic modeling can be performed using the Product of Exponentials (PoE) formula, describing the transformation relationship between joints through exponential mapping. Regardless of the parameterization method used, as long as the deviation between the actual robot and the ideal model can be described by introducing error parameters, the technical solution of this application can be achieved.
[0055] Furthermore, the step of constructing an optimization objective function based on the residual between the predicted target pose and the observed pose data includes: Step c1: For each set of joint angle data and its corresponding observation pose data, calculate the position residual and attitude residual based on the deviation of the predicted target calibration pose corresponding to the set of joint angle data from the set of observation pose data.
[0056] Here, for the first The first kinetic chain collected For each sample, the predicted pose of the camera coordinate system in the base coordinate system needs to be calculated using a forward kinematics model. This predicted pose is calculated based on the current joint angle data and the geometric parameters to be optimized, reflecting the model's estimate of the camera position. Based on this, according to the coordinate transformation relationship, the model's predicted "calibration plate pose in the camera coordinate system" can be further calculated. That is, using the base coordinate system as an intermediate bridge, the pose of the calibration plate in the base coordinate system is transformed to the camera coordinate system. Finally, this predicted pose is compared with the actual calibration plate pose observed by the camera, and a residual matrix is constructed. This residual matrix is defined as the inverse of the predicted pose multiplied by the observed pose, and its physical meaning is the small rigid body transformation required to transform from the predicted pose to the observed pose.
[0057] In this embodiment of the application, let the first... The first kinetic chain The joint angle vector of each sample is The set of geometric parameters for all joints is as follows The predicted pose of the camera coordinate system in the base coordinate system is calculated using the forward kinematics function: .
[0058] Let the pose of the calibration plate in the robot base coordinate system be... The corresponding homogeneous transformation matrix is denoted as The pose is a global variable to be optimized, and it is solved simultaneously with the joint error parameters during the calibration process.
[0059] The model predicts the calibration plate pose in the camera coordinate system as follows: .
[0060] Let the actual pose of the calibration plate observed by the camera be... The residual matrix is then defined as: .
[0061] Extract position and attitude errors from the residual matrix: The positional error is taken as the square of the magnitude of the translation part of the residual matrix, i.e. ; Attitude error is measured using axis angle error. for The rotation matrix part is then defined as follows: ,in, This function is used to limit the input value to the range [-1, 1] to avoid errors caused by numerical calculations. The function's argument is outside its domain.
[0062] Step c2: The sum of the squared position residuals and the sum of the squared attitude residuals of all data sets is determined as the closed-loop error term.
[0063] Here, the closed-loop error term is the core indicator for measuring the overall calibration accuracy, as it integrates the prediction biases of all kinematic chains and all samples. The overall prediction error of the entire system across all observation data is obtained by directly summing the position and attitude residuals of all samples. This closed-loop error term reflects the overall inconsistency between the kinematic model and the actual physical system and is a major component of the optimization objective function.
[0064] In this embodiment, for all samples across all kinematic chains, the sum of squared position residuals calculated in step c1 is added to the sum of squared attitude residuals to obtain the closed-loop error term. This closed-loop error term reflects the overall prediction error of the entire system across all observation data and is a major component of the objective function. In practical applications, different regularization weights can be set according to the joint type: for camera extrinsic joints, since installation errors may be large, smaller weights can be set to allow for a larger adjustment range; for robot body joints, since the mechanical structure is relatively stable, larger weights can be set to ensure the physical rationality of the parameters.
[0065] Step c3: The weighted sum of the squares of the deviations of the calibration error parameters of each joint from their respective initial values is determined as the regularization term.
[0066] Here, the regularization term is used to constrain the range of change of the error parameter to be calibrated during the optimization process, preventing unreasonable parameter drift. By incorporating the degree to which the error parameter deviates from its initial value into the objective function, the optimization result can be ensured to be physically reasonable, avoiding excessive parameter corrections.
[0067] In this embodiment, the regularization term is represented as: ,in For joints The error parameters to be calibrated Set its initial value (usually zero). This represents the regularization weight coefficient. Different regularization weights can be set for different types of joints. For example, a smaller weight can be set for camera extrinsic joints to allow for a larger adjustment range, while a larger weight can be set for robot body joints to ensure the physical rationality of the structure.
[0068] Step c4: The sum of the closed-loop error term and the regularization term is determined as the optimization objective function.
[0069] Here, the objective function is the total cost function to be minimized. By simultaneously minimizing the closed-loop error term and the regularization term, the goal is to maximize the model's prediction accuracy while preventing excessive deviation of the parameters from their initial values. This objective function is a nonlinear least squares problem, which can be solved using an iterative optimization algorithm.
[0070] In this embodiment of the application, the optimization objective function is expressed as: ; in For all variables to be optimized (including the calibration error parameters of each joint) pose of the calibration object in the base coordinate system ), These are the weighting coefficients for the closed-loop error term. By adjusting... The relative magnitudes of the regularization weights can balance the relationship between model accuracy and parameter stability. When When the regularization weight is large, the optimization process focuses more on reducing prediction error and obtaining higher calibration accuracy; when the regularization weight is large, the optimization process focuses more on keeping the parameters near their initial values to obtain more stable calibration results. The objective function is solved using the nonlinear least squares method, and the error parameter obtained when the objective function converges is the optimal compensation value.
[0071] Furthermore, solving the optimization objective function includes: Step d1: In the first optimization stage, the objective function is solved using all the collected data to obtain coarse calibration parameters. The coarse calibration parameters include the approximate values of the calibration error parameters of each joint and the approximate values of the pose of the target calibration object in the base coordinate system.
[0072] Here, the first optimization stage is the initial coarse-tuning step in the entire calibration process. Its purpose is to quickly obtain a set of preliminary calibration parameters using all collected data. Since all data may contain gross errors, a large regularization weight is used in this stage to ensure the stability of the optimization process. Although the accuracy of the coarse calibration parameters is limited, it can converge the parameters to a reasonable range, providing good initial values for subsequent fine calibration.
[0073] In this embodiment, before starting the first optimization stage, all collected data can be filtered using interquartile range (IQR) to remove obvious gross error data and retain valid data for the first optimization stage. All data collected in step S101 is input into the optimization objective function, and a nonlinear optimization algorithm is used to solve it. In the objective function, the regularization term weights... Set to a larger value to constrain the degree to which the parameters deviate from the initial value and avoid parameter drift caused by abnormal data. After the solution is completed, the rough values of the error parameters to be calibrated for each joint and the rough values of the pose of the calibration plate in the base coordinate system are obtained, which are used as coarse calibration parameters.
[0074] Step d2: Calculate the reprojection error of the predicted target pose relative to the observed pose data for each set of collected data, and select a high-quality data subset from all collected data based on the reprojection error.
[0075] Here, reprojection error refers to the deviation between the predicted pose recalculated using coarse calibration parameters and the actual observed pose. This deviation reflects the degree of matching between each set of data and the current calibration model. By calculating the reprojection error, the quality of each set of data can be quantitatively assessed, outliers with large deviations from the model can be eliminated, and high-quality data with good model matching can be retained. This screening process is a key step in ensuring the accuracy of the second-stage optimization.
[0076] In this embodiment, based on the coarse calibration parameters obtained in step d1, the predicted pose corresponding to each group of acquired data is recalculated and compared with the observed pose of that group to calculate the reprojection error. The formula for calculating the reprojection error is: For the first... The first kinetic chain Each sample's reprojection error includes position and orientation errors. Position error is measured using Euclidean distance, and orientation error is measured using axis-angle error. Based on the magnitude of the reprojection error, all collected data is filtered: first, data with the largest pre-defined proportion of reprojection errors (e.g., 20%) are removed; then, data with reprojection errors greater than a pre-defined threshold (e.g., position error 10mm, angle error 0.5°) are removed from the remaining data. The final remaining data is determined as a high-quality subset. This dual filtering method effectively eliminates abnormal data caused by changes in lighting, motion blur, or corner detection errors.
[0077] Step d3: In the second optimization stage, using the coarse calibration parameters as initial values, the optimization objective function is solved using the high-quality data subset to obtain the fine calibration parameters, which are then used as the kinematic calibration results.
[0078] Here, the second optimization stage is a fine-tuning process performed on a high-quality subset of data. This stage uses coarsely calibrated parameters as initial values, avoiding iteration from zero and enabling faster convergence to the optimal solution. Because it uses selected high-quality data, this stage yields more accurate calibration parameters, thus significantly improving calibration accuracy.
[0079] In this embodiment, the coarse calibration parameters obtained in step d1 are used as the initial values of the variables to be optimized, and the high-quality data subset selected in step d2 is used as the input data to re-solve the objective function. In this stage, the regularization term weights... This can be set to a smaller value or canceled altogether to allow for finer parameter adjustments. Simultaneously, a more stringent convergence criterion is employed for optimization. After solving, precise calibration parameters are obtained, including the accurate values of the calibration error parameters for each joint and the accurate pose of the calibration plate in the base coordinate system. These precise calibration parameters are used as the final robot kinematics calibration result.
[0080] In one possible implementation, the joint calibration of the multiple kinematic chains is not limited to simultaneously optimizing all kinematic chains. For example, a stepwise calibration method can be used, first fixing the torso and calibrating the head, then calibrating the arms based on the head calibration results, achieving parameter consistency by progressively transferring constraints. Alternatively, each individual chain can be calibrated first, then aligned using geometric constraints, and parameter fusion can be performed using observation information from common joints. Regardless of the coupling method used, as long as the error parameters of common joints are used as shared variables of multiple kinematic chains for consistency constraints, the technical solution of this application can be achieved.
[0081] Furthermore, solving the optimization objective function includes: Step e1: Initialize the calibration error parameters of each joint to zero, and initialize the pose of the target calibration object in the robot base coordinate system to the pose obtained by hand-eye calibration.
[0082] Here, initialization is the starting point for the optimization solution, assigning initial values to the variables to be optimized. The calibration error parameters of the joints are initialized to zero, indicating that in the initial state, it is assumed that there are no geometric errors in the robot's joints, i.e., they completely conform to the nominal kinematic model. The pose of the calibration object in the base coordinate system is initialized using a hand-eye calibration method. Hand-eye calibration can preliminarily estimate the relative pose relationship between the calibration object and the base based on camera observation data, providing a reasonable starting point for subsequent joint optimization.
[0083] In this embodiment, for each joint of the robot to be calibrated, its calibration error parameter is set to a zero vector. For the pose of the target calibration object in the base coordinate system, a hand-eye calibration algorithm is used to preliminarily calculate the pose of the calibration object in the base coordinate system using observation data from cameras at the ends of each kinematic chain, which serves as the initial value for the variable to be optimized. Proper initialization can accelerate the convergence speed of subsequent iterative optimizations and avoid getting trapped in local optima.
[0084] Step e2: In each iteration, based on the current value of the objective function, calculate the rate of change of the objective function for the variable to be optimized, determine the update amount of the variable to be optimized based on the rate of change, and update the variable to be optimized according to the update amount.
[0085] Here, the optimization process is an iterative search. In each iteration, the rate of change (i.e., gradient) of the objective function relative to the variable to be optimized needs to be calculated. This rate of change reflects the descent direction of the objective function at the current parameter point. Based on the rate of change, the update amount of the variable to be optimized is determined, that is, the parameters are adjusted along the direction of the fastest descent of the objective function. After updating the variable to be optimized according to the update amount, the value of the objective function will gradually decrease, making the model prediction gradually approach the actual observation.
[0086] In this embodiment, a gradient-based nonlinear iterative optimization algorithm (such as the Gauss-Newton method or interior-point method) is used for solving the problem. In each iteration, automatic differentiation is used to calculate the Jacobian matrix and Hessian matrix of the objective function for the variables to be optimized. Automatic differentiation accurately obtains derivative information through symbolic calculation, avoiding the truncation error of traditional numerical difference methods and improving the convergence speed and numerical stability in large-scale parameter optimization. The calculation of the update can use the iterative formula of the Gauss-Newton method or interior-point method, for example, the formula: ,in The gradient vector, For Hessian matrix, Step size, This is the damping factor. After updating the variable to be optimized according to this update amount, proceed to the next iteration.
[0087] Step e3: Repeat the iteration process until the difference between the values of the optimization objective function obtained from two adjacent iterations is less than a preset threshold, or the number of iterations reaches a preset number.
[0088] Here, the iteration termination condition is used to determine whether the optimization process has converged. When the difference between the objective function values of two adjacent iterations is less than a preset threshold, it indicates that the objective function has stopped decreasing significantly, the current solution is close to the optimal solution, and the iteration can be terminated. When the number of iterations reaches a preset number, the process is forcibly terminated regardless of whether convergence has occurred, to prevent infinite loops.
[0089] In this embodiment, a convergence threshold and a maximum number of iterations are set as termination conditions. After each iteration, the difference between the objective function value of the current iteration and the previous iteration is calculated. If the difference is less than a preset threshold, the optimization is considered to have converged, and the iteration is terminated. If the number of iterations reaches the preset maximum number of iterations, the iteration is terminated even if the convergence condition has not been met, to avoid excessive consumption of computational resources. The value of the variable to be optimized obtained at the time of iteration termination is the final optimization result.
[0090] In one possible implementation, the algorithm for solving the objective function is not limited to the Gauss-Newton method or the interior-point method. For example, the Levenberg-Marquardt algorithm can be used, adaptively adjusting between gradient descent and Gauss-Newton methods to balance convergence speed and stability. Alternatively, heuristic algorithms such as genetic algorithms or particle swarm optimization can be used to search for the global optimum through swarm intelligence, suitable for scenarios where the objective function is non-convex or has multiple local optima. Alternatively, extended Kalman filtering can be used for online iterative parameter estimation, suitable for scenarios requiring dynamic calibration. Regardless of the solution algorithm used, as long as the objective function can converge through iterative optimization, the technical solution of this application can be achieved.
[0091] Furthermore, the step of filtering a high-quality data subset from all collected data based on the reprojection error includes: Step f1: Delete the data with the largest reprojection error from all the collected data to obtain the first remaining collected data.
[0092] Here, the data with the largest reprojection error are usually outliers caused by random errors during the measurement process (such as sudden changes in illumination, motion blur, corner detection errors, etc.). These samples deviate significantly from the robot's actual kinematic characteristics and can seriously interfere with the calibration results. By deleting a preset proportion of data with the largest reprojection error, these obviously abnormal samples can be effectively removed, ensuring the quality of subsequent data screening.
[0093] In this embodiment, the reprojection error of each set of acquired data is first calculated based on coarse calibration parameters. The reprojection error includes position error and attitude error, and the position error, attitude error, or a weighted sum of both can be selected as the sorting criterion according to actual needs. All acquired data are sorted from largest to smallest according to reprojection error, and a preset percentage (e.g., 20%) of the data at the top is deleted, with the remaining data being the first remaining acquired data. This percentage can be adjusted according to the actual data quality; the deletion percentage can be appropriately increased when the data quality is poor.
[0094] Step f2: Delete the data with reprojection error greater than a preset threshold from the first remaining acquired data to obtain the second remaining acquired data.
[0095] Here, after step f1 removes the largest proportion of data, some samples with large reprojection errors may still exist in the remaining data. Although these samples are not the most extreme outliers, they can still affect the calibration accuracy. By setting a preset threshold, the remaining data is further filtered, retaining only samples with reprojection errors within a reasonable range, ensuring high consistency of the data used for fine calibration.
[0096] In this embodiment, for each group of data in the first remaining acquired data, it is determined whether its reprojection error is greater than a preset threshold. The preset threshold can be set according to actual accuracy requirements, for example, the position error threshold is set to 10 mm and the attitude error threshold is set to 0.5 degrees. If either the position error or the attitude error of a group of data exceeds the corresponding threshold, the group of data is deleted. Data whose reprojection errors are all less than the preset threshold are retained as the second remaining acquired data.
[0097] Step f3: The second remaining collected data is determined as the high-quality data subset.
[0098] Here, the data subset obtained after the above two steps of screening has eliminated samples with large errors and samples that do not meet the accuracy requirements, retaining high-quality data that is well consistent with the robot's kinematic model. This high-quality data subset is used for fine calibration in the second optimization stage, which can significantly improve the accuracy and robustness of the calibration results.
[0099] In this embodiment, the second remaining acquisition data obtained in step f2 is used as a high-quality data subset for the subsequent second optimization stage. Each sample in this high-quality data subset has a small reprojection error, which can accurately reflect the actual kinematic characteristics of the robot, thereby ensuring the reliability of the fine calibration results.
[0100] This application provides a robot kinematic calibration method, comprising: collecting joint angle data of at least two kinematic chains of the robot to be calibrated and observation pose data of the target calibration object by the end sensors of each kinematic chain; at least two kinematic chains share at least one common joint; based on the joint angle data and a pre-constructed kinematic model, determining the predicted pose of the target calibration object in the coordinate system of the end sensors of each kinematic chain; the kinematic model includes the nominal kinematic parameters of each joint and the error parameters to be calibrated, wherein the error parameters to be calibrated for the common joint are shared variables of each kinematic chain corresponding to the common joint; constructing an optimization objective function based on the residual between the predicted pose of the target calibration object and the observed pose data, and adding the pose of the target calibration object in the robot base coordinate system as the variable to be optimized into the objective function; solving the optimization objective function, and when the residual satisfies the convergence condition, obtaining the error parameters to be calibrated for each joint and the pose of the target calibration object in the robot base coordinate system, which are used as the kinematic calibration result of the robot to be calibrated. In this way, by using the calibration error parameters of common joints as shared variables and solving the pose in the robot's base coordinate system as the variable to be optimized simultaneously, the accuracy of robot kinematic calibration is improved.
[0101] Based on the same application concept, this application also provides a robot kinematics calibration device corresponding to the robot kinematics calibration method provided in the above embodiments. Since the principle of the device in this application is similar to the robot kinematics calibration method in the above embodiments of this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0102] Please see Figure 2 , Figure 2 This is one of the functional block diagrams of a robot kinematics calibration device provided in an embodiment of this application. Figure 2 As shown, the robot kinematics calibration device 200 provided in this application embodiment includes: The data acquisition module 210 is used to acquire joint angle data of at least two kinematic chains of the robot to be calibrated, as well as the observation pose data of the target calibration object by the end sensors of each kinematic chain; the at least two kinematic chains share at least one common joint.
[0103] The pose prediction module 220 is used to determine the predicted pose of the target calibration object in the sensor coordinate system at the end of each kinematic chain based on the joint angle data and the pre-constructed kinematic model. The kinematic model includes the nominal kinematic parameters of each joint and the error parameters to be calibrated. The error parameters to be calibrated for the common joint are the shared variables of each kinematic chain corresponding to the common joint.
[0104] The target construction module 230 is used to construct an optimization objective function based on the residual between the predicted target pose and the observed pose data, and to add the pose of the target in the robot base coordinate system as a variable to be optimized into the objective function.
[0105] The optimization calibration module 240 is used to solve the optimization objective function. When the residual satisfies the convergence condition, it obtains the calibration error parameters of each joint and the pose of the target calibration object in the robot base coordinate system, which are used as the kinematic calibration results of the robot to be calibrated.
[0106] Furthermore, when the data acquisition module 210 is used to acquire joint angle data of at least two kinematic chains of the robot to be calibrated and the observation pose data of the target calibration object by the end sensors of each kinematic chain, the data acquisition module 210 is specifically used for: The robot to be calibrated is driven to move sequentially to multiple preset configurations; Under each preset configuration, the joint angles are read by the encoders of each kinematic chain joint to obtain the joint angle data; In each preset configuration, images of the target calibration object are acquired by cameras at the ends of each motion chain, and the pose of the target calibration object in the camera coordinate system is calculated based on the images to obtain the observed pose data.
[0107] Further, please refer to Figure 3 , Figure 3 This is a second functional block diagram of a robot kinematics calibration device provided in an embodiment of this application. Figure 3 As shown, the robot kinematics calibration device 200 provided in this application embodiment further includes: The nominal acquisition module 250 is used to obtain the nominal origin coordinates and nominal Euler angles of each joint of the robot to be calibrated from the unified robot description format file, as the nominal kinematic parameters.
[0108] Error introduction module 260 is used to introduce error parameters to be calibrated for each joint; the error parameters include translation error along three mutually perpendicular directions and rotation error about three mutually perpendicular axes.
[0109] The shared determination module 270 is used to determine the calibration error parameter of any of the common joints as a shared variable for all kinematic chains passing through the common joints.
[0110] Furthermore, when constructing an optimization objective function based on the residual between the predicted target calibration pose and the observed pose data, the target construction module 230 is specifically used for: For each set of joint angle data and its corresponding observed pose data, the position residual and attitude residual are calculated based on the deviation of the predicted target pose corresponding to the set of joint angle data from the set of observed pose data. The sum of the squared position residuals and the sum of the squared attitude residuals of all data sets is used as the closed-loop error term. The regularization term is determined by the weighted sum of the squares of the deviations of the calibration error parameters of each joint from their respective initial values. The sum of the closed-loop error term and the regularization term is determined as the optimization objective function.
[0111] Furthermore, when the optimization calibration module 240 is used to solve the optimization objective function, the optimization calibration module 240 is specifically used for: In the first optimization stage, the optimization objective function is solved using all the collected data to obtain coarse calibration parameters; the coarse calibration parameters include the approximate values of the calibration error parameters of each joint and the approximate values of the pose of the target calibration object in the base coordinate system; Calculate the reprojection error of the predicted target pose relative to the observed pose data for each set of acquired data, and select a high-quality data subset from all acquired data based on the reprojection error. In the second optimization stage, using the coarse calibration parameters as initial values, the optimization objective function is solved using the high-quality data subset to obtain the fine calibration parameters, which are then used as the kinematic calibration results.
[0112] Furthermore, when the optimization calibration module 240 is used to solve the optimization objective function, the optimization calibration module 240 is specifically used for: The calibration error parameters of each joint are initialized to zero, and the pose of the target calibration object in the robot base coordinate system is initialized to the pose obtained by hand-eye calibration. In each iteration, based on the current value of the optimization objective function, the rate of change of the variable to be optimized in the optimization objective function is calculated, and the update amount of the variable to be optimized is determined based on the rate of change. The variable to be optimized is then updated according to the update amount. Repeat the iteration process until the difference between the values of the optimization objective function obtained from two adjacent iterations is less than a preset threshold, or the number of iterations reaches a preset number.
[0113] Furthermore, when the calibration module 240 is used to filter out a high-quality data subset from all acquired data based on the reprojection error, the calibration module 240 is specifically used for: The first remaining data is obtained by deleting the data with the largest reprojection error from all the collected data; From the first remaining acquired data, data with reprojection errors greater than a preset threshold are deleted to obtain the second remaining acquired data. The second remaining collected data is determined as the high-quality data subset.
[0114] This application provides a robot kinematic calibration device, comprising: a data acquisition module for acquiring joint angle data of at least two kinematic chains of the robot to be calibrated, and observation pose data of the target calibration object by the end sensors of each kinematic chain; the at least two kinematic chains share at least one common joint; a pose prediction module for determining the predicted pose of the target calibration object in the coordinate system of the end sensors of each kinematic chain based on the joint angle data and a pre-built kinematic model; the kinematic model includes the nominal kinematic parameters of each joint and the error parameters to be calibrated, and the error parameters to be calibrated for the common joint are shared variables of each kinematic chain corresponding to the common joint; a target construction module for constructing an optimization objective function based on the residual between the predicted pose of the target calibration object and the observed pose data, and adding the pose of the target calibration object in the robot base coordinate system as the variable to be optimized into the objective function; and an optimization calibration module for solving the optimization objective function, and when the residual satisfies the convergence condition, obtaining the error parameters to be calibrated for each joint and the pose of the target calibration object in the robot base coordinate system, as the kinematic calibration result of the robot to be calibrated. In this way, by using the calibration error parameters of common joints as shared variables and solving the pose in the robot's base coordinate system as the variable to be optimized simultaneously, the accuracy of robot kinematic calibration is improved.
[0115] Based on the same application concept, please refer to Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 400 includes a processor 410, a memory 420, and a bus 430.
[0116] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 and the memory 420 communicate through the bus 430. When the machine-readable instructions are executed by the processor 410, the steps of the robot kinematics calibration method provided in the above embodiment are executed. For specific implementation, please refer to the method embodiment, which will not be repeated here.
[0117] Based on the same concept, this application also provides a computer-readable storage medium storing a computer program. When the computer program is run by a processor, it executes the steps of the robot kinematics calibration method provided in the above embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0118] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0119] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0120] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0121] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0122] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0123] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0124] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A method for calibrating the kinematics of a robot, characterized in that, The method includes: Collect joint angle data of at least two kinematic chains of the robot to be calibrated, as well as the observation pose data of the target calibration object by the end sensors of each kinematic chain; the at least two kinematic chains share at least one common joint; Based on the joint angle data and the pre-constructed kinematic model, the predicted pose of the target calibration object in the sensor coordinate system at the end of each kinematic chain is determined; the kinematic model includes the nominal kinematic parameters of each joint and the error parameters to be calibrated, and the error parameters to be calibrated for the common joint are the shared variables of each kinematic chain corresponding to the common joint; Based on the residual between the predicted target pose and the observed pose data, an optimization objective function is constructed, and the pose of the target object in the robot base coordinate system is added to the objective function as a variable to be optimized. Solve the optimization objective function, and when the residual satisfies the convergence condition, obtain the calibration error parameters of each joint and the pose of the target calibration object in the robot base coordinate system, as the kinematic calibration result of the robot to be calibrated.
2. The robot kinematics calibration method according to claim 1, characterized in that, The acquisition of joint angle data from at least two kinematic chains of the robot to be calibrated, as well as the observation pose data of the target calibrator from the end sensors of each kinematic chain, includes: The robot to be calibrated is driven to move sequentially to multiple preset configurations; Under each preset configuration, the joint angles are read by the encoders of each kinematic chain joint to obtain the joint angle data; In each preset configuration, images of the target calibration object are acquired by cameras at the ends of each motion chain, and the pose of the target calibration object in the camera coordinate system is calculated based on the images to obtain the observed pose data.
3. The robot kinematics calibration method according to claim 1, characterized in that, The kinematic model is constructed according to the following steps: Obtain the nominal origin coordinates and nominal Euler angles of each joint of the robot to be calibrated from the unified robot description format file, and use them as the nominal kinematic parameters; An error parameter to be calibrated is introduced for each joint; the error parameter includes translational error along three mutually perpendicular directions and rotational error about three mutually perpendicular axes; For any of the common joints, the calibration error parameter of the common joint is determined as a shared variable for all kinematic chains passing through the common joint.
4. The robot kinematics calibration method according to claim 1, characterized in that, The objective function is constructed based on the residual between the predicted target pose and the observed pose data, including: For each set of joint angle data and its corresponding observed pose data, the position residual and attitude residual are calculated based on the deviation of the predicted target pose corresponding to the set of joint angle data from the set of observed pose data. The sum of the squared position residuals and the sum of the squared attitude residuals of all data sets is used as the closed-loop error term. The regularization term is determined by the weighted sum of the squares of the deviations of the calibration error parameters of each joint from their respective initial values. The sum of the closed-loop error term and the regularization term is determined as the optimization objective function.
5. The robot kinematics calibration method according to claim 1, characterized in that, Solving the optimization objective function includes: In the first optimization stage, the optimization objective function is solved using all the collected data to obtain coarse calibration parameters; the coarse calibration parameters include the approximate values of the calibration error parameters of each joint and the approximate values of the pose of the target calibration object in the base coordinate system; Calculate the reprojection error of the predicted target pose relative to the observed pose data for each set of acquired data, and select a high-quality data subset from all acquired data based on the reprojection error. In the second optimization stage, using the coarse calibration parameters as initial values, the optimization objective function is solved using the high-quality data subset to obtain the fine calibration parameters, which are then used as the kinematic calibration results.
6. The robot kinematics calibration method according to claim 5, characterized in that, Solving the objective function includes: The calibration error parameters of each joint are initialized to zero, and the pose of the target calibration object in the robot base coordinate system is initialized to the pose obtained by hand-eye calibration. In each iteration, based on the current value of the optimization objective function, the rate of change of the variable to be optimized in the optimization objective function is calculated, and the update amount of the variable to be optimized is determined based on the rate of change. The variable to be optimized is then updated according to the update amount. Repeat the iteration process until the difference between the values of the optimization objective function obtained from two adjacent iterations is less than a preset threshold, or the number of iterations reaches a preset number.
7. The robot kinematics calibration method according to claim 5, characterized in that, The step of filtering a high-quality data subset from all collected data based on the reprojection error includes: The first remaining data is obtained by deleting the data with the largest reprojection error from all the collected data; From the first remaining acquired data, data with reprojection errors greater than a preset threshold are deleted to obtain the second remaining acquired data. The second remaining collected data is determined as the high-quality data subset.
8. A robot kinematics calibration device, characterized in that, The robot kinematics calibration device includes: The data acquisition module is used to acquire joint angle data of at least two kinematic chains of the robot to be calibrated, as well as the observation pose data of the target calibration object by the end sensors of each kinematic chain; the at least two kinematic chains share at least one common joint; The pose prediction module is used to determine the predicted pose of the target calibration object in the sensor coordinate system at the end of each kinematic chain based on the joint angle data and the pre-built kinematic model. The kinematic model includes the nominal kinematic parameters of each joint and the error parameters to be calibrated. The error parameters to be calibrated for the common joints are the shared variables of each kinematic chain corresponding to the common joint. The target construction module is used to construct an optimization objective function based on the residual between the predicted target pose and the observed pose data, and to add the target pose in the robot base coordinate system as a variable to be optimized into the objective function; The optimization calibration module is used to solve the optimization objective function. When the residual satisfies the convergence condition, the calibration error parameters of each joint and the pose of the target calibration object in the robot base coordinate system are obtained as the kinematic calibration result of the robot to be calibrated.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the robot kinematics calibration method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the robot kinematics calibration method as described in any one of claims 1 to 7.