Robot tail end position accurate docking technology based on two-dimensional code

By analyzing the QR code switching sequence map and evaluating its confidence level, a coordinate mapping relationship with consistency correction was generated. This solved the problem of degradation in robot end-effector positioning accuracy caused by changes in the topological relationship of QR codes in dynamic environments, and enabled precise docking of the robot end-effector.

CN121234972AActive Publication Date: 2025-12-30广州乐比机器人有限公司
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511475016.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2025-12-30
Estimated Expiration
2045-10-15

AI Technical Summary

Technical Problem

In the precise docking technology of robot end-effector based on QR codes, the spatial topological relationship between multiple QR codes changes dynamically due to minor mechanical disturbances, thermal expansion and contraction, or accumulated operational errors in the long-term operating environment. Traditional systems lack dynamic consistency maintenance mechanisms, which leads to degradation of robot end-effector positioning accuracy and docking failure.

Method used

By statistically analyzing historical operation trajectory data and QR code recognition records, a QR code switching sequence map is generated, the confidence level of the QR codes is evaluated, a set of reference QR codes is selected, pose calculation and consistency evaluation are performed, and a coordinate mapping relationship with consistency correction is generated to ensure the trajectory planning and docking control of the robot's end effector.

Benefits of technology

It achieves precise docking of the robot's end effector in dynamic environments, solves the problem of accuracy degradation under traditional static calibration methods, and ensures the robot's high-precision docking capability in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121234972A_ABST
    Figure CN121234972A_ABST
Patent Text Reader

Abstract

The invention discloses a robot end position accurate docking technology based on a two-dimensional code, and the technology comprises the steps: carrying out the statistical analysis of historical track data and a two-dimensional code recognition record, and generating a two-dimensional code switching sequence map containing a path weight; according to the map, confidence evaluation is performed on the current multiple two-dimensional codes, a spatially independent reference two-dimensional code set is selected, and an initial coordinate mapping relation is generated; performing pose calculation on the reference two-dimensional code set, and performing consistency evaluation and correction on the coordinate mapping relation through deviation analysis; performing compensation processing on the attitude data according to the corrected mapping relation to generate a current frame global coordinate system; and executing trajectory planning based on the global coordinate system, and executing re-evaluation correction on the control instruction when the coordinate system is updated. According to the scheme, the change of the spatial topological relation between the two-dimensional codes can be dynamically detected and compensated, the problem of positioning precision degradation caused by topological drift in a multi-two-dimensional-code environment is solved, and the precision and reliability of robot tail end docking are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of robot vision guidance control, and in particular to a robot end position accurate docking technology based on a two-dimensional code. BACKGROUND

[0002] The robot end position accurate docking technology based on a two-dimensional code guides a robot end effector to achieve accurate docking by deploying two-dimensional code markers in a target position or working environment, using a vision system carried by the robot to recognize the two-dimensional code and solve its spatial pose. In actual application, in order to meet the requirements of large-scale operation, multi-station switching, and hierarchical positioning from coarse positioning to fine positioning, the system usually needs to deploy multiple two-dimensional code markers in the working area to form a spatial coordinate reference network. However, these two-dimensional code markers will change their spatial topological relationship with each other slightly but continuously due to factors such as equipment vibration, thermal expansion and contraction, mechanical looseness, etc. Since the existing system generally adopts a static coordinate mapping strategy of fixed use after one-time calibration, it lacks a dynamic perception mechanism for changes in the spatial relationship between two-dimensional codes. When the spatial topological relationship of multiple two-dimensional codes deviates, the system still solves the pose and plans the trajectory based on the outdated coordinate transformation relationship, resulting in gradual degradation of the positioning accuracy of the robot end, and eventually causing docking failure or precision not meeting process requirements. SUMMARY

[0003] The main purpose of the present application is to solve the following technical problems: In the process of robot end position accurate docking based on a two-dimensional code, multiple two-dimensional codes change their original spatial topological relationship with each other dynamically due to slight mechanical disturbance, thermal expansion and contraction, or accumulated errors in operation in a long-term running environment. The traditional system continues to solve the end pose based on static calibration information in the absence of a dynamic consistency maintenance mechanism, thereby causing the robot end path to deviate and docking errors.

[0004] To solve the above technical problems, the present application provides a robot end position accurate docking technology based on a two-dimensional code, comprising: statistically analyzing historical operation trajectory data and two-dimensional code recognition records to obtain a two-dimensional code switching sequence graph; performing confidence evaluation on multiple two-dimensional codes currently recognized according to the two-dimensional code switching sequence graph to obtain a reference two-dimensional code set and an initial coordinate mapping relationship corresponding to the reference two-dimensional code set; performing pose solving on the reference two-dimensional code set to obtain a set of attitude vectors, and performing spatial consistency evaluation on the initial coordinate mapping relationship according to the set of attitude vectors to obtain a consistency-modified coordinate mapping relationship; According to the consistency-corrected coordinate mapping relationship, pose compensation is performed on the pose vector set to generate a current frame global coordinate system; According to the current frame global coordinate system, trajectory planning is performed on a robot end effector to obtain end docking control instructions, and when the current frame global coordinate system is updated, trajectory reevaluation is performed on the end docking control instructions to complete end position docking control.

[0005] In an optional implementation, the historical operation trajectory data and the two-dimensional code recognition record are statistically analyzed to obtain a two-dimensional code switching sequence atlas, including: The spatial position sequence of the robot end effector in the historical operation trajectory data and the two-dimensional code recognition record at each position are obtained, the operation area is divided into a plurality of spatial regions according to the spatial position sequence, and the recognition frequency and recognition confidence value of the two-dimensional code in each spatial region are counted; According to the movement trajectory of the robot between adjacent spatial regions in the spatial position sequence, the access sequence of the two-dimensional code when switching between regions is extracted, the switching mode of the two-dimensional code in the access sequence is analyzed, and a two-dimensional code switching path set is obtained; According to the environmental parameters of each region in the plurality of spatial regions, the temperature variation amplitude and vibration intensity of each switching path in the two-dimensional code switching path set are calculated, and the environmental risk coefficient of each switching path is obtained; According to the recognition frequency, recognition confidence value, and environmental risk coefficient, each switching path in the two-dimensional code switching path set is assigned a path weight, and a two-dimensional code switching sequence atlas containing two-dimensional code nodes, switching paths, and path weights is generated.

[0006] In an optional implementation, according to the two-dimensional code switching sequence atlas, confidence evaluation is performed on a plurality of two-dimensional codes currently recognized to obtain a reference two-dimensional code set and an initial coordinate mapping relationship corresponding to the reference two-dimensional code set, including: The identification information of the plurality of two-dimensional codes currently recognized is obtained, the corresponding two-dimensional code nodes in the two-dimensional code switching sequence atlas are searched according to the identification information, and the path weight and historical recognition frequency of each two-dimensional code node are extracted; The image recognition confidence of the plurality of two-dimensional codes currently recognized is obtained, and the comprehensive confidence score of each two-dimensional code is calculated according to the image recognition confidence, path weight, and historical recognition frequency; The plurality of two-dimensional codes currently recognized are sorted according to the comprehensive confidence score, the two-dimensional codes ranked in the top N in the comprehensive confidence score are selected as candidate two-dimensional codes, and a two-dimensional code combination with spatial positions independent of each other is selected from the candidate two-dimensional codes as the reference two-dimensional code set; According to the current recognized pose of each two-dimensional code in the reference two-dimensional code set, a relative position relationship and a relative attitude relationship between two-dimensional codes are calculated, and an initial coordinate mapping relationship corresponding to the reference two-dimensional code set is generated.

[0007] In an optional implementation, the plurality of currently recognized two-dimensional codes are sorted according to the comprehensive confidence score, the top N two-dimensional codes in the comprehensive confidence score are selected as candidate two-dimensional codes, and a combination of two-dimensional codes that are independent in spatial position is selected from the candidate two-dimensional codes as the reference two-dimensional code set, including: The plurality of currently recognized two-dimensional codes are sorted in descending order according to the comprehensive confidence score, the top N two-dimensional codes in the sorting result are selected as candidate two-dimensional codes, and a minimum spatial distance and a maximum angle difference between the candidate two-dimensional codes are calculated. According to the minimum spatial distance and the maximum angle difference, geometric independence evaluation is performed on the candidate two-dimensional codes, redundant two-dimensional codes with a minimum spatial distance less than a distance threshold or a maximum angle difference less than an angle threshold are removed, and a subset of two-dimensional codes that are geometrically independent is obtained. The subset of two-dimensional codes that are geometrically independent is reordered according to a confidence weighting value, two-dimensional codes that maintain geometric independence with the selected two-dimensional codes are selected in order according to the sorting order, until the number of selected two-dimensional codes meets the reference set requirement, and a reference two-dimensional code set is formed.

