Mobile robot real-time attitude correction method and system, electronic equipment and storage medium

By identifying the corner points of the AprilTag tag and calculating the homography matrix, the mobile robot can achieve high-precision positioning in a dynamic environment, solving the problem of inaccurate positioning and improving the operational reliability and flexibility of the robotic arm.

CN119304885APending Publication Date: 2025-01-14FAIRYLAND TECH (WUHAN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411703671.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

Mobile robots are inaccurately positioned in dynamic environments, which affects the accuracy of object operation tasks, especially in scenarios where precise pickup and placement operations are required.

Method used

By acquiring AprilTag tag images based on the camera, identifying the four corners of the AprilTag tag using pixel gradient calculation and clustering algorithm, calculating the homography matrix and the camera's internal reference matrix, estimating the current pose of the mobile robot, and correcting it according to the reference pose.

Benefits of technology

It achieves high-precision positioning of mobile robots in changing environments and enhances the reliability and flexibility of automatic guided vehicle installation robot arms in industrial applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119304885A_ABST
    Figure CN119304885A_ABST
Patent Text Reader

Abstract

The invention provides a mobile robot real-time attitude correction method and system, electronic equipment and a storage medium, and the method comprises the steps: collecting an AprilTag tag image based on a camera, and recognizing four corner points of an AprilTag tag from an environment image through pixel gradient calculation and a clustering algorithm; calculating a homography matrix based on the two-dimensional image coordinates of the four angular points of the AprilTag in the image coordinate system and the space coordinates of the four angular points in the three-dimensional world coordinate system; estimating the current posture of the mobile robot according to the homography matrix and the internal reference matrix of the camera; and according to the reference posture of the mobile robot, the current posture of the mobile robot is corrected, the position of the mechanical arm is adjusted through the translation vector, and it is ensured that taking and placing operation is accurately executed. According to the method, the attitude of the mobile robot can be estimated and corrected in a self-adaptive manner, so that the mobile robot can realize high-precision positioning in a variable environment, and the reliability and the flexibility of the automatic guide vehicle mounting mechanical arm in industrial application are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mobile robots, and more specifically, to a method, system, electronic equipment and storage medium for real-time posture correction of a mobile robot. Background Art

[0002] In modern industrial automation, mobile robotic systems equipped with robotic arms have become essential for efficient material handling and logistics operations. Unlike fixed robotic arms, which have predetermined object locations and can therefore achieve high positioning accuracy, mobile robotic systems face unique challenges. Specifically, automated guided vehicles (AGVs) equipped with robotic arms must repeatedly navigate to specific points in dynamic environments. However, due to inherent hardware limitations, such as wheel slippage or slight variations in navigation accuracy, AGVs typically do not reach exactly the same location every time.

[0003] This variation in AGV positioning can affect the accuracy of object manipulation tasks, especially in scenarios that require precise pick-and-place operations. For traditional robotic arms, achieving sub-millimeter accuracy is simple due to their fixed base. But for compound robots (robotic arms that move with AGVs), there is an added layer of complexity. Every position deviation requires real-time correction to ensure that the robotic arm can successfully grasp or precisely locate an object. Summary of the invention

[0004] The present invention aims at the technical problem of inaccurate positioning of a mobile robot in the prior art and provides a method, system, electronic equipment and storage medium for real-time posture correction of a mobile robot.

[0005] According to a first aspect of the present invention, there is provided a method for real-time posture correction of a mobile robot, comprising: Based on the camera collecting AprilTag label image, the two-dimensional image coordinates of four corner points of the AprilTag label in the image coordinate system are identified from the AprilTag label image through pixel gradient calculation and clustering algorithm, wherein the AprilTag label is set on the mobile robot; Calculate a homography matrix based on the two-dimensional image coordinates of the four corner points of the AprilTag in the image coordinate system and the spatial coordinates of the four corner points in the three-dimensional world coordinate system; estimating a current posture of the mobile robot according to the homography matrix and an intrinsic parameter matrix of the camera; According to the reference posture of the mobile robot, the current posture of the mobile robot is corrected.

[0006] Based on the above technical solution, the present invention can also make the following improvements.

[0007] Optionally, the step of identifying the two-dimensional image coordinates of four corner points of the AprilTag label in the image coordinate system from the AprilTag label image by using pixel gradient calculation and clustering algorithm includes: Convert the collected AprilTag label image into a grayscale image, and calculate the gradient magnitude and gradient direction of each pixel in the grayscale image; Based on the clustering algorithm, pixels with similar gradient magnitudes and gradient directions are grouped to form line segments. Based on the formed multiple line segments, the four corner points of the AprilTag label are detected.

[0008] Optionally, the clustering algorithm is used to group pixels with similar gradient magnitudes and gradient directions into line segments, and four corner points of the AprilTag label are detected based on the formed multiple line segments, including: Based on the clustering algorithm, pixels with similar gradient magnitudes and gradient directions are clustered into pixel clusters to obtain multiple pixel clusters; According to the pixels in each pixel cluster, line segment fitting is performed based on the least square method, wherein the direction of the line segment is determined according to the gradient direction of the pixels in the pixel cluster.

[0009] Optionally, the calculating of the homography matrix based on the two-dimensional image coordinates of the four corner points of the AprilTag in the image coordinate system and the spatial coordinates of the four corner points in the three-dimensional world coordinate system includes:

[0010] Among them, (x, y) is the two-dimensional image coordinates of the corner point of the AprilTag label in the image coordinate system, and (X, Y, Z) is the spatial coordinates of the corner point of the AprilTag label in the three-dimensional world coordinate system. represents the scaling factor, is the homography matrix.

[0011] Optionally, the intrinsic parameter matrix of the camera is expressed as:

[0012] in, and is the focal length of the camera on the x-axis and y-axis, and are the principal point coordinates of the optical axis on the x-axis and y-axis, is the intrinsic parameter matrix of the camera.

[0013] Optionally, estimating the current posture of the mobile robot according to the homography matrix and the intrinsic parameter matrix of the camera includes: Multiply the homography matrix H by the inverse of the camera's intrinsic parameter matrix K to obtain the normalized transformation matrix:

[0014] in, The first two columns of and The third column is the scaled rotation matrix component. is the scaled translation vector; Will The first two columns of and Normalize to an orthogonal basis to obtain the rotation matrix R The first two columns of:

[0015] Will and Cross product calculation of the third column :

[0016] Rotation Matrix R And the normalized translation vector t is expressed as:

[0017] Among them, the rotation matrix R and the normalized translation vector t constitute the posture matrix of the mobile robot.

[0018] Optionally, the correcting the current posture of the mobile robot according to the reference posture of the mobile robot includes: Calculate the angle difference of the mobile robot according to the yaw angle in the current posture of the mobile robot and the yaw angle in the reference posture, and if the angle difference is greater than a set threshold, adjust the yaw angle in the current posture of the mobile robot so that the angle difference of the mobile robot is less than the set threshold; The position of the mechanical arm on the mobile robot on the x-axis and the y-axis is adjusted according to the x and y offset values ​​in the translation vector t in the posture matrix so that the mechanical arm reaches the target position.

[0019] According to a second aspect of the present invention, there is provided a mobile robot real-time posture correction system, comprising: An image acquisition module, used to collect an AprilTag label image based on a camera, and identify the two-dimensional image coordinates of four corner points of the AprilTag label in an image coordinate system from the AprilTag label image through pixel gradient calculation and clustering algorithm, wherein the AprilTag label is set on the mobile robot; A calculation module, for calculating a homography matrix based on the two-dimensional image coordinates of the four corner points of the AprilTag in the image coordinate system and the spatial coordinates of the four corner points in the three-dimensional world coordinate system; and estimating the current posture of the mobile robot according to the homography matrix and the intrinsic parameter matrix of the camera; The correction module is used to correct the current posture of the mobile robot according to the reference posture of the mobile robot.

[0020] According to a third aspect of the present invention, there is provided an electronic device comprising a memory and a processor, wherein the processor is used to implement the steps of a method for real-time posture correction of a mobile robot when executing a computer management program stored in the memory.

[0021] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium having a computer management program stored thereon, wherein the computer management program, when executed by a processor, implements the steps of a method for real-time posture correction of a mobile robot.

[0022] The present invention provides a real-time posture correction method, system, electronic device and storage medium for a mobile robot. The method identifies the four corner points of a tag from an environmental image based on an AprilTag detection method and calculates a homography matrix. The method estimates the current posture of the mobile robot based on the homography matrix and the intrinsic parameter matrix of the camera, and corrects the current posture of the mobile robot according to the current posture of the mobile robot and a reference posture. The method can adaptively estimate and correct the posture of the mobile robot, so that the mobile robot can achieve high-precision positioning in a changing environment, thereby enhancing the reliability and flexibility of an automatic guided vehicle installation mechanical arm in industrial applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A flow chart of a method for real-time posture correction of a mobile robot provided by the present invention; Figure 2 Schematic diagram of detecting the four corner points of the AprilTag label; Figure 3 A structural diagram of a real-time posture correction system for a mobile robot provided by the present invention; Figure 4 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention; Figure 5 A schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not subject to the constraints of the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in this field to achieve. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0025] For the positioning of the mobile robot, the present invention develops a posture estimation method for the mobile robot using AprilTags. AprilTags are similar to QR codes, but are optimized for precise position and direction detection and can be fixed near the target object. First, the mobile robot AGV and the robotic arm are calibrated according to the reference posture of AprilTag, and the robotic arm is aligned to the correct pick-and-place coordinates. Each time the mobile robot AGV revisits the location, the system estimates the posture of the mobile robot and compares it with the reference posture. If an angle or position deviation is detected, the direction of the mobile robot AGV is first corrected, and then the position of the robotic arm is fine-tuned to achieve the correction of the mobile robot posture.

