A method for constructing a calibration model of a legged robot, a calibration method and device

CN117754582BActive Publication Date: 2026-07-24SHANGHAI NORMAL UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI NORMAL UNIVERSITY
Filing Date
2023-12-28
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing methods for calibrating legged robots are inefficient and require professionals to use specialized tools, which affects user experience.

Method used

By setting up a binocular camera and a plane mirror on a legged robot, and using a recognition model and inverse kinematics, the robot can automatically acquire key points in the robot's images and generate three-dimensional coordinates, construct a calibration model, and achieve automatic zero-position calibration.

Benefits of technology

The system enables self-calibration of the legged robot, improving calibration efficiency and ensuring that the robot accurately executes gait movements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117754582B_ABST
    Figure CN117754582B_ABST
Patent Text Reader

Abstract

The application relates to a construction method, a calibration method and a device of a calibration model of a foot-type robot, and belongs to the technical field of robots. The construction method is applied to a foot-type robot, the foot-type robot comprises a robot body, a binocular camera device arranged on the robot body and a plane mirror located on one side of the robot body; the construction method comprises the following steps: when a set joint of the robot body is moved, a robot image corresponding to the robot body in the plane mirror is acquired through the binocular camera device; key points corresponding to the set joint in the robot image are determined through a recognition model, and a picture three-dimensional coordinate of the key points is generated; the picture three-dimensional coordinate is converted into a robot three-dimensional coordinate; a preset model is trained through the robot image and the corresponding robot three-dimensional coordinate, and a calibration model of the foot-type robot is obtained. The technical scheme provided by the application can realize automatic zero-position calibration of the foot-type robot, so that the foot-type robot can accurately perform a gait action.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robotics, specifically to a method for constructing a calibration model for a legged robot, a calibration method, and an apparatus. Background Technology

[0002] Legged robots, especially quadruped robots, are becoming increasingly widely used, not only in industrial settings but also frequently in daily life, such as the miniature quadruped robot represented by Bittle.

[0003] The positioning accuracy of legged robots is fundamental to their precise movement. The zero point is the reference point of the robot's coordinate system; without it, the robot cannot determine its own position and therefore cannot move accurately. Zero-point calibration is necessary after incidents such as collisions, replacement of motors or other components, and manual rotation of robot joints. However, current calibration is primarily performed by professionals using specialized tools, which is inefficient and impacts user experience. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a method for constructing a calibration model for a legged robot, a calibration method, and an apparatus.

[0005] In a first aspect, the present invention provides a method for constructing a calibration model for a legged robot, applicable to a legged robot, the legged robot comprising a robot body, a binocular camera device disposed on the robot body, and a plane mirror located on one side of the robot body; the construction method includes:

[0006] When the set joints of the robot body move, the binocular camera device acquires the robot image corresponding to the robot body in the plane mirror;

[0007] The key points corresponding to the set joints in the robot image are determined by the recognition model, and the three-dimensional coordinates of the key points are generated.

[0008] Convert the three-dimensional coordinates of the image into three-dimensional coordinates of the robot;

[0009] A legged robot calibration model is obtained by training a preset model using the robot image and the corresponding three-dimensional coordinates of the robot.

[0010] Furthermore, the robot body has a marker structure at the designated joint; the step of determining the key points in the robot image corresponding to the designated joint through the recognition model includes:

[0011] The recognition model determines the selection box corresponding to the set joint in the robot image, and the key point is determined by the selection box and the labeling structure.

[0012] Furthermore, the marker structure is circular; determining the key points in the robot image corresponding to the designated joint using the selection box and the marker structure includes:

[0013] The key point in the robot image corresponding to the set joint is determined by the center of the circle of the marked structure within the selection box.

[0014] Furthermore, the construction method also includes:

[0015] Obtain the camera parameters of the binocular camera device;

[0016] The step of converting the three-dimensional coordinates of the image into three-dimensional coordinates of the robot includes:

[0017] Based on the camera parameters, the three-dimensional coordinates of the image are converted into the three-dimensional coordinates of the robot.

[0018] Furthermore, the robot body includes four legs, each leg comprising a rotatably connected thigh and a lower leg, and the set joint includes the end of the lower leg and the connection point between the thigh and the lower leg.

[0019] Secondly, the present invention provides a construction apparatus for a legged robot calibration model, applied to a legged robot, the legged robot including a robot body, a binocular camera device disposed on the robot body, and a plane mirror located on one side of the robot body; the construction apparatus includes:

[0020] The first acquisition module is used to acquire the robot image corresponding to the robot body in the plane mirror through the binocular camera device when the set joint of the robot body moves.

[0021] The calibration module is used to determine the key points in the robot image corresponding to the set joint by recognizing the model, and to generate the three-dimensional coordinates of the key points in the image.

[0022] The conversion module is used to convert the three-dimensional coordinates of the image into three-dimensional coordinates of the robot;

[0023] The training module is used to train a preset model using the robot image and the corresponding three-dimensional coordinates of the robot to obtain a legged robot calibration model.

[0024] Thirdly, the present invention provides a calibration method for a legged robot, the calibration method comprising:

[0025] When the set joints of the robot body move, the actual robot image corresponding to the robot body in the plane mirror is obtained through the binocular camera device;

[0026] The actual robot image is input into the legged robot calibration model constructed by the legged robot calibration model construction method described above, and the three-dimensional coordinates of the set joints of the robot body are obtained.

[0027] Based on inverse kinematics, the angular offset value of the set joint of the robot body is determined according to the three-dimensional coordinates.

[0028] Furthermore, the calibration method also includes:

[0029] The set joints of the robot body are calibrated based on the angle offset value.

[0030] Furthermore, determining the angular offset value of the set joint of the robot body based on inverse kinematics and the three-dimensional coordinates includes:

[0031] Determine the line connecting the set joint and the set origin corresponding to the three-dimensional coordinates, determine the angle between the connecting line and the set straight line, and generate the angle offset value based on the angle.

[0032] Fourthly, the present invention provides a calibration device for a legged robot, the calibration device comprising:

[0033] The second acquisition module is used to acquire an image of the actual robot corresponding to the robot body in a plane mirror through a binocular camera device when the set joints of the robot body move.

[0034] The model module is used to input the actual robot image into the legged robot calibration model constructed by the legged robot calibration model construction method described above, and obtain the three-dimensional coordinates of the set joints of the robot body;

[0035] The solution module is used to determine the angular offset value of the set joint of the robot body based on the inverse kinematics and the three-dimensional coordinates;

[0036] A calibration module is used to calibrate the set joints of the robot body according to the angle offset value.

[0037] The beneficial effects of the legged robot calibration model construction method, calibration method, and device of the present invention include: the legged robot can move independently, especially after joint movement. A binocular camera device mounted on the robot can capture images of the robot in a plane mirror, and then, for example, the corresponding joint key points can be determined by model recognition. Since the image acquisition is performed by a binocular camera device, the three-dimensional coordinates of each point in the image can be generated. Through corresponding transformation, the coordinates of the corresponding joint key points in the image can be converted to coordinates in the world coordinate system, i.e., the robot's three-dimensional coordinates. This allows for the acquisition of multiple sets of robot images and their corresponding three-dimensional coordinates. Based on this, the model can be trained to obtain a calibration model. When using the calibration model, inputting a robot image yields the coordinates of the corresponding joint key points, thereby determining the actual movement angle of the corresponding joint. Comparing this angle with the movement angle in the set control command, the deflection angle used for zero-position calibration can be determined, thus enabling automatic zero-position calibration of the legged robot to ensure accurate gait movement execution. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a schematic diagram of the structure of a legged robot according to an embodiment of the present invention;