[0008] In an optional implementation, the pose of the reference two-dimensional code set is solved to obtain a set of attitude vectors, and a spatial consistency evaluation is performed on the initial coordinate mapping relationship according to the set of attitude vectors to obtain a coordinate mapping relationship that is modified for consistency, including: Image pose solving is performed on each two-dimensional code in the reference two-dimensional code set to obtain measured pose data of each two-dimensional code, and theoretical pose data of each two-dimensional code is calculated according to the initial coordinate mapping relationship, and the measured pose data and the theoretical pose data are combined to form a set of measured attitude vectors and a set of theoretical attitude vectors, respectively. According to the set of measured attitude vectors and the set of theoretical attitude vectors, a pose deviation value of each two-dimensional code is calculated, and a spatial topological consistency of the reference two-dimensional code set is analyzed according to the pose deviation value to obtain a topological consistency evaluation result. According to the topological consistency evaluation result, a two-dimensional code with a pose deviation value that exceeds a preset range is subjected to coordinate relationship correction, and a corresponding relative position relationship and a relative attitude relationship in the initial coordinate mapping relationship are updated to generate a coordinate mapping relationship that is modified for consistency.

[0009] In an optional embodiment, the pose deviation value of each two-dimensional code is calculated according to the measured attitude vector set and the theoretical attitude vector set, and the spatial topological consistency of the reference two-dimensional code set is analyzed according to the pose deviation value to obtain a topological consistency evaluation result, which includes: According to the measured attitude vector set and the theoretical attitude vector set, the pose deviation value of each two-dimensional code is calculated, and the numerical distribution characteristics and directional distribution characteristics of the pose deviation value are analyzed; According to the numerical distribution characteristics and directional distribution characteristics, the deviation values of each two-dimensional code are clustered and analyzed to identify systematic deviation two-dimensional codes and random deviation two-dimensional codes, and the influence weight of each type of deviation on the spatial topological structure is calculated; According to the influence weight, the overall topological consistency degree of the reference two-dimensional code set is evaluated, and a topological consistency evaluation result containing the consistency degree and deviation distribution information is generated.

[0010] In an optional embodiment, the attitude compensation of the attitude vector set is performed according to the consistency-corrected coordinate mapping relationship to generate a current frame global coordinate system, which includes: According to the consistency-corrected coordinate mapping relationship, the theoretical pose data of the reference two-dimensional code set is recalculated and compared with the measured pose data to obtain the pose compensation value of each two-dimensional code; According to the pose compensation value and the comprehensive confidence score of each two-dimensional code, the measured pose data is subjected to weighted compensation processing to generate a compensated global reference pose; According to the compensated global reference pose, the current position information of the robot end effector is combined to generate a current frame global coordinate system with the compensated global reference pose as the reference.

[0011] In an optional embodiment, the trajectory planning of the robot end effector is performed according to the current frame global coordinate system to obtain end docking control instructions, and the trajectory re-evaluation of the end docking control instructions is performed when the current frame global coordinate system is updated to complete the end position docking control, which includes: According to the current frame global coordinate system and the target docking position, the trajectory planning of the robot end effector is performed to generate end docking control instructions containing path nodes and speed parameters, and the end docking control instructions are assigned with a coordinate system version identifier corresponding to the current frame global coordinate system; The real-time position state and motion state of the robot end effector are obtained, and the update of the current frame global coordinate system is monitored. When a change in the coordinate system version identifier is detected, the current execution progress is recorded and the coordinate system change amount is calculated; According to the coordinate system change amount and the current execution progress, it is judged whether to execute trajectory reevaluation processing, when the coordinate system change amount exceeds a set threshold, coordinate transformation correction is executed on the path nodes not executed in the end docking control instruction, and an updated end docking control instruction is generated; According to the updated end docking control instruction, the robot end effector is controlled to move, and when approaching the target docking position, the predicted docking accuracy is calculated, and when the predicted docking accuracy meets the accuracy requirement, the end position docking control is completed.

[0012] In an optional implementation, according to the coordinate system change amount and the current execution progress, it is judged whether to execute trajectory reevaluation processing, when the coordinate system change amount exceeds a set threshold, coordinate transformation correction is executed on the path nodes not executed in the end docking control instruction, and an updated end docking control instruction is generated, including: According to the numerical value of the coordinate system change amount, combined with the current motion speed of the robot end effector and the remaining path length, a trajectory offset prediction value is calculated, and when the trajectory offset prediction value exceeds a set threshold, it is determined that trajectory reevaluation processing needs to be executed; When it is determined that trajectory reevaluation processing needs to be executed, the current execution position in the end docking control instruction is obtained, and the path nodes not executed are classified into near-range nodes and far-range nodes according to the path length from the current execution position; Complete coordinate transformation correction is executed on the far-range nodes, linear interpolation correction is executed on the near-range nodes, and an updated end docking control instruction that maintains trajectory continuity is generated.

[0013] The technical scheme provided by the embodiments of the application generates a two-dimensional code switching sequence atlas by statistically analyzing historical operation trajectory data and two-dimensional code recognition records, and establishes a knowledge base containing robot motion modes and two-dimensional code use rules. The atlas not only records the historical recognition performance of each two-dimensional code, but more importantly, establishes the association between the switching path of two-dimensional codes and environmental risk factors. When the robot recognizes multiple two-dimensional codes in the current task, the system performs confidence evaluation on each two-dimensional code according to the atlas. This evaluation is not a simple image quality judgment, but a multi-dimensional analysis that considers historical reliability, path weight, and current recognition quality. Through this evaluation mechanism, the system can identify the most reliable reference two-dimensional code set and calculate the initial coordinate mapping relationship based on the current poses of these two-dimensional codes. This process avoids the problem of indiscriminately trusting all recognized two-dimensional codes in traditional methods, and establishes an intelligent screening mechanism based on historical data.

[0014] Subsequently, the system performs pose solving on the selected reference QR code set to obtain a set of pose vectors, and uses these actual measurement data to evaluate the spatial consistency of the previously established initial coordinate mapping relationship. This evaluation process can accurately detect whether the spatial topological relationship between the QR codes has changed by comparing the theoretical pose calculated based on the coordinate mapping relationship with the actual recognized pose. When inconsistency is detected, the system will modify the coordinate mapping relationship to generate a modified coordinate relationship that can reflect the current actual spatial layout. Based on this consistency-modified coordinate mapping relationship, the system performs compensation processing on the set of pose vectors to generate the current frame global coordinate system, ensuring the accuracy and timeliness of the coordinate system. During trajectory planning and execution, when the global coordinate system is updated due to new topological changes, the system will re-evaluate and modify the generated control instructions. This dynamic updating mechanism ensures that even in an environment where the spatial relationship of the QR codes is constantly changing, the robot can still perform precise docking based on the latest accurate coordinate information, fundamentally solving the problem of precision degradation in dynamic environments for traditional static calibration methods. BRIEF DESCRIPTION OF DRAWINGS

[0015] Figure 1 An embodiment diagram of the two-dimensional code-based robot end position precise docking technology in the embodiments of the present application. DETAILED DESCRIPTION

[0016] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0017] In modern industrial automation production, various types of robot systems are widely used in precision assembly, automatic welding, and high-precision operations such as part insertion. These robots may be fixed multi-joint manipulators, mobile AGV transport carts, collaborative robots, or track-based operation robots, which all need to achieve millimeter-level or even sub-millimeter-level precise docking of the end effector with the target object in complex working environments. Whether it is to accurately insert electronic components into a circuit board, automatically assemble automobile parts, or perform precision assembly of medical devices, this precise docking capability directly determines the product quality and production efficiency. In order to guide the robot to achieve such high-precision positioning, engineers usually arrange multiple two-dimensional code markers in the working area. These two-dimensional codes not only provide spatial position references, but more importantly, they can build a coordinate reference network covering the entire work range, forming a stable spatial topological relationship (i.e., mutual position and attitude constraint relationship) between each two-dimensional code, supporting continuous positioning during large-scale movement and precise switching between multiple workstations.

[0018] However, in actual industrial environments, these two-dimensional code markers are exposed to complex environmental factors such as mechanical vibration, temperature change, thermal expansion and contraction, etc. for a long time, and the originally fixed spatial geometric relationship between them will change slightly but continuously. For example, vibration on the production line can cause the support of the fixed two-dimensional code to loosen, thermal expansion and contraction in a high-temperature working environment can cause the installation base to deform, and frequent equipment maintenance and workpiece replacement can also cause cumulative displacement of the two-dimensional code position. These seemingly insignificant changes can disrupt the spatial topological consistency of the multi-two-dimensional code system, causing positioning errors when the robot plans a path based on outdated coordinate mapping relationships, ultimately leading to a decrease in docking accuracy or even docking failure. Traditional solutions usually rely on periodic re-calibration, but this method cannot cope with dynamic changes in the working environment. Therefore, the present application proposes a two-dimensional code-based robot end position precise docking technology, please refer to Figure 1 The technology includes: Statistical analysis of historical operation trajectory data and two-dimensional code recognition records to obtain a two-dimensional code switching sequence graph; According to the two-dimensional code switching sequence graph, perform confidence evaluation on the multiple two-dimensional codes currently recognized to obtain a reference two-dimensional code set and an initial coordinate mapping relationship corresponding to the reference two-dimensional code set; Perform pose solving on the reference two-dimensional code set to obtain a set of attitude vectors, and perform spatial consistency evaluation on the initial coordinate mapping relationship according to the set of attitude vectors to obtain a consistency-modified coordinate mapping relationship; According to the consistency-modified coordinate mapping relationship, perform attitude compensation on the set of attitude vectors to generate a current frame global coordinate system; According to the current frame global coordinate system, trajectory planning is performed on the robot end effector to obtain end docking control instructions, and when the current frame global coordinate system is updated, trajectory reevaluation is performed on the end docking control instructions to complete end position docking control.