[0026] See also Figure 1 , provides a flow chart of a real-time posture correction method for a mobile robot of the present invention, such as Figure 1 As shown, the method includes: Step 1: collect an AprilTag label image based on a camera, and identify the two-dimensional image coordinates of four corner points of the AprilTag label in the image coordinate system from the AprilTag label image through pixel gradient calculation and clustering algorithm, wherein the AprilTag label is set on a mobile robot.

[0027] It is understandable that an AprilTag tag is set on the mobile robot, and the AprilTag tag image is captured by the camera, and the four corner points of the AprilTag tag image are identified through pixel gradient calculation and clustering algorithm. This detection method ensures the stability of target object detection under different lighting conditions and partial occlusion.

[0028] Among them, AprilTag detection and localization rely on a robust process for high-precision identification, verification and determination of the spatial orientation of each tag, which can maintain stability even under complex conditions such as partial occlusion, lighting changes and image noise.

[0029] In the process of detecting corner points of the method, illustratively, identifying the two-dimensional image coordinates of four corner points of the AprilTag label in the image coordinate system from the AprilTag label image by using pixel gradient calculation and clustering algorithm includes: Convert the collected AprilTag label image into a grayscale image, and calculate the gradient magnitude and gradient direction of each pixel in the grayscale image; Based on the clustering algorithm, pixels with similar gradient magnitudes and gradient directions are grouped to form line segments. Based on the formed multiple line segments, the four corner points of the AprilTag label are detected.