[0040] Figure 2 This is a flowchart illustrating the method for constructing a calibration model for a legged robot according to an embodiment of the present invention.

[0041] Figure 3 This is a schematic diagram of the structure of the apparatus for constructing a calibration model of a legged robot according to an embodiment of the present invention;

[0042] Figure 4 This is a flowchart illustrating the legged robot calibration method according to an embodiment of the present invention.

[0043] Figure 5 This is a schematic diagram illustrating the calibration of a legged robot according to an embodiment of the present invention;

[0044] Figure 6 This is a schematic diagram of the inverse kinematics solution according to an embodiment of the present invention;

[0045] Figure 7 This is a schematic diagram of the structure of the legged robot calibration device according to an embodiment of the present invention. Detailed Implementation

[0046] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0047] like Figure 1 As shown, an embodiment of the present invention provides a legged robot including a robot body 1, a binocular camera device 2 mounted on the robot body 1, and a plane mirror 3 located on one side of the robot body 1. This legged robot can be a quadruped robot; in this embodiment, the miniature quadruped robot Bittle is selected. The binocular camera device 2 can be mounted on the top of the robot body 1, acting as the robot's glasses. When the binocular camera device 2 faces the plane mirror 3, the robot body 1 is imaged within the plane mirror 3, allowing the binocular camera device 2 to acquire the corresponding robot image.

[0048] like Figure 2 As shown, a method for constructing a calibration model for a legged robot according to an embodiment of the present invention is applied to the aforementioned legged robot. The method includes the following steps:

[0049] When the set joints of the robot body 1 move, the binocular camera device 2 acquires the robot image corresponding to the robot body 1 in the plane mirror 3.

[0050] Specifically, the robot body 1 can move autonomously through program settings, for example, automatically controlling the thigh joint to rotate at a specific angle to achieve a leg-lifting action. Since the robot body 1 can be imaged within the plane mirror 3, this image can be acquired by the binocular camera device 2, thus avoiding the camera's own blind spots. For example, when the left joint needs to move, the left joint side of the robot body 1 is positioned facing the plane mirror 3, and the binocular camera device 2 can acquire an image of the robot after the left joint has moved. Preferably, the binocular camera device 2 can be calibrated using, for example, the Zhang Zhengyou camera calibration method, for its internal and external parameters, and image correction can be performed using OpenCV programming. The functions cv2.stereoRectify, cv2.initUndistortRectifyMap, and cv2.remap are called to perform stereo correction to eliminate errors caused by camera distortion.

[0051] The key points corresponding to the set joints in the robot image are determined by the recognition model, and the three-dimensional coordinates of the key points are generated.

[0052] Specifically, since the legs of robot body 1 mainly move in rotation, the relevant joints can be regarded as a rotation axis, which will be presented as points in the planar image, or joint end points. Therefore, the bounding boxes corresponding to the joint end points can be identified first by the recognition model, and then the key points within them can be labeled using the annotation tool to generate their coordinates. For example, the recognition model can be the YOLOv5s model, which can be used for transfer learning and can use model parameters pre-trained on the ImageNet dataset. In addition, the open-source labelimg tool can be used for image annotation to obtain the key points and corresponding coordinates of different joints.

[0053] The three-dimensional coordinates of the image are converted into three-dimensional coordinates of the robot.

[0054] Specifically, since the robot images are acquired by the binocular camera device 2, the three-dimensional coordinates of each key point, especially the key points corresponding to the joints, can be obtained, or in other words, the three-dimensional coordinates of the image. However, when performing zero-position calibration on the robot body 1, it is necessary to use the robot coordinates as a reference. Therefore, it is necessary to convert the three-dimensional coordinates of the image into the world coordinate system, or in other words, the robot's three-dimensional coordinates in the robot coordinate system. This conversion can be achieved by combining relevant camera parameters.

[0055] A legged robot calibration model is obtained by training a preset model using the robot image and the corresponding three-dimensional coordinates of the robot.