[0019] In an embodiment of the present application, the historical operation trajectory data and the two-dimensional code recognition record are statistically analyzed to obtain a two-dimensional code switching sequence atlas, including: The spatial position sequence of the robot end effector and the two-dimensional code recognition record at each position in the historical operation trajectory data are obtained, the operation area is divided into multiple spatial regions according to the spatial position sequence, and the recognition frequency and recognition confidence value of the two-dimensional code in each spatial region are counted; According to the movement trajectory of the robot between adjacent spatial regions in the spatial position sequence, the access sequence of the two-dimensional code when switching between regions is extracted, the switching mode of the two-dimensional code in the access sequence is analyzed, and a set of two-dimensional code switching paths is obtained; According to the environmental parameters of each region in the multiple spatial regions, the temperature variation amplitude and vibration intensity of each switching path in the set of two-dimensional code switching paths are calculated, and the environmental risk coefficients of each switching path are obtained; According to the recognition frequency, recognition confidence value and environmental risk coefficient, each switching path in the set of two-dimensional code switching paths is assigned a path weight, and a two-dimensional code switching sequence atlas containing two-dimensional code nodes, switching paths and path weights is generated.

[0020] The following is a specific description of the above embodiment: In the process of the robot performing the docking task, the system continuously records the three-dimensional coordinate position of the robot end effector through the encoder and position sensor of the robot control system, forming a spatial position sequence containing x, y, z coordinate values and time stamps. At the same time, the industrial camera installed on the robot performs image acquisition and identification processing on the two-dimensional codes in the field of view at each position point, records the number identification of the two-dimensional code, identifies whether it is successful, and outputs the confidence score of the image processing algorithm. The system divides the work area into several rectangular space regions according to actual needs using a fixed grid division method, and the division size is determined according to the robot work range, for example, dividing the 3m x 4m assembly table into 12 1m x 1m regions. After division, the system traverses the historical record data, counts the number of times each two-dimensional code in each space region is successfully identified as the identification frequency, and calculates the average confidence value of all identification records of the two-dimensional code in this region as the identification confidence value. The confidence value reflects the confidence level of the image processing algorithm for the two-dimensional code identification result, the value range is 0 to 1, and the closer to 1 indicates that the identification is more reliable. For example, two-dimensional code QR001 is identified 180 times in region A with an average confidence of 0.91, indicating that the two-dimensional code has high identification stability at this position. This regional statistical analysis provides quantitative data support for the reliability evaluation of two-dimensional codes in different spatial positions.

[0021] The system detects the region switching behavior of the robot by analyzing the coordinate changes of adjacent time points in the spatial position sequence. When the position coordinates of the robot end effector move from one space region to an adjacent space region, the system identifies this process as a region switching event. In each region switching process, the system records the two-dimensional code sequence recognized by the robot in sequence, forming an access sequence. The access sequence refers to the list of two-dimensional code numbers recognized by the robot in time sequence on the moving path. After collecting a large number of access sequences, the system uses sequence pattern mining algorithm to analyze the regularity, and identifies the frequently appearing two-dimensional code switching pattern. The switching pattern refers to the connection relationship of two-dimensional codes that often appears in multiple movements, such as QR001 to QR005, which appears 85 times in 100 movement records, indicating that this is a stable switching path. Based on the identified switching pattern, the system constructs a set of two-dimensional code switching paths, each path records the starting two-dimensional code, the target two-dimensional code and the possible transfer two-dimensional code node. This analysis based on the actual motion trajectory ensures that the extracted switching path conforms to the actual work mode of the robot, and provides real and reliable path topology information for subsequent evaluation.

[0022] The system acquires environmental parameter data through temperature and vibration sensors deployed in various spatial areas. Temperature sensors measure changes in ambient temperature, while vibration sensors measure the vibration acceleration generated by the equipment's operation. For each switching path in the QR code switching path set, the system identifies all spatial areas traversed by the path and extracts temperature and vibration data from these areas. The temperature change amplitude is obtained by calculating the difference between the highest and lowest temperature values ​​in the areas traversed by the path. For example, if a path passes through a normal temperature area (25℃) and a high-temperature welding area (70℃), the temperature change amplitude is 45℃. Vibration intensity is obtained by calculating the average vibration acceleration in the areas traversed by the path, in m / s². After normalizing the temperature change amplitude and vibration intensity, the system calculates the environmental risk coefficient using a weighted summation method: Environmental Risk Coefficient = 0.6 × (Temperature Change Amplitude / 100) + 0.4 × (Vibration Intensity / 10), where the weighting coefficients 0.6 and 0.4 are determined based on engineering experience regarding the impact of temperature and vibration on the stability of the QR code fixing device. The higher the environmental risk coefficient, the greater the risk of QR code position shift due to environmental factors during the switching path. This provides a quantitative assessment basis for identifying path areas prone to topological changes.

[0023] The system employs a multi-factor comprehensive evaluation method to assign path weights to each switching path, comprehensively considering three factors: identification frequency, identification confidence score, and environmental risk coefficient. During path weight calculation, identification frequency and identification confidence score are used as positive indicators (higher values ​​indicate a more reliable path), while the environmental risk coefficient is used as a negative indicator (higher values ​​indicate a higher path risk). The system first normalizes the three indicators, unifying their values ​​to between 0 and 1. Then, it uses a weighted average method to calculate the path weight: Path weight = 0.4 × Normalized identification frequency + 0.3 × Normalized identification confidence score + 0.3 × (1 - Normalized environmental risk coefficient). After calculation, the system generates a QR code switching sequence map, which is stored using a node-edge graph data structure. QR code nodes store the QR code number, location coordinates, and statistical information. Switching paths, as edges connecting nodes, store the start and end QR code information, and path weights, as attribute values ​​of the edges, record the path's reliability. This structured map provides the robot with a complete historical reference database when performing the current task, enabling the system to intelligently select the optimal QR code reference source based on historical operating experience and environmental risk assessment, thereby improving the reliability and accuracy stability of the multi-QR code positioning system in complex and dynamic environments.

[0024] In one embodiment of the present invention, the step of performing confidence evaluation on multiple currently identified QR codes based on the QR code switching sequence map to obtain a reference QR code set and an initial coordinate mapping relationship corresponding to the reference QR code set includes: Obtain the identification information of multiple currently identified QR codes, find the corresponding QR code node in the QR code switching sequence map based on the identification information, and extract the path weight and historical recognition frequency of each QR code node. Obtain the image recognition confidence scores of multiple currently recognized QR codes, and calculate the comprehensive confidence score of each QR code based on the image recognition confidence scores, path weights, and historical recognition frequencies. The multiple QR codes currently identified are sorted according to the comprehensive confidence score, and the top N QR codes with the highest comprehensive confidence scores are selected as candidate QR codes. From the candidate QR codes, combinations of QR codes with independent spatial locations are selected as a reference QR code set. Based on the current recognition pose of each QR code in the reference QR code set, the relative positional relationship and relative pose relationship between the QR codes are calculated, and the initial coordinate mapping relationship corresponding to the reference QR code set is generated.

[0025] The following provides a detailed description of the above embodiments: When the robot begins its current docking task, the system uses an industrial camera to capture and recognize images of QR codes within its field of view, obtaining the identification information for each QR code. The identification information refers to the unique identifier encoded within each QR code, such as QR001, QR005, etc. The system uses this identification information as an index key to perform node lookup operations in the QR code switching sequence graph, locating the corresponding QR code node record using a hash table retrieval method. The system traverses all nodes in the graph, matching the QR code number stored in the node with the currently recognized identification information. Once a matching node is found, it directly extracts the path weight and historical recognition frequency data stored in that node. For example, if the system currently recognizes QR001 and QR007, the graph shows that the path weight of node QR001 is 0.85 and its historical recognition frequency is 342 times, while the path weight of node QR007 is 0.73 and its historical recognition frequency is 198 times. This historical data-based extraction method allows the system to obtain the historical performance information of the currently recognized QR codes, avoiding the time-consuming process of repetitive statistical calculations.

[0026] The system obtains the image recognition confidence score of multiple currently recognized QR codes through image processing algorithms. The image recognition confidence score is a numerical value calculated by the image recognition algorithm based on factors such as QR code image clarity, edge detection integrity, and decoding verification success rate. The value ranges from 0 to 1, with values ​​closer to 1 indicating more reliable recognition results. The system uses a three-factor weighted average method to calculate the comprehensive confidence score of each QR code. Specifically, the image recognition confidence score is multiplied by a weight of 0.4, the path weight by a weight of 0.3, and the normalized historical recognition frequency by a weight of 0.3. These three factors are then added together to obtain the final score. Normalization involves dividing the current QR code's historical recognition frequency by the maximum historical recognition frequency among all recognized QR codes, unifying the value to between 0 and 1. The weight coefficients are set based on the statistical results of the influence of various factors on positioning accuracy in multi-QR code positioning experiments. The current recognition quality accounts for 40% of the weight, reflecting the importance of real-time accuracy, while historical data accounts for 60% of the weight, reflecting the value of empirical reliability. For example, if the image recognition confidence score of QR001 is 0.92, the path weight is 0.85, and the normalized historical recognition frequency is 0.89, then the overall confidence score is 0.888. This multi-dimensional fusion scoring avoids the one-sidedness of relying solely on the current image quality and provides a more stable and reliable basis for QR code selection.

