Gait control method and control device for a robot
By acquiring and correcting the contact state amount of the robot foot end and calculating the target position and speed, the problem of poor smoothness of the robot's movement under different terrain in the prior art is solved, and terrain adaptability and noise relief are achieved.
Patent Information
- Application Number
- CN202111343069.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-12
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-11-12
AI Technical Summary
In the prior art, it is difficult to ensure smoothness of the motion in controlling the travel of a robot, especially in different terrains, the speed of the swing leg cannot be effectively adjusted.
By obtaining the current foot contact state amount and correcting it according to the time scale factor, the target value of the current foot position and speed is calculated, and the robot is then controlled to travel. This method is suitable for different terrain, adjusting the swing leg speed to ensure smooth motion.
The smoothness of the robot's movement under different terrain is achieved, the grounding noise is alleviated, and the service life of the robot's foot end is improved.
Smart Images

Figure CN116125845B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of robot control, and in particular, to a gait control method, a control device, a computer-readable storage medium, and a processor for a robot. Background Technique
[0002] The foot end of a robot can imitate the structure and movement form of a human leg, and has the movement characteristics of a human leg. During walking, it has complex interactions with the ground, and higher requirements for stable control are imposed on the robot during walking. Therefore, reasonable gait control is a prerequisite for achieving the smoothness of robot movement. A complete gait of a robot includes three stages: starting, mid-step, and stopping. In order to ensure the smoothness of robot movement, different swing speeds are required for different terrains. Therefore, there is an urgent need for a control method for a robot to adapt to different terrains, while ensuring the smoothness during the movement process and optimizing the noise during the landing process.
[0003] The above information disclosed in the background art section is only used to enhance the understanding of the background art of the technology described herein. Therefore, the background art may contain certain information that is not prior art known to those skilled in the art in this country. Summary of the Invention
[0004] The main purpose of the present application is to provide a gait control method, a control device, a computer-readable storage medium, and a processor for a robot, so as to solve the problem that it is difficult to ensure the smoothness of robot movement in the prior art.
[0005] According to one aspect of an embodiment of the present invention, a gait control method for a robot is provided, including: obtaining a current foot end contact state quantity, where the foot end contact state quantity is a state quantity linearly related to the swing phase time, and the swing phase time is the time elapsed from the starting point to the current foot end position during one leg swing process; correcting the foot end contact state quantity according to a time scale factor to obtain the corrected foot end contact state quantity, where the time scale factor is a parameter characterizing the fast and slow effects during the leg swing process; calculating a target value of the current foot end position according to the corrected foot end contact state quantity; calculating a target value of the current speed according to the corrected foot end contact state quantity and the swing phase time; and controlling the robot to move forward according to the target value of the current foot end position and the target value of the current speed.
[0006] Optionally, before calculating the target value of the current foot end position based on the corrected foot end contact state quantity and calculating the target value of the current speed based on the corrected foot end contact state quantity and the swing phase time, the method further includes: determining a traveling mode according to terrain information, where the traveling mode includes a flat ground traveling mode and a staircase traveling mode; determining the type of the swing leg trajectory according to the traveling mode, where the type of the swing leg trajectory includes a Bezier curve trajectory and a near trapezoidal trajectory, and the type of the swing leg trajectory corresponding to the flat ground traveling mode is the Bezier curve trajectory, and the type of the swing leg trajectory corresponding to the staircase traveling mode is the near trapezoidal trajectory; determining a first calculation formula and a second calculation formula according to the swing leg trajectory, where the first calculation formula is the calculation formula for the target value of the current foot end position, and the second calculation formula is the calculation formula for the target value of the current speed.
[0007] Optionally, determining a first calculation formula and a second calculation formula according to the swing leg trajectory includes: obtaining an initial foot end position and a foot end expected landing position, where the initial foot end position is the starting position of the swing leg trajectory, and the foot end expected landing position is the ending position of the swing leg trajectory; in the case where the type of the swing leg trajectory is the Bezier curve trajectory, calculating the position of a first intermediate point according to the initial foot end position and the foot end expected landing position, where the first intermediate point is the highest point of the Bezier curve trajectory; determining the first calculation formula according to the initial foot end position, the foot end expected landing position, the position of the first intermediate point, and the corrected foot end contact state quantity; and determining the second calculation formula according to the initial foot end position, the foot end expected landing position, the position of the first intermediate point, the corrected foot end contact state quantity, and the swing phase time.
[0008] Optionally, determining a first calculation formula and a second calculation formula according to the leg swinging trajectory includes: obtaining an initial foot end position and an expected foot end landing position, where the initial foot end position is the starting position of the leg swinging trajectory, and the expected foot end landing position is the ending position of the leg swinging trajectory; in the case where the type of the leg swinging trajectory is the near trapezoidal trajectory, calculating the positions of a second intermediate point and a third intermediate point according to the initial foot end position and the expected foot end landing position, the second trapezoid being the first trapezoid with the largest area, the second trapezoid being the trapezoid formed by connecting the initial foot end position, the expected foot end landing position, the position of the second intermediate point, and the position of the third intermediate point, and the first trapezoid being the trapezoid formed by connecting the initial foot end position, the expected foot end landing position, and the positions of any two intermediate points; determining the first calculation formula according to the initial foot end position, the expected foot end landing position, the position of the second intermediate point, the position of the third intermediate point, and the corrected foot end contact state quantity; determining the second calculation formula according to the initial foot end position, the expected foot end landing position, the position of the second intermediate point, the third intermediate point, the corrected foot end contact state quantity, and the swing phase time.
[0009] Optionally, the value of the foot end contact state quantity ranges from 0 to 1. When the current foot end position is at the initial foot end position, the current foot end contact state quantity is 0, and when the current foot end position is at the expected foot end landing position, the current foot end contact state quantity is 1.
[0010] Optionally, calculating a target value of the current foot end position according to the corrected foot end contact state quantity includes: substituting the corrected foot end contact state quantity into the first calculation formula to calculate the target value of the current foot end position.
[0011] Optionally, calculating a target value of the current speed according to the corrected foot end contact state quantity and the swing phase time includes: substituting the corrected foot end contact state quantity and the swing phase time into the second calculation formula to calculate the target value of the current speed.
[0012] According to another aspect of the embodiments of the present invention, there is also provided a gait control device for a robot, including: an acquisition unit configured to acquire a current foot-end contact state quantity, where the foot-end contact state quantity is a state quantity linearly related to the swing-phase time, and the swing-phase time is the time elapsed from the starting point to the current foot-end position during one leg-swing process; a correction unit configured to correct the foot-end contact state quantity according to a time-scale factor to obtain the corrected foot-end contact state quantity, where the time-scale factor is a parameter characterizing the fast-slow effect at different foot-end positions during the leg-swing process; a first calculation unit configured to calculate a target value of the current foot-end position according to the corrected foot-end contact state quantity; a second calculation unit configured to calculate a target value of the current speed according to the corrected foot-end contact state quantity and the swing-phase time; and a control unit configured to control the robot to move forward according to the target value of the current foot-end position and the target value of the current speed.
[0013] According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and the program executes any one of the above methods.
[0014] According to yet another aspect of the embodiments of the present invention, there is also provided a processor, where the processor is configured to run a program, and the program executes any one of the above methods when running.
[0015] In the embodiments of the present invention, in the above gait control method for a robot, first, a current foot-end contact state quantity is acquired. The foot-end contact state quantity is a state quantity linearly related to the swing-phase time, and the swing-phase time is the time elapsed from the starting point to the current foot-end position during one leg-swing process. Then, the foot-end contact state quantity is corrected according to a time-scale factor to obtain the corrected foot-end contact state quantity. The time-scale factor is a parameter characterizing the fast-slow effect during the leg-swing process. After that, a target value of the current foot-end position is calculated according to the corrected foot-end contact state quantity. Then, a target value of the current speed is calculated according to the corrected foot-end contact state quantity and the swing-phase time. Finally, the robot is controlled to move forward according to the target value of the current foot-end position and the target value of the current speed. This control method corrects the foot-end contact state quantity through the time-scale factor, so that the time-scale factor can be adjusted according to the fast-slow requirements, making the leg-swing slow during the landing and take-off processes on uneven terrains and accelerating the leg-swing speed on smooth terrains, ensuring the motion smoothness, solving the problem in the prior art that the leg-swing speed cannot be adjusted according to the terrain, resulting in poor motion smoothness, that is, solving the problem in the prior art that it is difficult to ensure the motion smoothness when controlling the robot to move forward. Moreover, the leg-swing is slow during the landing and take-off processes on uneven terrains, reducing the landing noise and improving the service life of the foot-end of the robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments and descriptions thereof of this application are used to explain this application and do not constitute an improper limitation to this application. In the drawings:
[0017] Figure 1 The flowchart of the gait control method of a robot according to an embodiment of this application is shown;
[0018] Figure 2 The schematic diagram of a Bessel curve trajectory according to an embodiment of this application is shown;
[0019] Figure 3 The schematic diagram of a near-trapezoidal trajectory according to an embodiment of this application is shown;
[0020] Figure 4 The schematic diagram of the relationship curve between the corrected foot-end contact state quantity and the foot-end contact state quantity according to an embodiment of this application is shown;
[0021] Figure 5 The flowchart of the gait control method of a robot according to Embodiment 1 and Embodiment 2 of this application is shown;
[0022] Figure 6 The schematic diagram of the gait control device of a robot according to an embodiment of this application is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] It should be noted that the following detailed descriptions are all illustrative and are intended to provide a further description of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs.
[0024] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to this application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0025] It should be understood that when an element (such as a layer, film, region, or substrate) is described as being "on" another element, the element can be directly on the other element, or there can also be an intermediate element. Moreover, in the specification and claims, when an element is described as being "connected" to another element, the element can be "directly connected" to the other element, or "connected" to the other element through a third element.
[0026] As described in the background art, it is difficult to ensure smooth movement in controlling the movement of a robot in the prior art. To solve the above problems, in a typical embodiment of the present application, a gait control method, a control device, a computer-readable storage medium, and a processor for a robot are provided.
[0027] According to an embodiment of the present application, a gait control method for a robot is provided.
[0028] Figure 1 is a flowchart of a gait control method for a robot according to an embodiment of the present application. As Figure 1 shown, the method includes the following steps:
[0029] Step S101, obtaining a current foot-end contact state quantity, where the foot-end contact state quantity is a state quantity linearly related to the swing-phase time, and the swing-phase time is the time elapsed from the starting point to the current foot-end position during a single leg swing;
[0030] Step S102, correcting the foot-end contact state quantity according to a time scale factor to obtain the corrected foot-end contact state quantity, where the time scale factor is a parameter characterizing the fast and slow effects during the leg swing;
[0031] Step S103, calculating a target value of the current foot-end position according to the corrected foot-end contact state quantity;
[0032] Step S104, calculating a target value of the current speed according to the corrected foot-end contact state quantity and the swing-phase time;
[0033] Step S105, controlling the robot to move according to the target value of the current foot-end position and the target value of the current speed.
[0034] In the above gait control method of the robot, first, the current foot-end contact state quantity is obtained. The above foot-end contact state quantity is a state quantity linearly related to the swing-phase time. The above swing-phase time is the time taken for the foot-end to pass from the starting point to the current foot-end position during one leg swing. Then, the above foot-end contact state quantity is corrected according to the time scale factor to obtain the corrected above foot-end contact state quantity. The above time scale factor is a parameter characterizing the fast and slow effects during the leg swing. After that, the target value of the current foot-end position is calculated based on the corrected above foot-end contact state quantity. After that, the target value of the current speed is calculated based on the corrected above foot-end contact state quantity and the above swing-phase time. Finally, the robot is controlled to move forward based on the target value of the current foot-end position and the target value of the current speed. This control method corrects the above foot-end contact state quantity through the time scale factor, so that the time scale factor can be adjusted according to the fast and slow requirements, making the leg swing slow during the landing and take-off processes on the uneven terrain section, and speeding up the leg swing speed on the smooth terrain section, ensuring the motion smoothness, solving the problem in the prior art that the leg swing speed cannot be adjusted according to the terrain, resulting in poor motion smoothness, that is, solving the problem that it is difficult to ensure the motion smoothness when controlling the robot to move forward in the prior art. Moreover, the leg swing is slow during the landing and take-off processes on the uneven terrain section, reducing the landing noise and improving the service life of the robot's foot-end.
[0035] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0036] In an embodiment of the present application, before calculating the target value of the current foot end position based on the corrected above-mentioned foot end contact state quantity and calculating the target value of the current speed based on the corrected above-mentioned foot end contact state quantity and the above-mentioned swing phase time, the above method further includes: determining a traveling mode according to the terrain information, the traveling mode including a flat ground traveling mode and a staircase traveling mode; determining the type of the swing leg trajectory according to the traveling mode, the type of the swing leg trajectory including a Bezier curve trajectory and a near trapezoidal trajectory, the type of the swing leg trajectory corresponding to the flat ground traveling mode being the Bezier curve trajectory, and the type of the swing leg trajectory corresponding to the staircase traveling mode being the near trapezoidal trajectory; determining a first calculation formula and a second calculation formula according to the swing leg trajectory, the first calculation formula being the calculation formula for the target value of the current foot end position, and the second calculation formula being the calculation formula for the target value of the current speed. Specifically, the terrain information includes flat ground terrain and staircase terrain, the traveling mode corresponding to the flat ground terrain is the flat ground traveling mode, and the traveling mode corresponding to the staircase terrain is the staircase traveling mode. Determining the type of the swing leg trajectory according to the traveling mode, that is, determining that the swing leg trajectory is a Bezier curve trajectory for the flat ground traveling mode and determining that the swing leg trajectory is a near trapezoidal trajectory for the staircase traveling mode. Different swing leg trajectories result in different calculation formulas for the target value of the current foot end position and the target value of the current speed. According to the corresponding formulas, the target value of the current foot end position and the target value of the current speed can be calculated in real time to control the position and speed of the foot end of the robot to approach the target value in real time, so that the actual swing leg trajectory will not deviate from the corresponding predetermined Bezier curve trajectory or near trapezoidal trajectory, further ensuring the smoothness of the movement.
[0037] In an embodiment of the present application, determining a first calculation formula and a second calculation formula according to the swing leg trajectory includes: obtaining an initial foot end position and a foot end expected landing position, the initial foot end position being the starting position of the swing leg trajectory, and the foot end expected landing position being the ending position of the swing leg trajectory; in the case where the type of the swing leg trajectory is the Bezier curve trajectory, calculating the position of a first intermediate point according to the initial foot end position and the foot end expected landing position, the first intermediate point being the highest point of the Bezier curve trajectory; determining the first calculation formula according to the initial foot end position, the foot end expected landing position, the position of the first intermediate point, and the corrected above-mentioned foot end contact state quantity; determining the second calculation formula according to the initial foot end position, the foot end expected landing position, the position of the first intermediate point, the corrected above-mentioned foot end contact state quantity, and the above-mentioned swing phase time. Specifically, as Figure 2As shown, when the type of the above-mentioned leg-swing trajectory is the above-mentioned Bezier curve trajectory, the position of the highest point of the above-mentioned Bezier curve trajectory can be calculated based on the above-mentioned initial foot-end position and the above-mentioned expected foot-end landing position, that is, based on the starting point p of the Bezier curve trajectory corresponding to the initial foot-end position 0 with coordinates [p 0 (x), p 0 (y)] and the final point p of the Bezier curve trajectory corresponding to the expected foot-end landing position 2 with coordinates [p 2 (x), p 2 (y)] to calculate the position coordinates of the first intermediate point p 1 . The calculation formula for the position coordinates of the first intermediate point p 1 is where h is the step height, and the foot-end contact state quantity s corrected according to the initial foot-end position, the expected foot-end landing position, and the position of the first intermediate point c determines the first calculation formula as p(s c ) = (1 - s c ) 2 p 0 + 2s c (1 - s c )p 1 + s c 2 p 2 . The target value p(s c ) of the current foot-end position is calculated. According to the initial foot-end position, the expected foot-end landing position, the position of the first intermediate point, the corrected foot-end contact state quantity s c and the swing phase time T swing , the second calculation formula is determined as v(s c ) = (2s c (p 0 - 2p 1 + p 2 ) + 2p 1 - 2p 0 ) / T swing . The target value v(s c ) of the current speed is calculated. It can be seen that when the type of the above-mentioned leg-swing trajectory is the above-mentioned Bezier curve trajectory, the calculation processes of the target value of the current foot-end position and the target value of the current speed are simple and the calculation amount is small, thus improving the timeliness of controlling the foot-end position and the leg-swing speed of the robot and realizing real-time control.
[0038] In an embodiment of the present application, determining a first calculation formula and a second calculation formula according to the above-mentioned leg swing trajectory includes: obtaining an initial foot end position and an expected foot end landing position, where the initial foot end position is the starting position of the leg swing trajectory, and the expected foot end landing position is the ending position of the leg swing trajectory; in the case where the type of the leg swing trajectory is the near-trapezoidal trajectory, calculating the positions of a second intermediate point and a third intermediate point according to the initial foot end position and the expected foot end landing position, the second trapezoid being the first trapezoid with the largest area, and the second trapezoid being the trapezoid formed by connecting the initial foot end position, the expected foot end landing position, the position of the second intermediate point, and the position of the third intermediate point, and the first trapezoid being the trapezoid formed by connecting the initial foot end position, the expected foot end landing position, and the positions of any two intermediate points; determining the first calculation formula according to the initial foot end position, the expected foot end landing position, the position of the second intermediate point, the position of the third intermediate point, and the corrected foot end contact state quantity; determining the second calculation formula according to the initial foot end position, the expected foot end landing position, the position of the second intermediate point, the third intermediate point, the corrected foot end contact state quantity, and the swing phase time. Specifically, as Figure 3 shown, in the case where the type of the leg swing trajectory is the near-trapezoidal trajectory, the positions of the second intermediate point and the third intermediate point can be calculated according to the initial foot end position and the expected foot end landing position, that is, according to the starting point q 0 of the Bezier curve trajectory corresponding to the initial foot end position 0 (x), q 0 (y)] and the final point q 3 of the Bezier curve trajectory corresponding to the expected foot end landing position 3 (x), q 3 (y)] to calculate the position coordinates of the second intermediate point q 1 and the position coordinates of the third intermediate point q 2 . The calculation formula for the position coordinates of the second intermediate point q 1 is The calculation formula for the position coordinates of the third intermediate point q 2 is where h is the step height, β is a shape parameter used to adjust the shape of the near-trapezoidal trajectory, and determining the first calculation formula according to the initial foot end position, the expected foot end landing position, the position of the second intermediate point, the position of the third intermediate point, and the corrected foot end contact state quantity s c is p(s c )=(1 - s c ) 3 p 0 +3sc (1 - s c ) 2 p 1 + 3s c 2 (1 - s c )p 2 + s c 3 p 3 , calculate the target value p(s c ) of the current foot tip position. According to the initial foot tip position, the expected foot tip landing position, the position of the second intermediate point, the position of the third intermediate point, the corrected foot tip contact state quantity s c and the swing phase time T swing determine that the second calculation formula is v(s c ) = (-3(1 - s c ) 2 p 0 + 3(1 - s c )(1 - 3s c )p 1 + 3s c (2 - 3s c )p 2 + 3s c 2 p 3 ) / T swing , calculate the target value v(s c ) of the current speed. It can be seen that in the case where the type of the above-mentioned leg swing trajectory is the above-mentioned near-trapezoidal trajectory, the calculation processes of the target value of the current foot tip position and the target value of the current speed are not complicated and the calculation amount is small, thereby improving the timeliness of controlling the foot tip position and the leg swing speed of the robot and realizing real-time control.
[0039] In an embodiment of the present application, the value of the above-mentioned foot tip contact state quantity is between 0 and 1. When the current foot tip position is located at the above-mentioned initial foot tip position, the current above-mentioned foot tip contact state quantity is 0. When the current foot tip position is located at the above-mentioned expected foot tip landing position, the current above-mentioned foot tip contact state quantity is 1. Specifically, the value of the foot tip contact state quantity s is between 0 and 1, and the calculation formula of the foot tip contact state quantity s is s = T swing / T, where T is the time of one leg swing. That is, when the current foot tip position is located at the above-mentioned initial foot tip position, the current above-mentioned foot tip contact state quantity is 0. When the current foot tip position is located at the above-mentioned expected foot tip landing position, the current above-mentioned foot tip contact state quantity is 1. According to the foot tip contact state quantity s and the time scale factor α, the corrected foot tip contact state quantity s c can be calculated, and the specific calculation formula is Such asFigure 4 As shown, curve 1 is the relationship curve between the corrected foot-end contact state quantity and the foot-end contact state quantity when the time scale factor is 1, and curve 2 is the relationship curve between the corrected foot-end contact state quantity and the foot-end contact state quantity when the time scale factor is 2. Those skilled in the art set different time scale factors α according to the requirements of movement on different terrains, and correct the foot-end contact state quantity s according to the set time scale factor α to adjust the speed of the swing leg, and further ensure the smoothness of the movement under different terrains.
[0040] In an embodiment of the present application, calculating the target value of the current foot-end position according to the corrected above-mentioned foot-end contact state quantity includes: substituting the corrected above-mentioned foot-end contact state quantity into the above-mentioned first calculation formula to calculate the target value of the current foot-end position. Specifically, after the swing leg trajectory is determined, the initial foot-end position, the expected landing position of the foot-end, and the positions of the intermediate points can be determined. The intermediate points are the first intermediate point, the second intermediate point, or the third intermediate point. Only the corrected above-mentioned foot-end contact state quantity s c is the unknown quantity, and substituting the corrected above-mentioned foot-end contact state quantity s c into the above-mentioned first calculation formula, the target value of the current foot-end position can be calculated. That is, after the swing leg trajectory is determined, the first calculation formula can be determined, and the subsequent control process can quickly output the target value of the current foot-end position according to the input unknown quantity, realizing real-time control.
[0041] In an embodiment of the present application, calculating the target value of the current speed according to the corrected above-mentioned foot-end contact state quantity and the above-mentioned swing phase time includes: substituting the corrected above-mentioned foot-end contact state quantity and the above-mentioned swing phase time into the above-mentioned second calculation formula to calculate the target value of the current speed. After the swing leg trajectory is determined, the initial foot-end position, the expected landing position of the foot-end, and the positions of the intermediate points can be determined. The intermediate points are the first intermediate point, the second intermediate point, or the third intermediate point. Only the corrected above-mentioned foot-end contact state quantity s c and the swing phase time T swing are the unknown quantities, and substituting the corrected above-mentioned foot-end contact state quantity s c and the above-mentioned swing phase T swing time into the above-mentioned second calculation formula, the target value of the current speed can be calculated. That is, after the swing leg trajectory is determined, the second calculation formula can be determined, and the subsequent control process can quickly output the target value of the current speed according to the input unknown quantity, realizing real-time control.
[0042] The embodiment of the present application also provides a gait control device for a robot. It should be noted that the gait control device for the robot in the embodiment of the present application can be used to execute the gait control method for the robot provided by the embodiment of the present application. The following introduces the gait control device for the robot provided by the embodiment of the present application.
[0043] Figure 5 is a schematic diagram of the gait control device for the robot according to the embodiment of the present application. As Figure 5 shown, the device includes:
[0044] An acquisition unit 10, configured to acquire a current foot-end contact state quantity, where the foot-end contact state quantity is a state quantity linearly related to the swing-phase time, and the swing-phase time is the time elapsed from the starting point to the current foot-end position during a leg-swinging process;
[0045] A correction unit 20, configured to correct the foot-end contact state quantity according to a time-scale factor to obtain the corrected foot-end contact state quantity, where the time-scale factor is a parameter characterizing the fast-slow effect at different foot-end positions during the leg-swinging process;
[0046] A first calculation unit 30, configured to calculate a target value of the current foot-end position according to the corrected foot-end contact state quantity;
[0047] A second calculation unit 40, configured to calculate a target value of the current speed according to the corrected foot-end contact state quantity and the swing-phase time;
[0048] A control unit 50, configured to control the robot to move forward according to the target value of the current foot-end position and the target value of the current speed.
[0049] In the gait control device of the above-mentioned robot, an acquisition unit acquires the current foot-end contact state quantity, where the foot-end contact state quantity is a state quantity linearly related to the swing-phase time, and the swing-phase time is the time taken for the foot-end to pass from the starting point to the current foot-end position during one leg-swing process; a correction unit corrects the foot-end contact state quantity according to a time-scale factor to obtain the corrected foot-end contact state quantity, where the time-scale factor is a parameter characterizing the fast-slow effect during the leg-swing process; a first calculation unit calculates the target value of the current foot-end position based on the corrected foot-end contact state quantity; a second calculation unit calculates the target value of the current speed based on the corrected foot-end contact state quantity and the swing-phase time; a control unit controls the robot to move forward based on the target value of the current foot-end position and the target value of the current speed. This control device corrects the foot-end contact state quantity through the time-scale factor, so that the time-scale factor can be adjusted according to the fast-slow requirements, making the leg-swing slow during the landing and liftoff processes on rough terrain sections, and accelerating the leg-swing speed on smooth terrain sections, ensuring motion smoothness, solving the problem in the prior art that the leg-swing speed cannot be adjusted according to the terrain, resulting in poor motion smoothness, that is, solving the problem in the prior art that it is difficult to ensure motion smoothness when controlling the robot to move forward. Moreover, the leg-swing is slow during the landing and liftoff processes on rough terrain sections, reducing the landing noise and increasing the service life of the robot's foot-end.
[0050] In an embodiment of the present application, the above device further includes a determination unit, and the determination unit includes a first determination module, a second determination module, and a third determination module. Among them, the first determination module is configured to determine a traveling mode according to terrain information before calculating a target value of the current foot end position based on the corrected foot end contact state quantity and calculating a target value of the current speed based on the corrected foot end contact state quantity and the swing phase time. The traveling mode includes a flat ground traveling mode and a staircase traveling mode; the second determination module is configured to determine the type of the swing leg trajectory according to the traveling mode. The type of the swing leg trajectory includes a Bezier curve trajectory and a near trapezoidal trajectory. The type of the swing leg trajectory corresponding to the flat ground traveling mode is the Bezier curve trajectory, and the type of the swing leg trajectory corresponding to the staircase traveling mode is the near trapezoidal trajectory; the third determination module is configured to determine a first calculation formula and a second calculation formula according to the swing leg trajectory. The first calculation formula is a calculation formula for the target value of the current foot end position, and the second calculation formula is a calculation formula for the target value of the current speed. Specifically, the terrain information includes flat ground terrain and staircase terrain. The traveling mode corresponding to the flat ground terrain is the flat ground traveling mode, and the traveling mode corresponding to the staircase terrain is the staircase traveling mode. The type of the swing leg trajectory is determined according to the traveling mode, that is, the swing leg trajectory is determined to be a Bezier curve trajectory in the flat ground traveling mode, and the swing leg trajectory is determined to be a near trapezoidal trajectory in the staircase traveling mode. Different swing leg trajectories result in different calculation formulas for the target value of the current foot end position and the target value of the current speed. The target value of the current foot end position and the target value of the current speed can be calculated in real time according to the corresponding formulas to control the position and speed of the foot end of the robot to approach the corresponding target values in real time, so that the actual swing leg trajectory will not deviate from the corresponding predetermined Bezier curve trajectory or near trapezoidal trajectory, further ensuring the smoothness of the movement.
[0051] In an embodiment of the present application, the third determination module includes a first acquisition sub-module, a first calculation sub-module, a first determination sub-module, and a second determination sub-module. Among them, the first acquisition sub-module is used to acquire the initial foot end position and the expected foot end landing position. The initial foot end position is the starting position of the swing leg trajectory, and the expected foot end landing position is the ending position of the swing leg trajectory. The first calculation sub-module is used to calculate the position of the first intermediate point according to the initial foot end position and the expected foot end landing position when the type of the swing leg trajectory is the Bezier curve trajectory. The first intermediate point is the highest point of the Bezier curve trajectory. The first determination sub-module is used to determine the first calculation formula according to the initial foot end position, the expected foot end landing position, the position of the first intermediate point, and the corrected foot end contact state quantity. The second determination sub-module is used to determine the second calculation formula according to the initial foot end position, the expected foot end landing position, the position of the first intermediate point, the corrected foot end contact state quantity, and the swing phase time. Specifically, as Figure 2 shown, when the type of the swing leg trajectory is the Bezier curve trajectory, the position of the highest point of the Bezier curve trajectory can be calculated according to the initial foot end position and the expected foot end landing position, that is, according to the starting point p 0 of the Bezier curve trajectory corresponding to the initial foot end position with coordinates [p 0 (x), p 0 (y)] and the final point p 2 of the Bezier curve trajectory corresponding to the expected foot end landing position with coordinates [p 2 (x), p 2 (y)] to calculate the position coordinates of the first intermediate point p 1 . The calculation formula for the position coordinates of the first intermediate point p 1 is where h is the step height. According to the initial foot end position, the expected foot end landing position, the position of the first intermediate point, and the corrected foot end contact state quantity s c , the first calculation formula is determined as p(s c ) = (1 - s c ) 2 p 0 + 2s c (1 - s c )p 1 + s c 2 p 2 . The target value p(s c ) of the current foot end position is calculated. According to the initial foot end position, the expected foot end landing position, the position of the first intermediate point, the corrected foot end contact state quantity s c and the swing phase time Tswing Determine the second calculation formula as v(s c ) = (2s c (p 0 -2p 1 +p 2 ) + 2p 1 -2p 0 ) / T swing , and calculate the target value v(s c ) of the current speed. It can be seen that when the type of the above swing leg trajectory is the above Bessel curve trajectory, the calculation processes of the target value of the current foot end position and the target value of the current speed are simple and the calculation amount is small, thereby improving the timeliness of controlling the foot end position and swing leg speed of the robot and realizing real-time control.
[0052] In an embodiment of the present application, the above third determination module further includes a second acquisition sub-module, a second calculation sub-module, a third determination sub-module, and a fourth determination sub-module. Among them, the above second acquisition sub-module is used to acquire the initial foot end position and the expected foot end landing position. The above initial foot end position is the starting position of the above swing leg trajectory, and the above expected foot end landing position is the ending position of the above swing leg trajectory; the above second calculation sub-module is used to calculate the position of the second intermediate point and the position of the third intermediate point according to the above initial foot end position and the above expected foot end landing position when the type of the above swing leg trajectory is the above near trapezoidal trajectory. The second trapezoid is the first trapezoid with the largest area. The above second trapezoid is the trapezoid formed by the connection of the above initial foot end position, the above expected foot end landing position, the position of the above second intermediate point, and the position of the above third intermediate point. The above first trapezoid is the trapezoid formed by the connection of the above initial foot end position, the above expected foot end landing position, and the positions of any two intermediate points; the above third determination sub-module is used to determine the above first calculation formula according to the above initial foot end position, the above expected foot end landing position, the position of the above second intermediate point, the position of the above third intermediate point, and the corrected above foot end contact state quantity; the above fourth determination sub-module is used to determine the above second calculation formula according to the above initial foot end position, the above expected foot end landing position, the position of the above second intermediate point, the above third intermediate point, the corrected above foot end contact state quantity, and the above swing phase time. Specifically, as Figure 3 shown, when the type of the above swing leg trajectory is the above near trapezoidal trajectory, the position of the above second intermediate point and the position of the above third intermediate point can be calculated according to the above initial foot end position and the above expected foot end landing position, that is, according to the starting point q 0 of the Bessel curve trajectory corresponding to the initial foot end position with coordinates [q 0 (x), q 0 (y)] and the final point q 3 of the Bessel curve trajectory corresponding to the expected foot end landing position with coordinates [q3 (x), q 3 Calculate the position coordinates of the second intermediate point q 1 and the position coordinates of the third intermediate point q 2 The position coordinates of the second intermediate point q 1 The calculation formula for the position coordinates is The third intermediate point q 2 The calculation formula for the position coordinates is where h is the step height, β is the shape parameter used to adjust the shape of the near-trapezoidal trajectory, and according to the initial foot end position, the expected foot end landing position, the position of the second intermediate point, the position of the third intermediate point, and the corrected foot end contact state quantity s c Determine the first calculation formula as p(s c ) = (1 - s c ) 3 p 0 + 3s c (1 - s c ) 2 p 1 + 3s c 2 (1 - s c )p 2 + s c 3 p 3 , calculate the target value p(s c ) of the current foot end position. According to the initial foot end position, the expected foot end landing position, the position of the second intermediate point, the position of the third intermediate point, the corrected foot end contact state quantity s c and the swing phase time T swing Determine the second calculation formula as v(s c ) = (-3(1 - s c ) 2 p 0 + 3(1 - s c )(1 - 3s c )p 1 + 3s c (2 - 3s c )p 2 + 3s c 2 p 3 ) / T swing , calculate the target value v(s c ) of the current speed. It can be seen that in the case where the type of the above-mentioned swing leg trajectory is the above-mentioned near-trapezoidal trajectory, the calculation process of the target value of the current foot end position and the target value of the current speed is not complicated, and the calculation amount is small, thus improving the timeliness of controlling the foot end position and swing leg speed of the robot and realizing real-time control.
[0053] In an embodiment of the present application, the value of the above-mentioned foot-end contact state quantity ranges from 0 to 1. When the current foot-end position is at the above-mentioned initial foot-end position, the current above-mentioned foot-end contact state quantity is 0. When the current foot-end position is at the above-mentioned expected foot-end landing position, the current above-mentioned foot-end contact state quantity is 1. Specifically, the value of the foot-end contact state quantity s ranges from 0 to 1, and the calculation formula of the foot-end contact state quantity s is s = T swing / T, where T is the time of one leg swing. That is, when the current foot-end position is at the above-mentioned initial foot-end position, the current above-mentioned foot-end contact state quantity is 0. When the current foot-end position is at the above-mentioned expected foot-end landing position, the current above-mentioned foot-end contact state quantity is 1. According to the foot-end contact state quantity s and the time scale factor α, the corrected foot-end contact state quantity s can be calculated c , and the specific calculation formula is As Figure 4 shown, Curve 1 is the relationship curve between the corrected foot-end contact state quantity and the foot-end contact state quantity when the time scale factor is 1, and Curve 2 is the relationship curve between the corrected foot-end contact state quantity and the foot-end contact state quantity when the time scale factor is 2. Those skilled in the art set different time scale factors α according to the requirements of movement on different terrains, and correct the foot-end contact state quantity s according to the set time scale factor α to adjust the speed of leg swing, and further ensure the smoothness of movement under different terrains
[0054] In an embodiment of the present application, the above-mentioned first calculation unit is used to substitute the corrected above-mentioned foot-end contact state quantity into the above-mentioned first calculation formula to calculate the target value of the above-mentioned current foot-end position. Specifically, after the leg swing trajectory is determined, the initial foot-end position, the expected foot-end landing position, and the position of the intermediate point can be determined. The intermediate point is the first intermediate point, the second intermediate point, or the third intermediate point. In the above-mentioned first calculation formula, only the corrected above-mentioned foot-end contact state quantity s c is the unknown quantity. Substitute the corrected above-mentioned foot-end contact state quantity s c into the above-mentioned first calculation formula, and the target value of the above-mentioned current foot-end position can be calculated. That is, after the leg swing trajectory is determined, the first calculation formula can be determined, and the subsequent control process can quickly output the target value of the current foot-end position according to the input unknown quantity to achieve real-time control
[0055] In an embodiment of the present application, the second calculation unit is configured to substitute the corrected foot-end contact state quantity and the swing phase time into the second calculation formula to calculate the target value of the current speed. After the swing leg trajectory is determined, the initial foot-end position, the expected foot-end landing position, and the position of the intermediate point can be determined. The intermediate point is the first intermediate point, the second intermediate point, or the third intermediate point. Only the corrected foot-end contact state quantity s in the first calculation formula c and the swing phase time T swing are unknowns. Substituting the corrected foot-end contact state quantity s c and the swing phase T swing time into the second calculation formula, the target value of the current speed can be calculated. That is, after the swing leg trajectory is determined, the second calculation formula can be determined, and the subsequent control process can quickly output the target value of the current speed according to the input unknowns to achieve real-time control.
[0056] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the technical solution of the present application will be described below in conjunction with specific embodiments.
[0057] Embodiment 1
[0058] As Figure 6 shown, the terrain for the robot to travel in this embodiment is flat terrain. The gait control method of the robot in this embodiment includes the following steps:
[0059] Obtain the current swing phase time T swing , and substitute the current swing phase time T swing into the formula s = T swing / T, where T is the time for one swing leg, and the current foot-end contact state quantity s can be obtained;
[0060] Substitute the set time scale factor α and the current foot-end contact state quantity s into to calculate the corrected foot-end contact state quantity s c ;
[0061] Substitute the corrected foot-end contact state quantity s c into the first calculation formula p(s c ) = (1 - s c ) 2 p 0 + 2s c (1 - scp1 + sc2p2 to calculate the target value p(s c ) of the current foot-end position, where p 0 is the coordinate of the starting point of the Bezier curve trajectory, p 1is the coordinate of the first intermediate point, and the above first intermediate point is the highest point of the Bezier curve trajectory, p 2 is the coordinate of the final point of the Bezier curve trajectory;
[0062] Substitute the corrected above foot-end contact state quantity s c and the above swing phase time T swing into the second calculation formula v(s c )=(2s c (p 0 -2p 1 +p 2 )+2p 1 -2p 0 ) / T swing , and calculate the target value v(s c ) of the above current speed;
[0063] According to the target value p(s c ) of the above current foot-end position and the target value v(s c ) of the above current speed, control the robot to move forward, so as to control the position and speed of the robot's foot-end to approach the corresponding target values in real time, so that the actual swing leg trajectory will not deviate from the corresponding predetermined Bezier curve trajectory.
[0064] Embodiment 2
[0065] As Figure 6 shown, the terrain for the robot to move forward in this embodiment is flat terrain, and the gait control method of the robot in this embodiment includes the following steps:
[0066] Obtain the current swing phase time T swing , and substitute the current swing phase time T swing into the formula s = T swing / T, where T is the time of one swing leg, and the current foot-end contact state quantity s can be obtained;
[0067] Substitute the set time scale factor α and the current foot-end contact state quantity s into and calculate the corrected above foot-end contact state quantity s c ;
[0068] Substitute the corrected above foot-end contact state quantity s c into the first calculation formula p(s c )=(1 - s c ) 3 p 0 +3s c (1 - sc2p1 + 3sc21 - scp2 + sc3p3, and calculate the target value p(s c ) of the above current foot-end position, where, q0 is the coordinate of the starting point of the near-trapezoidal trajectory, q 1 is the coordinate of the second intermediate point of the near-trapezoidal trajectory, q 2 is the coordinate of the third intermediate point of the near-trapezoidal trajectory, q 2 is the coordinate of the final point of the near-trapezoidal trajectory. The second trapezoid is the first trapezoid with the largest area. The above-mentioned second trapezoid is the trapezoid formed by the connection of the starting point of the above-mentioned near-trapezoidal trajectory, the final point of the above-mentioned near-trapezoidal trajectory, the above-mentioned second intermediate point and the above-mentioned third intermediate point. The above-mentioned first trapezoid is the trapezoid formed by the connection of the starting point of the above-mentioned near-trapezoidal trajectory, the final point of the above-mentioned near-trapezoidal trajectory and any two intermediate points;
[0069] Substitute the corrected above-mentioned foot-end contact state quantity s c and the above-mentioned swing phase time T swing into the second calculation formula v(s c ) = (-3(1 - s c ) 2 p 0 + 3(1 - s c )(1 - 3s c )p 1 + 3s c (2 - 3s c )p 2 + 3s c 2 p 3 ) / T swing , and calculate the target value v(s c ) of the current speed;
[0070] According to the above-mentioned target value p(s c ) of the current foot-end position and the above-mentioned target value v(s c ) of the current speed, control the robot to move forward, so as to control the position and speed of the foot-end of the robot to approach the corresponding target values in real time, so that the actual swing leg trajectory will not deviate from the corresponding predetermined near-trapezoidal trajectory.
[0071] The gait control device of the above-mentioned robot includes a processor and a memory. The above-mentioned acquisition unit, correction unit, first calculation unit, second calculation unit and control unit, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.
[0072] The processor contains a kernel, and the kernel retrieves the corresponding program units from the memory. One or more kernels can be set, and by adjusting the kernel parameters, the problem that it is difficult to ensure the motion smoothness when controlling the robot to move forward in the prior art can be solved.
[0073] The memory may include non-permanent memory in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0074] An embodiment of the present invention provides a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, the above method is implemented.
[0075] An embodiment of the present invention provides a processor, which is used to run a program, and when the above program runs, the above method is executed.
[0076] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, at least the following steps are implemented:
[0077] Step S101, obtaining a current foot-end contact state quantity, where the foot-end contact state quantity is a state quantity linearly related to the swing-phase time, and the swing-phase time is the time elapsed from the starting point to the current foot-end position during one leg swing process;
[0078] Step S102, correcting the foot-end contact state quantity according to a time scale factor to obtain the corrected foot-end contact state quantity, where the time scale factor is a parameter characterizing the fast and slow effects during the leg swing process;
[0079] Step S103, calculating a target value of the current foot-end position according to the corrected foot-end contact state quantity;
[0080] Step S104, calculating a target value of the current speed according to the corrected foot-end contact state quantity and the swing-phase time;
[0081] Step S105, controlling the robot to move forward according to the target value of the current foot-end position and the target value of the current speed.
[0082] The device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0083] This application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program initialized with at least the following method steps:
[0084] Step S101, obtaining a current foot-end contact state quantity, where the foot-end contact state quantity is a state quantity linearly related to the swing-phase time, and the swing-phase time is the time elapsed from the starting point to the current foot-end position during one leg swing process;
[0085] Step S102: Modify the above-mentioned foot-end contact state quantity according to the time scale factor to obtain the modified above-mentioned foot-end contact state quantity, where the time scale factor is a parameter characterizing the fast and slow effects during the swing leg process;
[0086] Step S103: Calculate the target value of the current foot-end position based on the modified above-mentioned foot-end contact state quantity;
[0087] Step S104: Calculate the target value of the current speed based on the modified above-mentioned foot-end contact state quantity and the above-mentioned swing phase time;
[0088] Step S105: Control the robot to move forward based on the target value of the current foot-end position and the target value of the current speed.
[0089] In the above embodiments of the present invention, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0090] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the above-mentioned unit division can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of units or modules can be in electrical or other forms.
[0091] The units described as separate components above may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0092] In addition, in each embodiment of the present invention, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0093] When the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the above method in various embodiments of the present invention. The aforementioned computer-readable storage medium includes: various media such as USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), external hard drives, magnetic disks, or optical discs that can store program codes.
[0094] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0095] 1) In the gait control method of the robot of the present application, first, the current foot-end contact state quantity is obtained. The above foot-end contact state quantity is a state quantity linearly related to the swing phase time. The above swing phase time is the time elapsed from the starting point to the current foot-end position during one leg swing. Then, the above foot-end contact state quantity is corrected according to the time scale factor to obtain the corrected above foot-end contact state quantity. The above time scale factor is a parameter characterizing the fast and slow effects during the leg swing process. After that, the target value of the current foot-end position is calculated based on the corrected above foot-end contact state quantity. After that, based on the corrected above foot-end contact state quantity and the above swing phase time, the target value of the current speed is calculated. Finally, the robot is controlled to move forward based on the target value of the current foot-end position and the target value of the current speed. This control method corrects the above foot-end contact state quantity through the time scale factor, so that the time scale factor can be adjusted according to the fast and slow requirements, making the leg swing slow during the landing and take-off processes on uneven terrain sections and accelerating the leg swing speed on smooth terrain sections, ensuring motion smoothness, and solving the problem in the prior art that the leg swing speed cannot be adjusted according to the terrain, resulting in poor motion smoothness, that is, solving the problem in the prior art that it is difficult to ensure motion smoothness when controlling the robot to move forward. Moreover, the leg swing is slow during the landing and take-off processes on uneven terrain sections, reducing the landing noise and increasing the service life of the foot-end of the robot.
[0096] 2) In the gait control device of the robot of the present application, the acquisition unit acquires the current foot-end contact state quantity, and the foot-end contact state quantity is a state quantity linearly related to the swing phase time. The swing phase time is the time elapsed from the starting point to the current foot-end position during one leg swing process; the correction unit corrects the foot-end contact state quantity according to the time scale factor to obtain the corrected foot-end contact state quantity. The time scale factor is a parameter characterizing the fast and slow effect during the leg swing process; the first calculation unit calculates the target value of the current foot-end position according to the corrected foot-end contact state quantity; the second calculation unit calculates the target value of the current speed according to the corrected foot-end contact state quantity and the swing phase time; the control unit controls the robot to move forward according to the target value of the current foot-end position and the target value of the current speed. The control device corrects the foot-end contact state quantity through the time scale factor, so that the time scale factor can be adjusted according to the fast and slow requirements, making the leg swing slow during the landing and take-off processes on the rough terrain section, and accelerating the leg swing speed on the smooth terrain section, ensuring the motion smoothness, solving the problem that the prior art cannot adjust the fast and slow leg swing speed according to the terrain, resulting in poor motion smoothness, that is, solving the problem that it is difficult to ensure the motion smoothness when controlling the robot to move forward in the prior art. Moreover, the leg swing is slow during the landing and take-off processes on the rough terrain section, reducing the landing noise and increasing the service life of the foot-end of the robot.
[0097] The above are only the preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. A gait control method for a robot, characterized in that, it includes: Obtaining the current foot-end contact state quantity, where the foot-end contact state quantity is a state quantity linearly related to the swing phase time, and the swing phase time is the time elapsed from the starting point to the current foot-end position during one leg swing; Setting different time scale factors according to the requirements of movement on different terrains, and correcting the foot-end contact state quantity according to the time scale factors to obtain the corrected foot-end contact state quantity, where the time scale factor is a parameter characterizing the fast and slow effects during the leg swing; Calculating the target value of the current foot-end position according to the corrected foot-end contact state quantity; Calculating the target value of the current speed according to the corrected foot-end contact state quantity and the swing phase time; Controlling the robot to move forward according to the target value of the current foot-end position and the target value of the current speed.
2. The method according to claim 1, characterized in that, Before calculating the target value of the current foot-end position according to the corrected foot-end contact state quantity and calculating the target value of the current speed according to the corrected foot-end contact state quantity and the swing phase time, the method further includes: Determining the traveling mode according to the terrain information, where the traveling mode includes a flat ground traveling mode and a staircase traveling mode; Determining the type of the leg swing trajectory according to the traveling mode, where the type of the leg swing trajectory includes a Bezier curve trajectory and a near-trapezoidal trajectory, and the type of the leg swing trajectory corresponding to the flat ground traveling mode is the Bezier curve trajectory, and the type of the leg swing trajectory corresponding to the staircase traveling mode is the near-trapezoidal trajectory; Determining a first calculation formula and a second calculation formula according to the leg swing trajectory, where the first calculation formula is the calculation formula for the target value of the current foot-end position, and the second calculation formula is the calculation formula for the target value of the current speed.
3. The method according to claim 2, characterized in that, Determining a first calculation formula and a second calculation formula according to the leg swing trajectory includes: Obtaining the initial foot-end position and the expected foot-end landing position, where the initial foot-end position is the starting position of the leg swing trajectory, and the expected foot-end landing position is the ending position of the leg swing trajectory; In the case where the type of the leg swing trajectory is the Bezier curve trajectory, calculating the position of a first intermediate point according to the initial foot-end position and the expected foot-end landing position, where the first intermediate point is the highest point of the Bezier curve trajectory; Determining the first calculation formula according to the initial foot-end position, the expected foot-end landing position, the position of the first intermediate point, and the corrected foot-end contact state quantity; Determining the second calculation formula according to the initial foot-end position, the expected foot-end landing position, the position of the first intermediate point, the corrected foot-end contact state quantity, and the swing phase time.
4. The method according to claim 2, characterized in that, Determining a first calculation formula and a second calculation formula according to the leg swing trajectory includes: Obtain the initial foot end position and the expected landing position of the foot end. The initial foot end position is the starting position of the swing leg trajectory, and the expected landing position of the foot end is the ending position of the swing leg trajectory; When the type of the swing leg trajectory is the near trapezoidal trajectory, calculate the position of the second intermediate point and the position of the third intermediate point according to the initial foot end position and the expected landing position of the foot end. The second trapezoid is the first trapezoid with the largest area. The second trapezoid is the trapezoid formed by the connection lines of the initial foot end position, the expected landing position of the foot end, the position of the second intermediate point, and the position of the third intermediate point. The first trapezoid is the trapezoid formed by the connection lines of the initial foot end position, the expected landing position of the foot end, and the positions of any two intermediate points; Determine the first calculation formula according to the initial foot end position, the expected landing position of the foot end, the position of the second intermediate point, the position of the third intermediate point, and the corrected foot end contact state quantity; Determine the second calculation formula according to the initial foot end position, the expected landing position of the foot end, the position of the second intermediate point, the third intermediate point, the corrected foot end contact state quantity, and the swing phase time.
5. The method according to claim 3 or 4, characterized in that, the value of the foot end contact state quantity is between 0 and 1. When the current foot end position is at the initial foot end position, the current foot end contact state quantity is 0. When the current foot end position is at the expected landing position of the foot end, the current foot end contact state quantity is 1.
6. The method according to any one of claims 2 to 4, characterized in that, calculating the target value of the current foot end position according to the corrected foot end contact state quantity includes: Substitute the corrected foot end contact state quantity into the first calculation formula to calculate the target value of the current foot end position.
7. The method according to any one of claims 2 to 4, characterized in that, calculating the target value of the current speed according to the corrected foot end contact state quantity and the swing phase time includes: Substitute the corrected foot end contact state quantity and the swing phase time into the second calculation formula to calculate the target value of the current speed.
8. A gait control device for a robot, characterized in that, comprising: An acquisition unit for acquiring the current foot end contact state quantity. The foot end contact state quantity is a state quantity linearly related to the swing phase time. The swing phase time is the time elapsed from the starting point to the current foot end position during one swing leg process; A correction unit for setting different time scale factors according to the requirements of movement on different terrains, and correcting the foot end contact state quantity according to the time scale factors to obtain the corrected foot end contact state quantity. The time scale factor is a parameter characterizing the fast and slow effects of different foot end positions during the swing leg process; A first calculation unit for calculating the target value of the current foot end position according to the corrected foot end contact state quantity; A second calculation unit, configured to calculate a target value of the current speed according to the corrected foot-end contact state quantity and the swing phase time; A control unit, configured to control the robot to move forward according to the target value of the current foot-end position and the target value of the current speed.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 7.
10. A processor, characterized in that the processor is configured to run a program, wherein when the program runs, it executes the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Fuzzy controller for controlling motion of four-footed robot
CN102147592A
Cleaning method and device of cleaning robot and storage medium
CN113576322A