[0056] Specifically, a deep learning model can be used as a preset model, and labeled robot-related images can be used as the training dataset for the model. The model is trained to obtain a legged robot calibration model. That is, by inputting a robot image captured by a binocular camera device 2, the coordinates of the corresponding joints can be obtained, which can then be used to perform zero-position calibration on the robot.

[0057] In addition, since there may be cases where the binocular camera device 2 cannot observe specific joint end points, the angle of each servo joint of the robot body 1 can be adjusted by the controller so that the binocular camera device 2 can identify the key joint point of each leg end through the plane mirror 3. The above steps are repeated until the relevant images of each joint key point are collected. Subsequently, the zero-position angle offset value of the servo connected to each joint end point can be calculated and calibrated.

[0058] In this embodiment, the legged robot can move autonomously. In particular, after joint movements, it can capture images of the robot in a plane mirror using a binocular camera device. Then, it can identify the corresponding joint key points by, for example, recognizing a model. Since the images are captured by the binocular camera device, the three-dimensional coordinates of each point in the image can be generated. Through corresponding transformation, the coordinates of the corresponding joint key points in the image can be converted into coordinates in the world coordinate system, that is, the robot's three-dimensional coordinates. In this way, multiple sets of robot images and their corresponding robot three-dimensional coordinates can be obtained. Based on this, the model can be trained to obtain a calibration model. When using the calibration model, the robot image is input to obtain the coordinates of the corresponding joint key points, and the actual movement angle of the corresponding joint can be determined. By comparing it with the movement angle in the set control command, the deflection angle used for zero-position calibration can be determined, thereby realizing automatic zero-position calibration of the legged robot to ensure that the legged robot accurately executes gait movements.

[0059] Optionally, a marker structure is provided at the designated joint of the robot body 1; the step of determining the key points in the robot image corresponding to the designated joint through the recognition model includes:

[0060] The recognition model determines the selection box corresponding to the set joint in the robot image, and the selection box and the marker structure determine the key points.

[0061] Specifically, for example, a corresponding marking structure can be attached to the lower leg joint of the robot body 1, and the center of the marking structure is the key point corresponding to the lower leg joint.

[0062] Optionally, the marker structure is circular; determining the key point in the robot image corresponding to the designated joint using the selection box and the marker structure includes:

[0063] The key point in the robot image corresponding to the set joint is determined by the center of the circle of the marked structure within the selection box.

[0064] Specifically, since the selection box is generally rectangular, and the marker structure is usually located within the selection box, and the marker structure is circular, its center can be easily determined, thus serving as the key point of the corresponding joint. More specifically, after obtaining an image of the robot with a circular marker structure, the outline of the circular marker structure can be detected using, for example, the Hough circle detection algorithm in the OpenCV library, thereby obtaining the center position of the robot joint end point, i.e., the detected center position.

[0065] Optionally, the construction method further includes the following steps:

[0066] Obtain the camera parameters of the binocular camera device 2.

[0067] The step of converting the three-dimensional coordinates of the image into three-dimensional coordinates of the robot includes:

[0068] Based on the camera parameters, the three-dimensional coordinates of the image are converted into the three-dimensional coordinates of the robot.

[0069] Specifically, during camera calibration, the intrinsic parameters (focal length, distortion factor, principal point position, etc.) of the binocular camera device 2 and the relative positions between the left and right cameras can be obtained, and the extrinsic parameters (rotation matrix R and translation matrix T) of the camera can be determined. After calibration is completed, the transformation relationship between the camera coordinate system, image coordinate system, and pixel coordinate system can be determined.