[0030] The clustering algorithm is used to group pixels with similar gradient magnitudes and gradient directions into line segments, and the four corner points of the AprilTag label are detected based on the formed multiple line segments, including: Based on the clustering algorithm, pixels with similar gradient magnitudes and gradient directions are clustered into pixel clusters to obtain multiple pixel clusters; According to the pixels in each pixel cluster, line segment fitting is performed based on the least square method, wherein the direction of the line segment is determined according to the gradient direction of the pixels in the pixel cluster.

[0031] Specifically, first, the AprilTag label image is converted into a grayscale image, and the gradient magnitude and gradient direction of each pixel in the grayscale image are calculated to enhance edge detection. Through the gradient-based clustering algorithm, pixels with similar gradient directions and gradient magnitudes are grouped to form line segments, and then the four corner points of the AprilTag label are detected. The two-dimensional position coordinates of each corner point in pixel coordinates are: Corners = .

[0032] See also Figure 2 , AprilTag's corner detection algorithm starts by calculating the gradient magnitude and gradient direction of each pixel in the grayscale image. Using a graph-based method, pixels with similar gradient directions and gradient magnitudes are clustered into pixel clusters. Each pixel cluster includes many pixels with similar gradient magnitudes and gradient directions. Then, for each pixel in a pixel cluster, a line segment is fitted using weighted least squares, and the two endpoints of the line segment are the corners to be detected. The direction of the line segment is determined by the gradient direction, and the direction of the line segment is visualized by a short vertical "scratches" at its midpoint; note that these "scratches" always point to the bright area.

