Dual kinematic chain five-axis machine tool calibration method, system, calibration machine and storage medium
Patent Information
- Application Number
- CN202611489588.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-23
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]本申请的主要目的在于提供一种双运动链五轴设备标定方法,旨在解决现有双运动链相互辨识标定方式建模复杂、参数耦合严重、对设备结构要求高,以及依赖外部高精度设备导致成本高昂、难以大规模应用的技术问题
[0015]本申请提出的双运动链五轴设备标定方法,包括:步骤S10,控制双运动链五轴设备运动,获取多组采样数据。其中,多组采样数据包括第一数据集、第二数据集和第三数据集;第一数据集中的每组数据对应于两个旋转轴的角度值保持不变;第二数据集中的每组数据对应于第二旋转轴的角度值固定且第一旋转轴的角度值改变;第三数据集中的每组数据对应于第二旋转轴的角度值改变。步骤S20,基于第一数据集中各组数据的空间坐标与三个平移轴的位置,确定三个平移轴在相机坐标系下的单位方向向量。步骤S30,获取三个平移轴的参考位置;针对第二数据集中每组数据的空间坐标,以三个平移轴的参考位置为基准,结合三个平移轴在相机坐标系下的单位方向向量,通过预设平移补偿公式计算得到平移补偿后的第一坐标点,将多个第一坐标点记为第一旋转轨迹点集;基于第一旋转轨迹点集,确定第一旋转轨迹点集的各点的拟合平面,并计算出拟合平面的法向量,将拟合平面的法向量作为第一旋转轴的方向向量;将第一旋转轨迹点集中的各点沿拟合平面的法向量方向正交投影至拟合平面,得到平面投影点集;对平面投影点集进行圆拟合,得到圆心位置,将圆心位置作为第一旋转轴的轴心位置。步骤S40,基于三个平移轴在相机坐标系下的单位方向向量与第一旋转轴在相机坐标系下的单位方向向量和轴心位置,对第三数据集中各组数据的空间坐标进行平移补偿以及逆旋转补偿,得到第二旋转轨迹点集;以及,基于第二旋转轨迹点集,确定第二旋转轴在相机坐标系下的单位方向向量和轴心位置。如此,通过分步逐级解算的策略,将原本高度耦合的多轴参数辨识问题分解为多个独立子问题,每一步仅依赖前一步的已知结果进行补偿,无需建立包含全部几何误差参数的复杂运动学模型,有效解决了现有双运动链相互辨识标定方式中建模复杂、参数耦合严重、对设备结构要求高,以及依赖外部高精度设备导致成本高昂、难以大规模应用的技术问题。如此,本申请实现了低成本、高稳定性、易于工程化实施的双运动链五轴设备标定,此外,本申请并不要求五轴设备的各轴之间严格正交,其解算模型简单,应用场景广泛。
Smart Images