[0070] More specifically, since the binocular camera device 2 has two cameras, it can obtain two images, left and right, and thus obtain the pixel coordinates of the key joints of the legged robot in the two images. Then, stereo matching can be performed using the SGBM algorithm, and the disparity depth map can be calculated using the pixel coordinates of the two images to obtain the depth of the key joints, which is to say, the 3D coordinates of the image can be obtained. Through the transformation relationship between the camera coordinate system, image coordinate system, and pixel coordinate system, the 3D coordinates of the image can be transformed into the key point coordinates in the camera coordinate system. Then, using the extrinsic parameters obtained from camera calibration, the camera coordinate system (… Figure 1 The coordinates in the XcYcZc coordinate system are transformed into the world coordinate system, or the robot coordinate system. Figure 1 The coordinates in the XwYwZw coordinate system are used to obtain the coordinates of the joint key points in the robot coordinate system, which is the robot's three-dimensional coordinates.

[0071] Optionally, the robot body 1 includes four legs, each leg including a thigh and a lower leg that are rotatably connected, and the set joint includes the end of the lower leg and the connection between the thigh and the lower leg.

[0072] Specifically, taking the miniature quadruped robot Bittle as an example, it has four legs, each consisting of a thigh and a lower leg. The proximal end of the thigh is rotatably connected to the body, and the endpoint of the rotation axis corresponding to the thigh joint can be considered the origin, meaning that the motion angle of each joint can be referenced to this point. The distal end of the thigh is rotatably connected to the proximal end of the lower leg, forming the lower leg joint. Additionally, the distal end of the lower leg is typically used for contact with the ground and can also be considered a joint distal end. It should be noted that this method can be used for other quadruped robots, and even legged robots.

[0073] like Figure 3 As shown, an embodiment of the present invention provides a device for constructing a calibration model for a legged robot, which can be applied to the aforementioned legged robot. The device for constructing the calibration model for the legged robot includes:

[0074] The first acquisition module is used to acquire the robot image corresponding to the robot body 1 in the plane mirror 3 through the binocular camera device 2 when the set joint of the robot body 1 moves.

[0075] The calibration module is used to determine the key points in the robot image corresponding to the set joint by recognizing the model, and to generate the three-dimensional coordinates of the key points in the image.

[0076] The conversion module is used to convert the three-dimensional coordinates of the image into three-dimensional coordinates of the robot.

[0077] The training module is used to train a preset model using the robot image and the corresponding three-dimensional coordinates of the robot to obtain a legged robot calibration model.

[0078] like Figure 4 As shown, an embodiment of the present invention provides a legged robot calibration method comprising the following steps:

[0079] When the set joints of the robot body 1 move, the binocular camera device 2 acquires the actual robot image corresponding to the robot body 1 in the plane mirror 3.

[0080] Specifically, when a certain joint of the robot body 1 needs to be calibrated, the joint can be made to face the plane mirror 2 and move, and the corresponding actual robot image can be captured by the binocular camera device 2.

[0081] The actual robot image is input into the legged robot calibration model constructed by the legged robot calibration model construction method described above, and the three-dimensional coordinates of the set joints of the robot body 1 are obtained.

[0082] Specifically, the trained calibration model can generate the three-dimensional coordinates of the corresponding joint key points from the input robot image.

[0083] Based on inverse kinematics, the angular offset value of the set joint of the robot body 1 is determined according to the three-dimensional coordinates.

[0084] Specifically, after obtaining the three-dimensional coordinates of the corresponding joint key points, the actual motion angle can be solved through inverse kinematics. By comparing this with the motion angle in the set control command, the deflection angle, or angle offset value, can be obtained. Based on this angle offset value, the legged robot can be zero-position calibrated. In addition, the joints corresponding to each servo motor can be zero-position calibrated in this way.

[0085] Optionally, the calibration method further includes the following steps:

[0086] The set joints of the robot body 1 are calibrated according to the angle offset value.

[0087] Specifically, for example, if the motion angle in the control command is 10° clockwise, but the actual motion angle after inverse kinematics is 9° clockwise, then the joint angle offset value is 1°, indicating that the servo motor of the corresponding joint needs to be calibrated by 1°. Error compensation is performed through the zero offset value to ensure that the actual motion angle and the motion angle in the control command remain consistent during the subsequent execution of gait actions, thereby ensuring the accuracy and stability of the legged robot's movement.

[0088] Optionally, determining the angular offset value of the set joint of the robot body 1 based on inverse kinematics and the three-dimensional coordinates includes:

[0089] Determine the line connecting the set joint and the set origin corresponding to the three-dimensional coordinates, determine the angle between the connecting line and the set straight line, and generate the angle offset value based on the angle.

[0090] Specifically, such as Figure 5 As shown, taking the miniature quadruped robot Bittle as an example, since its leg joints have only two degrees of freedom, the solution only requires the X and Z coordinates. Figure 5 The X-axis in the equation is equivalent to Figure 1 The Xw axis in Figure 5 The Z-axis in the middle is equivalent to Figure 1 In the Zw axis, the head of the thigh can be regarded as the origin of the coordinate system. Figure 5 The two dotted lines in the middle connect the key joints at the beginning of the thigh and the beginning of the lower leg (end of the thigh) and the key joints at the beginning of the lower leg and the end of the lower leg, respectively. These two can be regarded as the thigh axis and the lower leg axis.

[0091] More specifically, such as Figure 6 As shown, when the thigh joint moves or the thigh and lower leg joints move simultaneously, the thigh axis forms an angle α with the Z-axis, and the lower leg axis forms an angle β with the X-axis. The coordinates of key points at the end of the lower leg can be obtained using the above method. Since only the X and Z coordinates are needed, the coordinates of this point are denoted as (x, z). For example, the process of solving for α and β using inverse kinematics is as follows:

[0092] The distance between the key point at the end of the lower leg and the origin is:

[0093]

[0094] Where, l = |z|.

[0095] The angle between the line connecting the two axes and the X-axis is:

[0096]

[0097] That is, x = scosq0, l = ssinq0.

[0098] Therefore, we can obtain:

[0099]

[0100] Where BL is the length of the thigh axis and LL is the length of the calf axis.

[0101] For α, we can obtain:

[0102] l 2 +x 2 +BL 2 -2BL(lcosα-xsinα)=LL 2

[0103] l 2 +x 2 +BL 2 -LL 2 =2BLs(sinq0cosα-cosq0sinα)

[0104] l 2 +x 2 +BL 2 -LL 2 =2BLssin(q0-α);

[0105] Therefore, the solution can be obtained as follows:

[0106]

[0107] Also available:

[0108]

[0109] For β, we can obtain:

[0110] l 2 +x 2 +LL 2 -2LL(lsinβ+xcosβ)=BL 2

[0111] l 2 +x 2 +LL 2 -BL 2 =2LLs(sinq0cosβ+cosq0sinβ)

[0112] l 2 +x 2 +LL 2 -BL 2 =2LLssin(q0+β);

[0113] Therefore, the solution can be obtained as follows:

[0114]

[0115] After obtaining the actual motion angles α and β of the relevant joints, the angle offset value can be obtained by comparing it with the motion angle in the control command, which is used for zero-position calibration of the relevant joints.

[0116] It should be noted that this embodiment uses the micro quadruped robot Bittle as an example only. This method is still applicable to other legged robots with multiple degrees of freedom in their joints.

[0117] like Figure 7 As shown, another embodiment of the present invention provides a legged robot calibration device comprising:

[0118] The second acquisition module is used to acquire the actual robot image corresponding to the robot body 1 in the plane mirror 3 through the binocular camera device 2 when the set joint of the robot body 1 moves.

[0119] The model module is used to input the actual robot image into the legged robot calibration model constructed by the legged robot calibration model construction method described above, and obtain the three-dimensional coordinates of the set joints of the robot body 1.

[0120] The solution module is used to determine the angular offset value of the set joint of the robot body 1 based on inverse kinematics and the three-dimensional coordinates.

[0121] Readers should understand that in the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0122] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for calibrating a legged robot, characterized in that, The method for calibrating a legged robot includes a robot body (1), a binocular camera device (2) mounted on the robot body (1), and a plane mirror (3) located on one side of the robot body (1). When the set joints of the robot body (1) move, the binocular camera device (2) acquires the actual robot image corresponding to the robot body (1) in the plane mirror (3); The actual robot image is input into the legged robot calibration model to obtain the three-dimensional coordinates of the set joint of the robot body (1); wherein, the method of constructing the legged robot calibration model includes: when the set joint of the robot body (1) moves, the robot image corresponding to the robot body (1) is obtained in the plane mirror (3) through the binocular camera device (2); the key points corresponding to the set joint in the robot image are determined by the recognition model, and the image three-dimensional coordinates of the key points are generated; the image three-dimensional coordinates are converted into robot three-dimensional coordinates; the preset model is trained by the robot image and the corresponding robot three-dimensional coordinates to obtain the legged robot calibration model; Based on inverse kinematics, the angular offset value of the set joint of the robot body (1) is determined according to the three-dimensional coordinates.