[0027] The system sorts multiple identified QR codes in descending order based on their comprehensive confidence scores, with higher-scoring QR codes appearing first. The system selects the top N QR codes from the sorted results as candidate QR codes. The value of N is determined based on the robot's operational accuracy requirements; for precision assembly tasks, N is 6-8 values, while for general docking tasks, N is 4-6 values. When selecting spatially independent QR code combinations from the candidate QR codes, the system first calculates the three-dimensional Euclidean distance between each candidate QR code. This distance calculation is based on the QR code's spatial coordinate position in the camera coordinate system. The criteria for determining spatial independence include two conditions: the straight-line distance between QR codes must be greater than a minimum distance threshold of 1.5 meters, and the difference in viewing angle between each QR code and the camera must be greater than a minimum angle threshold of 30 degrees. The difference in viewing angle is obtained by calculating the angle between the direction vectors from the camera center to the center of each QR code. The system uses a greedy algorithm for sequential selection, first selecting the QR code with the highest comprehensive confidence score, and then sequentially selecting other QR codes that meet the independence conditions and have high scores, until a reference QR code set containing 3-4 QR codes is formed. For example, among the six candidate QR codes, the system ultimately selected QR001, QR005, and QR012. The pairwise distances between these codes are 2.1 meters, 2.8 meters, and 3.2 meters, respectively, and the differences in their viewing angles are 35 degrees, 42 degrees, and 38 degrees, all satisfying the independence requirement. This selection strategy ensures good geometric diversity in the spatial distribution of the reference QR codes, providing stable geometric constraints for pose calculation.

[0028] The system employs the Perspective-n-Point (PnP) algorithm to calculate the current recognition pose of each QR code in the reference QR code set. The PnP algorithm is a standard algorithm in computer vision used to solve for camera pose based on known 3D point coordinates and corresponding 2D image point coordinates; in this scheme, it is used to calculate the spatial pose of the QR code relative to the camera. The algorithm inputs are the pixel coordinates of the four corner points of the QR code in the image and the actual physical size of the QR code. The output is six-degree-of-freedom pose information including position coordinates (x, y, z) and attitude angles (rotation angles around the x-axis, y-axis, and z-axis). Based on the obtained QR code pose data, the system calculates the relative positional and attitude relationships between the QR codes. The relative positional relationship is obtained by calculating the vector difference between the position coordinates of any two QR codes, and the relative attitude relationship is obtained by calculating the angle difference between the attitude angles of two QR codes and converting it into a rotation transformation matrix. The system stores all relative relationship data between QR codes in the form of a 4×4 homogeneous transformation matrix. The first 3×3 submatrix of each transformation matrix represents the rotation relationship, and the first 3 elements of the 4th column represent the translation relationship. For example, QR001 is located at coordinates (1.2, 0.5, 0.8) with an attitude angle of (5°, -10°, 15°), and QR005 is located at coordinates (2.4, -0.3, 0.9) with an attitude angle of (3°, -8°, 20°). Their relative positional relationship is a vector (1.2, -0.8, 0.1), and their relative attitude relationship is the difference in rotation angles around each axis (-2°, 2°, 5°). The system organizes the relative relationships between all QR codes in the reference QR code set into a relationship matrix, generating an initial coordinate mapping relationship. This coordinate mapping relationship, based on the actual measured pose, truly reflects the spatial layout state of the QR codes at the current moment, providing an accurate reference benchmark for subsequent detection of changes in spatial topology.

[0029] In one embodiment of the present invention, the step of sorting the currently identified multiple QR codes according to the comprehensive confidence score, selecting the top N QR codes with the highest comprehensive confidence scores as candidate QR codes, and selecting spatially independent combinations of QR codes from the candidate QR codes as a reference QR code set includes: Based on the comprehensive confidence score, the currently identified QR codes are sorted in descending order, and the top N QR codes in the sorting result are selected as candidate QR codes. The minimum spatial distance and maximum viewing angle difference between the candidate QR codes are then calculated. Based on the minimum spatial distance and the maximum viewing angle difference, the candidate QR codes are evaluated for geometric independence. Redundant QR codes with a minimum spatial distance less than a distance threshold or a maximum viewing angle difference less than an angle threshold are removed to obtain a geometrically independent subset of QR codes. The geometrically independent subset of QR codes is reordered according to the confidence weighted value. QR codes that maintain geometric independence from the selected QR codes are selected in the sorting order until the number of selected QR codes meets the requirements of the reference set, thus forming a reference QR code set.

[0030] The following provides a detailed description of the above embodiments: The system sorts the currently identified QR codes in descending order based on a comprehensive confidence score, using a fast sorting algorithm to prioritize QR codes with higher scores. The system then selects the top N QR codes from the sorted results as candidate QR codes. For each selected candidate QR code, the system calculates the minimum straight-line distance between all pairs of QR codes as the minimum spatial distance, and the maximum angle between the direction vectors from the camera center to the center of each QR code as the maximum angular difference. For example, among five candidate QR codes, if the distance of 1.2 meters between QR001 and QR003 is the minimum distance among all QR code pairs, and the 52-degree angle between the viewing angles of QR005 and QR007 is the maximum angular difference, these are recorded as the minimum spatial distance and the maximum angular difference, respectively. This global geometric feature calculation provides a unified standard for subsequent independence assessment.

[0031] The system performs geometric independence evaluation on candidate QR codes based on minimum spatial distance and maximum viewing angle difference. The system sets a distance threshold of 1.5 meters and an angle threshold of 30 degrees. The distance threshold ensures sufficient physical spacing between QR codes to avoid mutual influence from local interference, while the angle threshold ensures that the QR codes have different viewing directions within the camera's field of view, providing diverse geometric constraints. The system iterates through all candidate QR codes, checking the minimum distance and viewing angle difference between each QR code and any other QR code. When a QR code is less than 1.5 meters away from any other QR code or its viewing angle difference is less than 30 degrees, the system marks it as a redundant QR code. In cases of redundancy, the system retains the QR code with the higher overall confidence score and discards the QR code with the lower score. For example, if QR002 and QR004 are only 1.1 meters apart and QR002 has an overall confidence score of 0.75 while QR004 has 0.82, the system discards QR002 and retains QR004. The remaining QR codes constitute a geometrically independent subset. This rigorous geometric selection ensures that the selected QR code provides a stable and non-interfering geometric reference for pose calculation.

[0032] The system calculates the confidence weighted value of each QR code in the geometrically independent QR code subset and reorders them. The confidence weighted value is the product of the overall confidence score and the spatial distribution weight. The spatial distribution weight is calculated based on the uniformity of the QR code distribution in the work area. The calculation method is as follows: taking the geometric center of the work area as the reference point, calculate the distance from each QR code to the reference point. The QR code whose distance is closer to half the length of the area's diagonal receives a higher spatial distribution weight, with a weight range of 0.8 to 1.2. The system sorts the QR code subsets in descending order of confidence weighted value and then uses a greedy selection strategy to select QR codes sequentially. The specific execution process of the greedy selection strategy is as follows: first, select the QR code with the highest confidence weighted value and add it to the reference set. Then, iterate through the remaining QR codes and select the QR code with the highest confidence weighted value that meets the minimum distance of 1.5 meters and the minimum viewing angle of 30 degrees, along with the selected QR codes. Repeat this process until the reference set contains the required number of QR codes. The required number is determined based on the positioning accuracy requirements; high-precision tasks require 4, and general-precision tasks require 3. For example, from six geometrically independent QR codes, three QR codes—QR001, QR005, and QR008—are selected sequentially with confidence weighting values ​​of 0.94, 0.89, and 0.86. This selection strategy maximizes the overall reliability of the reference QR codes while satisfying geometric constraints, providing the optimal QR code combination for accurate positioning.

[0033] In one embodiment of the present invention, the step of performing pose calculation on the reference QR code set to obtain a pose vector set, and performing spatial consistency evaluation on the initial coordinate mapping relationship based on the pose vector set to obtain a consistency-corrected coordinate mapping relationship, includes: Image pose calculation is performed on each QR code in the reference QR code set to obtain the measured pose data of each QR code, and the theoretical pose data of each QR code is calculated according to the initial coordinate mapping relationship. The measured pose data and the theoretical pose data are combined to form a measured pose vector set and a theoretical pose vector set, respectively. Based on the measured attitude vector set and the theoretical attitude vector set, the pose deviation value of each QR code is calculated, and the spatial topological consistency of the reference QR code set is analyzed based on the pose deviation value to obtain the topological consistency evaluation result. Based on the topology consistency evaluation results, coordinate relationships are corrected for QR codes whose pose deviation values ​​exceed the preset range. The relative position and relative posture relationships in the initial coordinate mapping relationship are updated to generate a coordinate mapping relationship that has been corrected for consistency.

