A quadruped robot multi-gait switching and control method and computer readable medium
By combining a multi-gait phase controller and a dynamic model, smooth switching and stable control of the quadruped robot between various gaits were achieved, solving the stability problem of the quadruped robot during high-speed movement and improving the robot's motion flexibility and adaptability.
Patent Information
- Application Number
- CN202310387632.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-07
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-04-07
AI Technical Summary
Existing technologies struggle to enable quadruped robots to flexibly switch between various gaits and maintain stability, especially posing a challenge to stability control during high-speed movement.
By employing a multi-gait phase controller, a multi-gait foot trajectory generation controller, an attitude feedback controller, and a low-level motion actuator, and by setting the time difference, phase difference, and timer frequency between the airborne and landing phases, combined with MPC or ZMP dynamic models, the smooth switching and stable control of the quadruped robot's multi-gait is achieved.
It enables the quadruped robot to smoothly switch between various gaits, improving the robot's stability and mobility, and allowing it to adapt to changes in different environments.
Smart Images

Figure CN116627023B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of quadruped robot control, and particularly relates to a quadruped robot multi-gait switching and control method and a computer readable medium. BACKGROUND
[0002] Robotics is a comprehensive research field involving mechanical, control, hardware, artificial intelligence and other technologies, and bionic robots are an important branch of robot research. How to enable robots to have high-performance motion capabilities of animals in nature is one of the key problems in current research.
[0003] Quadruped robots are developed by imitating the motion of quadruped animals in nature, and have great application prospects in security inspection, warehouse logistics, engineering construction, intelligent companionship, and even national defense. The primary problem in applying these robots to these scenarios is to enable the robots to achieve high-speed stable and flexible walking, running, jumping and other gaits of quadruped animals in nature. How to flexibly switch between multiple gaits while maintaining the stability of the quadruped robot is an important research problem.
[0004] The controller of a quadruped robot mainly includes upper-layer motion planning and lower-layer path following. The control of a quadruped robot with a motor as an execution unit is based on environmental state and robot position, speed and acceleration state as input variables, and finally reflects the control of the trajectory and the size and direction of the force of the foot end of the quadruped robot through model predictive control or SLIP, ZMP and other dynamic model methods. The upper-layer control method needs to coordinate various gaits while sensing and feeding back the environment of the quadruped robot, and issuing corresponding control instructions to the lower-layer controller to adapt to the environment. SUMMARY
[0005] The present application provides a quadruped robot multi-gait control and smooth switching method for the control difficulties of quadruped robots, and provides a flexible interface for various quadruped robot dynamic balance control models. The present application includes four different hierarchical controllers, namely a multi-gait phase controller, a multi-gait foot end trajectory generation controller, a posture feedback controller, and a bottom-layer action executor.
[0006] Firstly, the multi-gait phase controller is used to control the time phase of the slow walk gait, the diagonal gait, the bound gait and the gallop running gait, and only needs to dynamically adjust the phase parameters to realize stable switching between the above-mentioned gaits. The controller includes the following steps:
[0007] Step 1: Set the air phase time, the landing phase cycle time, the left front leg phase difference, the right front leg phase difference, the left rear leg phase difference, the right rear leg phase difference, the timer frequency by the quadruped robot, calculate the single gait cycle time by the air phase time and the landing phase cycle time, obtain the current bottom system time by the quadruped robot, and take the current bottom system time as the phase control time;
[0008] Step 2: The quadruped robot calculates the left front leg single gait cycle starting time difference according to the single gait cycle time and the left front leg phase difference, calculates the right front leg single gait cycle starting time difference according to the single gait cycle time and the right front leg phase difference, calculates the left rear leg single gait cycle starting time difference according to the single gait cycle time and the left rear leg phase difference, and calculates the right rear leg single gait cycle starting time difference according to the single gait cycle time and the right rear leg phase difference;
[0009] Step 3: The quadruped robot calculates the duty cycle of different gaits of the left front leg according to the left front leg single gait cycle starting time difference, calculates the duty cycle of different gaits of the right front leg according to the right front leg single gait cycle starting time difference, calculates the duty cycle of different gaits of the right rear leg according to the right rear leg single gait cycle starting time difference, and calculates the duty cycle of different gaits of the left rear leg according to the left rear leg single gait cycle starting time difference;
[0010] Step 4: Real-time calculation of the control variable of the current leg to realize the control of the air phase foot and joint of the current leg;
[0011] Preferably, the air phase time in step 1 is T1;
[0012] The landing phase cycle time in step 1 is T2;
[0013] The left front leg phase difference in step 1 is S1;
[0014] The right front leg phase difference in step 1 is S2;
[0015] The left rear leg phase difference in step 1 is S3;
[0016] The right rear leg phase difference in step 1 is S4;
[0017] The timer frequency in step 1 is H;
[0018] The calculation of the single gait cycle time in step 1 is:
[0019] T stride =T1+T2
[0020] Wherein, T1 is the air phase time, and T2 is the landing phase cycle time;
[0021] The phase control time in step 1 is Ttelapse ;
[0022] As preferred, the time difference of the start time of the single gait cycle of the left front leg is calculated according to step 2 as follows:
[0023] t LF = T telapse - S1 * T stride
[0024] wherein T telapse is the phase control time, t LF is the control time of the left front leg, S1 is the phase difference of the left front leg, and T stride is the single gait cycle time.
[0025] The time difference of the start time of the single gait cycle of the right front leg is calculated according to step 2 as follows:
[0026] t RF = T telapse - S2 * T stride
[0027] wherein T telapse is the phase control time, t RF is the control time of the right front leg, S2 is the phase difference of the right front leg, and T stride is the single gait cycle time.
[0028] The time difference of the start time of the single gait cycle of the left rear leg is calculated according to step 2 as follows:
[0029] t RB = T telapse - S3 * T stride
[0030] wherein T telapse is the phase control time, t RB is the control time of the left rear leg, S3 is the phase difference of the left rear leg, and T stride is the single gait cycle time.
[0031] The time difference of the start time of the single gait cycle of the right rear leg is calculated according to step 2 as follows:
[0032] t LB = T telapse - S4 * T stride
[0033] wherein T telapse is the phase control time, t LB is the control time of the right rear leg, S4 is the phase difference of the right rear leg, and T stride is the single gait cycle time.
[0034] Preferably, step 3 involves calculating the duty cycle of the different gait states of the left foreleg based on the time difference at the start of a single gait cycle of the left foreleg, as detailed below:
[0035] If 0 < t LF <T st ,but
[0036] If t LF <-T sw ,but
[0037] If T st <t LF <T stride ,but D st_1 =1,
[0038] If -T st <t LF <0, then D st_1 =1
[0039] Among them, D st_1 D represents the duty cycle of the left foreleg landing phase. sw_1 T represents the duty cycle of the left foreleg's take-off phase. stride T is the time of a single gait cycle. st T represents the set landing phase time. sw The time t represents the set takeoff phase. LF Indicates the system time of the left foreleg;
[0040] Step 3 describes calculating the duty cycle of the different gait states of the right foreleg based on the time difference at the start of a single gait cycle of the right foreleg, as detailed below:
[0041] If 0 < t RF <T st ,but
[0042] If t RF <-T sw ,but
[0043] If T st <t RF <T stride ,but D st_2 =1
[0044] If -T st <t RF <0, then D st_2 =1
[0045] D st_2 represents the duty ratio of the right front leg landing phase, D sw_2 represents the duty ratio of the right front leg take-off phase, T stride is the single gait cycle time, T st represents the set landing phase time, T sw represents the set take-off phase time, t RF represents the system time of the right front leg;
[0046] The time difference of the right rear leg single gait cycle start time in step 3 calculates the duty ratio of the different gaits of the right rear leg, as follows:
[0047] If 0 RB <T st , then
[0048] If t RB <-T sw , then
[0049] If T st <t RB <T stride , then D st_3 = 1
[0050] If -T st <t RB <0, then D st_3 = 1
[0051] D st_3 represents the duty ratio of the right rear leg landing phase, D sw_3 represents the duty ratio of the right rear leg take-off phase, T stride is the single gait cycle time, T st represents the set landing phase time, T sw represents the set take-off phase time, t RB represents the system time of the right rear leg;
[0052] The time difference of the left rear leg single gait cycle start time in step 3 calculates the duty ratio of the different gaits of the left rear leg, as follows:
[0053] If 0 LB <T st , then
[0054] If t LB <-T sw , then
[0055] If T st <tLB <T stride ,but D st_4 =1
[0056] If -T st <t LB <0, then D st_4 =1
[0057] Among them, D st_4 D represents the duty cycle of the left hind leg landing phase. sw_4 T represents the duty cycle of the left hind leg's take-off phase. stride T is the time of a single gait cycle. st The time t represents the set landing phase. LB Indicates the system time of the left hind leg;
[0058] Step 4 is as follows:
[0059] Step 4.1: Combine the duty cycle D of the current leg landing phase. st_i Duty cycle D of the current leg take-off phase sw_i The position control coefficient legT1 of the current leg's landing phase is obtained using separate techniques. i The position control coefficient legT2 for the current leg in the air phase i The details are as follows:
[0060] D sw_i =1, 0<D st_i <1
[0061] D st_i =1, 0<D sw_i <1
[0062] i∈{1, 2, 3, 4}
[0063] Among them, legT1 i legT2 is the position control coefficient for the current leg's landing phase. i 'a' is the position control coefficient for the current leg's takeoff phase, 'a' is the set trajectory acceleration, and 'T' is the position control coefficient for the current leg's takeoff phase. st T represents the set landing phase time. sw This indicates the set time of the take-off phase. i=1 indicates that the current leg is the left front leg, i=2 indicates that the current leg is the right front leg, i=3 indicates that the current leg is the right rear leg, and i=4 indicates that the current leg is the left rear leg.
[0064] Step 4.2: Calculate the position coordinates of the next landing point based on the MPC or ZMP dynamic model, denoted as B(x). 11 y 11 );
[0065] The starting point coordinates of the current leg flight phase are recorded as A(x0, y0);
[0066] Point A is taken as the starting point of the twelve-order Bezier curve, and point B is taken as the terminal point of the twelve-order Bezier curve, a 12-order Bezier curve is constructed, the x-axis control coefficients of the 12-order Bezier curve are set as A0, A1,..., A 11 , and the y-axis control coefficients are set as B0, B1,..., B 11 , so that the projection of the distance |AB| between the starting point A and the terminal point B in the horizontal direction is the robot step length, and the vertical height of the curve is equal to the set robot step height;
[0067] Step 4.3: Control the current leg flight phase through the position control coefficient legT2 i and A0, A1,..., A 11 , and B0, B1,..., B 11 of the current leg flight phase, as follows:
[0068] The foot coordinates (X i , Y i , Z i ) of the current leg flight phase are calculated:
[0069] X i = A0*legT2 i 11 +A1*legT2 i 10 +A2*legT2 i 9 +A3*legT2 i 8 +A4*legT2 i 7 +…+A 11 *legT2 i 0
[0070] Y i =B0*legT2 i 11 +B1*legT2 i 10 +B2*legT2 i 9 +B3*legT2 i 8 +B4*legT2 i 7 +…+B 11 *legT2 i0
[0071] i∈{1,2,3,4}
[0072] Wherein, (X i , Y i , Z i ) represents the foot end coordinates of the current leg in the air phase, X i represents the X-axis coordinate of the foot end coordinates of the current leg in the air phase, Y i represents the Y-axis coordinate of the foot end coordinates of the current leg in the air phase, Z i represents the Z-axis coordinate of the foot end coordinates of the current leg in the air phase, legT2 i represents the position control coefficient of the current leg in the air phase, A k represents the k-order control coefficient of the 12-order Bezier curve x-axis, B k represents the k-order control coefficient of the 12-order Bezier curve y-axis.i=1 represents that the current leg is the left front leg, i=2 represents that the current leg is the right front leg, i=3 represents that the current leg is the right rear leg, and i=4 represents that the current leg is the left rear leg;
[0073] According to the foot end coordinates (X i , Y i , Z i ) obtained by inverse kinematics, the position of the motor is calculated, and the position is controlled by a position PID control algorithm to realize the foot end trajectory control of the air phase;
[0074] Step 4.4: Taking legT1 as the force action period, the motor joint is outputted by a moment PID control algorithm;
[0075] The application also provides a computer readable medium storing a computer program executed by an electronic device, when the computer program runs on the electronic device, the steps of the four-legged robot multi-gait switching and control method are executed.
[0076] The application has the advantages that the phase difference of each leg is set to realize the switching and control of multiple gaits of the four-legged robot, and the four-legged robot stability can be ensured by combining with an MPC or ZMP dynamics model. BRIEF DESCRIPTION OF DRAWINGS
[0077] Figure 1 : The method flowchart of the embodiment of the application. DETAILED DESCRIPTION
[0078] With reference to the drawings and embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0079] The following will be described in detail with reference to the drawings Figure 1 The specific embodiment of the present application is a quadruped robot multi-gait switching and control method, comprising:
[0080] Step 1: Set the flight phase time, the landing phase cycle time, the left front leg phase difference, the right front leg phase difference, the left rear leg phase difference, the right rear leg phase difference, and the timer frequency of the quadruped robot, calculate the single gait cycle time through the flight phase time and the landing phase cycle time, obtain the current bottom touch system time through the quadruped robot, and take the current bottom touch system time as the phase control time;
[0081] The flight phase time in step 1 is T1;
[0082] The landing phase cycle time in step 1 is T2;
[0083] The left front leg phase difference in step 1 is S1=0;
[0084] The right front leg phase difference in step 1 is S2=0;
[0085] The left rear leg phase difference in step 1 is S3=0.5;
[0086] The right rear leg phase difference in step 1 is S4=0.5;
[0087] The timer frequency in step 1 is H;
[0088] The calculation of the single gait cycle time in step 1 is:
[0089] T stride =T1+T2
[0090] Wherein, T1 is the flight phase time, T2 is the landing phase cycle time, and T stride =0.8
[0091] The phase control time in step 1 is T telapse ;
[0092] Step 2: The quadruped robot calculates the time difference of the single gait cycle start time of the left front leg according to the single gait cycle time and the left front leg phase difference, calculates the time difference of the single gait cycle start time of the right front leg according to the single gait cycle time and the right front leg phase difference, calculates the time difference of the single gait cycle start time of the left rear leg according to the single gait cycle time and the left rear leg phase difference, and calculates the time difference of the single gait cycle start time of the right rear leg according to the single gait cycle time and the right rear leg phase difference.
[0093] The calculation of the time difference of the single gait cycle start time of the left front leg in step 2 is:
[0094] t LF = T telapse - S1 * T stride
[0095] Wherein, T telapse is the phase control time, t LF is the control time of the left front leg, S1 is the left front leg phase difference, and T stride is the single gait cycle time.
[0096] The calculation of the time difference of the single gait cycle start time of the right front leg in step 2 is:
[0097] t RF = T telapse - S2 * T stride
[0098] Wherein, T telapse is the phase control time, t RF is the control time of the right front leg, S2 is the right front leg phase difference, and T stride is the single gait cycle time.
[0099] The calculation of the time difference of the single gait cycle start time of the left rear leg in step 2 is:
[0100] t RB = T telapse - S3 * T stride
[0101] Wherein, T telapse is the phase control time, t RB is the control time of the left rear leg, S3 is the left rear leg phase difference, and T stride is the single gait cycle time.
[0102] The calculation of the time difference of the single gait cycle start time of the right rear leg in step 2 is:
[0103] t LB = T telapse - S4 * T stride
[0104] wherein T telapse is a phase control time, t LB is a control time of the right rear leg, S4 is a phase difference of the right rear leg, T stride is a single gait cycle time.
[0105] Step 3: The quadruped robot calculates the duty cycles of different gaits of the left front leg according to the time difference of the single gait cycle start time of the left front leg, calculates the duty cycles of different gaits of the right front leg according to the time difference of the single gait cycle start time of the right front leg, calculates the duty cycles of different gaits of the right rear leg according to the time difference of the single gait cycle start time of the right rear leg, and calculates the duty cycles of different gaits of the left rear leg according to the time difference of the single gait cycle start time of the left rear leg.
[0106] Step 3: The duty cycles of different gaits of the left front leg are calculated according to the time difference of the single gait cycle start time of the left front leg, and the duty cycles of different gaits of the right front leg are calculated according to the time difference of the single gait cycle start time of the right front leg.
[0107] If 0 < t LF < T st , then
[0108] If t LF < -T sw , then
[0109] If T st < t LF < T stride , then D st_1 = 1,
[0110] If -T st < t LF < 0, then D st_1 = 1
[0111] wherein D st_1 represents the duty cycle of the landing phase of the left front leg, D sw_1 represents the duty cycle of the take-off phase of the left front leg, T stride is a single gait cycle time, T st represents the set landing phase time, T sw represents the set take-off phase time, t LF represents the system time of the left front leg.
[0112] Step 3: The duty cycles of different gaits of the right front leg are calculated according to the time difference of the single gait cycle start time of the right front leg, and the duty cycles of different gaits of the right front leg are calculated according to the time difference of the single gait cycle start time of the right front leg.
[0113] If 0 < t RF < T st , then
[0114] If t RF sw If t
[0115] If t st RF stride If t D st_2 = 1
[0116] If t st RF D st_2 = 1
[0117] Wherein, D st_2 represents the duty ratio of the right front leg landing phase, D sw_2 represents the duty ratio of the right front leg take-off phase, T stride is the single gait cycle time, T st represents the set landing phase time, T sw represents the set take-off phase time, t RF represents the system time of the right front leg;
[0118] The right rear leg single gait cycle start time difference calculates the duty ratio of different gaits of the right rear leg, as follows:
[0119] If 0 < t RB st
[0120] If t RB sw
[0121] If T st RB stride D st_3 = 1
[0122] If -T st RB D st_3 = 1
[0123] Wherein, D st_3 represents the duty ratio of the right rear leg landing phase, D sw_3 represents the duty ratio of the right rear leg take-off phase, T stride is the single gait cycle time, T st represents the set landing phase time, T sw represents the set take-off phase time, t RB The system time of the right hind leg;
[0124] The time difference of the single gait cycle start time of the left hind leg in step 3 is used to calculate the duty cycle of different gaits of the left hind leg, which is specifically as follows:
[0125] If 0 < t LB <T st , then
[0126] If t LB <-T sw , then
[0127] If T st <t LB <T stride , then D st_4 = 1
[0128] If -T st <t LB <0, then D st_4 = 1
[0129] Wherein, D st_4 represents the duty cycle of the left hind leg landing phase, D sw_4 represents the duty cycle of the left hind leg flight phase, T stride is the single gait cycle time, T st represents the set landing phase time, t LB represents the system time of the left hind leg;
[0130] Step 3.1, taking the initial gait as an example, first make the four legs stand and move to the diagonal gait start position, take the left front leg as the reference phase, initialize the phase difference parameters, S1=0, S2=0, S3=0.5, S4=0.5, initialize the gait cycle parameters, T sw =0.2, T st =0.35, the subsequent acceleration can directly reduce the value of T st to shorten the landing phase time to realize acceleration.
[0131] Step 3.2, start the timer interrupt, enter the timer interrupt every 0.0005, and perform related calculations of phase control in the timer interrupt, the system time t=t+0.0005, according to the ground detection to obtain the current cycle start time T DD , and the relative time of the current time relative to the start of the current gait cycle T telapse =t-T DD .
[0132] Step 3.3, get the time of each leg independently relative to the beginning of the current gait cycle,
[0133] leg t = T telapse - S leg * T stride
[0134] Step 3.4, calculate the 8 phase proportion values of the stance phase and the swing phase of each leg according to the method described in step 1.7
[0135] Step 3.5, calculate the size and direction of the force between each leg and the ground through MPC and ZMP, determine the initial point and the end point of the swing phase, and obtain the coordinates of 12 Bezier control points by equal ratio, and then calculate the control coefficients A1, A2, …, A 11 , and B1, B2, …, B 11 , the specific calculation process is not described.
[0136] Step 3.6, for the leg in the swing phase at the current time, obtain the coordinate values (X, Y, Z) of each leg in the three-dimensional space at the current time through the method shown in step 2.4, and then realize the tracking of the foot trajectory through the bottom motor controller.
[0137] Step 3.7, for the leg in the stance phase, the size and direction of the current leg force obtained in step 2.2 are used as the force action period of the stance phase parameter legT1, the torque output of the motor joint is realized through the bottom motor controller, and the position of the foot trajectory is limited according to the method of step 2.4 to realize the control of the stance phase motion.
[0138] Step 3.8, when receiving the gait switching instruction from the control handle, taking the diagonal gait switching to gollap running gait as an example, immediately reinitialize S1 = 0.2, S2 = 0.55, S3 = 0.75, S4 = 0, and reassign T sw = 0.2, T st = 0.1, the phase timer interrupt continues to calculate according to steps 1.1 to 1.7 to determine the position of the foot at the current time in the gollap gait, and the foot trajectory controller performs trajectory fitting and calculation to determine the position of the foot before switching and the initial position of the foot after switching the gait, and the two positions are taken as the starting and ending points, and the Bezier curve in steps 4.1 to 4.4 is used for interpolation fitting, thereby realizing the smooth switching of the gait.
[0139] Step 4: real-time calculation of the control variables of the current leg to realize the control of the swing phase foot and joint of the current leg;
[0140] Step 4.1: Combine the duty cycle D of the current leg stance phase st_i , the duty cycle D of the current leg swing phase sw_i respectively to obtain the position control coefficient legT1 of the current leg stance phase i , the position control coefficient legT2 of the current leg swing phase i , as follows:
[0141] D sw_i = 1, 0 < D st_i < 1
[0142] D st_i = 1, 0 < D sw_i < 1
[0143] i e {1, 2, 3, 4}
[0144] wherein legT1 i is the position control coefficient of the current leg stance phase, legT2 i is the position control coefficient of the current leg swing phase, a is the set trajectory acceleration, T st represents the set stance phase time, T sw represents the set swing phase time, i = 1 represents the current leg is the left front leg, i = 2 represents the current leg is the right front leg, i = 3 represents the current leg is the right rear leg, and i = 4 represents the current leg is the left rear leg;
[0145] Step 4.2, calculate the position coordinates of the next footfall point according to the MPC or ZMP dynamics model, denoted as B(x 11 , y 11 );
[0146] Take the starting point coordinates of the current leg swing phase as A(x0, y0);
[0147] Take point A as the starting point of the 12-order Bezier curve and take point B as the terminal point of the 12-order Bezier curve, construct a 12-order Bezier curve, the x-axis control coefficients of which are set as A0, A1,..., A 11 , and the y-axis control coefficients of which are set as B0, B1,..., B 11 , so that the projection of the distance |AB| between the starting point A and the terminal point B in the horizontal direction is the robot step length, and the vertical height of the curve is equal to the set robot step height;
[0148] Step 4.3: obtain the position control coefficient legT2 i of the current leg swing phase and A0, A1,..., A 11and B0, B1,..., B 11 The current leg flight phase is controlled as follows:
[0149] The foot coordinates (X i , Y i , Z i ) of the current leg flight phase are calculated:
[0150] X i = A0*legT2 i 11 + A1*legT2 i 10 + A2*legT2 i 9 + A3*legT2 i 8 + A4*legT2 i 7 +... + A 11 *legT2 i 0
[0151] Y i = B0*legT2 i 11 + B1*legT2 i 10 + B2*legT2 i 9 + B3*legT2 i 8 + B4*legT2 i 7 +... + B 11 *legT2 i 0
[0152] i e {1, 2, 3, 4}
[0153] wherein (X i , Y i , Z i ) represents the foot coordinates of the current leg flight phase, X i represents the X-axis coordinate of the foot coordinates of the current leg flight phase, Y i represents the Y-axis coordinate of the foot coordinates of the current leg flight phase, Z i represents the Z-axis coordinate of the foot coordinates of the current leg flight phase, legT2 i represents the position control coefficient of the current leg flight phase, A k represents the k-order control coefficient of the 12-order Bezier curve x-axis, and B kThe k-order control coefficient of the y-axis of the 12-order Bezier curve represents the current leg as the left front leg, i=2 represents the current leg as the right front leg, i=3 represents the current leg as the right rear leg, and i=4 represents the current leg as the left rear leg.
[0154] According to the joint inverse kinematics, the foot end coordinates (X i , Y i , Z i ) are obtained, and the position of the motor is calculated reversely, and the position is controlled by the position PID control algorithm to realize the foot end trajectory control of the take-off phase.
[0155] Step 4.4: Taking legT1 as the force action period, the torque output of the motor joint is controlled by the torque PID control algorithm.
[0156] The specific embodiments of the application also provide a computer readable medium.
[0157] The computer readable medium is a server workstation.
[0158] The server workstation stores a computer program executed by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the steps of the quadruped robot multi-gait switching and control method of the embodiments of the application.
[0159] It should be understood that the parts not elaborated in the specification are all prior art.
[0160] It should be understood that the above description of the preferred embodiments is more detailed, and therefore should not be considered as limiting the scope of patent protection of the application. Those skilled in the art can make substitutions or modifications without departing from the scope of the claims, and all fall within the scope of protection of the application. The scope of protection of the application should be subject to the appended claims.
Claims
1. A quadruped robot multi-gait switching and control method, characterized in that: a current bottom touch system time is obtained by a quadruped robot, and the current bottom touch system time is taken as a phase control time; a time difference of a single gait cycle start time of different legs is calculated; a duty cycle of different gaits of different legs is calculated according to the time difference of the single gait cycle start time of different legs; a control variable of a current leg is calculated in real time to realize the control of the leg, foot and joint of the current leg in a flight phase; the quadruped robot multi-gait switching and control method comprises the following steps Step 1: a flight phase time, a landing phase cycle time, a left front leg phase difference, a right front leg phase difference, a left rear leg phase difference, a right rear leg phase difference and a timer frequency are set by a quadruped robot, a single gait cycle time is calculated by the flight phase time and the landing phase cycle time, a current bottom touch system time is obtained by the quadruped robot, and the current bottom touch system time is taken as a phase control time; Step 2: a quadruped robot calculates a left front leg single gait cycle start time difference according to the single gait cycle time and the left front leg phase difference, calculates a right front leg single gait cycle start time difference according to the single gait cycle time and the right front leg phase difference, calculates a left rear leg single gait cycle start time difference according to the single gait cycle time and the left rear leg phase difference, and calculates a right rear leg single gait cycle start time difference according to the single gait cycle time and the right rear leg phase difference; Step 3: a quadruped robot calculates a duty cycle of different gaits of a left front leg according to the left front leg single gait cycle start time difference, calculates a duty cycle of different gaits of a right front leg according to the right front leg single gait cycle start time difference, calculates a duty cycle of different gaits of a right rear leg according to the right rear leg single gait cycle start time difference, and calculates a duty cycle of different gaits of a left rear leg according to the left rear leg single gait cycle start time difference; Step 4: a control variable of a current leg is calculated in real time to realize the control of the leg, foot and joint of the current leg in a flight phase; The void phase time as described in Step 1 is ; The ground phase cycle time of step 1 is ; The left front leg phase difference described in step 1 is ; The right front leg phase difference described in step 1 is ; The phase difference of the left rear leg described in step 1 is ; The phase difference of the right rear leg described in step 1 is ; the timer frequency in Step 1 is H; the calculation of the single gait cycle time in Step 1 is as follows: wherein, is the flight phase time, is the ground phase period time; The phase control time described in step 1 is ; the calculation of the left front leg single gait cycle start time difference in Step 2 is as follows: wherein, is the phase control time, is the control time for the left front leg, is the phase difference for the left front leg, is the single gait cycle time; the calculation of the right front leg single gait cycle start time difference in Step 2 is as follows: wherein, is the phase control time, is the control time for the right front leg, is the phase difference for the right front leg, is the single gait cycle time; the calculation of the left rear leg single gait cycle start time difference in Step 2 is as follows: wherein, is the phase control time, is the control time for the left hind leg, is the phase difference for the left hind leg, is the single gait cycle time; the calculation of the right rear leg single gait cycle start time difference in Step 2 is as follows: wherein, is the control time for the right front leg, is the control time for the right rear leg, is the phase difference for the right rear leg, is the time for a single gait cycle. 2.The quadruped robot multi-gait switching and control method according to claim 1, characterized in that: the calculation of the duty cycle of different gaits of the left front leg according to the left front leg single gait cycle start time difference in Step 3 is as follows: If then If then If then If then wherein, Duty cycle of left front leg stance phase, Duty cycle of left front leg swing phase, Single gait cycle time, Time of set stance phase, Time of set swing phase, System time of left front leg; the calculation of the duty cycle of different gaits of the right front leg according to the right front leg single gait cycle start time difference in Step 3 is as follows: If then If then If then If then wherein, Duty cycle of right front leg stance phase, Duty cycle of right front leg swing phase, Single gait cycle time, Time of set stance phase, Time of set swing phase, System time of right front leg; the calculation of the duty cycle of different gaits of the right rear leg according to the right rear leg single gait cycle start time difference in Step 3 is as follows: If then If then If then If then wherein, Duty cycle of right rear leg stance phase, Duty cycle of right rear leg swing phase, Single gait cycle time, Time of set stance phase, Time of set swing phase, System time of right rear leg; the calculation of the duty cycle of different gaits of the left rear leg according to the left rear leg single gait cycle start time difference in Step 3 is as follows: If then If then If then If then wherein, Duty cycle of left rear leg stance phase, Duty cycle of left rear leg swing phase, Single gait cycle time, Time of set stance phase, System time of left rear leg. 3.The quadruped robot multi-gait switching and control method according to claim 1, characterized in that: the Step 4 is as follows: Step 4.1: Combining the duty cycle of the current leg stance phase , the duty cycle of the current leg swing phase , the position control coefficient of the current leg stance phase is obtained by the respective technique , the position control coefficient of the current leg swing phase , as follows: ∈{1,2,3,4} wherein, is a position control coefficient of the current leg for the stance phase, is a position control coefficient of the current leg for the swing phase, a is a set trajectory acceleration, denotes a set time of the stance phase, denotes a set time of the swing phase, i=1 represents that the current leg is the left front leg, i=2 represents that the current leg is the right front leg, i=3 represents that the current leg is the right rear leg, i=4 represents that the current leg is the left rear leg; Step 4.2, calculate the position coordinates of the next footfall point according to the MPC or ZMP dynamics model, denoted as ; Let the starting point coordinate of the current leg airborne phase be denoted as ; As the starting point of the twelfth order Bezier curve, a point A is set As the end point of the twelfth order Bezier curve, a point B is set A twelfth order Bezier curve is constructed, the twelfth order Bezier curve The axis control coefficients are set as , The axis control coefficients are set as So that the projection of the distance |AB| between the starting point A and the end point B in the horizontal direction is a robot step length, and the height of the curve in the vertical direction is equal to the set robot step height; Step 4.3: Control of the current leg's air phase by the position of the current leg's air phase and , and control the current leg's air phase, as follows: airtime to current leg Compute: ∈{1,2,3,4} wherein, represents the foot end coordinate of the current leg in the swing phase, represents the X-axis coordinate of the foot end coordinate of the current leg in the swing phase, represents the Y-axis coordinate of the foot end coordinate of the current leg in the swing phase, represents the Z-axis coordinate of the foot end coordinate of the current leg in the swing phase, represents the position control coefficient of the current leg in the swing phase, represents the 12th order Bezier curve of the X-axis, control coefficient, represents the 12th order Bezier curve of the Y-axis, control coefficient. i=1 represents that the current leg is the left front leg, i=2 represents that the current leg is the right front leg, i=3 represents that the current leg is the right rear leg, i=4 represents that the current leg is the left rear leg; According to the joint inverse kinematics, the foot end coordinates are obtained The position of the motor is inversely calculated, and the foot end trajectory control of the empty phase is realized by the position PID control algorithm. Step 4.4: The torque output of the electric motor joint is controlled by the torque PID control algorithm for the action cycle of the force. The torque output of the electric motor joint is controlled by the torque PID control algorithm for the action cycle of the force.
4. A computer readable medium characterized by a computer program product, which stores a computer program for execution by an electronic device, which when run on the electronic device, causes the electronic device to perform the steps of the method according to any one of claims 1-3.