2. The legged robot calibration method according to claim 1, characterized in that, Also includes: The set joints of the robot body (1) are calibrated according to the angle offset value.

3. The legged robot calibration method according to claim 1 or 2, characterized in that, The determination of the angular offset value of the set joint of the robot body (1) based on inverse kinematics and the three-dimensional coordinates includes: Determine the line connecting the set joint and the set origin corresponding to the three-dimensional coordinates, determine the angle between the connecting line and the set straight line, and generate the angle offset value based on the angle.

4. The legged robot calibration method according to claim 1, characterized in that, The robot body (1) has a marker structure at the designated joint; the step of determining the key points in the robot image corresponding to the designated joint through the recognition model includes: The recognition model determines the selection box corresponding to the set joint in the robot image, and the key point is determined by the selection box and the labeling structure.

5. The legged robot calibration method according to claim 4, characterized in that, The marker structure is circular; determining the key points in the robot image corresponding to the designated joint using the selection box and the marker structure includes: The key point in the robot image corresponding to the set joint is determined by the center of the circle of the marked structure within the selection box.

6. The legged robot calibration method according to claim 1, characterized in that, Also includes: Obtain the camera parameters of the binocular camera device (2); The step of converting the three-dimensional coordinates of the image into three-dimensional coordinates of the robot includes: Based on the camera parameters, the three-dimensional coordinates of the image are converted into the three-dimensional coordinates of the robot.