[0034] The following provides a detailed description of the above embodiments: The system performs image pose calculation on each QR code in the reference QR code set, using the PnP algorithm to calculate the measured pose data of each QR code. The measured pose data includes the actual spatial coordinates and attitude angle information of the QR code at the current moment, reflecting the spatial state of the QR code in the real physical environment. Simultaneously, the system calculates the theoretical pose data of each QR code based on the initial coordinate mapping relationship. The theoretical pose data is the position and attitude that each QR code should be in, deduced from the relative relationships between QR codes recorded in the initial coordinate mapping relationship, representing the expected spatial state of the QR code in an ideal static environment. During the calculation process, the system selects the QR code with the highest comprehensive confidence score in the reference QR code set as the benchmark point. Using its measured pose as a reference, and combining the relative transformation matrix stored in the initial coordinate mapping relationship, the system sequentially calculates the theoretical pose data of other QR codes. For example, taking QR001 as the reference point, its measured pose is position (1.2, 0.8, 0.9) and attitude angle (5°, -8°, 12°). Based on the relative transformation relationship from QR001 to QR005 in the initial coordinate mapping relationship, the theoretical pose of QR005 should be calculated as position (2.1, 0.3, 1.0) and attitude angle (3°, -6°, 15°). The system arranges and combines the measured pose data of each QR code in the order of QR code number to form a set of measured pose vectors, and combines the theoretical pose data in the same order to form a set of theoretical pose vectors. This dual pose data acquisition method provides a comparison benchmark for detecting changes in the spatial relationship of QR codes, enabling the system to identify the differences between the actual layout and the expected layout.

[0035] The system calculates the pose deviation value of each QR code based on the measured pose vector set and the theoretical pose vector set. The pose deviation value is obtained by calculating the difference between the measured pose data and the theoretical pose data of the corresponding QR code, including two parts: position deviation and attitude deviation. The position deviation is obtained by calculating the difference between the three-dimensional vectors of the measured position coordinates and the theoretical position coordinates and obtaining their magnitude. The attitude deviation is obtained by calculating the difference between the measured attitude angle and the theoretical attitude angle and obtaining their absolute value. The system analyzes the spatial topological consistency of the reference QR code set based on the calculated pose deviation values. Spatial topological consistency analysis refers to the process of evaluating whether the relative spatial relationship between QR codes remains stable. The analysis method is as follows: when the pose deviation values ​​of most QR codes are within a small range (position deviation less than 3 mm, attitude deviation less than 2 degrees), the spatial topological consistency is considered good; when some QR codes show large deviations, the deviation distribution pattern is further analyzed to distinguish whether it is a global drift or a local change. For example, if the positional deviations of QR001, QR005, and QR008 are 1.8 mm, 2.1 mm, and 1.6 mm respectively, while the positional deviation of QR012 is 8.5 mm, then it is judged as a local change, and QR012 has experienced a positional shift. The system generates a topological consistency evaluation result that includes the consistency level and deviation distribution characteristics. This quantitative consistency analysis can accurately identify the type and scope of change in the spatial relationship of the QR codes, providing accurate diagnostic information for subsequent correction operations.

[0036] The system corrects the coordinate relationships of QR codes whose pose deviations exceed a preset range based on the topology consistency evaluation results. The preset range is set at a position deviation exceeding 5 mm or an attitude deviation exceeding 3 degrees. This range is determined based on the robot docking accuracy requirements; deviations exceeding this range will significantly affect the final positioning accuracy. The coordinate relationship correction adopts a local update strategy, that is, only correcting the relative relationship between the QR code with abnormal deviation and other QR codes, while maintaining the relative relationship between QR codes with good consistency. During the correction process, the system uses the QR code with the smaller deviation as a stable reference point, recalculates the relative position and attitude relationships between the abnormal QR code and each reference point, and updates the corresponding transformation matrix elements in the initial coordinate mapping relationship with the corrected relative relationship data. For example, if QR012 has an abnormal deviation, the system uses QR001, QR005, and QR008 as stable reference points, recalculates the relative transformation relationship between QR012 and the three reference points based on the measured pose of QR012, and replaces the corresponding records in the initial coordinate mapping relationship with the new transformation data. After the correction is completed, the system generates a coordinate mapping relationship corrected for consistency. This selective correction strategy avoids the problem of individual QR code offsets affecting the overall coordinate system, ensuring the consistency of coordinate mapping with the current actual spatial layout, and providing an accurate geometric reference for subsequent attitude compensation.

[0037] In one embodiment of the present invention, the step of calculating the pose deviation value of each QR code based on the measured pose vector set and the theoretical pose vector set, and analyzing the spatial topological consistency of the reference QR code set based on the pose deviation value to obtain the topological consistency evaluation result includes: Based on the measured attitude vector set and the theoretical attitude vector set, calculate the pose deviation value of each QR code, and analyze the numerical distribution characteristics and directional distribution characteristics of the pose deviation value. Based on the numerical distribution characteristics and directional distribution characteristics, cluster analysis is performed on the deviation values ​​of each QR code to identify QR codes with systematic deviations and QR codes with random deviations, and the influence weights of various deviations on the spatial topology are calculated. Based on the aforementioned influence weights, the overall topological consistency of the reference QR code set is evaluated, and a topological consistency evaluation result containing information on the degree of consistency and the distribution of deviations is generated.

[0038] The following provides a detailed description of the above embodiments: The system calculates the pose deviation values ​​for each QR code based on the measured and theoretical pose vector sets, and analyzes the numerical and directional distribution characteristics of these deviation values. The system obtains the pose deviation values, including positional and orientation deviations, by calculating the difference between the measured and theoretical poses of the corresponding QR code. The numerical distribution characteristic analysis employs statistical methods to calculate the mean and standard deviation of all deviation values. The mean reflects the overall magnitude of the deviation, while the standard deviation reflects the degree of dispersion. The directional distribution characteristic analysis is achieved by calculating the directional angle of the position deviation vector for each QR code. The deviation vector is a three-dimensional vector pointing from the theoretical position to the measured position, and the directional angle is obtained by calculating the angle between this vector and the horizontal plane. The system statistically analyzes the distribution patterns of the directional angles of each deviation to identify any directional concentration phenomena. For example, the positional deviations of four QR codes are 2.1 mm, 8.3 mm, 2.4 mm, and 1.9 mm, with a calculated mean deviation of 3.7 mm and a standard deviation of 3.1 mm. If the deviation angles of three of the QR codes are 42 degrees, 45 degrees, and 38 degrees respectively, showing a concentrated distribution characteristic, while the other is -15 degrees, showing a significant difference, this dual-feature analysis can identify the regularity of deviations in both numerical magnitude and spatial direction, distinguishing between systematic and random changes.

[0039] The system classifies QR codes based on their numerical and directional distribution characteristics to identify deviations. A threshold-based classification method is used, setting a numerical deviation threshold of 5 mm and an angular difference threshold of 20 degrees. During classification, the system first calculates the difference between each QR code's deviation value and the overall mean, then calculates the angular difference between each QR code's deviation direction and the main deviation direction. The main deviation direction is obtained by averaging the angles of all deviation directions. When a QR code's deviation value is greater than 5 mm and its angular difference from the main deviation direction is less than 20 degrees, it is identified as a systematically biased QR code; when the deviation value is less than 5 mm or the angular difference is greater than 20 degrees, it is identified as a randomly biased QR code. Systematically biased QR codes represent a group of QR codes influenced by common environmental factors, while randomly biased QR codes represent independent QR codes primarily affected by measurement noise. The system calculates the impact weight of various deviations on the spatial topology. The impact weight is equal to the product of the deviation value and the directional consistency coefficient. The directional consistency coefficient is determined based on the angular difference between the deviation direction and the main direction: 1.0 for an angular difference less than 10 degrees, 0.7 for 10-20 degrees, and 0.3 for greater than 20 degrees. For example, QR001 has a deviation of 8.3 mm and a directional angular difference of 5 degrees, identified as a systematic deviation with an impact weight of 8.3 × 1.0 = 8.3; QR012 has a deviation of 1.9 mm and a directional difference of 25 degrees, identified as a random deviation with an impact weight of 1.9 × 0.3 = 0.57. This classification and identification allows the system to distinguish between genuine spatial structure changes and measurement errors, avoiding incorrect corrections due to noise.

[0040] The system assesses the overall topological consistency of the reference QR code set based on influence weights. The system calculates a weighted average of the influence weights of all QR codes as the base value for overall consistency, and then normalizes the value to a range of 0-1. The normalization method is as follows: divide the weighted average by a preset maximum deviation benchmark of 10 mm to obtain the consistency value. The closer the value is to 0, the better the consistency; the closer it is to 1, the more severe the topological changes. The system generates a topological consistency evaluation result containing consistency level and deviation distribution information. The deviation distribution information is stored in a structured data format, including a list of QR code numbers with systematic deviations, a list of QR code numbers with random deviations, the main deviation direction angle, and the specific influence weight value for each QR code. For example, the evaluation result shows an overall consistency level of 0.35, with systematic deviation QR codes QR001 and QR005, the main deviation direction being 42 degrees northeast, and random deviation QR codes QR008 and QR012, with influence weights of 8.3, 7.1, 0.8, and 0.57 respectively. This quantitative evaluation provides clear operational guidelines for subsequent coordinate correction, enabling the system to compensate for systematic deviations while ignoring the interference of random deviations, thus significantly improving the accuracy, stability, and adaptive correction capabilities of the multi-QR code positioning system in dynamic environments.