Figure CN123015700A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of five-axis equipment calibration technology, and in particular to a calibration method, system, calibration equipment and storage medium for a dual-kinematic five-axis equipment. Background Technology
[0002] In industrial automation equipment, five-axis motion platforms are widely used in dispensing, machining, inspection, and vision guidance. Due to unavoidable machining and assembly errors during manufacturing and assembly, it is often difficult to maintain an ideal orthogonal relationship between the motion axes, and the position and orientation of the rotation axes will also deviate. Therefore, it is necessary to obtain the true spatial parameters of each axis of the equipment through calibration to effectively compensate for geometric errors and improve the positioning accuracy of the equipment.
[0003] Most existing five-axis calibration methods are based on the assumption of fixed camera installation. When the camera moves with the kinematic chain and the chain contains rotational degrees of freedom, the camera coordinate system orientation changes, causing sampling points to be inconsistent with the same reference frame, resulting in the failure of vector operations and trajectory fitting algorithms. For five-axis devices with dual kinematic chains, some methods solve for kinematic parameters by identifying the two kinematic chains, but this involves complex modeling, severe parameter coupling, and high requirements for equipment structure. Another type of method relies on high-precision external measuring equipment such as laser trackers, which, although highly accurate, is expensive and cumbersome to operate on-site, making it difficult to meet the needs of large-scale applications in ordinary industrial equipment.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a calibration method for a five-axis device with dual kinematic chains, which aims to solve the technical problems of existing dual kinematic chain mutual identification and calibration methods, such as complex modeling, severe parameter coupling, high requirements for equipment structure, and high cost and difficulty in large-scale application due to reliance on external high-precision equipment.
[0006] To achieve the above objectives, this application proposes a calibration method for a dual-kinematic-chain five-axis device. The dual-kinematic-chain five-axis device includes three translational axes and two rotational axes. A three-dimensional camera and a calibration pin are respectively mounted on two relatively independent kinematic chains of the five-axis device. The kinematic chain containing the three-dimensional camera includes at least two translational degrees of freedom, and the three-dimensional camera maintains a constant attitude during the movement of these at least two translational degrees of freedom. The kinematic chain containing the calibration pin includes two rotational degrees of freedom and the remaining translational degrees of freedom. The method includes: The movement of the dual-kinematic five-axis device is controlled to acquire multiple sets of sampled data. Each set of sampled data includes the spatial coordinates of the calibration point of the calibration needle in the camera coordinate system, as well as the positions of the corresponding three translation axes and the angle values of the two rotation axes. The multiple sets of sampled data include a first dataset, a second dataset, and a third dataset. In the first dataset, each set of data corresponds to a fixed angle value for the two rotation axes. In the second dataset, each set of data corresponds to a fixed angle value for the second rotation axis while the angle value for the first rotation axis changes. In the third dataset, each set of data corresponds to a change in the angle value for the second rotation axis. Based on the spatial coordinates of each group of data in the first dataset and the positions of the three translation axes, the unit direction vectors of the three translation axes in the camera coordinate system are determined. Obtain the reference positions of the three translation axes; for each set of data in the second dataset, using the reference positions of the three translation axes as a reference, and combining the unit direction vectors of the three translation axes in the camera coordinate system, calculate the first coordinate point after translation compensation using a preset translation compensation formula, and record multiple first coordinate points as the first rotation trajectory point set; based on the first rotation trajectory point set, determine the fitting plane of each point in the first rotation trajectory point set, and calculate the normal vector of the fitting plane, and use the normal vector of the fitting plane as the direction vector of the first rotation axis; orthogonally project each point in the first rotation trajectory point set onto the fitting plane along the normal vector direction of the fitting plane to obtain a plane projection point set; perform circle fitting on the plane projection point set to obtain the center position of the circle, and use the center position of the circle as the axis center position of the first rotation axis; Based on the unit direction vectors of the three translation axes in the camera coordinate system and the unit direction vector and axis center position of the first rotation axis in the camera coordinate system, translation compensation and inverse rotation compensation are performed on the spatial coordinates of each group of data in the third dataset to obtain the second rotation trajectory point set; and, based on the second rotation trajectory point set, the unit direction vector and axis center position of the second rotation axis in the camera coordinate system are determined.
[0007] In one embodiment, determining the unit direction vectors of the three translation axes in the camera coordinate system based on the spatial coordinates of each group of data in the first dataset and the positions of the three translation axes includes: Based on the spatial coordinates of each group of data in the first dataset and the positions of the three translation axes, a system of linear equations is established, and the system of linear equations is solved by the least squares method to obtain the unit direction vectors of the three translation axes in the camera coordinate system. The system of linear equations is as follows: Pi = A + t1i vt1+t2i vt2+t3i vt3; Where Pi is the spatial coordinate of the calibration point of the calibration needle in the i-th data set in the camera coordinate system, A is the spatial coordinate of the calibration point in the camera coordinate system when the three translation axes are in the preset reference position, t1i, t2i, and t3i are the positions of the three translation axes in the i-th data set, and vt1, vt2, and vt3 are the unit direction vectors of the three translation axes in the camera coordinate system.
[0008] In one embodiment, before solving the system of linear equations using the least squares method to obtain the unit direction vectors of the three translation axes in the camera coordinate system, the method further includes: Obtain the initial direction vectors of the three translation axes; The process of solving the linear equations using the least squares method yields the unit direction vectors of the three translation axes in the camera coordinate system, including: Using the initial direction vector as a constraint, the solution direction of the least squares method is constrained, and the unit direction vectors of the three translation axes in the camera coordinate system are calculated.
[0009] In one embodiment, the step of performing translation compensation and inverse rotation compensation on the spatial coordinates of each group of data in the third dataset based on the unit direction vectors of the three translation axes in the camera coordinate system and the unit direction vector and axis center position of the first rotation axis in the camera coordinate system to obtain a second rotation trajectory point set; and, based on the second rotation trajectory point set, determining the unit direction vector and axis center position of the second rotation axis in the camera coordinate system includes: Obtain the reference angle of the first rotation axis; For the spatial coordinates of each group of data in the third dataset, the intermediate coordinate point after translation compensation is calculated by taking the reference position of the three translation axes as a reference and combining the unit direction vector of the three translation axes in the camera coordinate system with the preset translation compensation formula. For the intermediate coordinate point of each set of data, determine the angle change value of the first rotation axis relative to the reference angle of the first rotation axis, and based on the angle change value, the unit direction vector and axis position of the first rotation axis in the camera coordinate system, perform inverse rotation compensation on the intermediate coordinate point through a preset rotation compensation formula to obtain the second coordinate point after inverse rotation compensation; record the multiple second coordinate points obtained as the second rotation trajectory point set; Based on the second set of rotation trajectory points, a fitting plane for each point in the second set of rotation trajectory points is determined, and the normal vector of the fitting plane is calculated. The normal vector of the fitting plane is then used as the direction vector of the second rotation axis. Each point in the second rotation trajectory point set is orthogonally projected onto the fitting plane along the direction of the normal vector to obtain a plane projection point set; The set of projected points on the plane is fitted with a circle to obtain the center position of the circle, and the center position of the circle is used as the axis center position of the second rotation axis.
[0010] In one embodiment, the preset translation compensation formula is: Pi' = Pi - (t1i - t1ref) vt1-(t2i-t2ref) vt2-(t3i-t3ref) vt3; Where Pi' is the coordinate point after translation compensation in the i-th group, Pi is the spatial coordinate of the calibration point of the calibration needle in the i-th group of data in the camera coordinate system, t1i, t2i, and t3i are the positions of the three translation axes in the i-th group of data, vt1, vt2, and vt3 are the unit direction vectors of the three translation axes in the camera coordinate system, and t1ref, t2ref, and t3ref are the reference positions of the three translation axes.
[0011] In one embodiment, the preset rotation compensation formula is: Pi''=Cr1+Rot(ur1,-Δri1) (Pi'-Cr1); Where Pi'' is the second coordinate point after the i-th group of inverse rotation compensation, Pi' is the middle coordinate point of the i-th group, Cr1 is the axis center position of the first rotation axis, ur1 is the unit direction vector of the first rotation axis, Δri1 is the angle change value of the i-th group, and Rot(ur1,-Δri1) is the inverse rotation function, which represents the rotation around the unit axis with direction ur1 in space by an angle of -Δri1.
[0012] In addition, to achieve the above objectives, this application also proposes a calibration device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the dual kinematic chain five-axis device calibration method described above.
[0013] Furthermore, to achieve the above objectives, this application also proposes a dual-kinematic five-axis device calibration system, comprising a dual-kinematic five-axis device, a 3D camera, a calibration needle, and the calibration equipment described above; the dual-kinematic five-axis device includes three translational axes and two rotational axes, and the 3D camera and the calibration needle are respectively disposed on two relatively independent kinematic chains of the five-axis device; wherein, the kinematic chain in which the 3D camera is located includes at least two translational degrees of freedom, and the 3D camera maintains a constant attitude during the movement of the at least two translational degrees of freedom; the kinematic chain in which the calibration needle is located includes two rotational degrees of freedom and the remaining translational degrees of freedom.
[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the dual kinematic chain five-axis device calibration method described above.
[0015] The dual-kinematic five-axis device calibration method proposed in this application includes: Step S10, controlling the movement of the dual-kinematic five-axis device to acquire multiple sets of sampled data. The multiple sets of sampled data include a first dataset, a second dataset, and a third dataset; in the first dataset, the angle values corresponding to the two rotation axes remain constant for each set of data; in the second dataset, the angle value corresponding to the second rotation axis is fixed while the angle value of the first rotation axis changes for each set of data; and in the third dataset, the angle value corresponding to the second rotation axis changes for each set of data. Step S20, based on the spatial coordinates of each set of data in the first dataset and the positions of the three translation axes, determining the unit direction vectors of the three translation axes in the camera coordinate system. Step S30: Obtain the reference positions of the three translation axes; for the spatial coordinates of each data set in the second dataset, using the reference positions of the three translation axes as a reference, and combining the unit direction vectors of the three translation axes in the camera coordinate system, calculate the first coordinate point after translation compensation using a preset translation compensation formula, and record multiple first coordinate points as the first rotation trajectory point set; based on the first rotation trajectory point set, determine the fitting plane of each point in the first rotation trajectory point set, and calculate the normal vector of the fitting plane, and use the normal vector of the fitting plane as the direction vector of the first rotation axis; orthogonally project each point in the first rotation trajectory point set onto the fitting plane along the normal vector direction of the fitting plane to obtain the plane projection point set; perform circle fitting on the plane projection point set to obtain the center position of the circle, and use the center position of the circle as the axis center position of the first rotation axis. Step S40: Based on the unit direction vectors of the three translation axes in the camera coordinate system and the unit direction vector and axis center position of the first rotation axis in the camera coordinate system, translation compensation and inverse rotation compensation are performed on the spatial coordinates of each group of data in the third dataset to obtain the second rotation trajectory point set; and, based on the second rotation trajectory point set, the unit direction vector and axis center position of the second rotation axis in the camera coordinate system are determined. Thus, by employing a step-by-step solution strategy, the originally highly coupled multi-axis parameter identification problem is decomposed into multiple independent sub-problems. Each step only relies on the known results of the previous step for compensation, eliminating the need to establish a complex kinematic model containing all geometric error parameters. This effectively solves the technical problems of existing dual-kinematic chain mutual identification and calibration methods, such as complex modeling, severe parameter coupling, high requirements for equipment structure, and high cost and difficulty in large-scale application due to reliance on external high-precision equipment. Therefore, this application achieves low-cost, high-stability, and easily engineering-implemented dual-kinematic chain five-axis equipment calibration. Furthermore, this application does not require strict orthogonality between the axes of the five-axis equipment; its solution model is simple and its application scenarios are wide-ranging. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating the first embodiment of the dual-kinematic-chain five-axis device calibration method of this application; Figure 2 A flowchart illustrating the second embodiment of the dual-kinematic-chain five-axis device calibration method of this application; Figure 3 A flowchart illustrating the fourth embodiment of the dual-kinematic-chain five-axis device calibration method of this application; Figure 4 A schematic diagram of a structure provided for an embodiment of the dual-kinematic-chain five-axis equipment calibration system of this application; Figure 5 This is a schematic diagram of the hardware operating environment involved in one embodiment of the calibration device of this application.
[0019] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0020] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0021] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0022] In industrial automation equipment, five-axis motion platforms are widely used in dispensing equipment, processing equipment, inspection equipment, and vision guidance equipment. Typical equipment usually includes three translation axes and two rotary axes, such as an XYZ+AB or XYZ+UV structure. During equipment manufacturing and assembly, due to machining and assembly errors, the ideal orthogonal relationship between the motion axes is often not guaranteed. Simultaneously, the position and orientation of the rotary axes may also deviate to some extent. Therefore, a calibration process is needed to obtain the true spatial parameters of each axis of the equipment, thereby improving the positioning accuracy of the equipment.
[0023] Currently, common five-axis equipment calibration methods mainly fall into the following categories: One category is based on robot kinematic models. This method typically requires establishing a complete kinematic model, such as through a DH parameter model or multi-coordinate system transformation relationships. For example, one kinematic chain might be T = T1 + T2 + T3 + ..., and another kinematic chain might also be T = T1 + T2 + T3 + .... The kinematic parameters are solved by identifying the two kinematic chains and collecting multiple sets of motion data. This type of method has a complex modeling process, severe coupling between parameters, and high requirements for the equipment structure, making it difficult to implement in practical engineering and computationally complex. Another category utilizes high-precision external measuring equipment, such as laser trackers or coordinate measuring machines, to calibrate the equipment. While this method offers high accuracy, the equipment is expensive, and its on-site use is complex, making it unsuitable for large-scale applications of ordinary industrial equipment.
[0024] Furthermore, in many practical devices, the camera is not fixedly mounted, but rather installed on the device's motion chain, such as on the Y or Z axes. In this case, during calibration, the camera itself will also change position as the device moves, causing the sampling points to be inconsistent with the same reference frame. Traditional calibration methods based on the assumption of a fixed camera are difficult to apply directly.
[0025] Therefore, there is a need to propose a device calibration method that does not require complex kinematic modeling and can handle situations where the camera moves with the kinematic chain.
[0026] This application proposes a calibration method for a dual-kinematic chain five-axis device.
[0027] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or a calibration device capable of performing the above functions. The following description uses a calibration device as an example to illustrate this embodiment and the subsequent embodiments.
[0028] In the first embodiment of this application, the dual-kinematic five-axis device includes three translational axes and two rotational axes. The three-dimensional camera and the calibration needle are respectively set on two relatively independent kinematic chains of the five-axis device. The kinematic chain where the three-dimensional camera is located includes at least two translational degrees of freedom, and the three-dimensional camera maintains its posture during the movement of at least two translational degrees of freedom. The kinematic chain where the calibration needle is located includes two rotational degrees of freedom and the remaining translational degrees of freedom.
[0029] It should be noted that the dual-kinematic-chain five-axis device calibration method is a geometric parameter calibration method based on visual measurement and a step-by-step solution strategy. "Dual-kinematic-chain" refers to dividing the five motion axes of the five-axis device into two independent kinematic chains: one carrying the 3D camera (containing at least two translational degrees of freedom, where the camera only translates and its attitude remains unchanged during motion), and the other carrying the calibration pin (containing two rotational degrees of freedom and the remaining translational degree of freedom); "calibration" refers to solving for the true direction vector and axis center position of each motion axis in a unified camera coordinate system by collecting multiple sets of motion data. Please refer to [link to relevant documentation]. Figure 4 Taking a camera mounted on a machining tool, with the tool positioned on the kinematic chain corresponding to the Y and Z translation axes, and the calibration needle positioned on the kinematic chain corresponding to the X translation axis, the first rotation axis, and the second rotation axis, as an example, in this example, during the movement of the dual-kinematic-chain five-axis device, when the camera and calibration needle move, the camera only experiences a change in spatial position during the translation axis movement, while its orientation remains unchanged. Therefore, the camera coordinate system only undergoes translation and not rotation during the entire calibration process, and all sampling points can be uniformly represented and calculated under the same camera coordinate system.
[0030] Please see Figure 1 The calibration method for this dual-kinematic five-axis device includes steps S10 to S40: Step S10: Control the movement of the dual-kinematic chain five-axis device to acquire multiple sets of sampling data; each set of sampling data includes the spatial coordinates of the calibration point of the calibration needle in the camera coordinate system, as well as the positions of the corresponding three translation axes and the angle values of the two rotation axes; wherein, the multiple sets of sampling data include a first dataset, a second dataset, and a third dataset; in the first dataset, each set of data corresponds to the angle values of the two rotation axes remaining unchanged; in the second dataset, each set of data corresponds to the angle value of the second rotation axis being fixed while the angle value of the first rotation axis is changing; in the third dataset, each set of data corresponds to the angle value of the second rotation axis changing.
[0031] It should be noted that the calibration equipment may include an execution control module, a data acquisition module, an axis position recording module, and a calibration calculation module. The execution control module is used to control the movement of the five-axis equipment, the data acquisition module is used to acquire the spatial coordinates of the calibration point of the calibration needle obtained from the 3D camera measurement in the camera coordinate system, and the axis position recording module is used to record the positions of the three translation axes and the angle values of the two rotation axes. The calibration calculation module is used to execute steps S20~S40.
[0032] In this embodiment, a five-axis device can be controlled to move according to a preset strategy and collect multiple sets of sampled data, such that the multiple sets of sampled data include a first dataset, a second dataset, and a third dataset. For example, the five-axis device can be controlled to perform movements in which only the translation axis changes while the angles of the two rotation axes remain fixed, movements in which the second rotation axis is fixed while the first rotation axis rotates, and movements in which the second rotation axis rotates, respectively, to collect multiple sets of sampled data.
[0033] Step S20: Based on the spatial coordinates of each group of data in the first dataset and the positions of the three translation axes, determine the unit direction vectors of the three translation axes in the camera coordinate system.
[0034] In this embodiment, a system of linear equations can be established based on the spatial coordinates of each group of data in the first dataset and the positions of the three translation axes. The calibration problem of the translation axes is transformed into the problem of solving the system of equations, and the unit direction vectors of the three translation axes in the camera coordinate system are obtained. Since the angle values of each group of data in the first dataset corresponding to the two rotation axes remain unchanged, the interference of rotation parameters is avoided, and the calculation is simple.
[0035] Step S30: Obtain the reference positions of the three translation axes; for the spatial coordinates of each data set in the second dataset, using the reference positions of the three translation axes as a reference, and combining the unit direction vectors of the three translation axes in the camera coordinate system, calculate the first coordinate point after translation compensation using a preset translation compensation formula, and record multiple first coordinate points as the first rotation trajectory point set; based on the first rotation trajectory point set, determine the fitting plane of each point in the first rotation trajectory point set, and calculate the normal vector of the fitting plane, and use the normal vector of the fitting plane as the direction vector of the first rotation axis; orthogonally project each point in the first rotation trajectory point set onto the fitting plane along the normal vector direction of the fitting plane to obtain the plane projection point set; perform circle fitting on the plane projection point set to obtain the center position of the circle, and use the center position of the circle as the axis center position of the first rotation axis.
[0036] It should be noted that the reference positions of the three translation axes are the unified reference origins of the three translation axes in the camera coordinate system, and users can customize them according to the actual application scenario.
[0037] In this step, the reference positions of the three translation axes are used as a unified reference origin. Using the pre-calibrated true motion directions of each translation axis in the camera coordinate system, the spatial coordinates corresponding to each set of data are inversely compensated to the state when the translation axis is at the reference position. After this compensation process, the translation components in all coordinate points are stripped away, and the remaining coordinate changes are entirely caused by the rotation of the first rotation axis. These compensated coordinate points form a set of trajectory points in space that reflects the pure rotational motion of the first rotation axis.
[0038] According to the principles of rigid body kinematics, when a point rotates about a fixed axis, its trajectory must lie in a plane perpendicular to that axis of rotation. Therefore, the set of rotation trajectory points obtained in this step should theoretically be coplanar, and the normal direction of this plane is the direction of the rotation axis. However, in actual processing, due to measurement noise and mechanical errors, the trajectory points are not strictly coplanar, but rather distributed near a certain best-fit plane. In this embodiment, taking the singular value decomposition algorithm for plane fitting as an example, singular value decomposition can be performed on the coordinate matrix corresponding to the first set of rotation trajectory points to obtain the optimal fitting plane and its normal vector that minimizes the sum of the squares of the perpendicular distances from all points to the plane. Furthermore, to ensure the numerical stability and fitting reliability of the singular value decomposition results, trajectory points need to be collected within a sufficiently large range of rotation angles to avoid uncertainty in the direction of the fitting plane due to overly concentrated spatial distribution of points.
[0039] Since the projection direction is parallel to the rotation axis, this projection operation does not change the radial distance and angular distribution of each point relative to the rotation axis center; it merely transforms the three-dimensional spatial coordinates into a two-dimensional coordinate system within the fitting plane. In this embodiment, with the centroid of the fitting plane as the origin and the normal vector obtained in this step as the Z1 axis, two orthogonal unit vectors are constructed in the plane as the X1 and Y1 axes to establish a local two-dimensional coordinate system. For each three-dimensional compensation point, its vector relative to the centroid is calculated, and then multiplied by the X1 and Y1 axis unit vectors respectively to obtain the two-dimensional coordinates of that point within the fitting plane. This facilitates the calculation of the center position.
[0040] In this embodiment, taking the use of the Taubing algebraic fitting method to fit a circle to a set of planar projection points as an example, the specific process includes: First, traversing all points in the set of planar projection points, constructing a data matrix reflecting the spatial distribution characteristics of the points based on the cumulative sum of the two-dimensional coordinates of each point, and simultaneously constructing a constraint matrix representing the approximate condition for minimizing the geometric distance; then, transforming the circle fitting problem into a problem of solving the generalized eigenvalues of the above two matrices, directly solving for the optimal parameter vector that minimizes the weighted algebraic error through linear algebraic operations. This process does not require preset initial values for iteration and the calculation result is uniquely determined; finally, based on the fixed analytical relationship between each component in the optimal parameter vector and the coordinates of the circle center, the position of the circle center is directly calculated and used as the axis of the first rotation axis. This method can still effectively avoid the circle center offset deviation caused by traditional algebraic fitting when the arc segment covered by the set of planar projection points is short or there is measurement noise, ensuring the accuracy and robustness of the axis calibration.
[0041] In this embodiment, the hybrid motion of the five-axis device is decoupled into pure rotational motion using the known unit direction vectors of each translation axis. This transforms the calibration of the first rotation axis into a standard geometric fitting problem, resolving the issue of severe coupling between rotation axis parameters and translation axis parameters during dual kinematic chain calibration. The compensated set of first rotation trajectory points is the spatial circular arc trajectory generated by the pure rotation of the first rotation axis, and its direction vector and axis position can be calculated through trajectory fitting.
[0042] Step S40: Based on the unit direction vectors of the three translation axes in the camera coordinate system and the unit direction vector and axis center position of the first rotation axis in the camera coordinate system, perform translation compensation and inverse rotation compensation on the spatial coordinates of each set of data in the third dataset to obtain the second rotation trajectory point set; and, based on the second rotation trajectory point set, determine the unit direction vector and axis center position of the second rotation axis in the camera coordinate system.
[0043] In this embodiment, the unit direction vectors of each translation axis obtained in step S20 and the unit direction vector and axis position of the first rotation axis obtained in step S30 are used to perform translation compensation and reverse rotation compensation around the first rotation axis on the original spatial coordinates. The compensated second rotation trajectory point set is the spatial circular arc trajectory generated by pure rotation around the second rotation axis, and its direction vector and axis position can be calculated by trajectory fitting.
[0044] In this embodiment, the spatial coordinates of the calibration point of the calibration needle in the camera coordinate system are obtained through a 3D camera. Combined with the teaching values of each motion axis of the five-axis device, the true directions and positions of the three translation axes and two rotation axes in space can be calculated. This embodiment does not require the establishment of a complex robot kinematic model, but directly uses visual measurement data to establish spatial motion relationships, thereby reducing algorithm complexity and improving the stability of the calibration process. During operation, the execution control module controls the movement of the five-axis device and collects multiple sets of sampling data. Then, while keeping the rotation axis angles constant, the unit direction vectors of the three translation axes in the camera coordinate system are calculated using a linear relationship model between spatial coordinates and translation axis positions. With the second rotation axis fixed, the unit direction vector and axis center position of the first rotation axis in the camera coordinate system are calculated through translation compensation and trajectory fitting. Finally, with the second rotation axis changing, the unit direction vector and axis center position of the second rotation axis in the camera coordinate system are calculated through joint compensation of translation and inverse rotation and trajectory fitting. Thus, by employing a step-by-step solution strategy, the originally highly coupled multi-axis parameter identification problem is decomposed into multiple independent sub-problems. Each step relies solely on the known results of the previous step for compensation, eliminating the need to establish a complex kinematic model that includes all geometric error parameters. This effectively solves the technical problems of existing dual-kinechain mutual identification and calibration methods, such as complex modeling, severe parameter coupling, high requirements for equipment structure, and high cost and difficulty in large-scale application due to reliance on external high-precision equipment. It achieves low-cost, high-stability, and easy-to-engineer-implement dual-kinechain five-axis equipment calibration.
[0045] Furthermore, this embodiment does not require strict orthogonality between the axes of the five-axis device. Taking a dual-kinematic-chain five-axis device as an example, if its three translation axes are significantly skewed from the ideal XYZ directions and are not strictly orthogonal to each other, the two rotation axes will also deviate from the standard posture. In this embodiment, during calibration, there is no need to preset an orthogonal kinematic model or force alignment of the theoretical coordinate system. Instead, the rotation axes are directly fixed and multiple sets of teaching values of the three translation axes and the coordinates of the calibration points of the calibration needle are collected to establish a system of linear equations and solve for the true unit direction vector of each translation axis in the camera coordinate system. Subsequently, in single-axis rotation acquisition, the identified translation direction is used to accurately compensate the trajectory points, and then the actual axis direction and axis center position of the rotation axis are deduced through plane and circle fitting. The other rotation axis is compensated and solved in the same way step by step. The whole process only relies on the observation data and geometric relationships, without assuming any prior orthogonality. As long as the sampling is sufficient and reasonable, the true spatial posture of each axis under non-orthogonal assembly can be uniquely determined, verifying the strong adaptability of this embodiment to actual engineering deviations and the simplicity of the model. As can be seen, this embodiment does not require strict orthogonality between the axes of the five-axis device, nor does it require prior knowledge of the precise installation relationship of each axis. Its calculation model is very simple and can be derived geometrically. It has a wide range of applications. As long as a sufficient number of three-dimensional observation points and corresponding teaching data are collected, there is no situation where convergence is not possible. If the collected data is reasonable, the calculated result is close to the geometrically unique solution. The true direction and rotation axis position of each motion axis in the reference camera coordinate system can be directly identified from the observation data.
[0046] Please see Figure 2 Based on the first embodiment, in the second embodiment of this application, step S20 includes step S21: Based on the spatial coordinates of each group of data in the first dataset and the positions of the three translation axes, a system of linear equations is established, and the system of linear equations is solved by the least squares method to obtain the unit direction vectors of the three translation axes in the camera coordinate system.
[0047] The linear equation system is as follows: Pi = A + t1i vt1+t2i vt2+t3i vt3; Where Pi is the spatial coordinate of the calibration point of the calibration needle in the camera coordinate system in the i-th data set, A is the spatial coordinate of the calibration point in the camera coordinate system when the three translation axes are in the preset reference position, t1i, t2i, and t3i are the positions of the three translation axes in the i-th data set, and vt1, vt2, and vt3 are the unit direction vectors of the three translation axes in the camera coordinate system.
[0048] It should be noted that during the calibration process, when the 3D camera samples for the i-th time, the spatial coordinates of the calibration point of the calibration needle in the camera coordinate system are: Pi = [xi,yi,zi]^T; Where Pi is the spatial coordinate of the i-th sample, and xi, yi, and zi are the coordinate components of the X-axis, Y-axis, and Z-axis, respectively; Simultaneously record the corresponding axis position: (t1i,t2i,t3i,r1i,r2i) Where t1, t2, and t3 represent the positions of the three translation axes, and r1 and r2 represent the angle values of the two rotation axes.
[0049] In this embodiment, in order to derive the relationship between the translation axis and the spatial coordinates, the true position of the calibration point of the calibration needle in space is first defined as Pworld; Define the position of the camera in space as C; Since the point measured by the camera is the position of the target point relative to the camera, the spatial coordinates of the calibration point of the calibration needle observed by the camera satisfy the following: Formula 1: Pi = Pworld_i - Ci; Where Pi is the coordinate of the calibration point in the camera coordinate system at the i-th sampling time, Pworld_i is the coordinate of the calibration point in the world coordinate system at the i-th sampling time, and Ci is the camera coordinate in the world coordinate system at the i-th sampling time. Taking the calibration needle mounted on the X (corresponding to translation axis t1), R1, R2 kinematic chain as an example, when the translation axis t1 moves, the position of the calibration point of the calibration needle in space will change, which can be expressed as: Formula 2, Pworld_i=Pworld_0+t1i vt1.
[0050] Where Pworld_i is the coordinate of the calibration point in the world coordinate system at the i-th sampling, Pworld_0 is the reference coordinate of the calibration point in the world coordinate system, t1i is the position of the translation axis t1 at the i-th sampling, and vt1 is the unit direction vector of the translation axis t1 in the camera coordinate system. Meanwhile, the camera is mounted on the Y (corresponding to translation axis t2) and Z kinematic chains (corresponding to translation axis t3), so the camera's position in space will change with the translation axis t2 and translation axis t3: Formula 3, Ci = C0 + t2i vt2+t3i vt3; Where Ci is the camera coordinate in the camera coordinate system at the i-th sampling, C0 is the camera reference coordinate in the camera coordinate system, t2i is the position of translation axis t2 at the i-th sampling, t3i is the position of translation axis t3 at the i-th sampling, vt2 is the unit direction vector of translation axis t2 in the camera coordinate system, vt3 is the unit direction vector of translation axis t3 in the camera coordinate system.
[0051] Substituting Formula 2 and Formula 3 into Formula 1, we get: Pi=(Pworld_0+t1i vt1)-(C0+t2i vt2+t3i vt3) Expanding, we get: Pi = (Pworld_0 - C0) + t1i vt1-t2i vt2-t3i vt3 Define constants: A=Pworld_0-C0 At the same time, the direction vector is redefined: vt2'=-vt2 vt3'=-vt3 vt2' and vt3' are the unit direction vectors in the opposite direction of translation axis t2 and translation axis t3 in the camera coordinate system, respectively; Then we can obtain: Pi = A + t1i vt1+t2i vt2'+t3i vt3'.
[0052] To simplify the representation, let's still denote vt2' and vt3' as vt2 and vt3, which gives us the linear relationship between the translation axis and the spatial coordinates: Formula 4: Pi = A + t1i vt1+t2i vt2+t3i vt3 in: A represents the position of the calibration point in the camera coordinate system when the three translation axes are in the reference position; vt1, vt2, and vt3 represent the unit direction vectors of the three translation axes in the camera coordinate system.
[0053] This system of linear equations describes only the linear relationship between the spatial position of the calibration point in the camera coordinate system and the displacement of each translation axis, where vt1, vt2, and vt3 represent the actual motion direction of each translation axis in the camera coordinate system. This relationship depends only on the spatial coordinate changes observed by the camera and the corresponding axis displacement data, and does not depend on the specific installation structure of the internal kinematic chain of the device.
[0054] Therefore, in practical equipment, regardless of which kinematic chain the three translation axes are located on, for example, the calibration needle is installed on the X, R1, R2 kinematic chain and the camera is installed on the Y, Z kinematic chain, or the camera is installed on the X, Y kinematic chain and the calibration needle is installed on the Z, R1, R2 kinematic chain, or even in complex structures with multiple kinematic chains, as long as the displacement of the three translation axes and the spatial coordinates Pi observed by the camera can be recorded at each sampling time, the above linear relationship can be used to solve the problem.
[0055] The system of equations corresponding to Formula 4 can be written in matrix form, resulting in: Formula 5: P = A + V t Where V = [vt1 vt2 vt3]; t = [t1,t2,t3]^T.
[0056] Substituting each set of data (Pi, t1i, t2i, t3i) from the first dataset into Formula 4, a system of linear equations can be established. The unknown parameters A, vt1, vt2, and vt3 can then be solved using the least squares method, thus obtaining the true directions of the three translation axes in the camera coordinate system.
[0057] In one embodiment, before solving the linear equations using the least squares method in step S21 to obtain the unit direction vectors of the three translation axes in the camera coordinate system, the dual-kinematic-chain five-axis device calibration method further includes step S2101: Obtain the initial direction vectors of the three translation axes; Step S21 includes step S2102: Using the initial direction vector as a constraint, the solution direction of the least squares method is constrained, and the unit direction vectors of the three translation axes in the camera coordinate system are calculated.
[0058] In this embodiment, the user can input the approximate directions of each translation axis as prior information before calibration, such as t1≈X direction, t2≈Y direction, and t3≈Z direction. This prior information can be represented as a unit vector [1,0,0], [0,1,0], or [0,0,1], which is used to constrain the least squares solution direction and determine the vector sign, thereby avoiding problems such as axis direction reversal or axis order confusion, and improving the stability and reliability of the calibration process.
[0059] In another implementation, after obtaining the unit direction vectors of the three translation axes in the camera coordinate system, a spatial motion model of the device's translation axes can be established based on Equation 5: P=A+V t Where V = [vt1 vt2 vt3], t = [t1,t2,t3]^T. Therefore, t=V^-1 (PA) This relationship allows us to establish a translation axis motion compensation model. For example, if the target coordinate of a five-axis device is ΔP, then the corresponding translation axis compensation motion is: Δt=V^-1 ΔP.
[0060] While keeping the angles of the two rotation axes constant, control the five-axis equipment to perform translational motion according to the corresponding translation axis compensation motion, remeasure the spatial coordinates of the calibration needle and compare them with the target coordinates to verify the calibration accuracy of the translation axis.
[0061] Based on the first embodiment, in the third embodiment of this application, the preset translation compensation formula is: Formula 6: Pi' = Pi - (t1i - t1ref) vt1-(t2i-t2ref) vt2-(t3i-t3ref) vt3; Where Pi' is the first coordinate point after translation compensation in the i-th group, Pi is the spatial coordinate of the calibration point of the calibration needle in the i-th group of data in the camera coordinate system, t1i, t2i, and t3i are the positions of the three translation axes in the i-th group of data, vt1, vt2, and vt3 are the unit direction vectors of the three translation axes in the camera coordinate system, and t1ref, t2ref, and t3ref are the reference positions of the three translation axes.
[0062] In this embodiment, after completing the translation axis calibration, the translation components in the mixed motion data are stripped using the calibrated translation axis parameters to reconstruct a pure rotation trajectory point set generated solely by the first rotation axis. Based on the geometric principle that the rotation trajectory is perpendicular to the rotation axis, a three-dimensional plane is fitted to the pure rotation point set; the normal vector of the resulting plane is the direction vector of the rotation axis. The three-dimensional trajectory points are projected onto the fitting plane along the axis direction. While maintaining the relative geometric relationships, the three-dimensional problem of finding the center of a circle is transformed into a two-dimensional plane problem. The center of the circle is fitted in the two-dimensional plane and then calculated back to three-dimensional space; this point is the intersection of the rotation axis and the plane (axis center position). Thus, the spatial pose of the first rotation axis can be completely determined.
[0063] Please see Figure 3Based on the first embodiment, in the fourth embodiment of this application, step S40 includes steps S41 to S46: Step S41: Obtain the reference angle of the first rotation axis.
[0064] It should be noted that the reference angle of the first rotation axis is the initial reference origin of the first rotation axis, which can be customized by the user according to the actual application scenario.
[0065] Step S42: For the spatial coordinates of each group of data in the third dataset, using the reference positions of the three translation axes as a reference, and combining the unit direction vectors of the three translation axes in the camera coordinate system, calculate the intermediate coordinate point after translation compensation using a preset translation compensation formula.
[0066] In this step, the reference positions of the three translation axes are used as a unified reference origin. Using the pre-calibrated true motion directions of each translation axis in the camera coordinate system, the spatial coordinates corresponding to each set of data are inversely compensated to the state when the translation axis is at the reference position. After this compensation process, the translation components in all coordinate points are stripped away, and the remaining coordinate changes are entirely caused by the rotation of the first and second rotation axes. These compensated coordinate points form a set of trajectory points in space reflecting the rotational motion of the first and second rotation axes.
[0067] Step S43: For the intermediate coordinate point of each set of data, determine the angle change value of the first rotation axis relative to the reference angle of the first rotation axis, and based on the angle change value and the unit direction vector and axis position of the first rotation axis in the camera coordinate system, perform inverse rotation compensation on the intermediate coordinate point through a preset rotation compensation formula to obtain the second coordinate point after inverse rotation compensation; record the multiple second coordinate points obtained as the second rotation trajectory point set.
[0068] In this step, for each intermediate coordinate point, the change in the angle value of the first rotation axis relative to the reference angle is calculated. Then, using the calibrated direction vector of the first rotation axis and the axis position, the point is rotated back in the opposite direction (i.e., reverse rotation compensation). After this step, the rotational influence of the first rotation axis is also eliminated, and the coordinate change is only due to the rotational contribution of the second rotation axis. These points constitute the second rotation trajectory point set.
[0069] Step S44: Based on the second rotation trajectory point set, determine the fitting plane of each point in the second rotation trajectory point set, calculate the normal vector of the fitting plane, and use the normal vector of the fitting plane as the direction vector of the second rotation axis.
[0070] In this embodiment, taking the singular value decomposition (SVD) algorithm for plane fitting as an example, SVD can be performed on the coordinate matrix corresponding to the second rotation trajectory point set to obtain the optimal fitting plane and its normal vector that minimizes the sum of the squared perpendicular distances from all points to the plane. Furthermore, to ensure the numerical stability and fitting reliability of the SVD results, trajectory points need to be collected within a sufficiently large rotation angle range to avoid uncertainty in the fitting plane direction due to overly concentrated point spatial distribution.
[0071] In this step, by performing plane fitting on all trajectory points, an optimal fitting plane can be found that minimizes the sum of the squared perpendicular distances of all points to the plane. The normal vector of this optimal fitting plane represents the true direction vector of the second rotation axis in the camera coordinate system.
[0072] Step S45: Project each point in the second rotation trajectory point set orthogonally onto the fitting plane along the normal vector direction of the fitting plane to obtain the plane projection point set.
[0073] It should be noted that since the projection direction is parallel to the rotation axis, this projection operation does not change the radial distance and angular distribution of each point relative to the rotation axis center; it merely transforms the three-dimensional spatial coordinates into a two-dimensional coordinate system within the fitting plane. In this embodiment, with the centroid of the fitting plane as the origin and the normal vector obtained in step S44 as the Z2 axis, two orthogonal unit vectors are constructed in the plane as the X2 and Y2 axes to establish a local two-dimensional coordinate system. For each three-dimensional compensation point, its vector relative to the centroid is calculated, and then multiplied by the X2 and Y2 axis unit vectors respectively to obtain the two-dimensional coordinates of that point in the fitting plane. This facilitates the calculation of the center position.
[0074] Step S46: Perform circle fitting on the set of projected points on the plane to obtain the center position of the circle, and use the center position of the circle as the axis of the second rotation axis.
[0075] In this embodiment, taking the use of the Taubing algebraic fitting method to fit a circle to a set of planar projection points as an example, the specific process includes: First, traversing all points in the set of planar projection points, constructing a data matrix reflecting the spatial distribution characteristics of the points based on the cumulative sum of the two-dimensional coordinates of each point, and simultaneously constructing a constraint matrix representing the approximate condition for minimizing the geometric distance; then, transforming the circle fitting problem into a problem of solving the generalized eigenvalues of the above two matrices, directly solving for the optimal parameter vector that minimizes the weighted algebraic error through linear algebraic operations. This process does not require preset initial values for iteration and the calculation result is uniquely determined; finally, based on the fixed analytical relationship between each component in the optimal parameter vector and the coordinates of the circle center, the position of the circle center is directly calculated and used as the axis of the second rotation axis. This method can still effectively avoid the circle center offset deviation caused by traditional algebraic fitting when the planar projection point set covers a short arc segment or when measurement noise exists, ensuring the accuracy and robustness of the axis calibration.
[0076] In one embodiment, the preset translation compensation formula is: Formula 6: Pi' = Pi - (t1i - t1ref) vt1-(t2i-t2ref) vt2-(t3i-t3ref) vt3; Where Pi' is the intermediate coordinate point after translation compensation in the i-th group, Pi is the spatial coordinate of the calibration point of the calibration needle in the i-th group of data in the camera coordinate system, t1i, t2i, and t3i are the positions of the three translation axes in the i-th group of data, vt1, vt2, and vt3 are the unit direction vectors of the three translation axes in the camera coordinate system, and t1ref, t2ref, and t3ref are the reference positions of the three translation axes.
[0077] In another embodiment, the preset rotation compensation formula is: Formula 7: Pi'' = Cr1 + Rot(ur1, -Δri1) (Pi'-Cr1); Where Pi'' is the second coordinate point after the i-th group of inverse rotation compensation, Pi' is the middle coordinate point of the i-th group, Cr1 is the axis center position of the first rotation axis, ur1 is the unit direction vector of the first rotation axis, Δri1 is the angle change value of the i-th group, and Rot(ur1,-Δri1) is the inverse rotation function, which represents the rotation around the unit axis with direction ur1 in space by an angle of -Δri1.
[0078] In this embodiment, after completing the translation axis calibration and the first rotation axis calibration, the translation component and the first rotation axis component in the mixed motion data are separated using the calibrated translation axis parameters and the first rotation axis parameters, restoring the pure rotation trajectory point set generated only by the second rotation axis. Based on the geometric principle that the rotation trajectory is perpendicular to the rotation axis, a three-dimensional plane fitting is performed on the pure rotation point set, and the normal vector of the resulting plane is the direction vector of the rotation axis. The three-dimensional trajectory points are projected onto the fitting plane along the axis direction. While maintaining the relative geometric relationships, the three-dimensional problem of finding the center of a circle is transformed into a two-dimensional plane problem. The center of the circle is fitted in the two-dimensional plane and then calculated back to three-dimensional space. This point is the intersection point (axis center position) of the rotation axis and the plane. In this way, the spatial pose of the second rotation axis can be completely determined.
[0079] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the calibration method of the dual kinematic chain five-axis equipment of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0080] This application provides a calibration device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the dual kinematic chain five-axis device calibration method in the first embodiment described above.
[0081] The following is for reference. Figure 5 The diagram illustrates a structural schematic suitable for implementing the calibration device in the embodiments of this application. The calibration device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The calibration device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0082] like Figure 5 As shown, the calibration device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the calibration device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the calibration device to communicate wirelessly or wiredly with other devices to exchange data. Although calibration devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0083] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0084] The calibration device provided in this application employs the dual-kinematic chain five-axis device calibration method described in the above embodiments. This method solves the technical problems of existing dual-kinematic chain mutual identification calibration methods, such as complex modeling, severe parameter coupling, high requirements for equipment structure, and high cost and difficulty in large-scale application due to reliance on external high-precision equipment. Compared with the prior art, the beneficial effects of the calibration device provided in this application are the same as those of the dual-kinematic chain five-axis device calibration method provided in the above embodiments. Furthermore, other technical features of this calibration device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0085] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0086] This application provides a dual-kinematic five-axis device calibration system. The system includes a dual-kinematic five-axis device, a 3D camera, a calibration needle, and the calibration equipment described above. The dual-kinematic five-axis device includes three translational axes and two rotational axes. The 3D camera and the calibration needle are respectively mounted on two relatively independent kinematic chains of the five-axis device. The kinematic chain in which the 3D camera is located includes at least two translational degrees of freedom, and the 3D camera maintains a constant attitude during the movement of the at least two translational degrees of freedom. The kinematic chain in which the calibration needle is located includes two rotational degrees of freedom and the remaining translational degrees of freedom.
[0087] The dual-kine chain five-axis equipment calibration system provided in this application adopts the dual-kine chain five-axis equipment calibration method in the above embodiments. It can solve the technical problems of existing dual-kine chain mutual identification calibration methods, such as complex modeling, severe parameter coupling, high requirements for equipment structure, and high cost and difficulty in large-scale application due to reliance on external high-precision equipment. Compared with the prior art, the beneficial effects of the dual-kine chain five-axis equipment calibration system provided in this application are the same as those of the dual-kine chain five-axis equipment calibration method provided in the above embodiments, and other technical features in the calibration equipment are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0088] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the dual kinematic chain five-axis device calibration method in the above embodiments.
[0089] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0090] The aforementioned computer-readable storage medium may be included in the calibration device or may exist independently and not assembled into the calibration device.
[0091] The aforementioned computer-readable storage medium carries one or more programs that, when executed by the calibration device, cause the calibration device to: control the movement of a dual-kinematic chain five-axis device to acquire multiple sets of sampled data; each set of sampled data includes the spatial coordinates of the calibration point of the calibration needle in the camera coordinate system, as well as the corresponding positions of three translation axes and the angle values of two rotation axes; wherein, the multiple sets of sampled data include a first dataset, a second dataset, and a third dataset; in the first dataset, the angle values of the two rotation axes corresponding to each set of data remain unchanged; in the second dataset, the angle value of the second rotation axis corresponding to each set of data is fixed while the angle value of the first rotation axis changes; in the third dataset, the angle value of the second rotation axis corresponding to each set of data changes; based on the spatial coordinates of each set of data in the first dataset and the positions of the three translation axes, determine the unit direction vectors of the three translation axes in the camera coordinate system; acquire the reference positions of the three translation axes; and, for the spatial coordinates of each set of data in the second dataset, use the reference positions of the three translation axes as a reference, calculate... The unit direction vectors of the three translation axes in the camera coordinate system are combined, and the first coordinate point after translation compensation is calculated using a preset translation compensation formula. Multiple first coordinate points are denoted as the first rotation trajectory point set. Based on the first rotation trajectory point set, the fitting plane for each point in the first rotation trajectory point set is determined, and the normal vector of the fitting plane is calculated. The normal vector of the fitting plane is used as the direction vector of the first rotation axis. Each point in the first rotation trajectory point set is orthogonally projected onto the fitting plane along the normal vector direction of the fitting plane to obtain a plane projection point set. A circle is fitted to the plane projection point set to obtain the center position, which is used as the axis center position of the first rotation axis. Based on the unit direction vectors of the three translation axes in the camera coordinate system, the unit direction vector of the first rotation axis in the camera coordinate system, and the axis center position, translation compensation and inverse rotation compensation are performed on the spatial coordinates of each group of data in the third dataset to obtain the second rotation trajectory point set. Finally, based on the second rotation trajectory point set, the unit direction vector and axis center position of the second rotation axis in the camera coordinate system are determined.
[0092] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via an internet service provider through the internet connection).
[0093] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0094] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0095] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described dual-kinematic five-axis device calibration method. This solves the technical problems of existing dual-kinematic mutual identification and calibration methods, such as complex modeling, severe parameter coupling, high requirements for equipment structure, and high cost and difficulty in large-scale application due to reliance on external high-precision equipment. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the dual-kinematic five-axis device calibration method provided in the above embodiments, and will not be repeated here.
[0096] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application through the content of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A calibration method for a dual-kinematic chain five-axis device, characterized in that, The dual-kinematic five-axis device includes three translational axes and two rotational axes. The 3D camera and the calibration pin are respectively mounted on two relatively independent kinematic chains of the five-axis device. The kinematic chain in which the 3D camera is located includes at least two translational degrees of freedom, and the 3D camera maintains a constant attitude during the movement of the at least two translational degrees of freedom. The kinematic chain in which the calibration pin is located includes two rotational degrees of freedom and the remaining translational degrees of freedom. The method includes: The movement of the dual-kinematic five-axis device is controlled to acquire multiple sets of sampled data. Each set of sampled data includes the spatial coordinates of the calibration point of the calibration needle in the camera coordinate system, as well as the positions of the corresponding three translation axes and the angle values of the two rotation axes. The multiple sets of sampled data include a first dataset, a second dataset, and a third dataset. In the first dataset, each set of data corresponds to a fixed angle value for the two rotation axes. In the second dataset, each set of data corresponds to a fixed angle value for the second rotation axis while the angle value for the first rotation axis changes. In the third dataset, each set of data corresponds to a change in the angle value for the second rotation axis. Based on the spatial coordinates of each group of data in the first dataset and the positions of the three translation axes, the unit direction vectors of the three translation axes in the camera coordinate system are determined. Obtain the reference positions of the three translation axes; for each set of data in the second dataset, using the reference positions of the three translation axes as a reference, and combining the unit direction vectors of the three translation axes in the camera coordinate system, calculate the first coordinate point after translation compensation using a preset translation compensation formula, and record multiple first coordinate points as the first rotation trajectory point set; based on the first rotation trajectory point set, determine the fitting plane of each point in the first rotation trajectory point set, and calculate the normal vector of the fitting plane, and use the normal vector of the fitting plane as the direction vector of the first rotation axis; orthogonally project each point in the first rotation trajectory point set onto the fitting plane along the normal vector direction of the fitting plane to obtain a plane projection point set; perform circle fitting on the plane projection point set to obtain the center position of the circle, and use the center position of the circle as the axis center position of the first rotation axis; Based on the unit direction vectors of the three translation axes in the camera coordinate system and the unit direction vector and axis center position of the first rotation axis in the camera coordinate system, translation compensation and inverse rotation compensation are performed on the spatial coordinates of each group of data in the third dataset to obtain the second rotation trajectory point set; and, based on the second rotation trajectory point set, the unit direction vector and axis center position of the second rotation axis in the camera coordinate system are determined.
2. The method as described in claim 1, characterized in that, The step of determining the unit direction vectors of the three translation axes in the camera coordinate system based on the spatial coordinates of each group of data in the first dataset and the positions of the three translation axes includes: Based on the spatial coordinates of each group of data in the first dataset and the positions of the three translation axes, a system of linear equations is established, and the system of linear equations is solved by the least squares method to obtain the unit direction vectors of the three translation axes in the camera coordinate system. The system of linear equations is as follows: Pi=A+t1i vt1+t2i vt2+t3i vt3; Where Pi is the spatial coordinate of the calibration point of the calibration needle in the i-th data set in the camera coordinate system, A is the spatial coordinate of the calibration point in the camera coordinate system when the three translation axes are in the preset reference position, t1i, t2i, and t3i are the positions of the three translation axes in the i-th data set, and vt1, vt2, and vt3 are the unit direction vectors of the three translation axes in the camera coordinate system.
3. The method as described in claim 2, characterized in that, Before solving the linear equations using the least squares method to obtain the unit direction vectors of the three translation axes in the camera coordinate system, the method further includes: Obtain the initial direction vectors of the three translation axes; The process of solving the linear equations using the least squares method yields the unit direction vectors of the three translation axes in the camera coordinate system, including: Using the initial direction vector as a constraint, the solution direction of the least squares method is constrained, and the unit direction vectors of the three translation axes in the camera coordinate system are calculated.
4. The method as described in claim 1, characterized in that, Based on the unit direction vectors of the three translation axes in the camera coordinate system and the unit direction vector and axis position of the first rotation axis in the camera coordinate system, translation compensation and inverse rotation compensation are performed on the spatial coordinates of each group of data in the third dataset to obtain the second rotation trajectory point set. And, based on the second set of rotation trajectory points, determining the unit direction vector and axis center position of the second rotation axis in the camera coordinate system includes: Obtain the reference angle of the first rotation axis; For the spatial coordinates of each group of data in the third dataset, using the reference positions of the three translation axes as a reference, and combining the unit direction vectors of the three translation axes in the camera coordinate system, the intermediate coordinate point after translation compensation is calculated using the preset translation compensation formula. For the intermediate coordinate point of each set of data, determine the angle change value of the first rotation axis relative to the reference angle of the first rotation axis, and based on the angle change value, the unit direction vector and axis position of the first rotation axis in the camera coordinate system, perform inverse rotation compensation on the intermediate coordinate point through a preset rotation compensation formula to obtain the second coordinate point after inverse rotation compensation; record the multiple second coordinate points obtained as the second rotation trajectory point set; Based on the second set of rotation trajectory points, a fitting plane for each point in the second set of rotation trajectory points is determined, and the normal vector of the fitting plane is calculated. The normal vector of the fitting plane is then used as the direction vector of the second rotation axis. Each point in the second rotation trajectory point set is orthogonally projected onto the fitting plane along the normal vector direction of the fitting plane to obtain a plane projection point set; The set of projected points on the plane is fitted with a circle to obtain the center position of the circle, and the center position of the circle is used as the axis center position of the second rotation axis.
5. The method as described in claim 1, characterized in that, The preset translation compensation formula is: Pi'=Pi-(t1i-t1ref) vt1-(t2i-t2ref) vt2-(t3i-t3ref) vt3; Where Pi' is the coordinate point after translation compensation in the i-th group, Pi is the spatial coordinate of the calibration point of the calibration needle in the i-th group of data in the camera coordinate system, t1i, t2i, and t3i are the positions of the three translation axes in the i-th group of data, vt1, vt2, and vt3 are the unit direction vectors of the three translation axes in the camera coordinate system, and t1ref, t2ref, and t3ref are the reference positions of the three translation axes.
6. The method as described in claim 4, characterized in that, The preset rotation compensation formula is: Pi''=Cr1+Rot(ur1,-Δri1) (Pi'-Cr1); Where Pi'' is the second coordinate point after the i-th group of inverse rotation compensation, Pi' is the middle coordinate point of the i-th group, Cr1 is the axis center position of the first rotation axis, ur1 is the unit direction vector of the first rotation axis, Δri1 is the angle change value of the i-th group, and Rot(ur1,-Δri1) is the inverse rotation function, which represents the rotation around the unit axis with direction ur1 in space by an angle of -Δri1.
7. A calibration device, characterized in that, The calibration device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the dual kinematic chain five-axis device calibration method as described in any one of claims 1 to 6.
8. A calibration system for a dual-kinematic chain five-axis device, characterized in that, The device includes a dual-kinematic five-axis apparatus, a 3D camera, a calibration needle, and the calibration device as described in claim 7; the dual-kinematic five-axis apparatus includes three translational axes and two rotational axes, and the 3D camera and the calibration needle are respectively disposed on two relatively independent kinematic chains of the five-axis apparatus; wherein, the kinematic chain in which the 3D camera is located includes at least two translational degrees of freedom, and the 3D camera maintains a constant attitude during the movement of the at least two translational degrees of freedom; the kinematic chain in which the calibration needle is located includes two rotational degrees of freedom and the remaining translational degrees of freedom.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the dual kinematic chain five-axis equipment calibration method as described in any one of claims 1 to 6.