7. The legged robot calibration method according to claim 1, characterized in that, The robot body (1) includes four legs, each leg including a rotatably connected thigh and a lower leg, and the set joint includes the end of the lower leg and the connection between the thigh and the lower leg.

8. A calibration device for a legged robot, characterized in that, The device is applied to a legged robot, which includes a robot body (1), a binocular camera device (2) mounted on the robot body (1), and a plane mirror (3) located on one side of the robot body (1). The legged robot calibration device includes: The second acquisition module is used to acquire the actual robot image corresponding to the robot body (1) in the plane mirror (3) through the binocular camera device (2) when the set joint of the robot body (1) moves; The model module is used to input the actual robot image into the legged robot calibration model to obtain the three-dimensional coordinates of the set joint of the robot body (1); wherein, the method for constructing the legged robot calibration model includes: when the set joint of the robot body (1) moves, acquiring the robot image corresponding to the robot body (1) in the plane mirror (3) through the binocular camera device (2); determining the key points in the robot image corresponding to the set joint through the recognition model, and generating the image three-dimensional coordinates of the key points; converting the image three-dimensional coordinates into robot three-dimensional coordinates; training the preset model through the robot image and the corresponding robot three-dimensional coordinates to obtain the legged robot calibration model; The solution module is used to determine the angle offset value of the set joint of the robot body (1) based on inverse kinematics and the three-dimensional coordinates.