[0041] In one embodiment of the present invention, the step of performing attitude compensation on the attitude vector set according to the consistency-corrected coordinate mapping relationship to generate the current frame global coordinate system includes: Based on the coordinate mapping relationship that has been corrected for consistency, the theoretical pose data of the reference QR code set is recalculated and compared with the measured pose data to obtain the pose compensation value of each QR code. Based on the pose compensation values ​​and the comprehensive confidence scores of each QR code, the measured pose data is subjected to weighted compensation processing to generate a compensated global reference pose. Based on the compensated global reference pose and the current position information of the robot's end effector, a current frame global coordinate system is generated with the compensated global reference pose as the reference.

[0042] The following provides a detailed description of the above embodiments: The system recalculates the theoretical pose data of the reference QR code set based on the consistent coordinate mapping relationship. The system selects the QR code with the highest overall confidence score in the reference QR code set as the calculation benchmark. Using its measured pose data as the starting reference, and combining the updated relative transformation matrix stored in the consistent coordinate mapping relationship, the system sequentially calculates the corrected theoretical pose data for other QR codes. The corrected theoretical pose data represents the spatial position and orientation of each QR code calculated based on the corrected coordinate mapping relationship, signifying the ideal spatial state after eliminating the influence of topological drift. The calculation process uses a matrix transformation method, performing matrix multiplication on the measured pose data of the benchmark QR code and the relative transformation matrices of other QR codes to obtain the corrected theoretical pose data for the other QR codes. The system compares the corrected theoretical pose data with the measured pose data of each QR code one by one, calculating the difference between the two as the pose compensation value. The pose compensation value includes position compensation and attitude compensation. The position compensation is obtained by calculating the three-dimensional vector difference between the corrected theoretical position and the measured position, and the attitude compensation is obtained by calculating the angle difference between the corrected theoretical attitude angle and the measured attitude angle. For example, taking QR001 as the reference point, its measured pose is position (1.2, 0.8, 0.9) and attitude (5°, -8°, 12°). Based on the corrected coordinate mapping relationship, the corrected theoretical pose of QR005 is calculated as position (2.3, 0.4, 1.1) and attitude (3°, -5°, 14°), while the measured pose of QR005 is position (2.1, 0.6, 1.0) and attitude (4°, -7°, 16°). Therefore, the pose compensation values ​​are position compensation (0.2, -0.2, 0.1) and attitude compensation (-1°, 2°, -2°). This compensation calculation based on the corrected mapping relationship eliminates the influence of topology drift on pose estimation and provides an accurate basis for pose correction.

[0043] The system performs weighted compensation processing on the measured pose data based on the pose compensation values ​​and the comprehensive confidence scores of each QR code. Weighted compensation processing involves assigning different weights to the pose compensation values ​​of each QR code according to their reliability, and then performing weighted correction on the measured pose data. The system uses the comprehensive confidence scores of each QR code as weighting coefficients; the higher the comprehensive confidence score, the greater the weight of the pose compensation value in the final compensation calculation. The system uses a weighted average method to calculate the compensated global reference pose. The calculation process is as follows: the measured pose data of each QR code is added to the corresponding pose compensation value to obtain the compensated pose; then, each compensated pose is multiplied by its corresponding comprehensive confidence score as a weight; all weighted results are summed and divided by the total weight to obtain the compensated global reference pose. The compensated global reference pose contains a unified position coordinate and attitude angle, representing the optimal spatial reference benchmark after topology correction and confidence weighting. For example, the compensated pose of QR001 is (1.2, 0.8, 0.9) with a weight of 0.88, the compensated pose of QR005 is (2.3, 0.4, 1.1) with a weight of 0.82, and the compensated pose of QR008 is (0.8, 1.5, 0.7) with a weight of 0.79. The compensated global reference pose is calculated as (1.4, 0.9, 0.9) through weighted averaging. This multi-QR code weighted fusion strategy fully utilizes the complementary information of each QR code, significantly improving the accuracy and stability of the global reference pose.

[0044] The system generates the current frame global coordinate system based on the compensated global reference pose and the current position information of the robot's end effector. The system acquires the current position information of the robot's end effector, including its position coordinates and attitude angles in the robot's base coordinate system, through the robot controller's encoder and sensors. The current frame global coordinate system is a three-dimensional coordinate system established with the compensated global reference pose as the spatial reference. The origin of this coordinate system is set to the position coordinates of the compensated global reference pose, and the direction of the coordinate system is set to the attitude direction of the compensated global reference pose. The system stores the current frame global coordinate system in the form of a homogeneous transformation matrix, which contains the complete geometric transformation relationship from the robot's base coordinate system to the global coordinate system. During generation, the system converts the compensated global reference pose into a 4×4 transformation matrix format. The rotation part of the matrix is ​​calculated from the attitude angles, and the translation part is determined by the position coordinates. For example, if the compensated global reference pose is position (1.4, 0.9, 0.9) and attitude (4°, -6°, 13°), the system converts it into the corresponding transformation matrix as the mathematical representation of the current frame global coordinate system. This global coordinate system establishment method based on multi-QR code fusion and topology correction ensures a high degree of consistency between the coordinate system and the current actual spatial environment, providing an accurate and reliable spatial reference benchmark for subsequent robot trajectory planning and precise docking, and effectively solving the problem of accuracy degradation of traditional static coordinate systems in dynamic environments.

[0045] In one embodiment of the present invention, the step of performing trajectory planning for the robot end effector based on the current frame global coordinate system to obtain end-effector docking control commands, and re-evaluating the trajectory of the end-effector docking control commands when the current frame global coordinate system is updated to complete the end-effector position docking control, includes: Based on the current frame global coordinate system and the target docking position, trajectory planning processing is performed on the robot end effector to generate end-effector docking control instructions containing path nodes and velocity parameters, and a coordinate system version identifier corresponding to the current frame global coordinate system is assigned to the end-effector docking control instructions. The system acquires the real-time position and motion status of the robot's end effector, monitors the update status of the global coordinate system in the current frame, and records the current execution progress and calculates the coordinate system change when a change in the coordinate system version identifier is detected. Based on the coordinate system change and the current execution progress, it is determined whether to perform trajectory reassessment. When the coordinate system change exceeds the set threshold, coordinate transformation correction is performed on the path nodes that have not been executed in the end docking control command, and an updated end docking control command is generated. The robot's end effector is controlled to move according to the updated end-point docking control command, and the predicted docking accuracy is calculated when it approaches the target docking position. When the predicted docking accuracy meets the accuracy requirements, the end-point position docking control is completed.

[0046] The following provides a detailed description of the above embodiments: The system performs trajectory planning for the robot's end effector based on the current frame's global coordinate system and the target docking position. First, the system acquires the spatial coordinates and attitude information of the target docking position. This information is either user-defined or provided by the task planning system, including the precise position coordinates of the docking point in the current frame's global coordinate system and the required attitude angle. The trajectory planning process uses a fifth-order polynomial interpolation algorithm to generate a smooth motion trajectory between the robot's end effector's current position and the target docking position. During planning, the system decomposes the trajectory into multiple path nodes. Each path node is a discrete spatial point on the trajectory, containing position coordinates, attitude angle, and arrival time information. The node spacing is set according to the docking accuracy requirements; for high-precision tasks, the node spacing is 2-5 mm, and for general-precision tasks, it is 5-10 mm. The system calculates the corresponding velocity parameters for each path node, including linear and angular velocity values, obtained by numerical differentiation of the position and time differences between adjacent nodes. The generated end-effector docking control commands are stored in a structured data format, containing a sequence of path nodes and corresponding velocity parameter sequences. The system assigns a coordinate system version identifier to each end-of-line docking control command. This identifier is a unique numerical code that marks the version status of the current frame's global coordinate system upon which the control command is based. For example, if the current frame's global coordinate system version identifier is V2025-001, then the corresponding end-of-line docking control command is marked as having the same version. This version identifier mechanism allows the system to track the correspondence between control commands and coordinate systems, avoiding control command failures caused by coordinate system updates.

[0047] The system acquires the real-time position and motion status of the robot's end effector through the robot controller's encoder and sensors, and continuously monitors the updates of the global coordinate system in the current frame. Real-time position status includes the end effector's position coordinates and attitude angles in the current frame's global coordinate system, while motion status includes the end effector's linear velocity, angular velocity, and acceleration values. The system uses a periodic check method to monitor the updates of the current frame's global coordinate system, with a check period set to 100 milliseconds to ensure timely detection of coordinate system changes. During monitoring, the system compares the version identifier of the current frame's global coordinate system with the version identifier stored in the end effector docking control commands. When a discrepancy is detected, the system considers the coordinate system version identifier to have changed. The system records the current execution progress, which refers to the percentage of path nodes completed by the robot's end effector during trajectory execution out of the total number of nodes. The system calculates the coordinate system change, obtained by calculating the difference in the transformation matrix between the new and old versions of the coordinate system. This includes two parts: position change and attitude change. Position change represents the displacement distance of the coordinate system origin, and attitude change represents the angular offset in the coordinate system direction. For example, if the coordinate system version is detected to have been updated from V2025-001 to V2025-002, and the current execution progress is 65%, the calculated change in coordinate system position is 3.2 mm, and the change in attitude is 1.8 degrees. This real-time monitoring mechanism ensures that the system can respond promptly to dynamic changes in the coordinate system, providing accurate change information for subsequent trajectory correction.

