A Quadruped Robot with Three-Dimensional Flexible Legs

As an important part of the quadruped robot, the leg determines its performance. Flexible legs or flexible joints aid in the buffering and adaptability of robots. At present, most flexible quadruped robots only have two-dimensional flexibility or use complex parallel structures to achieve three-dimensional flexibility. This research will propose a new type of three-dimensional flexible structure. This passive compliant three-dimensional flexibility reduces the weight and complex structure of the robot. The anti-impact performance of the robot is verified by a side impact experiment. The simulation and experiments show that the robot still has good stability even under a simple algorithm and that the flexible leg can reduce the impact on the quadruped robot and improve the environmental adaptability of the robot.


Introduction
At present, human living areas are relatively concentrated. Many wild areas in the world are still mysterious and dangerous, with particularly complex terrain. In most places, even human beings cannot cope with the complex environment, which can easily cause risks, as human beings can easily be attacked by wild animals or be trapped and fall in the wild. At this time, it is important for robots to replace human beings in field explorations or extreme environments to perform tasks that are otherwise difficult, thus aiding in safer field information obtainment. Additionally, with the application of robots more and more widely, robots will face unknown and complex environments, so physical interaction with the environment is inevitable [1]. In the existing field of mobile robots, the fault tolerance of multi-legged robots in complex environments is higher than that of wheeled and tracked mobile robots [2], which makes them highly valued.
Nowadays, the development of multi-legged robots is rapid and includes the bipedal humanoid [3][4][5], the hexapod spider [6,7], and the quadruped robots, such as bionic cheetah, bionic dog, among others. Among these, the quadruped robot is considered to be the best in terms of stability and control difficulty [8]. Compared to the traditional rigid quadruped robot, the quadruped robot with flexible legs or joints is the current development trend. Specifically, the damper of the robot plays an important role in reducing the vibrations of the robot and increasing the stability of the robot. In fact, in real life, some quadrupeds have fat, muscle, and meat mats on their legs to improve their adaptability to the complex environment of the wild. The research on the quadruped robot is mostly based on the principle of bionics, which uses a variety of dampers to improve the body of the robot, but different dampers have varying advantages and disadvantages. Yang [9] researched the hydraulic-driven quadruped robot. Semini et al. [10] developed the HYQ hydraulic quadruped robot and the newly developed hyq2max [11]. Although the hydraulic drive has a strong bearing capacity, it will increase the weight of the robot, and the leakage can be • A new three-dimensional flexible leg is designed and its material is characterized; • The dynamics and gait planning of the robot are designed, and the effectiveness of the technology is verified via simulation;

•
The experiments show that the robot has the characteristics of stability and fast recovery to a stable state when it is impacted by the side.
The remainder of the paper is organized as follows: Sections 2.1 and 2.2 present the structure and characterization of flexible legs. The kinematic and dynamic models of the robot are presented in Section 2.3. Section 2.4 presents gait planning. The hardware part of the robot is explained in Section 2.5. Then, the results are shown in Section 3. We discuss the results in Section 4. Finally, the conclusions are drawn in Section 5.