[0033] Step 2: Calculate a homography matrix based on the two-dimensional image coordinates of the four corner points of the AprilTag in the image coordinate system and the spatial coordinates of the four corner points in the three-dimensional world coordinate system.

[0034] It is understandable that this step uses the four corner points of the AprilTag tag to estimate the spatial position and direction of the corner points relative to the camera through homography transformation. The homography matrix H is used to map the known two-dimensional image coordinates (x, y) of the corner points to the real position (X, Y, Z) in the three-dimensional world coordinate system. Therefore, the homography matrix H can be calculated based on the two-dimensional image coordinates of the four corner points of the AprilTag tag in the image coordinate system and the spatial coordinates of the four corner points in the three-dimensional world coordinate system:

[0035] Among them, (x, y) is the two-dimensional image coordinates of the corner point of the AprilTag label in the image coordinate system, that is, the coordinates of the corner point detected in step 1, and (X, Y, Z) is the spatial coordinates of the corner point of the AprilTag label in the three-dimensional world coordinate system. is the scaling factor, is the homography matrix.

[0036] Step 3: Estimate the current posture of the mobile robot according to the homography matrix and the intrinsic parameter matrix of the camera.

[0037] It can be understood that after the homography matrix is ​​calculated, the real-time posture of the mobile robot is estimated according to the homography matrix H and the intrinsic parameter matrix K of the camera.

[0038] Among them, the camera's intrinsic parameter matrix K is calibrated. The specific camera calibration method can adopt the existing mature camera intrinsic parameter calibration method, such as Zhang Zhengyou's calibration method. To eliminate the distortion in the image. This process ensures that the corner points of the AprilTag label in the image coordinate system can be accurately mapped to the camera coordinate system. The camera's intrinsic parameter matrix K can be expressed as:

[0039] in, and is the focal length of the camera on the x-axis and y-axis, and are the principal point coordinates of the optical axis on the x-axis and y-axis, is the intrinsic parameter matrix of the camera.

[0040] Specifically, by multiplying the homography matrix H with the inverse of the camera intrinsic parameter matrix K, we get the normalized transformation matrix containing rotation and translation: ,

[0041] in, The first two columns of and Corresponding to the scaled rotation matrix components, the third column Corresponding to the scaled translation vector, through subsequent processing, the rotation matrix R and the translation vector t can be extracted respectively.

[0042] Will The first two columns of and Normalize to an orthogonal basis to obtain the first two columns of the rotation matrix:

[0043] Calculate the third column by cross product , ensuring the orthogonality of the rotation matrix:

[0044] Finally, the rotation matrix R and the normalized translation vector t are expressed as:

[0045] The rotation matrix R and the normalized translation vector t constitute the current posture of the mobile robot.

[0046] Step 4: Correct the current posture of the mobile robot according to the reference posture of the mobile robot.

[0047] Exemplarily, the correcting the current posture of the mobile robot according to the reference posture of the mobile robot includes: Calculate the angle difference of the mobile robot according to the yaw angle in the current posture of the mobile robot and the yaw angle in the reference posture, and if the angle difference is greater than a set threshold, adjust the yaw angle in the current posture of the mobile robot so that the angle difference of the mobile robot is less than the set threshold; The position of the mechanical arm on the mobile robot on the x-axis and the y-axis is adjusted according to the x and y offset values ​​in the translation vector t in the posture matrix so that the mechanical arm reaches the target position.

[0048] It can be understood that after obtaining the rotation matrix R and translation vector t of the mobile robot posture estimation, the current yaw angle of the mobile robot AGV is compared with the reference yaw angle according to the rotation matrix R. If the angle difference between the two exceeds 1 degree, the current yaw angle of the mobile robot is adjusted so that the current yaw angle of the mobile robot is closer to the reference yaw angle, that is, the angle difference is less than the set threshold.

[0049] Next, the x and y offset values ​​in the translation vector t in the pose matrix are used to precisely adjust the position of the robot arm on the x and y axes. This process ensures that the robot arm can reach the target position and achieve sub-millimeter precision pick-and-place operations.

