QR code-based precise docking technology for robot end-effector positioning
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2026-08-14
AI Technical Summary
然而,这些二维码标记在长期使用过程中会因设备振动、热胀冷缩、机械松动等因素导致其相互间的空间拓扑关系发生微小但持续的变化
[0014]随后,系统对选定的参考二维码集合执行位姿解算得到姿态向量集合,并利用这些实际测量数据对之前建立的初始坐标映射关系进行空间一致性评价。这一评价过程通过比较基于坐标映射关系推算的理论位姿与实际识别的位姿,能够精确检测出二维码间空间拓扑关系是否发生了变化。当检测到不一致时,系统会对坐标映射关系进行修正,生成能够反映当前实际空间布局的修正坐标关系。基于这种经过一致性修正的坐标映射关系,系统对姿态向量集合执行补偿处理生成当前帧全局坐标系,确保了坐标系的准确性和时效性。在轨迹规划和执行过程中,当全局坐标系因新的拓扑变化而更新时,系统会对已生成的控制指令进行重评估和修正。这种动态更新机制确保了即使在二维码空间关系持续变化的环境中,机器人仍能基于最新的准确坐标信息执行精确对接,从根本上解决了传统静态标定方法在动态环境中精度退化的问题。
Smart Images

Figure CN121234972B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot vision guidance and control technology, and in particular to a precise docking technology for robot end-effector positioning based on QR codes. Background Technology
[0002] QR code-based robot end-effector positioning precision docking technology deploys QR code markers at the target location or working environment. The robot's onboard vision system identifies the QR codes and calculates their spatial pose, guiding the robot's end effector to achieve precise docking. In practical applications, to meet the needs of large-scale operations, multi-station switching, and hierarchical positioning from coarse to fine, the system typically needs to deploy multiple QR code markers within the working area, forming a spatial coordinate reference network. However, over long-term use, these QR code markers undergo subtle but continuous changes in their spatial topology due to factors such as equipment vibration, thermal expansion and contraction, and mechanical loosening. Because existing systems generally employ a static coordinate mapping strategy that is fixed after a single calibration, lacking a dynamic perception mechanism for changes in the spatial relationships between QR codes, when the spatial topology of multiple QR codes shifts, the system still performs pose calculations and trajectory planning based on outdated coordinate transformation relationships. This leads to a gradual degradation in the robot's end-effector positioning accuracy, ultimately causing docking failure or inadequate accuracy to meet process requirements. Summary of the Invention
[0003] The main objective of this invention is to solve the following technical problem: In the process of precise docking of robot end positions based on QR codes, multiple QR codes may experience dynamic changes in their original spatial topology due to minor mechanical disturbances, thermal expansion and contraction, or accumulated operational errors during long-term operation. Traditional systems continue to calculate the end pose based on static calibration information without a dynamic consistency maintenance mechanism, which in turn causes robot end path deviation and docking errors.
[0004] To address the aforementioned technical problems, this invention provides a precise docking technology for robot end-effector positioning based on QR codes, comprising: Statistical analysis was performed on historical operation trajectory data and QR code recognition records to obtain a QR code switching sequence map; Based on the QR code switching sequence map, confidence evaluation is performed on the multiple currently identified QR codes to obtain a reference QR code set and an initial coordinate mapping relationship corresponding to the reference QR code set; Pose calculation is performed on the reference QR code set to obtain a set of pose vectors, and spatial consistency evaluation is performed on the initial coordinate mapping relationship based on the set of pose vectors to obtain a coordinate mapping relationship after consistency correction. Based on the consistent coordinate mapping relationship, attitude compensation is performed on the attitude vector set to generate the current frame global coordinate system; The robot end effector executes trajectory planning based on the current frame global coordinate system to obtain end-effector docking control commands. When the current frame global coordinate system is updated, the trajectory of the end-effector docking control commands is re-evaluated to complete the end-effector position docking control.
[0005] In one optional implementation, the step of statistically analyzing historical operation trajectory data and QR code recognition records to obtain a QR code switching sequence map includes: The spatial position sequence of the robot's end effector and the QR code recognition record at each position are obtained from the historical operation trajectory data. 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 QR codes in each spatial region are counted. Based on the robot's movement trajectory between adjacent spatial regions in the spatial location sequence, the access sequence of the QR code when switching regions is extracted, the switching mode of the QR code in the access sequence is analyzed, and a set of QR code switching paths is obtained. Based on the environmental parameters of each region in the multiple spatial regions, the temperature change amplitude and vibration intensity of each switching path in the QR code switching path set are calculated to obtain the environmental risk coefficient of each switching path. Based on the recognition frequency, recognition confidence value, and environmental risk coefficient, path weights are assigned to each switching path in the QR code switching path set to generate a QR code switching sequence map containing QR code nodes, switching paths, and path weights.
[0006] In one optional implementation, the step of performing confidence evaluation on the currently identified multiple 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.
[0007] In one optional implementation, 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.
[0008] In one optional implementation, 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.
[0009] In one optional implementation, 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.
[0010] In one optional implementation, the step of performing attitude compensation on the set of attitude vectors 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.
[0011] In one optional implementation, the step of performing trajectory planning for the robot's end effector based on the current frame global coordinate system to obtain end-effector docking control commands, and performing trajectory re-evaluation 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.
[0012] In one optional implementation, 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.
[0013] The technical solution provided in this application generates a QR code switching sequence map by statistically analyzing historical operation trajectory data and QR code recognition records, establishing a knowledge base containing robot movement patterns and QR code usage rules. This map not only records the historical recognition performance of each QR code, but more importantly, establishes the correlation between QR code switching paths and environmental risk factors. When the robot recognizes multiple QR codes in the current task, the system performs a confidence assessment on each QR code based on this map. This assessment is not a simple image quality judgment, but a multi-dimensional analysis that comprehensively considers historical reliability, path weight, and current recognition quality. Through this assessment mechanism, the system can identify the most reliable set of reference QR codes and calculate the initial coordinate mapping relationship based on the current pose of these QR codes. This process avoids the problem of indiscriminate trust in all recognized QR codes in traditional methods, instead establishing an intelligent filtering mechanism based on historical data.
[0014] Subsequently, the system performs pose calculations on the selected set of reference QR codes to obtain a set of pose vectors, and uses this actual measurement data to evaluate the spatial consistency of the previously established initial coordinate mapping relationship. This evaluation process, by comparing the theoretical pose calculated based on the coordinate mapping relationship with the actual recognized pose, can accurately detect whether the spatial topological relationship between QR codes has changed. When an inconsistency is detected, the system corrects the coordinate mapping relationship, generating a corrected coordinate relationship that reflects the current actual spatial layout. Based on this consistent corrected coordinate mapping relationship, the system performs compensation processing on the pose vector set to generate the current frame's 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 re-evaluates and corrects the generated control commands. This dynamic update mechanism ensures that even in an environment where the spatial relationship of QR codes is constantly changing, the robot can still perform precise docking based on the latest accurate coordinate information, fundamentally solving the problem of accuracy degradation of traditional static calibration methods in dynamic environments. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of an embodiment of the robot end-effector precise docking technology based on QR codes in this invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0017] In modern industrial automation, various robot systems are widely used in high-precision operations such as precision assembly, automated welding, and component insertion. These robots may be fixed multi-joint robotic arms, mobile AGV (Automated Guided Vehicle) transport vehicles, collaborative robots, or track-based robots. They all require millimeter-level or even sub-millimeter-level precision docking between the end effector and the target object in complex working environments. Whether it's precisely inserting electronic components into circuit boards, automating the assembly of automotive parts, or performing precision assembly of medical devices, this precise docking capability directly determines product quality and production efficiency. To guide robots to achieve this high-precision positioning, engineers typically place multiple QR code markers within the work area. These QR codes not only provide spatial location references but, more importantly, construct a coordinate reference network covering the entire work area. Stable spatial topological relationships (i.e., mutual positional and orientation constraints) are formed between the QR codes, supporting continuous positioning and precise switching between multiple workstations during large-scale movement of the robot.
[0018] However, in real industrial environments, these QR code markers are constantly exposed to complex environmental factors such as mechanical vibration, temperature changes, and thermal expansion and contraction, causing subtle but continuous changes in their originally fixed spatial geometric relationships. For example, vibrations on the production line can cause the brackets holding the QR codes to loosen, thermal expansion and contraction in high-temperature working environments can cause deformation of the mounting base, and frequent equipment maintenance and workpiece replacements can also cause cumulative shifts in the QR code positions. These seemingly insignificant changes can disrupt the spatial topological consistency of the multi-QR code system, leading to positioning errors when the robot plans its path based on outdated coordinate mapping relationships, ultimately resulting in decreased docking accuracy or even docking failure. Traditional solutions typically rely on periodic recalibration, but this method cannot cope with dynamically changing working environments. Therefore, this application proposes a precise docking technology for robot end-effector positions based on QR codes. Please refer to [reference needed]. Figure 1 The technology includes: Statistical analysis was performed on historical operation trajectory data and QR code recognition records to obtain a QR code switching sequence map; Based on the QR code switching sequence map, confidence evaluation is performed on the multiple currently identified QR codes to obtain a reference QR code set and an initial coordinate mapping relationship corresponding to the reference QR code set; Pose calculation is performed on the reference QR code set to obtain a set of pose vectors, and spatial consistency evaluation is performed on the initial coordinate mapping relationship based on the set of pose vectors to obtain a coordinate mapping relationship after consistency correction. Based on the consistent coordinate mapping relationship, attitude compensation is performed on the attitude vector set to generate the current frame global coordinate system; The robot end effector executes trajectory planning based on the current frame global coordinate system to obtain end-effector docking control commands. When the current frame global coordinate system is updated, the trajectory of the end-effector docking control commands is re-evaluated to complete the end-effector position docking control.
[0019] In one embodiment of the present invention, the step of statistically analyzing historical operation trajectory data and QR code recognition records to obtain a QR code switching sequence map includes: The spatial position sequence of the robot's end effector and the QR code recognition record at each position are obtained from the historical operation trajectory data. 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 QR codes in each spatial region are counted. Based on the robot's movement trajectory between adjacent spatial regions in the spatial location sequence, the access sequence of the QR code when switching regions is extracted, the switching mode of the QR code in the access sequence is analyzed, and a set of QR code switching paths is obtained. Based on the environmental parameters of each region in the multiple spatial regions, the temperature change amplitude and vibration intensity of each switching path in the QR code switching path set are calculated to obtain the environmental risk coefficient of each switching path. Based on the recognition frequency, recognition confidence value, and environmental risk coefficient, path weights are assigned to each switching path in the QR code switching path set to generate a QR code switching sequence map containing QR code nodes, switching paths, and path weights.
[0020] The following provides a detailed description of the above embodiments: During the robot's docking task, the system continuously records the three-dimensional coordinate position of the robot's end effector using the encoder and position sensors integrated into the robot's control system, forming a spatial position sequence containing x, y, and z coordinate values and a timestamp. Simultaneously, industrial cameras mounted on the robot capture and process images of QR codes within their field of view at each position, recording the QR code's identifier, whether the recognition was successful, and the confidence score output by the image processing algorithm. The system uses a fixed grid partitioning method to divide the work area into several rectangular spatial regions according to actual needs. The partition size is determined based on the robot's working range; for example, a 3m × 4m assembly table is divided into 12 1m × 1m regions. After partitioning, the system iterates through historical data, counting the number of times each QR code in each spatial region is successfully recognized as the recognition frequency, and calculates the average confidence score of all recognition records for that QR code in that region as the recognition confidence value. The confidence value reflects the image processing algorithm's degree of certainty regarding the QR code recognition result, ranging from 0 to 1, with values closer to 1 indicating more reliable recognition. For example, QR001 was recognized 180 times in region A with an average confidence level of 0.91, indicating that the QR code has high recognition stability in this location. This regionalized statistical analysis provides quantitative data support for the reliability assessment of QR codes in different spatial locations.
[0021] The system detects robot area switching behavior by analyzing coordinate changes between adjacent time points in a spatial location sequence. When the robot's end effector moves from one spatial region to an adjacent spatial region, the system identifies this process as an area switching event. During each area switching process, the system records the sequence of QR codes sequentially recognized by the robot, forming an access sequence. An access sequence refers to a list of QR code numbers recognized by the robot in chronological order along its movement path. After collecting a large number of access sequences, the system uses a sequence pattern mining algorithm to analyze the regularities and identify frequently occurring QR code switching patterns. A switching pattern refers to the QR code connection relationship that frequently appears in multiple movements. For example, the connection from QR001 to QR005 appeared 85 times in 100 movement records, indicating that this is a stable switching path. Based on the identified switching patterns, the system constructs a set of QR code switching paths, with each path recording the starting QR code, the target QR code, and possible intermediate QR code nodes. This analysis based on actual motion trajectories ensures that the extracted switching paths conform to the robot's actual operating mode, providing 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. 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 weighting 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 precise docking technology for robot end-effector positioning based on QR codes, characterized in that, include: Statistical analysis was performed on historical operation trajectory data and QR code recognition records to obtain a QR code switching sequence map; Based on the QR code switching sequence map, confidence evaluation is performed on the multiple currently identified QR codes to obtain a reference QR code set and an initial coordinate mapping relationship corresponding to the reference QR code set; Pose calculation is performed on the reference QR code set to obtain a set of pose vectors, and spatial consistency evaluation is performed on the initial coordinate mapping relationship based on the set of pose vectors to obtain a coordinate mapping relationship after consistency correction. Based on the consistent coordinate mapping relationship, attitude compensation is performed on the attitude vector set to generate the current frame global coordinate system; The robot end effector executes trajectory planning based on the current frame global coordinate system to obtain end-effector docking control commands. When the current frame global coordinate system is updated, the trajectory of the end-effector docking control commands is re-evaluated to complete the end-effector position docking control.
2. The precise docking technology for robot end-effector positioning based on QR codes according to claim 1, characterized in that, The statistical analysis of historical operation trajectory data and QR code recognition records to obtain a QR code switching sequence map includes: The spatial position sequence of the robot's end effector and the QR code recognition record at each position are obtained from the historical operation trajectory data. 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 QR codes in each spatial region are counted. Based on the robot's movement trajectory between adjacent spatial regions in the spatial location sequence, the access sequence of the QR code when switching regions is extracted, the switching mode of the QR code in the access sequence is analyzed, and a set of QR code switching paths is obtained. Based on the environmental parameters of each region in the multiple spatial regions, the temperature change amplitude and vibration intensity of each switching path in the QR code switching path set are calculated to obtain the environmental risk coefficient of each switching path. Based on the recognition frequency, recognition confidence value, and environmental risk coefficient, path weights are assigned to each switching path in the QR code switching path set to generate a QR code switching sequence map containing QR code nodes, switching paths, and path weights.
3. The precise docking technology for robot end-effector positioning based on QR codes according to claim 1, characterized in that, 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.
4. The precise docking technology for robot end-effector positioning based on QR codes according to claim 3, characterized in that, The step of sorting the currently identified 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. The selected QR codes are those with the highest confidence weighted value.
5. The precise docking technology for robot end-effector positioning based on QR codes according to claim 1, characterized in that, 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.
6. The precise docking technology for robot end-effector positioning based on QR codes according to claim 5, characterized in that, The step involves 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, including: 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.
7. The precise docking technology for robot end-effector positioning based on QR codes according to claim 1, characterized in that, The step of performing attitude compensation on the attitude vector set based on the consistent 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.
8. The precise docking technology for robot end-effector positioning based on QR codes according to claim 1, characterized in that, The step of planning the robot end effector's trajectory based on the current frame's 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's 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.
9. The precise docking technology for robot end-effector positioning based on QR codes according to claim 8, characterized in that, The step involves determining whether to perform trajectory reassessment based on the coordinate system change and the current execution progress. When the coordinate system change exceeds a set threshold, coordinate transformation correction is performed on the unexecuted path nodes in the end-of-line docking control command to generate updated end-of-line docking control commands, including: 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.
Citation Information
Patent Citations
Robot tail end positioning method
CN115194762A
Device and method for adjusting operation parallelism based on two-dimensional code
CN117283534A