Design Principle of a Rigid-Flexible Coupling Leg
The structure of the leg is shown in Figure 1. The motor connector is made of aluminum plate, thrust rings are used to limit the stiffness range of the flexible part, and the carbon fiber rods are used to limit the lateral deformation of the flexible part. The flexible part is composed of a plurality of air bags, a carbon fiber board is used to support the flexible air bag, and flexible silicone toes provide flexible contact between the end of the robot's leg and the spherical surface of the ground. At present, most quadruped robots use silicone toes to make spherical contact between the end of the foot and the ground, and toes will be greatly impacted when the end of the foot makes contact with the ground during the movement of the robot. Using a flexible ball as the sole is similar to the meat ball of an animal's sole, which is equivalent to an additional passive degree of freedom, i.e., it can reduce the impact. part is composed of a plurality of air bags, a carbon fiber board is used to support the flexible air bag, and flexible silicone toes provide flexible contact between the end of the robot's leg and the spherical surface of the ground. At present, most quadruped robots use silicone toes to make spherical contact between the end of the foot and the ground, and toes will be greatly impacted when the end of the foot makes contact with the ground during the movement of the robot. Using a flexible ball as the sole is similar to the meat ball of an animal's sole, which is equivalent to an additional passive degree of freedom, i.e., it can reduce the impact. The design principle is to make the legs fit with flexible air bags and rigid bones. Purely flexible animals are adaptable but move very slowly in reality. Although the purely rigid structure is very fast, in order to improve the stability of the robot, we can only carry several sensors and use complex control algorithms. The rigid-flexible coupling structure takes into account the adaptability of flexibility and the speed of rigidity. In this design, the low density and high compression characteristics of the air bags can be used to support the body and reduce the weight of the whole machine. Moreover, each air bag can be compressed independently. The carbon fiber rods can not only limit the flexible part of the legs but also provide some stiffness and cooperate with the thrust rings. Thus, this structure can adjust the stiffness and leg length by adjusting the position of the thrust rings. When there are thrust rings on both sides of a carbon fiber board, the lateral deformation of flexible legs can be limited. First, a quadruped robot model with only lower leg flexibility is discussed. The flexible leg experiment can be seen in video (https://www.bilibili.com/video/BV1QK4y1u7iw/ (accessed on 7 July 2021)) provided in the Supplementary Materials of this research.

Characterization of the Flexible Leg
The flexible leg is made of 150 mm-long shockproof air bags made by Zhejiang Enron Packaging Materials Co., Ltd. This material is made of nine layers of coextrusion original film PE (polypropylene) + PA (nylon). It features a design with strong compression and air leakage prevention, making it easy to use, and it can be used just by cutting and filling. The company has certified the material by Societe Generale de Surveillance S.A (SGS). It can bear the weight of 80 kg and will not leak for several months. The method of use is shown in Figure 2. Shockproof air bags are usually used for the filling and packaging of express delivery, and they are not only low cost but also recyclable. The design principle is to make the legs fit with flexible air bags and rigid bones. Purely flexible animals are adaptable but move very slowly in reality. Although the purely rigid structure is very fast, in order to improve the stability of the robot, we can only carry several sensors and use complex control algorithms. The rigid-flexible coupling structure takes into account the adaptability of flexibility and the speed of rigidity. In this design, the low density and high compression characteristics of the air bags can be used to support the body and reduce the weight of the whole machine. Moreover, each air bag can be compressed independently. The carbon fiber rods can not only limit the flexible part of the legs but also provide some stiffness and cooperate with the thrust rings. Thus, this structure can adjust the stiffness and leg length by adjusting the position of the thrust rings. When there are thrust rings on both sides of a carbon fiber board, the lateral deformation of flexible legs can be limited. First, a quadruped robot model with only lower leg flexibility is discussed. The flexible leg experiment can be seen in video (https://www.bilibili.com/video/BV1QK4y1u7iw/ (accessed on 7 July 2021)) provided in the Supplementary Materials of this research.

Characterization of the Flexible Leg
The flexible leg is made of 150 mm-long shockproof air bags made by Zhejiang Enron Packaging Materials Co., Ltd. This material is made of nine layers of coextrusion original film PE (polypropylene) + PA (nylon). It features a design with strong compression and air leakage prevention, making it easy to use, and it can be used just by cutting and filling. The company has certified the material by Societe Generale de Surveillance S.A (SGS). It can bear the weight of 80 kg and will not leak for several months. The method of use is shown in Figure 2. Shockproof air bags are usually used for the filling and packaging of express delivery, and they are not only low cost but also recyclable.  In this paper, the stress and strain of a flexible leg with different winding methods are tested. The results of the compression experiment are shown in Figure 3. It can be seen that the different winding methods affect the elastic modulus characteristics. Increasing the number of bundles will increase the elastic modulus and hinder its extrusion. When the whole flexible part is surrounded by carbon fiber rods, the gap in the flexible air column is smaller. The elastic modulus of pentagons and hexagons is higher than that of triangles and quadrangles, and the former has more uniform compressive strength in all directions. Due to the low elastic modulus of the front half of the air column, the legs will be too soft, which will lead to greater robot walking errors. Therefore, in the actual assembly, the air column will be preloaded, and the initial compression of the air column can be changed by adjusting the position of the thrust rings so as to adjust the stiffness of the flexible leg. In this study, based on the leg size and elastic modulus requirements, the hexagonal mode is selected for winding. Moreover, the length is limited to 139 mm, as shown with the purple cross symbol in Figure 3, because the deformation of the flexible leg caused by the robot during the process of motion after loading the preload is not very large. In order to facilitate a dynamic calculation and simulate a solution, the elastic modulus of the flexible leg can be regarded as a constant 0.35 Mpa, through the stressstrain experiment Poisson's ratio is 0.1, and through the immersion method experiment the density can be calculated as 10 kg/m^3.  In this paper, the stress and strain of a flexible leg with different winding methods are tested. The results of the compression experiment are shown in Figure 3. It can be seen that the different winding methods affect the elastic modulus characteristics. Increasing the number of bundles will increase the elastic modulus and hinder its extrusion. When the whole flexible part is surrounded by carbon fiber rods, the gap in the flexible air column is smaller. The elastic modulus of pentagons and hexagons is higher than that of triangles and quadrangles, and the former has more uniform compressive strength in all directions. Due to the low elastic modulus of the front half of the air column, the legs will be too soft, which will lead to greater robot walking errors. Therefore, in the actual assembly, the air column will be preloaded, and the initial compression of the air column can be changed by adjusting the position of the thrust rings so as to adjust the stiffness of the flexible leg. In this study, based on the leg size and elastic modulus requirements, the hexagonal mode is selected for winding. Moreover, the length is limited to 139 mm, as shown with the purple cross symbol in Figure 3, because the deformation of the flexible leg caused by the robot during the process of motion after loading the preload is not very large. In order to facilitate a dynamic calculation and simulate a solution, the elastic modulus of the flexible leg can be regarded as a constant E = 0.35 Mpa, through the stress-strain experiment Poisson's ratio is v = 0.1, and through the immersion method experiment the density can be calculated as ρ ≈ 10 kg/mˆ3. In this paper, the stress and strain of a flexible leg with different winding methods are tested. The results of the compression experiment are shown in Figure 3. It can be seen that the different winding methods affect the elastic modulus characteristics. Increasing the number of bundles will increase the elastic modulus and hinder its extrusion. When the whole flexible part is surrounded by carbon fiber rods, the gap in the flexible air column is smaller. The elastic modulus of pentagons and hexagons is higher than that of triangles and quadrangles, and the former has more uniform compressive strength in all directions. Due to the low elastic modulus of the front half of the air column, the legs will be too soft, which will lead to greater robot walking errors. Therefore, in the actual assembly, the air column will be preloaded, and the initial compression of the air column can be changed by adjusting the position of the thrust rings so as to adjust the stiffness of the flexible leg. In this study, based on the leg size and elastic modulus requirements, the hexagonal mode is selected for winding. Moreover, the length is limited to 139 mm, as shown with the purple cross symbol in Figure 3, because the deformation of the flexible leg caused by the robot during the process of motion after loading the preload is not very large. In order to facilitate a dynamic calculation and simulate a solution, the elastic modulus of the flexible leg can be regarded as a constant 0.35 Mpa, through the stressstrain experiment Poisson's ratio is 0.1, and through the immersion method experiment the density can be calculated as 10 kg/m^3.

Kinematics and Dynamics of the Proposed Robot
In this paper, the Denavit-Hartenberg (D-H) method is used to analyze the front leg of the robot. A D-H coordinate diagram of the leg is shown in Figure 4.

Kinematics and Dynamics of the Proposed Robot
In this paper, the Denavit-Hartenberg (D-H) method is used to analyze the front leg of the robot. A D-H coordinate diagram of the leg is shown in Figure 4. The homogeneous transformation matrix T 3 0 , relating the foot to the hip joint frame, can be represented as follows, where P , P , and P represent the position of the foot tip in the coordinates of hip joint.
The inverse kinematics can be obtained by Equations (2)-(4): In robotics, the Jacobian matrix is usually used to connect the joint velocity with the Cartesian velocity at the end of the robot. The velocity of the Jacobian matrix J Θ can be obtained using Equation (9): The angular acceleration equation can be obtained by differentiating Equation (9) with time: The homogeneous transformation matrix T 0 3 , relating the foot to the hip joint frame, can be represented as follows, where P x , P y , and P z represent the position of the foot tip in the coordinates of hip joint.
The inverse kinematics can be obtained by Equations (2)-(4): In robotics, the Jacobian matrix is usually used to connect the joint velocity with the Cartesian velocity at the end of the robot. The velocity of the Jacobian matrix J(Θ) can be obtained using Equation (9): The angular acceleration equation can be obtained by differentiating Equation ( In this paper, the Lagrange formulation is used to analyze the dynamics of the robot when the robot moves along a straight line and the hip joint rotates at an angle of θ 1 = 0.
As shown in Figure 5, the cross section of the flexible part is equivalent to a circle, and the circular area can be regarded as the area integral of countless rectangles. As shown in Figure 6, because the flexible part is inclined and compressed on the plane, the compression of a rectangle is equal in the same x r , which can be regarded as vertical compression. In this way, the inclination can be converted into compression for calculation. In this paper, the Lagrange formulation is used to analyze the dynamics of the robot when the robot moves along a straight line and the hip joint rotates at an angle of θ 0.
As shown in Figure 5, the cross section of the flexible part is equivalent to a circle, and the circular area can be regarded as the area integral of countless rectangles. As shown in Figure 6, because the flexible part is inclined and compressed on the plane, the compression of a rectangle is equal in the same , which can be regarded as vertical compression. In this way, the inclination can be converted into compression for calculation.  As shown in Figure 6, the flexible leg can be seen that compressed and the recline angle . According to the principle of the mechanics of materials, regardless of other energy loss in the loading process, the tensile and compressive strain energy of the bar is equal to the work performed by the external force w. The compression energy equation of the cuboid is as follows: Therefore, it can be calculated that: where A is the compression force area, E is the elastic modulus of the material, S is the compression amount, and L is the length of the rod. As shown in Figures 5 and 6, in the case of the same E, L and S, W is only related to A. The results are as follows:  In this paper, the Lagrange formulation is used to analyze the dynamics of the robot when the robot moves along a straight line and the hip joint rotates at an angle of θ 0.
As shown in Figure 5, the cross section of the flexible part is equivalent to a circle, and the circular area can be regarded as the area integral of countless rectangles. As shown in Figure 6, because the flexible part is inclined and compressed on the plane, the compression of a rectangle is equal in the same , which can be regarded as vertical compression. In this way, the inclination can be converted into compression for calculation.  As shown in Figure 6, the flexible leg can be seen that compressed and the recline angle . According to the principle of the mechanics of materials, regardless of other energy loss in the loading process, the tensile and compressive strain energy of the bar is equal to the work performed by the external force w. The compression energy equation of the cuboid is as follows: Therefore, it can be calculated that: where A is the compression force area, E is the elastic modulus of the material, S is the compression amount, and L is the length of the rod. As shown in Figures 5 and 6, in the case of the same E, L and S, W is only related to A. The results are as follows: As shown in Figure 6, the flexible leg can be seen that compressed S c and the recline angle θ b . According to the principle of the mechanics of materials, regardless of other energy loss in the loading process, the tensile and compressive strain energy of the bar is equal to the work performed by the external force w. The compression energy equation of the cuboid is as follows: Therefore, it can be calculated that: where A is the compression force area, E is the elastic modulus of the material, S is the compression amount, and L is the length of the rod. As shown in Figures 5 and 6, in the case of the same E, L and S, W is only related to A. The results are as follows: S r = y r sin θ b (15) S r is the amount of compression at y r caused by a rotation θ b of the flexible part. According to Equations (14) and (15), we can obtain: As shown in Figure 7, the center of mass of the legs and body is at its center, according to geometry: where L 3 is the length of the flexible part after deformation, z b_td is the displacement of the leg end relative to the hip joint in the z direction, x b is the height of the center of gravity of the robot from the ground, and B L is the body length of the robot, which is solved by Equation (18).
Sensors 2021, 21, x FOR PEER REVIEW 8 of 18 In combination with Equations (23)-(25), it can be obtained that: The center of mass of rod 2 and rod 3 is at the center of the rod. When θ = θ = 0, the system potential energy P is 0, so we can obtain: As shown in Figure 8, in the diagonal motion state, it is assumed that there is no relative sliding between the foot and the ground during the motion of the robot. A and B are the connection points between the two diagonal legs and the robot body at a certain time, and O is the center of mass of the robot body. At the next moment, the robot moves from AB to A`B`. Where vector `= (AA` , AA` , AA` ) , vector `= (BB` , BB` , BB` ) , it is also equal to the mapping of the movement of the end of the leg in the robot body coordinate system, and its value can be calculated by Equations (5) ``= −`+` After considering the flexible deformation of the leg, the kinematics and inverse kinematics model parameters will be updated with the following inequation: After completing the variable conversion, the final compression energy is only related to the robot's body inclination, height, and leg end displacement, which can be measured by sensors. The Lagrange function is: The Lagrange dynamic formulation is: where L-Lagrange multiplier, τ-Driving torque of the leg, I-Moment of inertia connecting the rod.
According to Figure 7, it can be concluded that: In combination with Equations (23)-(25), it can be obtained that: The center of mass of rod 2 and rod 3 is at the center of the rod. When θ 2 = θ 3 = 0, the system potential energy P is 0, so we can obtain: As shown in Figure 8, in the diagonal motion state, it is assumed that there is no relative sliding between the foot and the ground during the motion of the robot. A and B are the connection points between the two diagonal legs and the robot body at a certain time, and O is the center of mass of the robot body. At the next moment, the robot moves from AB to A B . Where vector AA = AA x , AA y , AA z T , vector BB = BB x , BB , BB z T , it is also equal to the mapping of the movement of the end of the leg in the robot body coordinate system, and its value can be calculated by Equations (5)- (7); Vector AB = (B L , 0, B b ) T , of which B L is the length of the robot body, B b is the width of the robot body, and m b is the body weight.
Sensors 2021, 21, 4907 9 of 18 The total kinetic energy K is equal to: The total potential energy P equals: P = P , + W + P According to Equations (21)-(37), the driving torque of the leg τ can be calculated.

Gait Planning and Simulation
In this study, we mainly analyze the trot gait. The trot gait is a gait featuring diagonal legs moving simultaneously, also known as "diagonal gait", which takes into account both stability and speed. It is one of the more common types of gait. A gait phase diagram is shown in Figure 9, and its phase duty cycle of a gait cycle is β = 0.5. In the first half of the cycle, when the left front leg and right rear leg swing, the left rear leg and right front leg are supported, and after the second half of the cycle, the left front leg and right rear leg are supported, and the left rear leg and right front leg are in the swing state. The forward motion of the quadruped robot can be realized by cyclic motion. The space direction offset of the robot's centroid coordinate, that is, the space angle difference between AB and A B , is vector R body ; The space displacement OO of the robot's centroid coordinate is vector P body ; H = (0, 1, 0) is the height offset vector of the robot body; I br is the moment of inertia matrix of the robot passing through the center of mass; The total kinetic energy K is equal to: The total potential energy P equals: According to Equations (21)-(37), the driving torque of the leg τ can be calculated.

Gait Planning and Simulation
In this study, we mainly analyze the trot gait. The trot gait is a gait featuring diagonal legs moving simultaneously, also known as "diagonal gait", which takes into account both stability and speed. It is one of the more common types of gait. A gait phase diagram is shown in Figure 9, and its phase duty cycle of a gait cycle is β = 0.5. In the first half of the cycle, when the left front leg and right rear leg swing, the left rear leg and right front leg are supported, and after the second half of the cycle, the left front leg and right rear leg are supported, and the left rear leg and right front leg are in the swing state. The forward motion of the quadruped robot can be realized by cyclic motion. Sensors 2021, 21, x FOR PEER REVIEW 10 of 18 In the following design of the foot trajectory, as shown in Figure 4, the backward direction is the positive Z direction and the vertical downward direction is the positive X direction. The gait is described by the mathematical model of Equations (29) and (30), where S is the step length and H is the step height. z t=0 = 0 z t=T/2 = −S z t=T = 0 (38) The phase stability is very important during the phase switching. According to the zero impact principle, the trajectory needs to meet the following constraints in order to achieve zero velocity and acceleration when touching the ground and at the highest position.
In order to make full use of the constraints of Equations (38)-(43), this paper uses a piecewise quintic polynomial trajectory to solve the foot trajectory equations of the swing phase and support phase. The basic curve is: When the constraint conditions are brought to Equation (44) according to the phase, the foot trajectory equations corresponding to the swing phase and support phase can be solved as follows: T0 = T/2 = 0.5 s. The swing phase is: In the following design of the foot trajectory, as shown in Figure 4, the backward direction is the positive Z direction and the vertical downward direction is the positive X direction. The gait is described by the mathematical model of Equations (29) and (30), where S is the step length and H is the step height.
The phase stability is very important during the phase switching. According to the zero impact principle, the trajectory needs to meet the following constraints in order to achieve zero velocity and acceleration when touching the ground and at the highest position.
In order to make full use of the constraints of Equations (38)-(43), this paper uses a piecewise quintic polynomial trajectory to solve the foot trajectory equations of the swing phase and support phase. The basic curve is: When the constraint conditions are brought to Equation (44) according to the phase, the foot trajectory equations corresponding to the swing phase and support phase can be solved as follows: T0 = T/2 = 0.5 s. The swing phase is: The supporting phase is: The gait trajectory of the robot is shown in Figure 10. In real control, the relationship between the joint angle and gait trajectory can be obtained by calculating the inverse kinematics [25].
The supporting phase is: The gait trajectory of the robot is shown in Figure 10. In real control, the relationship between the joint angle and gait trajectory can be obtained by calculating the inverse kinematics [25].
The simulation of the quadruped robot is carried out jointly by Adams and MATLAB/Simulink. Adams is the simulation environment, while the controller of the simulation model is in Simulink. The control flow is shown in Figure 11. Two control groups are set in the simulation experiment: a rigid simulation group and a flexible simulation group under the same PID closed-loop control. The flexible part transforms the rigid leg into a flexible leg through the rigid-flexible conversion module in Adams. The interaction time in the Adams interaction module is set to 0.0005 s, the simulation solution of Simulink is set to the variable step, the max step size is 0.0005 s, the simulation time is 12 s, and the gait cycle is T = 0.8 s. The simulation parameters are consistent with the actual structure parameters, step height H = 25 mm and step size S = 100 mm.   The simulation of the quadruped robot is carried out jointly by Adams and MAT-LAB/Simulink. Adams is the simulation environment, while the controller of the simulation model is in Simulink. The control flow is shown in Figure 11. Two control groups are set in the simulation experiment: a rigid simulation group and a flexible simulation group under the same PID closed-loop control. The flexible part transforms the rigid leg into a flexible leg through the rigid-flexible conversion module in Adams. The interaction time in the Adams interaction module is set to 0.0005 s, the simulation solution of Simulink is set to the variable step, the max step size is 0.0005 s, the simulation time is 12 s, and the gait cycle is T 0 = 0.8 s. The simulation parameters are consistent with the actual structure parameters, step height H = 25 mm and step size S = 100 mm.

(46)
The gait trajectory of the robot is shown in Figure 10. In real control, the relationship between the joint angle and gait trajectory can be obtained by calculating the inverse kinematics [25].
The simulation of the quadruped robot is carried out jointly by Adams and MATLAB/Simulink. Adams is the simulation environment, while the controller of the simulation model is in Simulink. The control flow is shown in Figure 11. Two control groups are set in the simulation experiment: a rigid simulation group and a flexible simulation group under the same PID closed-loop control. The flexible part transforms the rigid leg into a flexible leg through the rigid-flexible conversion module in Adams. The interaction time in the Adams interaction module is set to 0.0005 s, the simulation solution of Simulink is set to the variable step, the max step size is 0.0005 s, the simulation time is 12 s, and the gait cycle is T = 0.8 s. The simulation parameters are consistent with the actual structure parameters, step height H = 25 mm and step size S = 100 mm.   As shown in Figure 12, each leg and body of the robot form a quadrilateral. OO G can be calculated from the rotation matrix R body and displacement matrix P of the robot. AO can be obtained from the structural parameters of the body. DO G is the vector of D relative to the world coordinate O G .
As shown in Figure 12, each leg and body of the robot form a quadrilateral. can be calculated from the rotation matrix and displacement matrix of the robot. can be obtained from the structural parameters of the body.
is the vector of D relative to the world coordinate O .
represents the position of D relative to A in the coordinate system of point A. Under the post control, in order to ensure the stability of the robot body in the three rotation directions, the position information parameters of vector are input into the inverse kinematics model as the error e(P) together with the results of the corresponding leg motion obtained from the gait planning. The corresponding rotation angle of each actuator is obtained for the motion control of the robot.

Detailed System Hardware
The proposed rigid-flexible coupled quadruped robot model is shown in Figure 13. Other parameters of the quadruped robot are shown in Table 1. One leg is composed of three motors with three degrees of freedom. The inner knee elbow structure is symmetrically distributed in the front and back, which can greatly reduce the sliding between the foot and the ground, thus improving the stability of the robot. Therefore, the robot in this study also adopts this structure. The RX series servo actuator is used as the actuator. The mechanical legs can be controlled by high mechanical strength, high power, high efficiency, and high bandwidth via the direct drive of the motor [23,26]. Additionally, the body of the robot is made of a carbon fiber board with a thickness of 2 mm. Due to its high strength and light weight, the carbon fiber board is the most suitable choice for the robot.  AD represents the position of D relative to A in the coordinate system of point A. Under the post control, in order to ensure the stability of the robot body in the three rotation directions, the position information parameters of vector AD are input into the inverse kinematics model as the error e(P) together with the results of the corresponding leg motion obtained from the gait planning. The corresponding rotation angle of each actuator is obtained for the motion control of the robot.

Detailed System Hardware
The proposed rigid-flexible coupled quadruped robot model is shown in Figure 13. Other parameters of the quadruped robot are shown in Table 1. One leg is composed of three motors with three degrees of freedom. The inner knee elbow structure is symmetrically distributed in the front and back, which can greatly reduce the sliding between the foot and the ground, thus improving the stability of the robot. Therefore, the robot in this study also adopts this structure. The RX series servo actuator is used as the actuator. The mechanical legs can be controlled by high mechanical strength, high power, high efficiency, and high bandwidth via the direct drive of the motor [23,26]. Additionally, the body of the robot is made of a carbon fiber board with a thickness of 2 mm. Due to its high strength and light weight, the carbon fiber board is the most suitable choice for the robot. As shown in Figure 12, each leg and body of the robot form a quadrilateral. can be calculated from the rotation matrix and displacement matrix of the robot. can be obtained from the structural parameters of the body.
is the vector of D relative to the world coordinate O .
represents the position of D relative to A in the coordinate system of point A. Under the post control, in order to ensure the stability of the robot body in the three rotation directions, the position information parameters of vector are input into the inverse kinematics model as the error e(P) together with the results of the corresponding leg motion obtained from the gait planning. The corresponding rotation angle of each actuator is obtained for the motion control of the robot.

Detailed System Hardware
The proposed rigid-flexible coupled quadruped robot model is shown in Figure 13. Other parameters of the quadruped robot are shown in Table 1. One leg is composed of three motors with three degrees of freedom. The inner knee elbow structure is symmetrically distributed in the front and back, which can greatly reduce the sliding between the foot and the ground, thus improving the stability of the robot. Therefore, the robot in this study also adopts this structure. The RX series servo actuator is used as the actuator. The mechanical legs can be controlled by high mechanical strength, high power, high efficiency, and high bandwidth via the direct drive of the motor [23,26]. Additionally, the body of the robot is made of a carbon fiber board with a thickness of 2 mm. Due to its high strength and light weight, the carbon fiber board is the most suitable choice for the robot.   STM32f4 MCU with a gyroscope sensor is used for control and can be used as the main board of the quadruped robot, communicate with the computer, and display the parameters of the robot sensor in real time. Additionally, it can be separated from the host computer and controlled directly by the MUC according to the program. The robot drive actuator is equipped with a non-contact absolute encoder. All the same series of the rudders support RS485 serial communication, which is controlled by sending a status package to the ID actuator. The control flow chart is shown in Figure 14. STM32f4 MCU with a gyroscope sensor is used for control and can be used as th main board of the quadruped robot, communicate with the computer, and display th parameters of the robot sensor in real time. Additionally, it can be separated from the hos computer and controlled directly by the MUC according to the program. The robot driv actuator is equipped with a non-contact absolute encoder. All the same series of the rud ders support RS485 serial communication, which is controlled by sending a status packag to the ID actuator. The control flow chart is shown in Figure 14.
When receiving the command, each actuator will return to a status package. The ac tual rotation angle, torque, voltage, current, and temperature information of the actuato can be obtained from the status package and then returned from the control master drive to the MCU.  When receiving the command, each actuator will return to a status package. The actual rotation angle, torque, voltage, current, and temperature information of the actuator can be obtained from the status package and then returned from the control master driver to the MCU.

Results
The robot carried out a straight-line movement experiment outdoors, as shown in Figure 15 (a to f represents the motion of the robot). On the premise of obtaining relatively stable movement, the movement speed was about 200 mm/s. The experimental results are shown in Figures 16-18, which show an offset comparison of the robot in three directions under the rigid simulation, flexible legs simulation, and experimental conditions, respectively.
Sensors 2021, 21, x FOR PEER REVIEW

Results
The robot carried out a straight-line movement experiment outdoors, as s Figure 15 (a to f represents the motion of the robot). On the premise of obtaining r stable movement, the movement speed was about 200 mm/s. The experimental re shown in Figures 16-18, which show an offset comparison of the robot in three d under the rigid simulation, flexible legs simulation, and experimental conditions tively.

Results
The robot carried out a straight-line movement experiment outdoors, as sh Figure 15 (a to f represents the motion of the robot). On the premise of obtaining re stable movement, the movement speed was about 200 mm/s. The experimental re shown in Figures 16-18, which show an offset comparison of the robot in three di under the rigid simulation, flexible legs simulation, and experimental conditions tively.

Results
The robot carried out a straight-line movement experiment outdoors, as s Figure 15 (a to f represents the motion of the robot). On the premise of obtaining r stable movement, the movement speed was about 200 mm/s. The experimental re shown in Figures 16-18, which show an offset comparison of the robot in three d under the rigid simulation, flexible legs simulation, and experimental conditions tively.       The results show that the flexible leg has a smaller deflection range than the rigid leg. At 0 s, the robot changes from a standing posture to a trot gait. For the robot, this phase change will bring about the initial error of the body, and the error angle of the flexible leg stabilizes around 0 • faster. Moreover, the results show that the flexible part is robust to reduce vibrations and external shock and can also provide better stability via adjusting the stiffness of the flexible leg.
As shown in Figure 19, during the impact experiment, the robot stands in a normal posture and the side of the robot is impacted with four weights of different masses at a speed of about 1 m/s. Since the quadruped robot does not use any balance algorithm in the experiment, the flexible legs mainly contribute to its stability. The experiments can be seen in video (https://www.bilibili.com/video/BV1QK4y1u7iw/ (accessed on 7 July 2021)) provided in the Supplementary Materials of this research. The experimental results are shown in Figure 20. The abscissa is the time and the ordinate is the rolling angle of the robot. The robot was impacted in the second second. In the impact experiments, the robot had basically completed the buffering of the large impact in 1.5 s. The experiment proves that the structure has good shock resistance and buffering ability. The results are discussed in detail in the next section. The results show that the flexible leg has a smaller deflection range than the At 0 s, the robot changes from a standing posture to a trot gait. For the robot, th change will bring about the initial error of the body, and the error angle of the fle stabilizes around 0° faster. Moreover, the results show that the flexible part is r reduce vibrations and external shock and can also provide better stability via a the stiffness of the flexible leg.
As shown in Figure 19, during the impact experiment, the robot stands in a posture and the side of the robot is impacted with four weights of different ma speed of about 1 m/s. Since the quadruped robot does not use any balance algo the experiment, the flexible legs mainly contribute to its stability. The experimen seen in video (https://www.bilibili.com/video/BV1QK4y1u7iw/ (accessed on 7 Ju provided in the Supplementary Materials of this research. The experimental re shown in Figure 20. The abscissa is the time and the ordinate is the rolling ang robot. The robot was impacted in the second second. In the impact experiments, t had basically completed the buffering of the large impact in 1.5 s. The experimen that the structure has good shock resistance and buffering ability. The results cussed in detail in the next section.

Discussion
The results in Figures 16-18 show that, comparing the simulation results of flexibility and rigidity, it can be seen that the flexible leg makes the robot obtain better stability in the process of motion. The result of actual movement is better than that of rigid simulation, but compared with the simulation results of flexibility, it can be seen that the robot motion error was larger than the simulation result, since there are many challenges in reality, such as the position of the center of gravity, assembly error, and manual error in flexible leg manufacturing (the difference in inflation and the binding of four flexible legs). There are also foot offset errors caused by the flexibility of the slender carbon fiber rods. This experiment is mainly to reflect the advantages of the flexible leg under the same controller. In the control process, the three outputs of the robot roll, pitch, and yaw were adjusted via PID. As the results of the three PID outputs will affect each other, it is difficult to obtain ideal results. In fact, the robot can achieve better walking stability. Experiments proved that the designed flexible leg has better stability, compared with the rigid leg, the amplitude is smaller, and it is faster to stabilize at 0 • nearby.
The results in Figure 20 show that in the impact experiments of 0.66 kg, 1.32 kg, and 2.18 kg heavy objects, the robot had basically completed the buffering of the large impact in 1.5 s. In the 2.84 kg impact experiment, there are still some body angle deviations that are not automatically restored. As the impact on the robot is very large, the total weight of the robot body, including all the controllers and the power supply, is 3.625 kg, which is equivalent to being impacted by 80% of the body's weight. The body had a visible tilt and the legs also deviated from their original position, so there are still some body angle deviations that are not automatically restored but only need a lifting of the flexible leg. When the flexible leg leaves the ground, it can immediately return to its original state. We can also use the complex control algorithm, such as disturbance observers and boundary controllers [27,28], to further optimize the anti-interference and vibration reduction ability of the flexible link. However, the precise control of the flexible body is always a difficulty in the field of control. However, the purpose of replacing the rigid part with the flexible part is to better adapt to the nonlinear uncertain environment. Some environments are difficult to be considered in the control algorithm, so it is worth considering sacrificing part of the control accuracy to improve the flexibility of the robot body structure. Although this will increase the control complexity of the system, it can also have good stability without the complex control algorithm.
The purpose of this paper is to highlight the advantages of the robot structure itself. This experiment proves the robustness of the rigid-flexible coupled quadruped robot. In the rolling direction, the robot returns to the initial state in a relatively stable form after a short period of oscillation without any balance algorithm.

Conclusions
This paper introduces a novel rigid-flexible coupled quadruped robot. The flexible leg of the robot is a new three-dimensional flexible structure. The structure is low in cost, lightweight, and features a convenient adjustability of the stiffness and leg length and the robot's good stability without a complex algorithm. In this paper, the hardware design and software design of the robot are given, the material of the flexible leg is characterized, and the dynamic model of the robot is deduced. After the simulation, walking experiment, and stability experiment, the results show that the designed flexible leg can provide good stability for the robot. We believe that such a robot can provide new ideas for future research on the rigid-flexible coupled quadruped robot. In future work, we intend to use admittance control based on a neural network to achieve the compliant behavior of robotic manipulators in response to external torques from the unknown environment [29,30]. Moreover, we will further increase the number of sensors carried by the robot, and through strengthening the learning to train, further improve the stability of the robot.