[0050] See also Figure 3 , provides a mobile robot real-time posture correction system of the present invention, comprising: The image acquisition module 301 is used to collect an AprilTag label image based on a camera, and identify the two-dimensional image coordinates of the four corner points of the AprilTag label in the image coordinate system from the AprilTag label image through pixel gradient calculation and clustering algorithm, wherein the AprilTag label is set on the mobile robot; A calculation module 302 is used to calculate a homography matrix based on the two-dimensional image coordinates of the four corner points of the AprilTag in the image coordinate system and the spatial coordinates of the four corner points in the three-dimensional world coordinate system; and to estimate the current posture of the mobile robot according to the homography matrix and the intrinsic parameter matrix of the camera; The correction module 303 is used to correct the current posture of the mobile robot according to the reference posture of the mobile robot.

[0051] It can be understood that the real-time posture correction system of a mobile robot provided by the present invention corresponds to the real-time posture correction method of a mobile robot provided by the aforementioned embodiments. The relevant technical features of the real-time posture correction system of a mobile robot can refer to the relevant technical features of the real-time posture correction method of a mobile robot, which will not be repeated here.

[0052] See also Figure 4 , Figure 4 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 4 As shown, an embodiment of the present invention provides an electronic device 400, including a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420, wherein the processor 420 implements the following steps when executing the computer program 411: based on the camera collecting AprilTag label image, identifying the two-dimensional image coordinates of the four corner points of the AprilTag label in the image coordinate system from the AprilTag label image through pixel gradient calculation and clustering algorithm, wherein the AprilTag label is set on the mobile robot; based on the two-dimensional image coordinates of the four corner points of the AprilTag label in the image coordinate system and the spatial coordinates of the four corner points in the three-dimensional world coordinate system, calculating the homography matrix; estimating the current posture of the mobile robot according to the homography matrix and the intrinsic parameter matrix of the camera; and correcting the current posture of the mobile robot according to the reference posture of the mobile robot.

[0053] See also Figure 5 , Figure 5 Schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Figure 5 As shown, this embodiment provides a computer-readable storage medium 500, on which a computer program 511 is stored. When the computer program 511 is executed by a processor, the following steps are implemented: based on the camera collecting AprilTag label image, the two-dimensional image coordinates of the four corner points of the AprilTag label in the image coordinate system are identified from the AprilTag label image through pixel gradient calculation and clustering algorithm, wherein the AprilTag label is set on the mobile robot; based on the two-dimensional image coordinates of the four corner points of the AprilTag label in the image coordinate system and the spatial coordinates of the four corner points in the three-dimensional world coordinate system, a homography matrix is ​​calculated; according to the homography matrix and the intrinsic parameter matrix of the camera, the current posture of the mobile robot is estimated; according to the reference posture of the mobile robot, the current posture of the mobile robot is corrected.

[0054] The embodiments of the present invention provide a method, system, electronic device and storage medium for real-time posture correction of a mobile robot. The method identifies the four corner points of an AprilTag tag from an AprilTag tag image based on an AprilTag detection method, and calculates a homography matrix. The method estimates the current posture of the mobile robot based on the homography matrix and the intrinsic parameter matrix of the camera, and corrects the current posture of the mobile robot according to the current posture of the mobile robot and a reference posture. The method can adaptively estimate and correct the posture of the mobile robot, so that the mobile robot can achieve high-precision positioning in a changing environment, thereby enhancing the reliability and flexibility of the automatic guided vehicle installation mechanical arm in industrial applications.

[0055] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0056] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0057] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0058] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0059] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0060] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0061] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A real-time posture correction method for a mobile robot, characterized in that: include: Based on the camera collecting AprilTag label image, the two-dimensional image coordinates of four corner points of the AprilTag label in the image coordinate system are identified from the AprilTag label image through pixel gradient calculation and clustering algorithm, wherein the AprilTag label is set on the mobile robot; Calculate a homography matrix based on the two-dimensional image coordinates of the four corner points of the AprilTag in the image coordinate system and the spatial coordinates of the four corner points in the three-dimensional world coordinate system; estimating a current posture of the mobile robot according to the homography matrix and an intrinsic parameter matrix of the camera; According to the reference posture of the mobile robot, the current posture of the mobile robot is corrected.

2. The real-time posture correction method for a mobile robot according to claim 1, characterized in that: The method of identifying the two-dimensional image coordinates of the four corner points of the AprilTag label in the image coordinate system from the AprilTag label image by using pixel gradient calculation and clustering algorithm includes: Convert the collected AprilTag label image into a grayscale image, and calculate the gradient magnitude and gradient direction of each pixel in the grayscale image; Based on the clustering algorithm, pixels with similar gradient magnitudes and gradient directions are grouped to form line segments. Based on the formed multiple line segments, the four corner points of the AprilTag label are detected.

