Locating method, device, equipment, medium and foot-type robot for foot-type robot
By fusing knee joint angle and acceleration sensor data of a legged robot using a complementary filter, the problem of inaccurate positioning caused by sensor errors is solved, achieving higher precision positioning and odometry accuracy, making it a suitable positioning method for legged robots.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, the positioning methods for legged robots are easily affected by the strength of satellite signals and sensor errors, resulting in low positioning accuracy. This is especially true in indoor environments, where IMU-measured linear acceleration drift and joint angle sensor errors lead to inaccurate positioning.
Complementary filters are used to fuse knee joint angle sensor data and body acceleration sensor data of a legged robot. Velocity vectors are obtained through kinematic methods and then fused using complementary filters to determine the target velocity and obtain position information. Visual data is used to adjust the filter cutoff frequency to improve positioning accuracy.
By filtering out high-frequency noise and low-frequency errors, the positioning accuracy and odometer precision of the legged robot are improved, the impact of sensor errors is reduced, and the stability of positioning is enhanced.
Smart Images

Figure CN116858218B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motion control technology for legged robots, and more particularly to a positioning method, device, equipment, medium, and legged robot for legged robots. Background Technology
[0002] In areas such as path planning, autonomous tracking, and active obstacle avoidance for legged robots, obtaining the position of the robot's center of mass is particularly important for its motion control. Currently, to obtain the position information of a legged robot in the world coordinate system, outdoor positioning methods generally use the Global Positioning System (GPS, BeiDou), but the accuracy is easily affected by the strength of satellite signals and weather factors. When positioning a legged robot in a confined indoor space, ultra-wideband wireless communication technology (UWB) is required, thus necessitating the installation of additional positioning equipment.
[0003] Therefore, it is particularly important to determine the relative position of the legged robot's center of mass in the world coordinate system based solely on the robot's own sensor information. Currently, there are two main methods to achieve this:
[0004] The first approach involves measuring the linear acceleration at the robot's center of mass using a high-precision IMU (Inertial Measurement Unit) mounted on the legged robot (this linear acceleration needs to be subtracted from its own gravitational acceleration g), and then obtaining the robot's position information through two integrations. However, this approach is prone to significant drift over time, mainly because the linear acceleration measured by the IMU has low-frequency errors.
[0005] The second approach first estimates the robot's velocity based on the foot kinematics gait localization method, and then integrates this information to obtain the robot's position. However, the joint angle sensors used in this approach are prone to producing large signal deviations due to their inherent errors. Summary of the Invention
[0006] To address the shortcomings of the prior art, this invention provides a positioning method, apparatus, device, medium, and legged robot for legged robots, thereby improving the positioning accuracy of legged robots.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] In a first aspect, the present invention provides a positioning method for a legged robot, comprising:
[0009] Based on the angle sensor data at each knee joint of the legged robot, the first velocity vector of the legged robot in the world coordinate system is obtained using kinematic methods.
[0010] Based on the acceleration sensor data of the legged robot body, the second velocity vector of the legged robot in the world coordinate system is obtained;
[0011] The first velocity vector and the second velocity vector are fused by a complementary filter to obtain the target velocity of the legged robot in the world coordinate system, wherein the cutoff frequency of the complementary filter is predetermined.
[0012] Based on the target velocity, the position information of the legged robot in the world coordinate system is obtained by integration.
[0013] Optionally, the cutoff frequency of the complementary filter is determined by the following steps:
[0014] Obtain the visual data collected by the vision module of the legged robot;
[0015] Based on the visual data, the terrain information of the location of the legged robot is determined;
[0016] Based on the terrain information, the cutoff frequency of the complementary filter is determined.
[0017] Optionally, determining the terrain information of the location of the legged robot based on the visual data includes:
[0018] Based on the visual data, the terrain type of the location where the legged robot is located is identified;
[0019] Based on the identified terrain type, the terrain information of the location of the legged robot is determined.
[0020] Optionally, the step of fusing the first velocity vector and the second velocity vector through a complementary filter to obtain the target velocity of the legged robot in the world coordinate system includes fusing the first velocity vector and the second velocity vector according to the following equation (8):
[0021]
[0022] In equation (8), Let be the target velocity, s be the Laplace differential operator, and ω be the ω. c The cutoff frequency, The first velocity vector, This is the second velocity vector.
[0023] Optionally, the step of obtaining the first velocity vector of the legged robot in the world coordinate system based on the angle sensor data at each knee joint of the legged robot using kinematic methods includes:
[0024] Establish the body coordinate system of the legged robot;
[0025] Based on the transformation relationship between the fuselage coordinate system and the world coordinate system, and the angle sensor data, the first velocity vector is obtained using kinematic methods.
[0026] Optionally, obtaining the second velocity vector of the legged robot in the world coordinate system based on the acceleration sensor data of the legged robot's body includes:
[0027] The acceleration sensor data is corrected to obtain the target acceleration;
[0028] Integrating the target acceleration yields the second velocity vector of the legged robot in the world coordinate system.
[0029] In a second aspect, the present invention provides a positioning device for a legged robot, comprising:
[0030] The first velocity acquisition module is configured to acquire the first velocity vector of the legged robot in the world coordinate system based on the angle sensor data at each knee joint of the legged robot and using kinematic methods.
[0031] The second velocity acquisition module is configured to acquire the second velocity vector of the legged robot in the world coordinate system based on the acceleration sensor data of the legged robot body.
[0032] The fusion module is configured to fuse the first velocity vector and the second velocity vector through a complementary filter to obtain the target velocity of the legged robot in the world coordinate system, wherein the cutoff frequency of the complementary filter is predetermined.
[0033] The position acquisition module is configured to acquire the position information of the legged robot in the world coordinate system based on the target velocity.
[0034] Thirdly, the present invention provides a legged robot, including a body and a plurality of legs connected to the body, wherein the bottom end of the legs is the foot end, and the legged robot further includes the aforementioned positioning device.
[0035] Fourthly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the positioning method as described above.
[0036] Fifthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the positioning method as described above.
[0037] By adopting the above solution, the present invention has the following beneficial effects:
[0038] This invention first obtains a first velocity vector of the legged robot in the world coordinate system based on angle sensor data at each knee joint using kinematic methods. Simultaneously, it obtains a second velocity vector based on acceleration sensor data from the robot's body. Then, it fuses the first and second velocity vectors using a complementary filter to obtain a target velocity of the legged robot in the world coordinate system, where the cutoff frequency of the complementary filter is predetermined. Finally, based on the target velocity, it obtains the position information of the legged robot in the world coordinate system. Because this invention uses a complementary filter to fuse the first and second velocity vectors, it can, on the one hand, filter out the high-frequency components of the first velocity vector obtained from kinematics through low-pass filtering, thereby removing high-frequency white noise caused by sensor inaccuracies; on the other hand, it can filter out low-frequency errors in the acceleration sensor data through high-pass filtering, thereby removing the influence of low-frequency errors during integration, thus improving the local positioning accuracy of the legged robot. Attached Figure Description
[0039] Figure 1 This is a flowchart of the positioning method for a legged robot according to Embodiment 1 of the present invention;
[0040] Figure 2 This is a modeling diagram of the legged robot in Embodiment 1 of the present invention;
[0041] Figure 3 This is another modeling diagram of the legged robot in Embodiment 1 of the present invention;
[0042] Figure 4 This is a structural block diagram of the positioning device for the legged robot according to Embodiment 2 of the present invention;
[0043] Figure 5 This is a hardware architecture diagram of the electronic device according to Embodiment 3 of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.
[0045] The terminology used in this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0046] Example 1
[0047] This embodiment provides a positioning method for a legged robot, such as... Figure 1 The method specifically includes the following steps:
[0048] S1, based on the angle sensor data at each knee joint of the legged robot, the first velocity vector of the legged robot in the world coordinate system is obtained using kinematic methods, specifically through the following steps S11-S12:
[0049] S11, Establish the body coordinate system of the legged robot.
[0050] In this embodiment, a quadruped robot is used as an example to construct a system as follows: Figure 2 The image shows a legged robot model. Figure 2 In the model shown, the legged robot's body includes a main body 11 and multiple legs 12 connected to the main body 11 (four legs are shown in the figure). The bottom end of each leg 12 is its foot. The legs are numbered as follows: the right front leg is numbered 0, the left front leg is numbered 1, the right hind leg is numbered 2, and the left hind leg is numbered 3. An IMU is also located at the center of mass of the body, and angle sensors (such as angle encoders) are located at the knee joints of each leg to obtain angle sensor data at the knee joints.
[0051] In one optional implementation, a body coordinate system {B} is established with the center of mass of the legged robot body as the origin, the forward direction of the body is the x-direction of {B}, the left side of the body is the y-direction of {B}, and the z-direction of {B} is determined according to the right-hand rule.
[0052] In an alternative implementation, the world coordinate system {W} is established on the ground, and the x, y, z directions of {W} are defined according to ENU (Northeast-North Celestial Coordinate System).
[0053] S12, based on the transformation relationship between the body coordinate system and the world coordinate system and the angle sensor data at each knee joint of the legged robot, uses kinematic methods to obtain the first velocity vector.
[0054] Specifically, such as Figure 2 As shown, the transformation relationship between the positions of each foot of the legged robot in the world coordinate system {W} and the body coordinate system {B} is as follows:
[0055]
[0056] In the formula, Let be the position vector of the i-th foot of the legged robot relative to the origin in the world coordinate system. This position vector is the position of the foot relative to the world coordinate system defined at the initial moment of the robot. It can be assumed that the world coordinate system {W} and the body coordinate system {B} coincide at the beginning. The position coordinates of each foot can be obtained by the joint angle sensor according to the forward kinematics. Let be the position vector of the legged robot's center of mass (cm) relative to the origin in the world coordinate system. Let be the position vector of the i-th foot of the legged robot relative to the origin in the body coordinate system {B}.
[0057] Differentiating formula (1), we get:
[0058]
[0059] In the formula, Let be the velocity vector of the i-th foot of the legged robot in the world coordinate system. Let be the velocity vector of the legged robot's center of mass in the world coordinate system. Let be the velocity vector of the i-th foot tip of the legged robot relative to the origin of the coordinate system {B} in the body coordinate system.
[0060] In the support phase of a leg of a leg in a legged robot (there is always a leg in the support phase), assuming the i-th foot tip touches the ground and the sole does not slip, then the velocity vector of that foot tip in the world coordinate system is: The following relationship must be satisfied:
[0061]
[0062] When the foot touches the ground and the sole does not slip, a foot coordinate system {F} can be established with the foot as the origin, such as... Figure 3 As shown. Based on the angle sensor data at the knee joint, the position vector of the fuselage center of mass in the foot coordinate system {F} can be obtained using kinematic methods. The position vector of the centroid in the world coordinate system {W} satisfies the following transformation relationship:
[0063]
[0064] In the formula, Let be the position vector of the robot's center of mass in the world coordinate system. Let be the position vector of the foot in the world coordinate system. Let be the position vector of the centroid in the foot coordinate system.
[0065] Combining equations (3) and (4) and differentiating them with respect to time, we can obtain the velocity vector at the center of mass of the fuselage when the i-th foot touches the ground without slipping:
[0066]
[0067] In the formula, The velocity vector at the center of mass, obtained by solving in a foot coordinate system with the i-th foot as the origin, can be obtained by converting the position vector... It can be obtained by directly differentiating it with respect to time; Let be the velocity of the center of mass in the world coordinate system calculated using the i-th contacting leg.
[0068] The velocity vector of the legged robot's total center of mass in the world coordinate system is:
[0069]
[0070] In the formula, The weighted average velocity vector of the legged robot's center of mass relative to the world coordinate system over one motion cycle. This refers to the first velocity vector of the legged robot in the world coordinate system, where n is the number of legs of the legged robot, and c is the number of legs. i Let be the ground contact factor of the i-th leg.
[0071] Taking the Trot gait (diagonal trotting) of a quadruped robot as an example, in one movement cycle T, the right foreleg and left hindleg touch the ground, followed by the left foreleg and right hindleg. The foot contact situation is shown in the table below:
[0072] Table 1: Variation of Ground Contact Factor During the Gait of the Quadruped Robot Trot
[0073]
[0074] S2, Based on the acceleration sensor data of the legged robot's body, obtain the second velocity vector of the legged robot in the world coordinate system, specifically through the following steps S21-S22:
[0075] S21, Correct the acceleration sensor data of the legged robot body to obtain the target acceleration;
[0076] In this embodiment, the acceleration sensor data is measured by a triaxial acceleration sensor in the IMU mounted on the robot body. Since the measured acceleration sensor data includes the gravitational acceleration vector and the offset of the acceleration sensor, it deviates from the actual acceleration of the legged robot in the world coordinate system. Therefore, it needs to be corrected, specifically by the following formula (7):
[0077]
[0078] In the formula, This represents the actual acceleration of the legged robot in the world coordinate system (i.e., the corrected target acceleration). Accelerometer data measured by the IMU. It is the gravitational acceleration vector. This is the offset of the accelerometer. The initial parameters for IMU accelerometer calibration need to be measured in advance.
[0079] S22, Integrate the aforementioned target acceleration to obtain the second velocity vector of the legged robot in the world coordinate system.
[0080] It should be understood that by measuring the actual acceleration of the legged robot in the world coordinate system (i.e., the target acceleration) By integrating, the velocity vector of the legged robot in the world coordinate system can be obtained. (Denotes this as the second velocity vector).
[0081] Currently, during the movement of legged robots, their motion and stillness can introduce static drift into the velocity obtained by integrating acceleration. In practice, this static drift is often eliminated by detecting the relative displacement of the robot's various feet to determine the start and stop of its motion, thereby eliminating the drift bias of the accelerometer itself and obtaining a more accurate velocity vector of the legged robot in the world coordinate system.
[0082] S3, the first velocity vector and the second velocity vector are fused by a complementary filter to obtain the target velocity of the legged robot in the world coordinate system, wherein the cutoff frequency of the complementary filter is predetermined.
[0083] Specifically, the first velocity vector and the second velocity vector can be fused using a complementary filter according to the following equation (8):
[0084]
[0085] In equation (8), Let be the target velocity, s be the Laplace differential operator, and ω be the ω. c The cutoff frequency, The first velocity vector, This is the second velocity vector.
[0086] This step removes the low-frequency component of the IMU linear acceleration integral by using the high-pass filter of the complementary filter, thereby eliminating the cumulative integration error; and removes the high-frequency component of the body linear velocity obtained based on kinematics by using the low-pass filter of the complementary filter, thereby eliminating the high-frequency white noise caused by the inaccurate measurement of the angle sensor at the joint of the legged robot.
[0087] In an optional implementation, the cutoff frequency of the complementary filter is determined by the following steps S31-S33:
[0088] S31, acquire visual data collected by the vision module of the legged robot.
[0089] Specifically, during movement, the legged robot will collect real-time image information (i.e., visual data) of the surrounding environment through its built-in vision module.
[0090] S32, based on visual data, determines the terrain information of the legged robot's location.
[0091] Specifically, this step first identifies the terrain type of the legged robot's location based on the acquired visual data; then, based on the identified terrain type, it determines the terrain information of the legged robot's location.
[0092] In this embodiment, the terrain type may include any type such as sand, swamp, snow, mountain, grassland, or flat land, and the terrain information may include any one or more of the following: the friction coefficient, slope, stiffness, and roughness of the ground.
[0093] In an alternative implementation, deep learning can be used to identify the terrain type of the legged robot's location, and then the corresponding terrain information can be calculated based on the terrain type.
[0094] S33, based on terrain information, determines the cutoff frequency of the complementary filter.
[0095] Specifically, this embodiment can use a deep learning method to determine the optimal cutoff frequency as the cutoff frequency of the complementary filter based on the terrain information obtained in step S32, and the cutoff frequency can be adaptively adjusted according to changes in the ground.
[0096] In an optional implementation, when the legged robot's vision module malfunctions, the optimal cutoff frequency ω, obtained based on experimental experience when the legged robot walks on flat ground, can be selected. c,const It serves as the cutoff frequency for a complementary filter.
[0097] S4. Based on the aforementioned target velocity, the position information of the legged robot in the world coordinate system is obtained through integration.
[0098] Specifically, the position information of the legged robot in the world coordinate system after running for a period of time can be obtained according to the following formula (9):
[0099]
[0100] In equation (9), x t+1 Let y represent the x-coordinate of the center of mass of the legged robot at time t in the world coordinate system. t+1 v represents the ordinate of the center of mass of the legged robot in the world coordinate system at time t. t Let ψ be the target velocity of the robot's center of mass in the world coordinate system obtained by fusing the complementary filters at time t, where t is time and ψ is the target velocity. t The yaw angle of the legged robot's center of mass at time t can be obtained from the magnetometer measurement in the IMU.
[0101] In this embodiment, ψ t It can be used to represent the posture of a legged robot. Therefore, this embodiment can obtain the posture of the legged robot while determining its position information.
[0102] The method in this embodiment uses a complementary filter to fuse the first velocity vector and the second velocity vector. On the one hand, it can filter out the high-frequency part of the first velocity vector obtained based on kinematics through its low-pass filtering effect, thereby removing the high-frequency white noise caused by sensor inaccuracy. On the other hand, it can filter out the low-frequency error in the accelerometer data through its high-pass filtering effect, thereby removing the influence of low-frequency error during integration. Therefore, this embodiment can improve the positioning accuracy of the legged robot. When applied to the odometer of the legged robot, it can improve the accuracy of the odometer.
[0103] Example 2
[0104] This embodiment provides a positioning device for a legged robot, such as... Figure 4 As shown, the positioning device 10 includes a first velocity acquisition module 21, a second velocity acquisition module 22, a fusion module 23, and a position acquisition module 24.
[0105] The first velocity acquisition module 21 is configured to acquire the first velocity vector of the legged robot in the world coordinate system based on the angle sensor data at each knee joint of the legged robot and using kinematic methods; the second velocity acquisition module 22 is configured to acquire the second velocity vector of the legged robot in the world coordinate system based on the acceleration sensor data of the legged robot body; the fusion module 23 is configured to fuse the first velocity vector and the second velocity vector through a complementary filter to obtain the target velocity of the legged robot in the world coordinate system, wherein the cutoff frequency of the complementary filter is predetermined; and the position acquisition module 24 is configured to acquire the position information of the legged robot in the world coordinate system based on the target velocity.
[0106] In an optional implementation, the first velocity acquisition module 21 includes a modeling unit and a first velocity acquisition unit.
[0107] In an alternative implementation, the modeling unit is configured to establish the body coordinate system of the legged robot.
[0108] In this embodiment, a quadruped robot is used as an example to construct a system as follows: Figure 2 The image shows a legged robot model. Figure 2 In the model shown, the legged robot's body includes a main body 11 and multiple legs 12 connected to the main body 11 (four legs are shown in the figure). The bottom end of the leg 12 is its foot end. The legs are numbered according to the following rules: the right front leg is numbered 0, the left front leg is numbered 1, the right hind leg is numbered 2, and the left hind leg is numbered 3.
[0109] In one optional implementation, a body coordinate system {B} is established with the center of mass of the legged robot body as the origin, the forward direction of the body is the x-direction of {B}, the left side of the body is the y-direction of {B}, and the z-direction of {B} is determined according to the right-hand rule.
[0110] In an alternative implementation, the world coordinate system {W} is established on the ground, and the x, y, z directions of {W} are defined according to ENU (Northeast-North Celestial Coordinate System).
[0111] In an optional implementation, the first velocity acquisition unit is configured to acquire the first velocity vector using a kinematic method based on the transformation relationship between the body coordinate system and the world coordinate system and the angle sensor data at each knee joint of the legged robot.
[0112] Specifically, such as Figure 2 As shown, the transformation relationship between the positions of each foot of the legged robot in the world coordinate system {W} and the body coordinate system {B} is as follows:
[0113]
[0114] In the formula, Let be the position vector of the i-th foot of the legged robot relative to the origin in the world coordinate system. Let be the position vector of the legged robot's center of mass relative to the origin in the world coordinate system. Let be the position vector of the i-th foot of the legged robot relative to the origin in the body coordinate system {B}.
[0115] Differentiating formula (1), we get:
[0116]
[0117] In the formula, Let be the velocity vector of the i-th foot of the legged robot in the world coordinate system. Let be the velocity vector of the legged robot's center of mass in the world coordinate system. Let be the velocity vector of the i-th foot tip of the legged robot relative to the origin of the coordinate system {B} in the body coordinate system.
[0118] In the support phase of a leg of a leg in a legged robot (there is always a leg in the support phase), assuming the i-th foot tip touches the ground and the sole does not slip, then the velocity vector of that foot tip in the world coordinate system is: The following relationship must be satisfied:
[0119]
[0120] When the foot touches the ground and the sole does not slip, a foot coordinate system {F} can be established with the foot as the origin, such as... Figure 3 As shown. Based on the angle sensor data at the knee joint, the position vector of the fuselage center of mass in the foot coordinate system {F} can be obtained using kinematic methods. The position vector of the centroid in the world coordinate system {W} satisfies the following transformation relationship:
[0121]
[0122] In the formula, Let be the position vector of the robot's center of mass in the world coordinate system. Let be the position vector of the foot in the world coordinate system. Let be the position vector of the centroid in the foot coordinate system.
[0123] Combining equations (3) and (4) and differentiating them with respect to time, we can obtain the velocity vector at the center of mass of the fuselage when the i-th foot touches the ground without slipping:
[0124]
[0125] In the formula, The velocity vector at the center of mass, obtained by solving in a foot coordinate system with the i-th foot as the origin, can be obtained by converting the position vector... It can be obtained by directly differentiating it with respect to time; Let be the velocity of the center of mass in the world coordinate system calculated using the i-th contacting leg.
[0126] The velocity vector of the legged robot's total center of mass in the world coordinate system is:
[0127]
[0128] In the formula, The weighted average velocity vector of the legged robot's center of mass relative to the world coordinate system over one motion cycle. This refers to the first velocity vector of the legged robot in the world coordinate system, where n is the number of legs of the legged robot, and c is the number of legs. i Let be the ground contact factor of the i-th leg.
[0129] Taking the Trot gait (diagonal trotting) of a quadruped robot as an example, in one movement cycle T, the right foreleg and left hindleg touch the ground, followed by the left foreleg and right hindleg. The foot contact situation is shown in the table below:
[0130] Table 1: Variation of Ground Contact Factor During the Gait of the Quadruped Robot Trot
[0131]
[0132] In an optional implementation, the second speed acquisition module 22 includes a correction unit and a second speed acquisition unit.
[0133] In an optional implementation, the correction unit is configured to correct the acceleration sensor data of the legged robot body to obtain the target acceleration.
[0134] In this embodiment, the acceleration sensor data is measured by a triaxial acceleration sensor in the IMU mounted on the robot body. Since the measured acceleration sensor data includes the gravitational acceleration vector and the offset of the acceleration sensor, it deviates from the actual acceleration of the legged robot in the world coordinate system. Therefore, it needs to be corrected, specifically by the following formula (7):
[0135]
[0136] In the formula, This represents the actual acceleration of the legged robot in the world coordinate system (i.e., the corrected target acceleration). Accelerometer data measured by the IMU. It is the gravitational acceleration vector. This is the offset of the accelerometer. It needs to be measured in advance.
[0137] In an optional implementation, the second velocity acquisition unit is configured to integrate the aforementioned target acceleration to obtain the second velocity vector of the legged robot in the world coordinate system.
[0138] It should be understood that by measuring the actual acceleration of the legged robot in the world coordinate system (i.e., the target acceleration) By integrating, the velocity vector of the legged robot in the world coordinate system can be obtained. (Denotes this as the second velocity vector).
[0139] Currently, during the movement of legged robots, their motion and stillness can introduce static drift into the velocity obtained by integrating acceleration. In practice, the start and stop of movement can be determined by detecting the relative displacement of each leg, thereby eliminating the drift bias of the accelerometer itself and obtaining the velocity vector of the legged robot in the world coordinate system more accurately.
[0140] In an optional implementation, the fusion module 23 fuses the first velocity vector and the second velocity vector using a complementary filter according to the following equation (8):
[0141]
[0142] In equation (8), Let be the target velocity, s be the Laplace differential operator, and ω be the ω. c The cutoff frequency, The first velocity vector, This is the second velocity vector.
[0143] This module removes the low-frequency component of the linear acceleration integral of the IMU by using the high-pass filter of the complementary filter, thereby eliminating the cumulative integration error; and removes the high-frequency component of the body linear velocity obtained based on kinematics by using the low-pass filter of the complementary filter, thereby eliminating the high-frequency white noise caused by the inaccuracy of the joint sensor measurement of the legged robot.
[0144] In an optional embodiment, the positioning device 20 further includes a cutoff frequency determination module, which includes a visual data acquisition unit, a terrain information acquisition unit, and a cutoff frequency determination unit.
[0145] In an optional implementation, the visual data acquisition unit is configured to acquire visual data collected by the vision module of the legged robot.
[0146] Specifically, during movement, the legged robot will collect real-time image information (i.e., visual data) of the surrounding environment through its built-in vision module.
[0147] In an alternative implementation, the terrain information acquisition unit is configured to determine the terrain information of the legged robot's location based on visual data.
[0148] Specifically, the terrain information acquisition unit first identifies the terrain type of the legged robot's location based on the acquired visual data; then, based on the identified terrain type, it determines the terrain information of the legged robot's location.
[0149] In this embodiment, the terrain type may include any type such as sand, swamp, snow, mountain, grassland, or flat land, and the terrain information may include any one or more of the following: the friction coefficient, slope, stiffness, and roughness of the ground.
[0150] In an alternative implementation, deep learning can be used to identify the terrain type of the legged robot's location, and then the corresponding terrain information can be calculated based on the terrain type.
[0151] In an alternative implementation, the cutoff frequency determination unit is configured to determine the cutoff frequency of the complementary filter based on terrain information.
[0152] Specifically, this embodiment can use a deep learning method to determine the optimal cutoff frequency as the cutoff frequency of the complementary filter based on the terrain information obtained in step S32, and the cutoff frequency can be adaptively adjusted according to changes in the ground.
[0153] In an optional implementation, when the legged robot's vision module malfunctions, the optimal cutoff frequency ω, obtained based on experimental experience when the legged robot walks on flat ground, can be selected. c,const It serves as the cutoff frequency for a complementary filter.
[0154] In an optional implementation, the position acquisition module 24 acquires the position information of the legged robot in the world coordinate system after running for a period of time according to the following equation (9):
[0155]
[0156] In equation (9), x t+1 Let y represent the x-coordinate of the center of mass of the legged robot at time t in the world coordinate system. t+1 v represents the ordinate of the center of mass of the legged robot in the world coordinate system at time t. t Let ψ be the target velocity of the robot's center of mass in the world coordinate system obtained by fusing the complementary filters at time t, where t is time and ψ is the target velocity. tThe yaw angle of the legged robot's center of mass at time t can be obtained from the magnetometer measurement in the IMU.
[0157] In this embodiment, ψ t It can be used to represent the posture of a legged robot. Therefore, this embodiment can obtain the posture of the legged robot while determining its position information.
[0158] The device in this embodiment uses a complementary filter to fuse the first velocity vector and the second velocity vector. On the one hand, it can filter out the high-frequency part of the first velocity vector obtained based on kinematics through its low-pass filtering effect, thereby removing the high-frequency white noise caused by sensor inaccuracy. On the other hand, it can filter out the low-frequency error in the acceleration sensor data through its high-pass filtering effect, thereby removing the influence of low-frequency error during integration. Therefore, this embodiment can improve the positioning accuracy of the legged robot.
[0159] Example 3
[0160] This embodiment provides a legged robot, which includes a main body and multiple legs connected to the main body, with the bottom end of each leg being a foot. Furthermore, the legged robot of this embodiment also includes the positioning device 20 from embodiment 2.
[0161] By integrating the positioning device 20 from Embodiment 2, the legged robot in this embodiment can improve the positioning accuracy of the legged robot.
[0162] In an alternative embodiment, the aforementioned positioning device 20 is installed as an odometer for the legged robot within the body of the legged robot.
[0163] Example 4
[0164] This embodiment provides an electronic device, which can be represented in the form of a computing device (e.g., a server device), including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it can implement the steps of the positioning method provided in Embodiment 1.
[0165] Figure 5 A schematic diagram of the hardware structure of this embodiment is shown, as follows: Figure 5 As shown, the electronic device 30 specifically includes:
[0166] At least one processor 31, at least one memory 32, and a bus 33 for connecting different system components (including processor 31 and memory 32), wherein:
[0167] Bus 33 includes a data bus, an address bus, and a control bus.
[0168] The memory 32 includes volatile memory, such as random access memory (RAM) 321 and / or cache memory 322, and may further include read-only memory (ROM) 323.
[0169] The memory 32 also includes a program / utility 325 having a set (at least one) of program modules 324, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0170] The processor 31 executes various functional applications and data processing by running computer programs stored in the memory 32, such as the steps of the positioning method provided in Embodiment 1 of the present invention.
[0171] Electronic device 30 can further communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). This communication can be performed via input / output (I / O) interface 35. Furthermore, electronic device 30 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public network, such as the Internet) via network adapter 36. Network adapter 36 communicates with other modules of electronic device 30 via bus 33. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.
[0172] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.
[0173] Example 5
[0174] This embodiment provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the positioning method provided in Embodiment 1.
[0175] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.
[0176] In a possible implementation, the present invention can also be implemented as a program product comprising program code, which, when the program product is run on a terminal device, is used to cause the terminal device to perform steps implementing the positioning method provided in Embodiment 1.
[0177] The program code for executing the present invention can be written in any combination of one or more programming languages. The program code can be executed entirely on the user device, partially on the user device, as a standalone software package, partially on the user device and partially on a remote device, or entirely on a remote device.
[0178] While specific embodiments of the present invention have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of the present invention is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but all such changes and modifications fall within the scope of protection of the present invention.
Claims
1. A positioning method for a legged robot, characterized in that, include: Based on the angle sensor data at each knee joint of the legged robot, the first velocity vector of the legged robot in the world coordinate system is obtained using kinematic methods. Based on the acceleration sensor data of the legged robot body, the second velocity vector of the legged robot in the world coordinate system is obtained; The first velocity vector and the second velocity vector are fused by a complementary filter to obtain the target velocity of the legged robot in the world coordinate system, wherein the cutoff frequency of the complementary filter is predetermined. Based on the target velocity, the position information of the legged robot in the world coordinate system is obtained by an integration method; The step of fusing the first velocity vector and the second velocity vector using a complementary filter to obtain the target velocity of the legged robot in the world coordinate system includes fusing the first velocity vector and the second velocity vector according to the following formula (8): (8) In equation (8), Let be the target velocity, and s be the Laplace differential operator. The cutoff frequency, The first velocity vector, This is the second velocity vector.
2. The positioning method according to claim 1, characterized in that, The cutoff frequency of the complementary filter is determined by the following steps: Obtain the visual data collected by the vision module of the legged robot; Based on the visual data, the terrain information of the location of the legged robot is determined; Based on the terrain information, the cutoff frequency of the complementary filter is determined.
3. The positioning method according to claim 2, characterized in that, The step of determining the terrain information of the legged robot's location based on the visual data includes: Based on the visual data, the terrain type of the location where the legged robot is located is identified; Based on the identified terrain type, the terrain information of the location of the legged robot is determined.
4. The positioning method according to claim 1, characterized in that, The method of obtaining the first velocity vector of the legged robot in the world coordinate system using kinematic methods based on the angle sensor data at each knee joint of the legged robot includes: Establish the body coordinate system of the legged robot; Based on the transformation relationship between the fuselage coordinate system and the world coordinate system, and the angle sensor data, the first velocity vector is obtained using kinematic methods.
5. The positioning method according to claim 1, characterized in that, The acquisition of the second velocity vector of the legged robot in the world coordinate system based on the acceleration sensor data of the legged robot body includes: The acceleration sensor data is corrected to obtain the target acceleration; Integrating the target acceleration yields the second velocity vector of the legged robot in the world coordinate system.
6. A positioning device for a legged robot, characterized in that, A positioning device employing the positioning method of any one of claims 1-5, comprising: The first velocity acquisition module is configured to acquire the first velocity vector of the legged robot in the world coordinate system based on the angle sensor data at each knee joint of the legged robot and using kinematic methods. The second velocity acquisition module is configured to acquire the second velocity vector of the legged robot in the world coordinate system based on the acceleration sensor data of the legged robot body. The fusion module is configured to fuse the first velocity vector and the second velocity vector through a complementary filter to obtain the target velocity of the legged robot in the world coordinate system, wherein the cutoff frequency of the complementary filter is predetermined. The position acquisition module is configured to acquire the position information of the legged robot in the world coordinate system based on the target velocity.
7. A legged robot, comprising a body and a plurality of legs connected to the body, wherein the bottom end of each leg is a foot end, characterized in that, The legged robot also includes the positioning device as described in claim 6.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the positioning method as described in any one of claims 1-5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the positioning method as described in any one of claims 1 to 5.