Correction method and correction system applied to mechanical arm and mechanical arm

By establishing the transformation relationship between the image and the physical coordinate system, the changes in feature points before and after the workpiece rotation are obtained, the initial offset is calculated, and the physical coordinates are corrected. This solves the positioning error problem of the vision-guided robotic arm during rotation, achieving high-precision dynamic compensation and reducing maintenance costs.

CN122008243BActive Publication Date: 2026-07-21SHENZHEN ZMOTION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN ZMOTION TECH CO LTD
Filing Date
2026-04-03
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

When the target object rotates relative to the initial template, the calculated grasping or placement coordinates of the existing vision-guided robotic arm will produce systematic errors, resulting in inaccurate fitting or grasping. This is mainly due to the mismatch between the kinematic model of the robotic arm and the coordinate calculation model of the vision system.

Method used

By establishing the transformation relationship between the image coordinate system and the physical coordinate system, the workpiece rotation is controlled to obtain the image coordinate changes of the feature points, the initial offset is determined, and the physical coordinate compensation is calculated in combination with the current angle to correct the original physical coordinates and obtain the target correction coordinates.

Benefits of technology

It enables automatic correction of nonlinear geometric deviations caused by non-coincidence of rotation centers at any angle, improving positioning accuracy and reducing reliance on senior technicians and equipment maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122008243B_ABST
    Figure CN122008243B_ABST
Patent Text Reader

Abstract

The application discloses a correction method and system applied to a mechanical arm and the mechanical arm, relates to the technical field of machinery, and comprises the following steps: acquiring the image coordinate change relation of feature points on the workpiece before and after rotation; determining the initial offset of the feature center of the workpiece relative to the rotation center of the rotation axis in the physical coordinate system; calculating the physical coordinate compensation amount under the current angle, and correcting the original physical coordinate by using the physical coordinate compensation amount to obtain target correction coordinates. Through the calibration of the rotation center offset and the establishment of a dynamic compensation model based on geometric kinematics, the compensation amount accurately corresponding to the current target angle can be calculated. Therefore, when the mechanical arm processes a target object at any angle, the nonlinear geometric deviation caused by the non-coincidence of the rotation centers can be automatically corrected, the problem that the fitting error cannot be controlled in the unordered angle scene in the prior art is solved, and the positioning precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of mechanical technology, and in particular to a calibration method, calibration system and robotic arm for use in robotic arms. Background Technology

[0002] In the field of industrial automation, vision-guided robotic arms for alignment, precision assembly, or unordered loading and unloading have become mainstream technologies. These systems typically use cameras to identify the position and angle of the target object and guide the robotic arm's end effector to move to the corresponding pose to complete the operation.

[0003] However, existing technologies suffer from a long-standing, unresolved core problem: when the target object rotates relative to the initial template established by the vision system, the grasping or placement coordinates calculated by the system exhibit systematic errors related to the rotation angle, leading to inaccurate alignment or grasping. The root cause lies in the mismatch between the kinematic model of the robotic arm and the coordinate calculation model of the vision system. Specifically, the end effector of the robotic arm typically rotates around a fixed point, while the vision system, when calculating the target coordinates, assumes the robotic arm aligns with the target through pure translation. When rotation occurs, the actual trajectory is an arc centered on the rotation center, which geometrically deviates from the linear translation path assumed by the vision system, and this deviation varies non-linearly with the rotation angle. Summary of the Invention

[0004] The main objective of this application is to provide a calibration method, calibration system, and robotic arm for use in robotic arms, aiming to solve the problem of nonlinear positioning error caused by the non-coincidence of the rotation center of the robotic arm and the theoretical operating point of the vision system in existing vision guidance technologies, which varies with the angle of the target object.

[0005] To achieve the above objectives, this application proposes a calibration method for a robotic arm, the robotic arm having a rotation axis and a camera, comprising:

[0006] Establish the image coordinate system, the physical coordinate system, and the transformation relationship between the two;

[0007] Control the workpiece to rotate at a target angle, and obtain the image coordinate changes of feature points on the workpiece before and after the rotation;

[0008] Based on the image coordinate change relationship and the target angle, determine the initial offset of the workpiece feature center relative to the rotation axis rotation center in the physical coordinate system;

[0009] The current angle and original physical coordinates of the workpiece to be calibrated are obtained. Combined with the initial offset, the physical coordinate compensation amount at the current angle is calculated. The original physical coordinates are then corrected using the physical coordinate compensation amount to obtain the target calibration coordinates.

[0010] In one embodiment, the specific steps of controlling the workpiece to rotate at a target angle and obtaining the image coordinate changes of feature points on the workpiece before and after the rotation include:

[0011] Set a certain feature position of the workpiece as the target feature point;

[0012] Record the first image coordinates of the target feature point before rotation;

[0013] The rotating axis is driven to rotate the workpiece at a target angle, and the second image coordinates of the target feature point after rotation are recorded to construct the image coordinate change relationship before and after the workpiece rotation.

[0014] In one embodiment, the specific steps of determining the initial offset of the workpiece feature center relative to the rotation axis center in the physical coordinate system based on the image coordinate change relationship and the target angle include:

[0015] Based on the first image coordinates and second image coordinates of the target feature point and the target angle, combined with the transformation relationship, and based on the preset rotation formula around the point, the first physical coordinates of the rotation center of the rotation axis in the physical coordinate system are calculated.

[0016] Obtain the second physical coordinates of the feature center of the workpiece, calculate the relative displacement between the second physical coordinates of the workpiece and the first physical coordinates of the rotation center of the rotation axis, and obtain the initial offset.

[0017] In one embodiment, the specific steps of calculating the first physical coordinates of the rotation axis center in the physical coordinate system based on the first image coordinates and second image coordinates of the target feature point, the target angle, and the transformation relationship, and based on a preset rotation formula around the point, include:

[0018] Based on the transformation relationship between the image coordinate system and the physical coordinate system, the first image coordinates and the second image coordinates are respectively converted into physical points before and after rotation in the physical coordinate system.

[0019] Substitute the physical point before rotation, the physical point after rotation, and the target angle into the preset rotation formula around the point to obtain the first physical coordinates.

[0020] In one embodiment, the coordinates of the physical point before rotation are set to (X0, Y0), the coordinates of the physical point after rotation are set to (X1, Y1), the target angle is θ, and the first physical coordinates are (C... x C y );

[0021] The preset rotation formula around the point is:

[0022] X1 = C x +(X0- C x cosθ-(Y0- C) y sinθ;

[0023] Y1= C y +(X0- C x sinθ + (Y0 - C) y cosθ.

[0024] In one embodiment, the specific steps of obtaining the current angle and original physical coordinates of the workpiece to be calibrated, calculating the physical coordinate compensation amount at the current angle in combination with the initial offset, and correcting the original physical coordinates using the physical coordinate compensation amount to obtain the target calibration coordinates include:

[0025] Obtain the current angle and original physical coordinates of the workpiece to be calibrated;

[0026] Using the initial offset and the current angle, the current offset between the workpiece feature center and the rotation axis rotation center is calculated at the current angle through rotation transformation;

[0027] Calculate the difference between the current offset and the initial offset, and determine the difference as the physical coordinate compensation amount at the current angle;

[0028] The original physical coordinates are corrected using the physical coordinate compensation amount to obtain the target corrected coordinates.

[0029] In one embodiment, the absolute value of the target angle is greater than 10°.

[0030] In one embodiment, the step of establishing the image coordinate system, the physical coordinate system, and the transformation relationship between the two is further included before:

[0031] Determine whether the polarity of the camera's image coordinate system is a mirror image of the physical rotation direction of the rotation axis;

[0032] If the polarity of the camera's image coordinate system is a mirror image of the physical rotation direction of the rotation axis, then the target angle and the current angle are reversed so that the polarity of the image coordinate system is consistent with the physical rotation direction of the rotation axis.

[0033] In addition, to achieve the above objectives, this application also proposes a correction system for a robotic arm, comprising: 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 correction method for the robotic arm as described above.

[0034] Furthermore, to achieve the above objectives, this application also proposes a robotic arm, including the aforementioned correction system applied to the robotic arm, and...

[0035] The robotic arm body has at least one rotation axis;

[0036] A camera used to acquire images of the workpiece;

[0037] The correction system calculates the target correction coordinates based on the image acquired by the camera and controls the robotic arm to perform alignment movements. One or more technical solutions proposed in this application have at least the following technical effects:

[0038] This invention calibrates the rotation center offset and establishes a dynamic compensation model based on geometric kinematics, enabling the calculation of a compensation amount precisely corresponding to the current target angle. This allows the robotic arm to automatically correct nonlinear geometric deviations caused by the misalignment of the rotation center when handling target objects at any angle, thus solving the problem of uncontrollable fitting errors in disordered angle scenarios in existing technologies and improving positioning accuracy. Furthermore, the calibration process of this invention is performed only once during initial system installation or when significant changes are made to the mechanical structure. Afterward, the established dynamic compensation model can be continuously and stably used for subsequent operations, reducing reliance on highly skilled technicians, minimizing equipment downtime for debugging, and thus lowering maintenance costs. Attached Figure Description

[0039] 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.

[0040] 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.

[0041] Figure 1 This is a flowchart illustrating a calibration method for a robotic arm according to an embodiment of this application.

[0042] Figure 2This is a schematic diagram of step S200 provided in Embodiment 2 of a calibration method for a robotic arm according to this application;

[0043] Figure 3 This is a schematic diagram of step S300 provided in Embodiment 3 of a calibration method for a robotic arm according to this application;

[0044] Figure 4 This is a schematic diagram of step S400 provided in Embodiment 4 of a calibration method for a robotic arm according to this application.

[0045] 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

[0046] 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.

[0047] 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.

[0048] In robotic vision alignment and loading / unloading systems, fitting errors caused by changes in the rotation axis angle are a common technical challenge. Specifically, when a target object rotates within a plane, even if the vision system can identify its position and angle, positional deviations will still occur during actual fitting or grasping. These deviations often exhibit regular or irregular variations with changes in the rotation angle. This phenomenon is commonly referred to as "rotation-dependent error," and its essence is not simply due to insufficient visual recognition accuracy, but rather a systemic problem caused by the failure to achieve complete synchronization and precise mapping between the visual coordinate system, the robot coordinate system, and rotational kinematics during dynamic changes.

[0049] From the perspective of causes, this error mainly comes from several aspects: First, there are geometric errors in the mechanical structure itself, such as the center of the rotating axis not coinciding with the center of the robot's end tool, deviations in perpendicularity between axes, transmission gaps, etc.; second, there are visual calibration errors, including residual errors in camera and robot hand-eye calibration, especially during rotation, these errors can be amplified or coupled; third, there is a delay between the control system and vision processing, which causes dynamic asynchrony between angle recognition and robot execution; in addition, changes in the shape, center of gravity, or surface feature distribution of the target object after rotation may also affect the stability of visual matching and the accuracy of position feedback.

[0050] Currently, the common solutions in the industry mainly involve mitigating the problem through process limitations and fixed compensation. Specifically, this involves strictly limiting the allowable angular variation range of the target object, causing it to fluctuate within a small, fixed interval. An average compensation value is then calculated within this interval through experimental measurements, and static offset correction is performed in the system. This method can control accuracy within an acceptable range for customers in scenarios where angular variations are ordered or the fluctuations are small, achieving a basically usable alignment effect. However, its significant drawback lies in its lack of generalization and adaptability: once the target object is in a situation with disordered angles, i.e., random rotation angles with a large variation range, the fixed compensation value cannot cover all situations, and errors will reappear or even worsen, leading to inaccurate fitting, gripping failure, or damage to the workpiece.

[0051] The current technical challenge lies in the fact that most existing systems still rely on static, offline error compensation models, failing to establish a real-time dynamic mapping relationship between rotation angle and error. In scenarios with disordered angles, simply improving visual matching accuracy or mechanical repeatability positioning accuracy cannot fundamentally solve the problem, because the error is a systematic error that varies non-linearly with the angle. Furthermore, when multi-axis cooperative motion is involved, the sources of error become more complex and difficult to completely eliminate through simple linear compensation.

[0052] This application proposes a calibration method for a robotic arm, which has a rotation axis and a camera, such as... Figure 1 As shown, steps S100~S400 are included:

[0053] S100: Establish the image coordinate system, the physical coordinate system, and the transformation relationship between the two;

[0054] S200: Control the workpiece to rotate at the target angle and obtain the image coordinate changes of feature points on the workpiece before and after the rotation;

[0055] S300: Based on the image coordinate change relationship and target angle, determine the initial offset of the workpiece feature center relative to the rotation axis rotation center in the physical coordinate system;

[0056] S400: Obtain the current angle and original physical coordinates of the workpiece to be calibrated, calculate the physical coordinate compensation amount at the current angle in combination with the initial offset, and use the physical coordinate compensation amount to correct the original physical coordinates to obtain the target calibration coordinates.

[0057] In a specific implementation, the correction method for a robotic arm proposed in this application, relying on a robotic arm system with a rotation axis and a camera, specifically includes the following steps:

[0058] In step S100, an image coordinate system, a physical coordinate system, and the transformation relationship between them are established. An image of the calibration reference object is acquired using a camera, and the two-dimensional position coordinates within the pixel plane are extracted to construct the image coordinate system. A three-dimensional or two-dimensional physical coordinate system is constructed by selecting the space where the robotic arm base or end effector is located. The camera is controlled to acquire a reference image containing multiple calibration feature points, and the pixel coordinate data of the calibration reference object in the image coordinate system is extracted. The actual position coordinate data of the robotic arm in the physical coordinate system is recorded. A coordinate transformation algorithm is used to calculate multiple sets of corresponding pixel coordinate data and physical position coordinate data to generate an affine transformation matrix containing translation parameters, rotation parameters, and scaling factors. The affine transformation matrix is ​​used as a mapping parameter to establish the transformation relationship from the image coordinate system to the physical coordinate system.

[0059] In step S200, the workpiece is controlled to rotate at a target angle, and the image coordinate changes of feature points on the workpiece before and after the rotation are obtained. The rotating axis of the driving robot arm clamps or adsorbs the workpiece, and a preset rotation target angle motion command is set and executed. The camera is controlled to acquire a first frame image of the workpiece before the rotating axis performs the rotation action, and a second frame image of the workpiece is acquired after the rotation action is completed. Specific geometric features of the workpiece in the two frames of images are extracted as feature points using an image recognition algorithm. The first image coordinates of the feature points in the first frame image and the second image coordinates in the second frame image are recorded. The displacement deviation vector between the first image coordinates and the second image coordinates is calculated to generate the image coordinate change relationship of the feature points in the two-dimensional image plane.

[0060] In step S300, based on the image coordinate change relationship and the target angle, the initial offset of the workpiece feature center relative to the rotation axis center in the physical coordinate system is determined. The displacement deviation vector from step S200 is extracted and substituted into the affine transformation matrix determined in step S100 to convert the pixel displacement deviation in the image coordinate system into a physical displacement vector in the physical coordinate system. A rotational kinematic geometry model is constructed, and the physical displacement vector and the rotation target angle from step S200 are input into the rotational kinematic geometry model. Using trigonometric function operations, the absolute coordinate data of the rotation axis center in the physical coordinate system is calculated. The position coordinate data of the workpiece feature center in the physical coordinate system is extracted, and the vector difference between the workpiece feature center coordinates and the rotation axis center coordinates is calculated. This vector difference is output as the initial offset of the workpiece feature center relative to the rotation axis center in the physical coordinate system.

[0061] In step S400, the current angle and original physical coordinates of the workpiece to be calibrated are obtained. Combined with the initial offset, the physical coordinate compensation at the current angle is calculated, and the original physical coordinates are corrected using the physical coordinate compensation to obtain the target calibration coordinates. The camera is controlled to acquire real-time images of the workpiece to be calibrated, and the current angle data of the workpiece in the current working posture is extracted. The original physical coordinates of the robotic arm executing the current task, set by the control system, are read. The current angle and the initial offset obtained in step S300 are substituted into the rigid body rotation transformation matrix to calculate the position component changes in each axis of the physical coordinate system after the initial offset undergoes rotation at the current angle, generating the physical coordinate compensation at the current angle. The physical coordinate compensation is then vector-superimposed with the original physical coordinates to update the position data, and the superposition result is output as the target calibration coordinates. The robotic arm control system receives the target calibration coordinates and executes corresponding alignment, bonding, or loading / unloading actions.

[0062] This invention calibrates the rotation center offset and establishes a dynamic compensation model based on geometric kinematics, enabling the calculation of a compensation amount precisely corresponding to the current target angle. This allows the robotic arm to automatically correct nonlinear geometric deviations caused by the misalignment of the rotation center when handling target objects at any angle, thus solving the problem of uncontrollable fitting errors in disordered angle scenarios in existing technologies and improving positioning accuracy. Furthermore, the calibration process of this invention is performed only once during initial system installation or when significant changes occur to the mechanical structure. Afterward, the established dynamic compensation model can be continuously and stably used for subsequent operations, reducing reliance on highly skilled technicians, minimizing equipment downtime for debugging, and thus lowering maintenance costs. The entire process is implemented based on existing hardware structures, without altering the original mechanical layout, and can be embedded and executed within conventional control flows.

[0063] In one specific embodiment, the step of establishing the image coordinate system, the physical coordinate system, and the transformation relationship between the two is further included before:

[0064] Determine whether the polarity of the camera's image coordinate system is a mirror image of the physical rotation direction of the rotation axis. If the polarity of the camera's image coordinate system is a mirror image of the physical rotation direction of the rotation axis, then reverse the target angle and the current angle to make the polarity of the image coordinate system consistent with the physical rotation direction of the rotation axis.

[0065] This embodiment can be understood as requiring the determination of whether the polarity of the camera's image coordinate system is a mirror image of the physical rotation direction of the rotation axis. This determination is based on the camera's mounting orientation and the direction of its imaging optical axis, specifically divided into upper and lower camera configurations. In the upper camera configuration, the camera is positioned above the workpiece with the lens looking downwards. Since the imaging field of view is from above the physical plane, the coordinate axes of its image coordinate system differ from the physical world coordinate system in three-dimensional spatial mapping, resulting in a mathematically mirror image of the observed rotation direction of the object in the image and the actual rotation direction performed by the physical rotation axis. In the lower camera configuration, the camera is positioned below the workpiece with the lens looking upwards. Its imaging direction is consistent with the observation angle of the physical rotation axis, and the image polarity does not constitute a mirror image of the physical rotation direction.

[0066] If the polarity of the camera's image coordinate system is determined to be a mirror image of the physical rotation direction of the rotation axis, then in all subsequent steps involving rotation calculations, the target angle and the current angle will be inverted. Specifically, the original angle value identified by the vision system or output by the motion control system will be multiplied by -1, and this value will be used as the angle parameter for subsequent mathematical model calculations. This inversion operation forces the trend of angle change in image space to be mathematically consistent with the trend of motion of the rotation axis in physical space. All definitions of positive and negative angles will uniformly refer to the polarity definition of the machine's physical coordinate system and conform to the right-hand rule, that is, counterclockwise rotation is defined as a positive angle and clockwise rotation as a negative angle in the rotation plane. If the camera is determined to be in a lower camera configuration, the angle inversion operation will not be performed, and the original angle data will be used directly in the calculation.

[0067] This embodiment eliminates the influence of hardware installation layout on the correction algorithm logic by pre-setting the mirror determination and angle polarity correction process before establishing the spatial mapping relationship. This step avoids the problem of coordinate compensation failure caused by the conflict between the angle change in visual feedback and the angle command direction executed by the mechanical axis, ensuring the algorithm compatibility of the rotation transformation formula under different camera installation configurations, and providing a unified mathematical benchmark for subsequent accurate calculation of initial offset and physical coordinate compensation. This polarity configuration is set once during the system initialization phase and is used as a low-level physical parameter throughout the entire operation cycle.

[0068] In one embodiment, step S200 involves controlling the workpiece to rotate at a target angle and obtaining the image coordinate changes of feature points on the workpiece before and after the rotation. The specific steps are as follows: Figure 2 As shown, steps S210 to S230 are included:

[0069] S210: Set a certain feature position of the workpiece as the target feature point;

[0070] S220: Records the first image coordinates of the target feature point before rotation;

[0071] S230: Drive the rotating shaft to rotate the workpiece at the target angle, and record the second image coordinates of the target feature points after rotation to construct the image coordinate change relationship before and after the workpiece rotation.

[0072] This can be understood as follows: in step S200, the workpiece is controlled to rotate at the target angle, and the image coordinate changes of the feature points on the workpiece before and after the rotation are obtained, including sub-steps S210 to S230.

[0073] In step S210, a specific feature location on the workpiece is set as a target feature point. A location with clear geometric features or visual recognizability is selected on the workpiece surface as the target feature point. This location includes corners, center holes, marker points, edge intersections, or the center of a preset visual identifier pattern. The location is located in the initially acquired image using an image processing algorithm and defined as a fixed reference point for subsequent tracking. The selection of feature points is based on the principle that they can be stably identified under different rotational postures, ensuring accurate matching of the same physical position before and after rotation. The setting process is completed manually through the software interface or automatically, and the position information of the point is stored in the system parameter table for later retrieval.

[0074] In step S220, the first image coordinates of the target feature point before rotation are recorded. Before the rotation is performed, the camera is controlled to acquire images of the workpiece in a stationary state, obtaining image data of the workpiece in its initial posture. A preset feature extraction algorithm is performed on the image, including edge detection, template matching, subpixel localization, or circle fitting, to identify the pixel positions of the target feature points set in S210 in the image. The obtained coordinate values ​​are represented in the form of horizontal and vertical coordinates in the image coordinate system, denoted as the first image coordinates ( u 1, v 1) The coordinate value is stored in the control system cache as the reference position data before rotation, and is used for comparison and analysis with the coordinates after rotation.

[0075] In step S230, the drive axis rotates the workpiece by a target angle, and the second image coordinates of the target feature point after rotation are recorded to construct the image coordinate change relationship before and after the workpiece rotation. A rotation command is sent to the drive axis to control it to precisely rotate the workpiece around its own central axis by a preset target angle θ. The target angle is confirmed by the motion controller based on encoder feedback. After the rotation stops and the system stabilizes, the camera is triggered again to acquire images of the workpiece in the new posture. Based on the same image processing flow as S220, the new position of the same target feature point after rotation is identified, and its coordinate value in the image coordinate system is obtained, denoted as the second image coordinate (θ). u 2, v2) Generate image coordinate change data for the feature point at the target angle θ. This data, together with the corresponding angle information, constitutes the basic dataset of the image coordinate change relationship before and after workpiece rotation, which is used for subsequent analysis of the deviation between the actual motion trajectory and the ideal rotation path in the physical coordinate system.

[0076] By executing steps S210 to S230, the positional change of a single selected feature point during rotation is tracked. This process provides raw observation data, supporting the conversion of displacement information in the image domain into error analysis input in physical space. The acquired image coordinate changes reflect the actual motion trajectory of the feature point during workpiece rotation, providing data support for determining the relative offset between the workpiece feature center and the rotation axis center. This method is applicable to workpieces of different shapes and sizes, can be completed within standard production cycles, does not rely on additional measuring equipment, and can be implemented using existing vision and motion systems.

[0077] In one embodiment, step S300, based on the image coordinate change relationship and the target angle, determines the initial offset of the workpiece feature center relative to the rotation axis rotation center in the physical coordinate system. The specific steps are as follows: Figure 3 As shown, steps S310 to S320 are included:

[0078] S310: Based on the first image coordinates, second image coordinates, and target angle of the target feature point, and combined with the transformation relationship, calculate the first physical coordinates of the rotation center of the rotation axis in the physical coordinate system based on the preset rotation formula around the point.

[0079] S320: Obtain the second physical coordinates of the workpiece feature center, calculate the relative displacement between the second physical coordinates of the workpiece feature center and the first physical coordinates of the rotation axis rotation center, and obtain the initial offset.

[0080] This can be understood as follows: Step S300 determines the initial offset of the workpiece feature center relative to the rotation axis center in the physical coordinate system based on the image coordinate transformation relationship and the target angle, including sub-steps S310 to S320. Specifically, based on the transformation relationship between the image coordinate system and the physical coordinate system, the first image coordinates and the second image coordinates are respectively converted into a physical point before rotation and a physical point after rotation in the physical coordinate system; the physical point before rotation, the physical point after rotation, and the target angle are substituted into the preset rotation formula around the point to obtain the first physical coordinates. The coordinates of the physical point before rotation are set as ( X 0, Y 0), the coordinates of the physical point after rotation are ( X 1, Y 1) The target angle is θ The first physical coordinate is ( C x ,C y The preset formula for rotation around a point is expressed as follows:

[0081] X 1 = C x + ( X 0 - C x cos θ- ( Y 0 - C y sin θ;

[0082] Y 1 = C y + ( X 0 - C x sin θ+ ( Y 0 - C y cos θ .

[0083] In step S310, based on the first image coordinates, second image coordinates, and target angle of the target feature point, and combined with the transformation relationship, the first physical coordinates of the rotation axis center in the physical coordinate system are calculated according to a preset rotation formula around the point. Using the transformation matrix between the image coordinate system and the physical coordinate system established in step S100, the recorded target feature position is then repositioned to the first image coordinates before rotation. u 1, v 1) Convert to the physical coordinate system before rotation ( X 0, Y 0), and rotate the coordinates of the second image ( u 2, v 2) The coordinates of the physical point after rotation are ( X 1, Y 1) Obtain the target angle of the rotation axis fed back by the motion control system. θ Before substituting into the formula, perform coordinate polarity determination: If using a camera for shooting, because the image coordinate system and the physical world coordinate system are mirror images of each other along the Y-axis, the target angle... θ Perform the inversion operation; if the camera is used for shooting from below, the inversion operation is not performed. The positive and negative definitions of all angles uniformly follow the right-hand rule. The physical point before rotation ( X 0 , Y 0) Physical point after rotation ( X 1, Y 1) Substitute the target angle θ after polarity processing into the preset rotation formula around the point:X 1 = C x + ( X 0 - C x cos θ- ( Y 0 - C y sin θ;Y 1 = C y + ( X 0 - C x sin θ+ ( Y 0 - C y cos θ By establishing a framework regarding C x and C y The linear equations are solved to obtain the coordinates of the rotation center in the physical coordinate system, which are defined as the first physical coordinates. C x , C y This step derives the physical axis position of the rotating shaft by reverse engineering the observed characteristic motion trajectory, eliminating the problem of unpredictable rotation center position of the rotating shaft due to mechanical assembly tolerances.

[0084] In step S320, the second physical coordinates of the workpiece feature center are obtained, and the relative displacement between the second physical coordinates of the workpiece feature center and the first physical coordinates of the rotation axis rotation center is calculated to obtain the initial offset. The overall geometric contour or specific center marker of the workpiece is identified using an image processing algorithm, and the reference position of the workpiece in physical space is extracted to obtain its corresponding physical coordinates, denoted as the second physical coordinates. X f , Y f ). The second physical coordinates ( X f , Y f ) and the first physical coordinates determined in step S310 ( C x , C y By performing vector subtraction, the relative displacement components of the two components in the physical coordinate system can be calculated: dx = X f - C x;dy = Y f - C y The calculation results represent, in vector form, the angular and positional deviation of the workpiece feature center relative to the rotation axis center at the initial moment, i.e., the initial offset. dx , dy The initial offset quantifies the degree of eccentricity of the workpiece on the rotating mechanism and is stored in the memory as an inherent static error parameter of the system. During this process, physical deviations caused by manual adjustment or mechanical alignment are converted into digital compensation references, enabling the prediction and correction of arc motion caused by eccentricity during subsequent rotations at any angle.

[0085] By executing steps S310 and S320 above, a precise modeling of the coupling relationship between the rotation axis and the workpiece's center of mass is achieved in physical space. This process converts the pixel displacement captured by vision into an eccentric vector reflecting the mechanical structure, providing input parameters for dynamic position compensation under disordered angles. This method does not rely on high-precision mechanical concentricity adjustment; instead, it corrects mechanical geometric errors through software algorithms, reducing the requirements for fixture installation accuracy. Furthermore, even with random workpiece arrival angles, it ensures that the subsequently calculated correction coordinates meet the accuracy indicators for fitting and gripping.

[0086] In one embodiment, step S400 involves acquiring the current angle and original physical coordinates of the workpiece to be calibrated, calculating the physical coordinate compensation amount at the current angle based on the initial offset, and using the physical coordinate compensation amount to correct the original physical coordinates to obtain the target calibration coordinates. The specific steps are as follows: Figure 4 As shown, steps S410 to S440 are included:

[0087] S410: Obtain the current angle and original physical coordinates of the workpiece to be calibrated;

[0088] S420: Using the initial offset and the current angle, calculate the current offset of the workpiece feature center relative to the rotation axis rotation center at the current angle through rotation transformation;

[0089] S430: Calculate the difference between the current offset and the initial offset, and determine the difference as the physical coordinate compensation amount at the current angle;

[0090] S440: Correct the original physical coordinates using physical coordinate compensation to obtain the target corrected coordinates.

[0091] This can be understood as follows: in step S400, the current angle and original physical coordinates of the workpiece to be calibrated are obtained, and the physical coordinate compensation amount under the current angle is calculated in combination with the initial offset amount. The original physical coordinates are then corrected using the compensation amount to obtain the target calibration coordinates, including sub-steps S410 to S440.

[0092] In step S410, the current angle and original physical coordinates of the workpiece to be calibrated are obtained. An image of the workpiece is acquired using a camera. The image processing module identifies preset positioning features on the workpiece and extracts the current angle α of the workpiece based on the deflection state of the positioning features relative to the reference template. The current angle α is the original angle observed based on the 0-degree template position. Simultaneously, the pixel coordinates of the workpiece feature points are located using an image processing algorithm. Combined with the transformation relationship between the image coordinate system and the physical coordinate system established in step S100, the pixel coordinates are converted into position values ​​in the physical coordinate system, denoted as the original physical coordinates. X in , Y in The original physical coordinates obtained are visual feedback coordinates without rotational deviation correction, which serve as the input reference for subsequent compensation calculations.

[0093] In step S420, using the initial offset and the current angle, the current offset between the workpiece feature center and the rotation axis rotation center is calculated through rotation transformation at the current angle. The system calls the initial offset predetermined in step S300 ( dx , dy This initial offset characterizes the geometric deviation between the physical center and the rotation center of the workpiece in its initial posture. Using the current angle α as a rotation parameter, and substituting it into the rotation transformation formula for the two-dimensional coordinate system, the spatial mapping of the initial offset after rotation is calculated: dx α = dx · cos α - dy · sin α ; dyα = dx · sin α + dy · cos α This yields the real-time offset caused by the workpiece rotating with the axis at the current angle α, denoted as the current offset. dx α , dy α This step establishes the real-time relative position of the physical center of the workpiece with respect to the axis of rotation at any rotation angle.

[0094] In step S430, the difference between the real-time offset and the initial offset is calculated, and this difference is determined as the physical coordinate compensation amount at the current angle. The system uses the current offset obtained in step S420 ( dx α , dy α ) and the initial offset of storage ( dx , dyTo extract the spatial displacement increment caused by rotational motion, a subtraction operation is performed. The specific calculation formula is: Δ x = dx - dx α Δ y = dy - dy α The calculated difference vector (Δx, Δy) is the physical coordinate compensation amount at that angle. This compensation amount quantitatively describes the displacement error of the workpiece feature center deviating from the ideal rotation trajectory at a specific rotation angle. During the calculation process, polarity determination logic ensures that the sign of angle α is consistent with the physical rotation direction of the machine axis.

[0095] In step S440, the original physical coordinates are corrected using physical coordinate compensation to obtain the target corrected coordinates. The physical coordinate compensation determined in step S430 is then superimposed onto the original physical coordinates extracted in step S410 using an algebraic superposition method. The calculation formula is as follows: X out = X in + Δ x ; Y out = Y in + Δ y Output results ( X out , Y out These are the target calibration coordinates. The calibration system sends these target calibration coordinates to the robotic arm motion controller, which then performs the corresponding alignment, gripping, or fitting actions.

[0096] By executing steps S410 to S440, real-time dynamic correction of rotation-dependent errors is achieved. Utilizing the established nonlinear mapping model between angle and offset, when the workpiece is in a state of disordered angle or large-range rotation angle addressing, the corresponding coordinate correction value can be calculated in real time based on the currently identified angle value. This method eliminates the limitation of traditional static compensation in covering variable angle conditions, enabling the robotic arm to maintain constant positioning accuracy throughout the entire rotation angle range. The entire process is automatically completed based on mathematical modeling, avoiding the limitations of manual adjustment of compensation values ​​and reducing the concentricity accuracy requirements of mechanical installation.

[0097] In one embodiment, the absolute value of the target angle is greater than 10°.

[0098] This can be understood as follows: when executing step S200, the set target angle θ satisfies that its absolute value is greater than 10°, i.e., |θ| > 10°. When the target angle θ is near 0° or has a small value (e.g., less than or equal to 1°), the displacement of the feature points on the workpiece in physical space is small. Due to the limitations of the pixel resolution of the vision sensor and system noise interference, the change of the feature points in the image coordinate system is not significant, leading to a decrease in the accuracy of the calculated rotation center. By setting the absolute value of the target angle θ to be greater than 10°, it can be ensured that the feature points generate sufficient spatial displacement before and after rotation, thereby improving the accuracy of the calculation of the rotation center of the rotation axis and subsequent offset.

[0099] In acquiring the coordinate changes of feature point images, the target angle θ is preferably set to an angle greater than 90°, and more preferably to around 180°. Under large-angle rotation conditions, the arc length of the feature point's trajectory increases, the coordinate difference before and after rotation increases, and the weight of the displacement vector affected by measurement errors decreases, which is beneficial for obtaining more accurate rotational motion modeling parameters. This error data acquisition and initial offset determination process is executed once during system initialization or mechanical calibration. The obtained initial offset is stored as a static structural parameter of the system in non-volatile memory. In subsequent operation cycles for different workpieces to be calibrated, the stored initial offset is directly called in conjunction with the currently identified angle for dynamic compensation calculation.

[0100] If critical hardware parameters of the system change, especially when camera recalibration alters the transformation relationship between the image coordinate system and the physical coordinate system, steps S200 to S300 need to be re-executed to re-acquire the image coordinate changes of feature points and update the initial offset. This re-acquisition operation ensures the synchronization and consistency of the physical offset with the latest visual mapping matrix in the spatial dimension, preventing compensation logic failure due to calibration parameter changes.

[0101] By limiting the target angle range and setting the triggering conditions as described above, we ensure that the data source of the error correction model has sufficient feature recognition, and while maintaining the system's operating efficiency, we maintain the robot arm's fitting accuracy in long-cycle operations by updating the offset parameters at necessary nodes.

[0102] In summary, in one specific embodiment, the process of calculating the target correction coordinates based on the acquired current angle and physical offset using a preset correction function is as follows:

[0103] When the workpiece to be calibrated is detected to be at a specific rotation angle, such as an angle of 158.0377 degrees after polarity reversal, the measurement result recognized by the vision system deviates from the actual target alignment position in the physical coordinate system. Through experimental measurement or system re-inspection, it is determined that if the material needs to be translated +1.15mm in the X direction of the physical coordinate system to coincide with the target center, but not in the Y direction, then the deviation Δ in the X direction of the physical coordinate system is determined. x The deviation Δ in the Y direction is +1.15mm. y It is 0mm. This deviation reflects the actual coordinate offset caused by the misalignment of the mechanical centers at the current rotation angle.

[0104] The system calls the coordinate correction function to perform dynamic correction. The input parameters and operation logic of this function are configured as follows: Input parameters X in With Y in These are the original X and Y physical coordinates to be corrected, obtained by the vision system and coordinate transformation, respectively; input parameters. α This is the current matching angle to be corrected. The matching angle... α The value must be the relative rotation angle change measured based on the starting position of the 0-degree template, and this value must not contain any preset fixed static compensation value to ensure that the calculation benchmark of the rotation transformation model is consistent with the physical definition of the initial offset.

[0105] The function receives preset offset components. In this embodiment, the X-direction input is 1.15, the Y-direction input is 0, and the corresponding measurement reference angle is 158.0377 as the calculation boundary conditions. During function execution, the matching angle to be corrected is... α Substitute the rotation compensation matrix and combine it with the determined displacement components to calculate the coordinate increment caused by eccentric motion at that specific angle through inverse rotation transformation.

[0106] Finally, the function outputs the calculated correction result. X out and Y out The result X out and Y out This refers to the target correction coordinates after eliminating rotational dependency errors. The robotic arm receives these target correction coordinates and drives the actuator to move to the corrected physical position for fitting or gripping. In this process, by introducing a dynamic deviation parameter linked to the angle, the correction function can calculate and offset the nonlinear displacement error caused by the eccentricity of the rotation axis online based on the real-time angle of the workpiece, ensuring the accuracy of the alignment action across the entire angle range. The correction calculation is completed within a single task cycle after visual recognition, ensuring the real-time performance of the system.

[0107] Furthermore, this application proposes a correction system for a robotic arm, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program is configured to implement the steps of the correction method for the robotic arm as described above. This can be implemented using a main controller, such as a DSP (Digital Signal Processor), FPGA (Field Programmable Gate Array), MCU (Microcontroller Unit), or SOC (System on Chip).

[0108] It is worth noting that since the calibration system of the present invention is applied to the above-mentioned calibration method for robotic arms, the embodiments of the calibration system of the present invention include all the technical solutions of all the embodiments of the above-mentioned calibration method for robotic arms, and the technical effects achieved are exactly the same, so they will not be repeated here.

[0109] In addition, this application also proposes a robotic arm, including the above-described correction system applied to the robotic arm, and a robotic arm body having at least one rotation axis; a camera for acquiring workpiece images; wherein the correction system calculates target correction coordinates based on the images acquired by the camera and controls the robotic arm body to perform alignment actions.

[0110] It can be understood that the robotic arm disclosed in this application constructs a closed-loop alignment control architecture based on visual feedback data, and the hardware components include a camera, a correction system, and the robotic arm itself.

[0111] The camera mechanism is positioned at a fixed reference position on the end effector of the robotic arm or in the working environment. It receives the optical signals reflected by the workpiece, performs photoelectric conversion, generates digital image matrix data, and continuously transmits it to the storage unit of the calibration system. The camera establishes a data channel for converting the physical shape of the workpiece into digital information, and outputs low-level image source data for feature extraction, coordinate recognition, and pixel displacement comparison, eliminating interference from workpiece force deformation or position movement caused by contact measurement.

[0112] The calibration system establishes a data communication connection with the camera and the robotic arm, receives digital image matrix data from the camera, and runs image processing algorithms to extract the pixel coordinates of workpiece feature points in the image coordinate system. The calibration system calls preset hand-eye calibration parameters and a spatial geometric solution model to map the pixel coordinate displacement into a spatial offset vector in a three-dimensional physical coordinate system. It then combines the preset target work position coordinates with the spatial offset vector to perform vector summation, generating the final target calibration coordinates. The calibration system decouples the visual two-dimensional data from the mechanical three-dimensional motion commands, converting the identified rotational eccentricity values ​​into executable kinematic compensation quantities, forming a data control link that includes an error correction mechanism.

[0113] The robotic arm body includes a transmission mechanism, a linkage assembly, and a joint module with at least one rotation axis. Each joint is equipped with a servo drive motor and a position encoder. The servo drive controller of the robotic arm body receives the target calibration coordinates from the calibration system, parses the position coordinates and attitude compensation values ​​in the command message, and outputs corresponding pulse currents to the servo drive motors. This drives the mechanical structure to carry the workpiece in linear translation along the X, Y, and Z axes, as well as rotational motion around the rotation axis, until the physical spatial position specified by the target calibration coordinates is reached. The robotic arm body provides the physical execution carrier for performing spatial alignment actions. It executes motion based on the target calibration coordinates combined with visual compensation values, correcting the actual trajectory deviation caused by mechanical assembly tolerances, running backlash, and non-coplanarity of the rotation axis, thereby reducing the spatial relative deviation between the workpiece placement point and the theoretical target position.

[0114] 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 and using the contents 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 robotic arm, the robotic arm having a rotation axis and a camera, characterized in that, include: Establish the image coordinate system, the physical coordinate system, and the transformation relationship between the two; Control the workpiece to rotate at a target angle, and obtain the image coordinate changes of feature points on the workpiece before and after the rotation; Based on the image coordinate change relationship and the target angle, determine the initial offset of the workpiece feature center relative to the rotation axis rotation center in the physical coordinate system; The current angle and original physical coordinates of the workpiece to be calibrated are obtained. Combined with the initial offset, the physical coordinate compensation amount at the current angle is calculated. The original physical coordinates are then corrected using the physical coordinate compensation amount to obtain the target calibration coordinates. The specific steps for determining the initial offset of the workpiece feature center relative to the rotation axis center in the physical coordinate system based on the image coordinate change relationship and the target angle include: Based on the first image coordinates and second image coordinates of the target feature point and the target angle, combined with the transformation relationship, and based on the preset rotation formula around the point, the first physical coordinates of the rotation center of the rotation axis in the physical coordinate system are calculated. Obtain the second physical coordinates of the workpiece feature center, calculate the relative displacement between the second physical coordinates of the workpiece feature center and the first physical coordinates of the rotation axis rotation center, and obtain the initial offset; The specific steps of obtaining the current angle and original physical coordinates of the workpiece to be calibrated, calculating the physical coordinate compensation amount at the current angle in combination with the initial offset, and correcting the original physical coordinates using the physical coordinate compensation amount to obtain the target calibration coordinates include: Obtain the current angle and original physical coordinates of the workpiece to be calibrated; Using the initial offset and the current angle, the current offset between the workpiece feature center and the rotation axis rotation center is calculated at the current angle through rotation transformation; Calculate the difference between the current offset and the initial offset, and determine the difference as the physical coordinate compensation amount at the current angle; The original physical coordinates are corrected using the physical coordinate compensation amount to obtain the target corrected coordinates; The preset rotation formula around the point is: X1= C x +(X0 - C x )cosθ-(Y0 - C y )sinθ; Y1= C y +(X0 - C x )sinθ+(Y0 - C y )cosθ; Wherein, the coordinates of the physical point before rotation, obtained from the first image coordinate transformation, are set as (X0, Y0), and the coordinates of the physical point after rotation, obtained from the second image coordinate transformation, are set as (X1, Y1). The target angle is θ, and the first physical coordinates are (C... x C y ).

2. The calibration method for a robotic arm as described in claim 1, characterized in that, The specific steps for controlling the workpiece to rotate at a target angle and obtaining the image coordinate changes of feature points on the workpiece before and after rotation include: Set a certain characteristic position of the workpiece as the target feature point; Record the first image coordinates of the target feature point before rotation; The rotating axis is driven to rotate the workpiece at a target angle, and the second image coordinates of the target feature point after rotation are recorded to construct the image coordinate change relationship before and after the workpiece rotation.

3. The calibration method for a robotic arm as described in claim 1, characterized in that, The specific steps for calculating the first physical coordinates of the rotation axis center in the physical coordinate system based on the first image coordinates and second image coordinates of the target feature point, the target angle, and the transformation relationship, and based on a preset rotation formula around the point, include: Based on the transformation relationship between the image coordinate system and the physical coordinate system, the first image coordinates and the second image coordinates are respectively converted into physical points before and after rotation in the physical coordinate system. Substitute the physical point before rotation, the physical point after rotation, and the target angle into the preset rotation formula around the point to obtain the first physical coordinates.

4. The calibration method for a robotic arm as described in claim 1, characterized in that, The absolute value of the target angle is greater than 10°.

5. The calibration method for a robotic arm as described in any one of claims 1 to 4, characterized in that, Before the step of establishing the image coordinate system, the physical coordinate system, and the transformation relationship between the two, the following steps are also included: Determine whether the polarity of the camera's image coordinate system is a mirror image of the physical rotation direction of the rotation axis; If the polarity of the camera's image coordinate system is a mirror image of the physical rotation direction of the rotation axis, then the target angle and the current angle are reversed so that the polarity of the image coordinate system is consistent with the physical rotation direction of the rotation axis.

6. A correction system for a robotic arm, characterized in that, include: 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 correction method for a robotic arm as described in any one of claims 1 to 5.

7. A robotic arm, characterized in that, Including the correction system for a robotic arm as described in claim 6, and The robotic arm body has at least one rotation axis; A camera used to acquire images of the workpiece; The correction system calculates the target correction coordinates based on the image acquired by the camera and controls the robotic arm to perform alignment actions.