[0048] The system determines whether to perform trajectory reassessment based on coordinate system changes and the current execution progress. The system sets a threshold for coordinate system changes as a 2mm position change or a 1.5-degree attitude change. This threshold is determined based on the robot's docking accuracy requirements; changes exceeding this threshold will significantly impact the final docking accuracy. During the judgment process, when the coordinate system change exceeds the set threshold, the system determines that trajectory reassessment is necessary. Trajectory reassessment refers to the process of correcting the original control commands to adapt to the new coordinate system. The system identifies unexecuted path nodes in the end-effector docking control commands. Unexecuted path nodes are those with sequence numbers greater than the corresponding node number in the current execution progress. The system performs coordinate transformation correction on the unexecuted path nodes. The correction process uses a matrix transformation method, multiplying the position coordinates and attitude angles of each path node by the transformation matrix from the old coordinate system to the new coordinate system to obtain the corrected coordinate values ​​in the new coordinate system. The corrected path nodes maintain their original time sequence and relative geometric relationships, updating only the spatial coordinate values ​​to adapt to the new coordinate system reference. The system generates updated end-point docking control instructions, which include the executed original path nodes and the corrected unexecuted path nodes, ensuring the continuity and consistency of the trajectory. For example, if a coordinate system change occurs when the execution progress is 65%, the system keeps the first 65% of the path nodes unchanged and performs coordinate transformation corrections on the remaining 35% of the path nodes. The generated updated instructions can continue to execute smoothly in the new coordinate system. This selective correction strategy avoids the computational overhead of replanning the entire trajectory while ensuring the consistency of the trajectory with the latest coordinate system.

[0049] The system controls the robot's end effector movement according to the updated end-effector docking control commands and performs accuracy assessment as it approaches the target docking position. The system sends the updated control commands to the robot controller, which drives the robot's joints based on path nodes and velocity parameters, causing the end effector to move along the planned trajectory towards the target position. During trajectory execution, the system continuously monitors the distance between the end effector and the target docking position. When the distance is less than a preset distance threshold (set to 20 mm), the system considers the robot to be approaching the target docking position. The system calculates the predicted docking accuracy by analyzing the current motion trend and remaining path error to predict the final position deviation at docking. The calculation method is as follows: based on the end effector's current position, motion speed, and remaining path length, the predicted coordinates of the end effector when it reaches the target position are extrapolated, and the difference between the predicted coordinates and the target docking position is taken as the predicted docking accuracy. The system sets the accuracy requirements to a position error of less than 1 mm and an attitude error of less than 0.5 degrees, which is determined based on the process requirements of the precision docking task. When the predicted docking accuracy meets the accuracy requirements, the system continues to execute the docking action until completion. When the predicted accuracy does not meet the requirements, the system reduces the motion speed and increases the control accuracy to ensure successful docking. For example, when the predicted position error is 0.8 mm and the attitude error is 0.3 degrees, the accuracy requirements are met, and the system completes the end-effector position docking control. This predictive accuracy control mechanism enables the system to proactively adjust its control strategy during the docking process, ensuring that the final docking accuracy meets the process requirements, and significantly improving the success rate and stability of precise robot docking in dynamic environments.

[0050] In one embodiment of the present invention, the step of determining whether to perform trajectory reassessment processing based on the coordinate system change and the current execution progress, and when the coordinate system change exceeds a set threshold, performing coordinate transformation correction on the unexecuted path nodes in the end-of-line docking control command to generate an updated end-of-line docking control command, includes: Based on the magnitude of the coordinate system change, combined with the current motion speed of the robot end effector and the remaining path length, the trajectory offset prediction value is calculated. When the trajectory offset prediction value exceeds the set threshold, it is determined that trajectory re-evaluation processing needs to be performed. When it is determined that trajectory reassessment processing needs to be performed, the current execution position in the end docking control command is obtained, and the unexecuted path nodes are classified into near nodes and long nodes according to the path length from the current execution position; Perform a full coordinate transformation correction on the remote node and a linear interpolation correction on the near node to generate an updated end-point docking control command that maintains trajectory continuity.

[0051] The following provides a detailed description of the above embodiments: The system calculates the trajectory offset prediction value based on the magnitude of the coordinate system change, combined with the current motion speed of the robot's end effector and the remaining path length. The trajectory offset prediction value refers to the predicted value of the impact of coordinate system change on the final accuracy of the robot's end effector, obtained by analyzing the cumulative impact of coordinate system change during the remaining trajectory execution process. The system obtains the current motion speed of the end effector, including linear and angular velocity values, through the encoder of the robot controller, and calculates the remaining path length from the current position to the target docking position. During the calculation, the system multiplies the coordinate system change by the ratio of the remaining path length to the current total path length to obtain the degree of influence of the coordinate system change on the remaining trajectory. This influence is then time-weighted by the current motion speed to calculate the trajectory offset prediction value. For example, if the coordinate system position change is 2.5 mm, the remaining path length is 150 mm, the total path length is 400 mm, and the current linear speed is 20 mm / s, then the trajectory offset prediction value is 2.5 × (150 / 400) × (20 / 10) = 1.875 mm, where the speed weighting coefficient of 10 is the baseline speed value. The system sets a threshold of 1.5 mm for the predicted trajectory offset. This threshold is determined based on the robot's docking accuracy requirements. When the predicted value exceeds this threshold, the system determines that trajectory reassessment is necessary. This predictive judgment mechanism allows the system to anticipate the impact of coordinate system changes on the final docking accuracy in the early stages, avoiding the discovery of insufficient accuracy only after docking is completed.

[0052] When trajectory reassessment is determined to be required, the system obtains the current execution position from the end-effector docking control command and classifies unexecuted path nodes. The current execution position refers to the path node position reached by the robot's end-effector during trajectory execution. The nearest executed node is determined by comparing the distance between the robot's actual position and each path node position. The system identifies all unexecuted path nodes after the current execution position and calculates the path length of each unexecuted node from the current execution position. The path length is obtained by summing the straight-line distances between adjacent nodes. The system uses a distance classification standard to divide unexecuted path nodes into two categories: near nodes and far nodes. The classification standard is set as the path length from the current execution position; nodes less than 50 mm are classified as near nodes, and nodes greater than 50 mm are classified as far nodes. This classification distance is determined based on the robot's motion control response characteristics. Near nodes are more affected by the current motion state and require a smooth correction method, while far nodes are less affected and can be directly transformed using coordinate transformation. For example, if the current execution position is the 15th path node, and the unexecuted nodes include nodes 16-30, then the distances from nodes 16-20 to the current position are 12, 25, 38, 45, and 52 millimeters, respectively. The first four are classified as near nodes, and the 20th and subsequent nodes are classified as far-reaching nodes. This distance-based classification method ensures that path nodes at different positions are fitted with appropriate correction strategies based on their characteristics.

[0053] The system performs full coordinate transformation correction on remote nodes and linear interpolation correction on near nodes. For remote nodes, the system uses a homogeneous transformation matrix method for full coordinate transformation correction, multiplying the position coordinates and attitude angles of each remote node by the transformation matrix from the old coordinate system to the new coordinate system, and directly updating them to the corresponding values ​​in the new coordinate system. For near nodes, the system uses a linear interpolation correction method. Linear interpolation correction refers to establishing a smooth transition correction between the current execution position and the starting position of the remote node to avoid abrupt changes in the trajectory. In specific implementation, the system uses the current execution position as the correction starting point (correction amount is 0) and the starting position of the remote node as the correction ending point (correction amount is the full coordinate transformation amount), allocating the correction amount within the near node range according to the distance ratio. For example, if a near node is 25 mm from the current position and 25 mm from the remote starting position, then the correction amount for that node is 50% of the full correction amount. After the correction is completed, the system generates updated end-point docking control commands that maintain trajectory continuity. Trajectory continuity refers to the smooth connection between nodes of the corrected trajectory, without abrupt changes in velocity or acceleration. Linear interpolation correction ensures a smooth transition from the uncorrected region to the fully corrected region. This hierarchical correction strategy guarantees both the accurate correspondence between the long-range trajectory and the new coordinate system and maintains the motion continuity of the short-range trajectory, avoiding robot vibration or control instability caused by abrupt trajectory changes. It significantly improves the smoothness and accuracy retention of robot trajectory execution in dynamic coordinate system environments.