3. The real-time posture correction method for a mobile robot according to claim 2, characterized in that: The clustering algorithm is used to group pixels with similar gradient magnitudes and gradient directions into line segments, and four corner points of the AprilTag label are detected based on the formed multiple line segments, including: Based on the clustering algorithm, pixels with similar gradient magnitudes and gradient directions are clustered into pixel clusters to obtain multiple pixel clusters; According to the pixels in each pixel cluster, line segment fitting is performed based on the least square method, wherein the direction of the line segment is determined according to the gradient direction of the pixels in the pixel cluster.

4. The method for real-time posture correction of a mobile robot according to claim 1, characterized in that: The step of calculating the homography matrix based on the two-dimensional image coordinates of the four corner points of the AprilTag in the image coordinate system and the spatial coordinates of the four corner points in the three-dimensional world coordinate system includes: Among them, (x, y) is the two-dimensional image coordinates of the corner point of the AprilTag label in the image coordinate system, and (X, Y, Z) is the spatial coordinates of the corner point of the AprilTag label in the three-dimensional world coordinate system. represents the scaling factor, is the homography matrix.

5. The real-time posture correction method for a mobile robot according to claim 1, characterized in that: The intrinsic parameter matrix of the camera is expressed as: in, and is the focal length of the camera on the x-axis and y-axis, and are the principal point coordinates of the optical axis on the x-axis and y-axis, is the intrinsic parameter matrix of the camera.

6. The real-time posture correction method for a mobile robot according to claim 1 or 5, characterized in that: The estimating the current posture of the mobile robot according to the homography matrix and the intrinsic parameter matrix of the camera includes: Multiply the homography matrix H by the inverse of the camera's intrinsic parameter matrix K to get the normalized transformation matrix : in, The first two columns of and The third column is the scaled rotation matrix component. is the scaled translation vector; Will The first two columns of and Normalize to an orthogonal basis to obtain the rotation matrix R The first two columns of: Will and Cross product calculation of the third column : Rotation Matrix R And the normalized translation vector t is expressed as: Among them, the rotation matrix R and the normalized translation vector t constitute the posture matrix of the mobile robot.

7. The method for real-time posture correction of a mobile robot according to claim 6, characterized in that: The correcting the current posture of the mobile robot according to the reference posture of the mobile robot comprises: Calculate the angle difference of the mobile robot according to the yaw angle in the current posture of the mobile robot and the yaw angle in the reference posture, and if the angle difference is greater than a set threshold, adjust the yaw angle in the current posture of the mobile robot so that the angle difference of the mobile robot is less than the set threshold; The position of the mechanical arm on the mobile robot on the x-axis and the y-axis is adjusted according to the x and y offset values ​​in the translation vector t in the posture matrix so that the mechanical arm reaches the target position.

8. A mobile robot real-time posture correction system, characterized in that: include: An image acquisition module, used to collect an AprilTag label image based on a camera, and identify the two-dimensional image coordinates of four corner points of the AprilTag label in an image coordinate system from the AprilTag label image through pixel gradient calculation and clustering algorithm, wherein the AprilTag label is set on the mobile robot; A calculation module, for calculating a homography matrix based on the two-dimensional image coordinates of the four corner points of the AprilTag in the image coordinate system and the spatial coordinates of the four corner points in the three-dimensional world coordinate system; and estimating the current posture of the mobile robot according to the homography matrix and the intrinsic parameter matrix of the camera; The correction module is used to correct the current posture of the mobile robot according to the reference posture of the mobile robot.

9. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the processor is used to implement the steps of a method for real-time posture correction of a mobile robot when executing a computer management program stored in the memory.

10. A computer-readable storage medium, characterized in that: A computer management program is stored thereon, and when the computer management program is executed by the processor, the steps of the real-time posture correction method of the mobile robot are implemented.

Citation Information

Patent Citations

  • Positioning control method and system of flexible mechanical arm based on vision

    CN109227538A

  • Indoor mobile robot positioning method based on multiple cameras

    CN112833883A

  • Intelligent trolley track prediction method based on multi-view vision

    CN112884832A

  • Generation of ground truth gaze data for training in-cabin monitoring systems and applications

    US20240290112A1