[0054] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A two-dimensional code-based robot end position precise docking technology, characterized in that, The method comprises the following steps: statistical analysis is performed on historical operation trajectory data and two-dimensional code recognition records to obtain a two-dimensional code switching sequence atlas; confidence evaluation is performed on a plurality of two-dimensional codes currently recognized according to the two-dimensional code switching sequence atlas to obtain a reference two-dimensional code set and an initial coordinate mapping relationship corresponding to the reference two-dimensional code set; pose solution is performed on the reference two-dimensional code set to obtain a pose vector set, and spatial consistency evaluation is performed on the initial coordinate mapping relationship according to the pose vector set to obtain a consistency-modified coordinate mapping relationship; pose compensation is performed on the pose vector set according to the consistency-modified coordinate mapping relationship to generate a current frame global coordinate system; trajectory planning is performed on a robot end effector according to the current frame global coordinate system to obtain end docking control instructions, and trajectory reevaluation is performed on the end docking control instructions when the current frame global coordinate system is updated to complete end position docking control.

2. The two-dimensional code-based robot end position precise docking technique according to claim 1, wherein, The method comprises the following steps: spatial position sequences of a robot end effector in historical operation trajectory data and two-dimensional code recognition records at each position are obtained, the operation area is divided into a plurality of spatial regions according to the spatial position sequences, and the recognition frequency and recognition confidence value of two-dimensional codes in each spatial region are counted; the access sequence of two-dimensional codes when switching between regions is extracted according to the movement trajectory of the robot between adjacent spatial regions in the spatial position sequences, the switching mode of two-dimensional codes in the access sequence is analyzed, and a two-dimensional code switching path set is obtained; the temperature variation amplitude and vibration intensity of each switching path in the two-dimensional code switching path set are calculated according to the environmental parameters of each region in the plurality of spatial regions, and the environmental risk coefficient of each switching path is obtained; each switching path in the two-dimensional code switching path set is assigned a path weight according to the recognition frequency, recognition confidence value and environmental risk coefficient, and a two-dimensional code switching sequence atlas containing two-dimensional code nodes, switching paths and path weights is generated.

3. The two-dimensional code-based robot end position precise docking technique according to claim 1, wherein, The method comprises the following steps: identification information of a plurality of two-dimensional codes currently recognized is obtained, corresponding two-dimensional code nodes in the two-dimensional code switching sequence atlas are searched according to the identification information, and the path weight and historical recognition frequency of each two-dimensional code node are extracted; image recognition confidence of the plurality of two-dimensional codes currently recognized is obtained, and the comprehensive confidence score of each two-dimensional code is calculated according to the image recognition confidence, path weight and historical recognition frequency; the plurality of two-dimensional codes currently recognized are sorted according to the comprehensive confidence score, the top N two-dimensional codes with the highest comprehensive confidence score are selected as candidate two-dimensional codes, and a two-dimensional code combination with spatial positions independent of each other is selected from the candidate two-dimensional codes as a reference two-dimensional code set. According to the current recognition pose of each two-dimensional code in the reference two-dimensional code set, the relative position relationship and the relative attitude relationship between the two-dimensional codes are calculated, and an initial coordinate mapping relationship corresponding to the reference two-dimensional code set is generated.

4. The two-dimensional code-based robot end position precise docking technology according to claim 3, characterized in that, The method comprises the following steps of: according to the comprehensive confidence score, sorting the currently recognized multiple two-dimensional codes, selecting the top N two-dimensional codes in the comprehensive confidence score as candidate two-dimensional codes, and selecting a two-dimensional code combination that is independent in spatial position from the candidate two-dimensional codes as the reference two-dimensional code set. According to the comprehensive confidence score, the currently recognized multiple two-dimensional codes are sorted in descending order, the top N two-dimensional codes in the sorting result are selected as candidate two-dimensional codes, and the minimum spatial distance and the maximum angle difference between the candidate two-dimensional codes are calculated. According to the minimum spatial distance and the maximum angle difference, geometric independence evaluation is performed on the candidate two-dimensional codes, redundant two-dimensional codes with a minimum spatial distance less than a distance threshold or a maximum angle difference less than an angle threshold are removed, and a geometric independent two-dimensional code subset is obtained. The geometric independent two-dimensional code subset is reordered according to the confidence weighted value, and two-dimensional codes that maintain geometric independence with the selected two-dimensional codes are selected in turn according to the sorting order until the number of selected two-dimensional codes meets the reference set requirement, and a reference two-dimensional code set is formed.

5. The two-dimensional code-based robot end position precise docking technique according to claim 1, wherein, The method comprises the following steps of: performing pose calculation on the reference two-dimensional code set to obtain a pose vector set, and performing spatial consistency evaluation on the initial coordinate mapping relationship according to the pose vector set to obtain a coordinate mapping relationship that is modified for consistency. The method comprises the following steps of: performing image pose calculation on each two-dimensional code in the reference two-dimensional code set to obtain measured pose data of each two-dimensional code, calculating theoretical pose data of each two-dimensional code according to the initial coordinate mapping relationship, and combining the measured pose data and the theoretical pose data to form a measured pose vector set and a theoretical pose vector set, respectively. According to the measured pose vector set and the theoretical pose vector set, the pose deviation values of each two-dimensional code are calculated, and the spatial topological consistency of the reference two-dimensional code set is analyzed according to the pose deviation values to obtain a topological consistency evaluation result. According to the topological consistency evaluation result, the two-dimensional codes with pose deviation values exceeding a preset range are modified in coordinate relationship, the relative position relationship and the relative attitude relationship in the initial coordinate mapping relationship are updated, and a coordinate mapping relationship that is modified for consistency is generated.

6. The two-dimensional code-based robot end position precise docking technique according to claim 5, characterized in that, The method comprises the following steps of: according to the measured pose vector set and the theoretical pose vector set, the pose deviation values of each two-dimensional code are calculated, and the numerical distribution characteristics and the directional distribution characteristics of the pose deviation values are analyzed. According to the numerical distribution characteristics and the directional distribution characteristics, the deviation values of each two-dimensional code are analyzed by clustering, systematic deviation two-dimensional codes and random deviation two-dimensional codes are identified, and the influence weights of each type of deviation on the spatial topological structure are calculated. ​ According to the influence weight, a global topological consistency degree of the reference two-dimensional code set is evaluated, and a topological consistency evaluation result containing the consistency degree and deviation distribution information is generated.

7. The two-dimensional code-based robot end position precise docking technique according to claim 1, wherein, The posture compensation is performed on the posture vector set according to the consistency-corrected coordinate mapping relationship, and a current frame global coordinate system is generated, including: According to the consistency-corrected coordinate mapping relationship, the theoretical pose data of the reference two-dimensional code set is recalculated and compared with the measured pose data, and the pose compensation values of each two-dimensional code are obtained; According to the pose compensation values and the comprehensive confidence scores of each two-dimensional code, weighted compensation processing is performed on the measured pose data, and a compensated global reference pose is generated; According to the compensated global reference pose, combined with the current position information of the robot end effector, a current frame global coordinate system with the compensated global reference pose as the reference is generated.

8. The two-dimensional code-based robot end position precise docking technique according to claim 1, wherein, According to the current frame global coordinate system, trajectory planning is performed on the robot end effector to obtain end docking control instructions, and when the current frame global coordinate system is updated, trajectory re-evaluation is performed on the end docking control instructions to complete end position docking control, including: According to the current frame global coordinate system and the target docking position, trajectory planning processing is performed on the robot end effector to generate end docking control instructions containing path nodes and speed parameters, and the end docking control instructions are assigned a coordinate system version identifier corresponding to the current frame global coordinate system; The real-time position state and motion state of the robot end effector are obtained, and the update of the current frame global coordinate system is monitored. When a change in the coordinate system version identifier is detected, the current execution progress is recorded and the coordinate system change amount is calculated; According to the coordinate system change amount and the current execution progress, it is judged whether to perform trajectory re-evaluation processing. When the coordinate system change amount exceeds a set threshold, coordinate transformation correction is performed on the unexecuted path nodes in the end docking control instructions to generate updated end docking control instructions; According to the updated end docking control instructions, the robot end effector is controlled to move, and when approaching the target docking position, the predicted docking accuracy is calculated. When the predicted docking accuracy meets the accuracy requirement, the end position docking control is completed.

9. The two-dimensional code-based robot end position precise docking technique of claim 8, wherein, According to the coordinate system change amount and the current execution progress, it is judged whether to perform trajectory re-evaluation processing. When the coordinate system change amount exceeds a set threshold, coordinate transformation correction is performed on the unexecuted path nodes in the end docking control instructions to generate updated end docking control instructions, including: According to the numerical value of the coordinate system change amount, combined with the current motion speed of the robot end effector and the remaining path length, a trajectory offset prediction value is calculated. When the trajectory offset prediction value exceeds a set threshold, it is determined that trajectory re-evaluation processing needs to be performed; When it is determined that trajectory re-evaluation processing needs to be performed, the current execution position in the end docking control instructions is obtained, and the unexecuted path nodes are classified into near nodes and far nodes according to the path length from the current execution position. Performing a complete coordinate transformation correction on the remote node and a linear interpolation correction on the proximal node to generate an updated end docking control instruction that maintains trajectory continuity.

Citation Information

Patent Citations

  • Robot tail end positioning method

    CN115194762A

  • Device and method for adjusting operation parallelism based on two-dimensional code

    CN117283534A

  • Data acquisition system for dexterous operation of robot end effector

    CN120552125A

  • Mechanical arm tail end positioning method

    CN120680510A

  • Working reference object, working reference object manufacturing method, robot arm adjusting method, vision system, robot apparatus, and indicator member

    JP2017071033A