Design, Analysis and Experiments of Hexapod Robot with Six-Link Legs for High Dynamic Locomotion

An important feature of a legged robot is its dynamic motion performance. Traditional methods often improve the dynamic motion performance by reducing the moment of inertia of robot legs or by adopting quasi-direct drive actuators. This paper proposes a method to enhance the dynamic performance of a legged robot by transmission mechanism. Specifically, we present a unique six-link leg mechanism that can implement a large output motion using a small drive motion. This unique feature can enhance the robots’ dynamic motion capability. Experiments with a hexapod robot verified the effectiveness of the mechanism. The experimental results showed that, when the steering gear of the robot rotates 1°, the toe can lift 7 mm (5% of body height), and the maximum running speed of the robot can reach 390 mm/s (130% of the moveable body length per second).

As the main component of a multi-legged robot, the leg mechanism plays the role of achieving motion, weight-bearing, and balancing. Therefore, the study of leg mechanisms is one of the core parts in research on multi-legged robots. Compared with quadruped robots, hexapod robots have higher terrain adaptability but lose some speed. In some flat terrains where stability is not required, an important index affecting the efficiency of a hexapod robot is its dynamic motion capability. For hexapod robots, the traditional methods to improve the dynamic motion capability of the legs are divided into the following: the cable-driven method [14][15][16][17] and the one quasi-direct drive actuator method [18]. The special structure of the cable-driven gives it a low inertia. The advantages of the cabledriven method are the simple structure, low cost, and low noise. However, the basis of the cable-driven method is friction, so this method has low drive efficiency and unstable drive. In addition, this method has low life and low payload. The one quasi-direct drive actuator method uses a high torque density motor with a low-speed ratio reducer, coupled with a low inertia leg design. The advantages include its compactness, the ability to achieve high bandwidth force control, and good shock resistance. However, quasi-direct drive actuators tend to be expensive.
Therefore, we propose a six-link leg mechanism that can significantly improve the dynamic motion of a hexapod robot by relying only on mechanical structures. This mechanism has the following characteristics: 1.
This mechanism can realize a transformation from small input motion to large output motion.

1.
We proposed a six-link leg mechanism and applied it to a hexapod robot that can significantly improve the dynamic locomotion of the hexapod robot. We completed the kinematic modeling of this mechanism. 2.
We completed the single-legged foot-end trajectory planning of this hexapod robot based on the kinematic model. We introduced bipod gait into the gait planning of the hexapod robot, which enabled the leg mechanism to be more effective, and significantly improved the dynamic locomotion capability of the hexapod robot. 3.
We completed the motion simulation of a single leg and verified the high dynamic motion capability of this mechanism. We completed the physical prototype experiments to verify the feasibility of bipod gait with this mechanism to achieve highly dynamic walking of a hexapod robot.
This paper is organized as follows. Section 1 is an introduction. Section 2 presents an overview of the system. Section 3 presents an analysis of the robot motion, including the solution to the forward and inverse kinematics of the leg mechanism, single-leg trajectory planning, and gait planning. Section 4 presents the simulation and experiments of the robot. Section 5 is the conclusion.

Selection of Leg Mechanism
In this design, we adopted a six-link leg mechanism, which has the following advantages. First, the link structure has a significant bearing capacity, which can better support the robot's body and keep the whole robot stable. Second, by simply changing the length of each element in the moving components, we can obtain different movement rules. Therefore, by designing the size and the whole structure of the connecting link, we can obtain leg movement rules similar to that of a robot. In addition, the light weight of the connecting rod also accelerates the movement speed of the robot. In a word, the linkage mechanism is suitable for the leg mechanism of a bionic robot. The movement diagram of the introduced leg mechanism is shown in Figure 1a.
Two bus-steering gears are fixed on the Z-shaped steering gear bracket to control the horizontal and vertical movements of the legs. The steering gear for controlling horizontal movement is connected with the upper and lower plates of the machine body through the steering gear plate, and the steering gear for controlling vertical movement is connected to the original parts of the leg linkage mechanisms through a group of parallelogram linkage mechanisms. Through the transmission of the leg six-bar linkage mechanism, the movement of the prime mover can be converted into the lifting movement of the foot end and then combined with the horizontal movement of the leg, thus achieving a leg-stepping action.  This six-link mechanism can be regarded as a combination of two four-link mechanisms (1-2-3-4 and 1-4-5-6) with the same fixed frame. In Figure 1a, 1 is the fixed frame, and 2, the link, is the prime mover. Through the transmission of the connecting links 3, the rotation of the prime mover can be converted into the regular swing of link 4. The regular swing of link 4 can be converted into the lifting and lowering movement of link 6 by the transmission of the connecting rod 5. After calculation, the degree of freedom of the mechanism is 1, that is, the rotation angle of the prime mover and the foot end correspond with each other. This one-to-one correspondence is convenient for later debugging. Figure 1b is a diagram of the leg mechanism. The leg mechanism includes a base numbered 2, a driving part numbered 1 arranged on the base, a connecting rod structure numbered 3 connected with the driving part, and a robot leg numbered 4 connected with the connecting rod structure.
Two bus-steering gears are fixed on the Z-shaped steering gear bracket to control the horizontal and vertical movements of the legs. The steering gear for controlling horizontal movement is connected with the upper and lower plates of the machine body through the steering gear plate, and the steering gear for controlling vertical movement is connected to the original parts of the leg linkage mechanisms through a group of parallelogram linkage mechanisms. Through the transmission of the leg six-bar linkage mechanism, the movement of the prime mover can be converted into the lifting movement of the foot end and then combined with the horizontal movement of the leg, thus achieving a leg-stepping action.
The main features of this mechanism are as follows: 1.
The specially designed linkage mechanism makes the leg move up and down within a wider range and the foot end easier to lift. In other words, when the steering gear rotates at the same angle, the foot end can move up a larger distance to enhance its ability to climb over obstacles in high-speed motion.

2.
The lighter weight of the linkage mechanism solves the problem of large joint mass. 3.
The centralized placement of steering gear lowers the leg's moment of inertia and enhances its agility, providing the foundation for the high dynamic movement of the whole robot.

4.
This design is more convenient for wiring, which can better protect the steering gear to cope with more harsh environment.

5.
The U-shaped opening can reduce the mass and increase the working space, as the prime mover is frame-shaped, the connecting rod 34 is provided with a U-shaped opening facing the connecting rod 36, and the obtuse end of the connecting rod 36 is located in the U-shaped opening. 6.
Two degrees of freedom can reduce the difficulty of control. Figure 2 is a diagram of the leg mechanism in two limit positions.
3. The centralized placement of steering gear lowers the leg's moment of inertia and enhances its agility, providing the foundation for the high dynamic movement of the whole robot. 4. This design is more convenient for wiring, which can better protect the steering gear to cope with more harsh environment. 5. The U-shaped opening can reduce the mass and increase the working space, as the prime mover is frame-shaped, the connecting rod 34 is provided with a U-shaped opening facing the connecting rod 36, and the obtuse end of the connecting rod 36 is located in the U-shaped opening. 6. Two degrees of freedom can reduce the difficulty of control.

Selection of Body Base and Overall Mechanical Structure
In the above leg mechanism, the joint between the leg mechanism and the body base is relatively bloated due to the centralized placement of the steering gear, and the legs may interfere with each other during the movement. To give each leg more room to move so as not to interfere with each other, we adopted a design with an upper plate and a lower plate for the robot's body base and sandwich the legs between the two plates. This not only solves the above problems but also makes the robot lighter and easier to disassemble.
The 3D model of the hexapod robot is shown in Figure 3.

Selection of Body Base and Overall Mechanical Structure
In the above leg mechanism, the joint between the leg mechanism and the body base is relatively bloated due to the centralized placement of the steering gear, and the legs may interfere with each other during the movement. To give each leg more room to move so as not to interfere with each other, we adopted a design with an upper plate and a lower plate for the robot's body base and sandwich the legs between the two plates. This not only solves the above problems but also makes the robot lighter and easier to disassemble.
The 3D model of the hexapod robot is shown in Figure 3.

The Theoretical Analysis of The Robot Movement
This section builds the kinematics analysis model of the robot leg, which lays the foundation for the trajectory planning of the foot end. We analyzed the planned foot trajectory and the foot trajectory to suit the characteristics of robot motion. Last, we built the dynamic model of the robot's leg swing process to identify the real force in the robot's movement process.

The Theoretical Analysis of The Robot Movement
This section builds the kinematics analysis model of the robot leg, which lays the foundation for the trajectory planning of the foot end. We analyzed the planned foot trajectory and the foot trajectory to suit the characteristics of robot motion. Last, we built the dynamic model of the robot's leg swing process to identify the real force in the robot's movement process.

Foot Trajectory Planning
Here, the requirement of the foot end trajectory is as follows.
1. The trajectory of the foot should be a continuous and smooth closed curve, with no sudden change in speed and acceleration. 2. There is no impact between the leg movement and the ground, that is, the speed and acceleration when landing and leaving the ground are 0. 3. Try to avoid unnecessary exercise.
The legs in the supporting phase bear the body's weight and the robot's extra load, generating body movement through relative movement. The trajectory projection formed by the leg in the supporting phase contacting the ground is mostly a simple straight line. Swing is the continuous movement process of feet from the ground up to the ground down, which determines the step length and height of the whole robot and has an essential influence on the robot's motion performance. Typical robot foot trajectory curves include rectangular curve, elliptic curve, parabola, modified cycloid, heart-shaped line, combined line segment, etc. [32][33][34]. The functional forms of cycloid and elliptic curves are elementary, and their derivatives are continuous and smooth and have no mutation [35]. The starting angle and landing angle of the swing phase are right angles, there is no horizontal velocity component, and it is not easy to slip. Therefore, there is no sudden change in speed during walking, which can ensure that the robot walks stably without impact. The expressions for correcting cycloid and elliptic curves are as follows.
Modified cycloid expression:  When the position of the prime mover is known, according to the geometric relationship of the mechanism, the coordinate position of the foot end F depends on the length of each rod and the position of the prime mover. The lengths of OA, AB, BC, BD, CD, OE, OC, ED, and DF are l 1 , l 2 , l 3 , l 4 , l 5 , l 6 , s, a, and b, respectively, and the angle between the prime mover and the positive direction of Y-axis is θ. To facilitate the solution, AC and OC are connected as auxiliary ∆ AOC. Let ∠OCA = ϕ 1 , ∠ACB = ϕ 2 , ∠COY = α 1 . Since O and C are fixed points, the coordinate expressions of A and C can be written directly.
From the formula of the distance between two points in the plane coordinate system, ∠OCA is always an acute angle when the prime mover swings in the range of motion. The value of θ is positive when A is on the right side of Y-axis and negative when A is on the left side of Y-axis. In ∆ AOC, it can be obtained by the sine theorem: In ∆ ABC, it can be obtained by the cosine theorem: θ 1 = ϕ 2 − ϕ 1 can be obtained from Figure 4. In ∆ OBC, it can be obtained by the cosine theorem: After this, OD is referred to as l 8 .
The coordinates of point D can be obtained from Figure 4.
For point E, it moves in a circle around point O, and the distance between it and point D is a, so we can obtain the equations about the coordinates of point E.
Since E, D, and F are collinear, assuming a = λb, the coordinate expression of the foot-end F point can be obtained by the formula of fixed ratio point coordinates.
As shown in Figure 4, λ = a/b, so the coordinate expression of the foot end F point is as follows:

Foot Trajectory Planning
Here, the requirement of the foot end trajectory is as follows. 1.
The trajectory of the foot should be a continuous and smooth closed curve, with no sudden change in speed and acceleration.

2.
There is no impact between the leg movement and the ground, that is, the speed and acceleration when landing and leaving the ground are 0.

3.
Try to avoid unnecessary exercise.
The legs in the supporting phase bear the body's weight and the robot's extra load, generating body movement through relative movement. The trajectory projection formed by the leg in the supporting phase contacting the ground is mostly a simple straight line. Swing is the continuous movement process of feet from the ground up to the ground down, which determines the step length and height of the whole robot and has an essential influence on the robot's motion performance. Typical robot foot trajectory curves include rectangular curve, elliptic curve, parabola, modified cycloid, heart-shaped line, combined line segment, etc. [32][33][34]. The functional forms of cycloid and elliptic curves are elementary, and their derivatives are continuous and smooth and have no mutation [35]. The starting angle and landing angle of the swing phase are right angles, there is no horizontal velocity component, and it is not easy to slip. Therefore, there is no sudden change in speed during walking, which can ensure that the robot walks stably without impact. The expressions for correcting cycloid and elliptic curves are as follows. Modified cycloid expression: Elliptic curve expression: where L, H, and ϕ are step length, step height, and polar angle, respectively. Figure 5 shows the trajectory comparison between the elliptic curve and modified cycloid, in which the step length L = 100 mm and the step height H = 40 mm. As can be seen from the figure, both curves are continuous and smooth, with no abrupt change. Furthermore, with the same step length and step height, the trajectory of the modified cycloid is shorter than that of the elliptic curve, which reduces unnecessary motion and consumes less energy. Therefore, this paper uses the modified cycloid to plan the foot-end trajectory.
Micromachines 2022, 13,1404 8 of 21 Figure 5 shows the trajectory comparison between the elliptic curve and modified cycloid, in which the step length L = 100 mm and the step height H = 40 mm. As can be seen from the figure, both curves are continuous and smooth, with no abrupt change Furthermore, with the same step length and step height, the trajectory of the modified cycloid is shorter than that of the elliptic curve, which reduces unnecessary motion and consumes less energy. Therefore, this paper uses the modified cycloid to plan the foot-end trajectory.
It can also be found that, in the whole trajectory period, the modified cycloid and ellipse have sharp points at the junction with the straight line (point A and point B), which means that there is a sudden change at the transition between the swing phase and the support phase, which will significantly affect the stability of robot motion. It is necessary to make a smooth transition between the supporting and swinging phases to make the foot end track continuous and smooth. In this paper, the method of quintic polynomial interpolation is used to smooth the transition of the foot-end trajectory composed of the modified cycloid and straight lines. Because of the symmetry of the trajectory, the proper transition function can be written by the left transition function. The specific planning method is as follows.

•
The length R is subtracted from the left end of the swing phase and the left end of the support phase to construct the retraction transition curve. As shown in Figure 6, the trajectory consists of BĈ , CD , DÊ , EB .  It can also be found that, in the whole trajectory period, the modified cycloid and ellipse have sharp points at the junction with the straight line (point A and point B), which means that there is a sudden change at the transition between the swing phase and the support phase, which will significantly affect the stability of robot motion.
It is necessary to make a smooth transition between the supporting and swinging phases to make the foot end track continuous and smooth. In this paper, the method of quintic polynomial interpolation is used to smooth the transition of the foot-end trajectory composed of the modified cycloid and straight lines. Because of the symmetry of the trajectory, the proper transition function can be written by the left transition function. The specific planning method is as follows.

•
The length R is subtracted from the left end of the swing phase and the left end of the support phase to construct the retraction transition curve. As shown in Figure 6, the trajectory consists ofBC,ĈD,DE,ÊB.
quintic polynomial interpolation is used to smooth the transition of the foot-end trajectory composed of the modified cycloid and straight lines. Because of the symmetry of the trajectory, the proper transition function can be written by the left transition function. The specific planning method is as follows.
• The length R is subtracted from the left end of the swing phase and the left end of the support phase to construct the retraction transition curve. As shown in Figure 6, the trajectory consists of BĈ , CD , DÊ , EB . From B to C:   From B to C: The value range of ϕ in Equations (14) and (15) From D to E: • The expressions of velocity and acceleration can be obtained by taking the first derivative and the second derivative of the expression of BC, respectively: . . .. ..
Similarly, the expressions of velocity and acceleration can be obtained by taking the first derivative and the second derivative of the expression of CD segment, respectively: ..
It should be noted that the foot trajectory planning method [36] introduced in this paper is aimed at motion in a two-dimensional plane. Because of the characteristics of the linkage mechanism, the foot of the robot introduced in this paper moves in threedimensional space, so the foot trajectory planning described in this paper is the foot trajectory projection planning. In addition, since the installation position of the robot leg on the body base is determined in this paper, if the robot needs to walk in a straight line when moving forward or backward, the step length of each group of legs will be different, but as long as the method introduced in this paper is followed, the changed trajectory parameters can be obtained.

Leg Dynamics Analysis
In this paper, the ground reference system is used to establish the coordinate system, as shown in Figure 7. Take the generalized joint variable The center point of each rod is located in the geometric center of the rod. The corresponding generalized driving force F can be obtained by using the Lagrange equation: where E K is the total kinetic energy of the system, E P is the total potential energy of the system, and q i is the generalized coordinate.

Gait Planning and Analysis
For the hexapod robot described in this paper, the movement gait is a typical crawling principle of hexapod insects. In order to clearly describe the movement law of legs, the schematic diagram and timing diagram are now used to describe the step sequence of the hexapod robot. As shown in Figure 8, the six legs of a hexapod robot are divided into two groups: defined and numbered. The left front foot, right middle foot, and left rear foot (L1, R2, and L3) of the hexapod robot are a group, and the right front foot, left middle foot, and right rear foot (R1, L2, and R3) are a group. The three legs of each group can form a stable triangular structure, so it is called a tripod gait. The leg vector of the robot is P H , the acceleration vector of gravity is g, the center vector of each link is P i , the mass of each component is m i , the velocity vector of the center of mass is v i , the angular velocity vector is ω i , and the inertia tensor is I i . Then, the total kinetic energy of the whole system is the sum of the kinetic energy of each connecting rod.
After homogenizing each connecting rod, calculating the centroid coordinates, and taking the derivative, the following formula can be obtained: Through simultaneous (26) and (27), the joint torque can be obtained: where D(q) is the inertial matrix of the robot legs, H q, ..
q is the Coriolis force vector, and G(q) is the gravity vector.
If the gait cycle of the robot is T, the energy consumed by the robot in one gait cycle can be expressed as follows:

Gait Planning and Analysis
For the hexapod robot described in this paper, the movement gait is a typical crawling principle of hexapod insects. In order to clearly describe the movement law of legs, the schematic diagram and timing diagram are now used to describe the step sequence of the hexapod robot. As shown in Figure 8, the six legs of a hexapod robot are divided into two groups: defined and numbered. The left front foot, right middle foot, and left rear foot (L1, R2, and L3) of the hexapod robot are a group, and the right front foot, left middle foot, and right rear foot (R1, L2, and R3) are a group. The three legs of each group can form a stable triangular structure, so it is called a tripod gait.

Gait Planning and Analysis
For the hexapod robot described in this paper, the movement gait is a typical crawling principle of hexapod insects. In order to clearly describe the movement law of legs the schematic diagram and timing diagram are now used to describe the step sequence of the hexapod robot. As shown in Figure 8, the six legs of a hexapod robot are divided into two groups: defined and numbered. The left front foot, right middle foot, and left rear foot (L1, R2, and L3) of the hexapod robot are a group, and the right front foot, left middle foot, and right rear foot (R1, L2, and R3) are a group. The three legs of each group can form a stable triangular structure, so it is called a tripod gait. The basic movements of the hexapod robot can be achieved by the different alternations of the two groups of legs. When the hexapod robot moves forward, R1, R3, and L2 move towards the head and are in the supporting phase, while L1, L3, and R2 move towards the tail and are in the swinging phase. Then, the two groups of legs alternately take the above actions to complete the hexapod robot's advance. The timing chart of the advance is shown in Figure 9. The basic movements of the hexapod robot can be achieved by the different alternations of the two groups of legs. When the hexapod robot moves forward, R1, R3, and L2 move towards the head and are in the supporting phase, while L1, L3, and R2 move towards the tail and are in the swinging phase. Then, the two groups of legs alternately take the above actions to complete the hexapod robot's advance. The timing chart of the advance is shown in Figure 9.  Similarly, when the hexapod robot retreats, it only needs to change the rota rection and to run the logic for each leg. For a hexapod robot, the rotation direction group of legs is slightly different when it turns left and right on a fixed axis. For ex when it turns left on a fixed axis, R1, L2, and R3 rotate counterclockwise in the sup phase and L1, R2, and L3 rotate clockwise in the swinging phase, and then the two of legs alternately take the above actions. The same is true for turning right on a fix In nature, multi-legged insects have a typical tripod gait, but studies have that, when there is no adhesive structure on the legs of insects, the bipod gait sim vertebrates performs better than the tripod gait in terms of movement speed [37]. gait refers to dividing the legs of a hexapod robot into three groups (the first grou and R3, the second group is L2 and R2, and the third group is R1 and L3) and e that only the legs of the same group land simultaneously every time the hexapo lands. As only two legs of the hexapod robot land on the ground at the same tim pared with the tripod gait, the bipod gait has no static stability but is a dynamica anced gait. With a high frequency of alternating movements of each group of l bipod gait equips the hexapod robot with high dynamic movement capability.
When the robot moves in a bipod gait, L2 and R2 (group 2), and R1 and L3 (g move towards the head of the robot in a swinging phase, and L1 and R3 (group 1 towards the tail in a supporting phase; then, each group of legs moves in turn ac to this logic. The timing chart of advance is shown in Figure 10.

Analysis of Gait Stability of Hexapod Robot
This section provides an analysis of the tripod gait as the static gait and an a of the bipod gait as the dynamic gait.
In this paper, the projection of the center of gravity on the XOY plane is use termine whether the robot meets the static conditions. In the tripod gait, at most th are in the supporting phase. As shown in Figure 11, when the robot moves forwa assumed that L1, L3, and R2 are in the supporting phase and that R1, R3, and L2 ar Similarly, when the hexapod robot retreats, it only needs to change the rotation direction and to run the logic for each leg. For a hexapod robot, the rotation direction of each group of legs is slightly different when it turns left and right on a fixed axis. For example, when it turns left on a fixed axis, R1, L2, and R3 rotate counterclockwise in the supporting phase and L1, R2, and L3 rotate clockwise in the swinging phase, and then the two groups of legs alternately take the above actions. The same is true for turning right on a fixed axis.
In nature, multi-legged insects have a typical tripod gait, but studies have shown that, when there is no adhesive structure on the legs of insects, the bipod gait similar to vertebrates performs better than the tripod gait in terms of movement speed [37]. Bipedal gait refers to dividing the legs of a hexapod robot into three groups (the first group is L1 and R3, the second group is L2 and R2, and the third group is R1 and L3) and ensuring that only the legs of the same group land simultaneously every time the hexapod robot lands. As only two legs of the hexapod robot land on the ground at the same time, compared with the tripod gait, the bipod gait has no static stability but is a dynamically balanced gait. With a high frequency of alternating movements of each group of legs, the bipod gait equips the hexapod robot with high dynamic movement capability.
When the robot moves in a bipod gait, L2 and R2 (group 2), and R1 and L3 (group 3) move towards the head of the robot in a swinging phase, and L1 and R3 (group 1) move towards the tail in a supporting phase; then, each group of legs moves in turn according to this logic. The timing chart of advance is shown in Figure 10. Similarly, when the hexapod robot retreats, it only needs to change the rota rection and to run the logic for each leg. For a hexapod robot, the rotation direction group of legs is slightly different when it turns left and right on a fixed axis. For e when it turns left on a fixed axis, R1, L2, and R3 rotate counterclockwise in the sup phase and L1, R2, and L3 rotate clockwise in the swinging phase, and then the two of legs alternately take the above actions. The same is true for turning right on a fix In nature, multi-legged insects have a typical tripod gait, but studies have that, when there is no adhesive structure on the legs of insects, the bipod gait si vertebrates performs better than the tripod gait in terms of movement speed [37]. gait refers to dividing the legs of a hexapod robot into three groups (the first gro and R3, the second group is L2 and R2, and the third group is R1 and L3) and e that only the legs of the same group land simultaneously every time the hexapo lands. As only two legs of the hexapod robot land on the ground at the same tim pared with the tripod gait, the bipod gait has no static stability but is a dynamic anced gait. With a high frequency of alternating movements of each group of l bipod gait equips the hexapod robot with high dynamic movement capability.
When the robot moves in a bipod gait, L2 and R2 (group 2), and R1 and L3 (g move towards the head of the robot in a swinging phase, and L1 and R3 (group towards the tail in a supporting phase; then, each group of legs moves in turn ac to this logic. The timing chart of advance is shown in Figure 10.

Analysis of Gait Stability of Hexapod Robot
This section provides an analysis of the tripod gait as the static gait and an of the bipod gait as the dynamic gait.
In this paper, the projection of the center of gravity on the XOY plane is use termine whether the robot meets the static conditions. In the tripod gait, at most th are in the supporting phase. As shown in Figure 11, when the robot moves forw assumed that L1, L3, and R2 are in the supporting phase and that R1, R3, and L2 a swinging phase at a certain moment. At this time, the endpoints S1, S2, and S3 of t legs in the supporting phase will form a triangle. When the projection point P o bot's center of gravity M on XOY plane is located in the triangle area, the static ga ity condition is satisfied.

Analysis of Gait Stability of Hexapod Robot
This section provides an analysis of the tripod gait as the static gait and an analysis of the bipod gait as the dynamic gait.
In this paper, the projection of the center of gravity on the XOY plane is used to determine whether the robot meets the static conditions. In the tripod gait, at most three legs are in the supporting phase. As shown in Figure 11, when the robot moves forward, it is assumed that L1, L3, and R2 are in the supporting phase and that R1, R3, and L2 are in the swinging phase at a certain moment. At this time, the endpoints S1, S2, and S3 of the three legs in the supporting phase will form a triangle. When the projection point P of the robot's center of gravity M on XOY plane is located in the triangle area, the static gait stability condition is satisfied.
The mathematical relationship after converting the stability conditions corre ing to the robot stability is △ S1S2S3 , and the sum of the areas of the three triangles by point P is equal to △ S1S2S3 . The specific geometric analysis is shown in Figure 1  The coordinates of S1, S2, S3, and point P of the robot can be known by mo the XOY plane, and the coordinates are set as S1(x 1 , y 1 ), S2(x 2 , y 2 ), S3(x 3 , y 3 ), and P respectively, so that the areas of the four triangles can be obtained. x y x y x y x y x y x y S S S S x y x y x y x y x y x y The mathematical expression for keeping the robot's static gait stable is as fo (31) is satisfied, the center of gravity of the robot falls in the area of △ S1S2S3 stability condition is satisfied. In the tripod gait, the full-tube support triangle will The mathematical relationship after converting the stability conditions corresponding to the robot stability is S1S2S3 , and the sum of the areas of the three triangles divided by point P is equal to S1S2S3 . The specific geometric analysis is shown in Figure 12. The mathematical relationship after converting the stability conditions corr ing to the robot stability is △ S1S2S3 , and the sum of the areas of the three triangles by point P is equal to △ S1S2S3 . The specific geometric analysis is shown in Figure   Figure 12. Analysis of mathematical relationship for static gait stability.
The coordinates of S1, S2, S3, and point P of the robot can be known by mo the XOY plane, and the coordinates are set as S1(x 1 , y 1 ), S2(x 2 , y 2 ), S3(x 3 , y 3 ), and P respectively, so that the areas of the four triangles can be obtained. x y x y x y x y x y x y S S S S x y x y x y x y x y x y The mathematical expression for keeping the robot's static gait stable is as fo (31) is satisfied, the center of gravity of the robot falls in the area of △ S1S2S3 stability condition is satisfied. In the tripod gait, the full-tube support triangle will with the cycle, but the projection point P of the robot's center of gravity on the XO The coordinates of S1, S2, S3, and point P of the robot can be known by moving in the XOY plane, and the coordinates are set as S1(x 1 ,y 1 ), S2(x 2 ,y 2 ), S3(x 3 ,y 3 ), and P (x P ,y P ), respectively, so that the areas of the four triangles can be obtained.
The mathematical expression for keeping the robot's static gait stable is as follows: S S1S2S3 = S S1S2P + S S1S3P + S S2S3P (31) If (31) is satisfied, the center of gravity of the robot falls in the area of S1S2S3 and the stability condition is satisfied. In the tripod gait, the full-tube support triangle will change with the cycle, but the projection point P of the robot's center of gravity on the XOY plane will always be located in the support triangle, so the robot in the tripod gait is always in a stable state.
In order to make the hexapod robot perform better in high-speed movement, this paper adopts a dynamic gait that is bipodal. However, the bipod gait is more complicated than the tripod gait, and the stability analysis is relatively complicated. The ZMP theory is used to analyze the stability of robot bipod dynamic gait [38].
In dynamic motion, the R1 and L3 legs are in the supporting phase and the other four legs are in the swinging phase; the dynamic motion stability of the robot can be analyzed. As shown in Figure 13, the coordinate relationship of ZMP can be obtained from Figure 13a.
Simultaneously using Equations (32) and (33), the coordinates of ZMP point can be obtained:   In Formula (32), F X , F Y , and F Z are the components of the resultant force of the robot in X, Y, and Z directions, respectively. x A , y A , and z A are the respective coordinates of the center of gravity of the robot in X, Y, and Z directions. x ZMP and y ZMP are the respective coordinates of ZMP in the X and Y directions.
According to mechanics, the resultant force of the robot in motion is the resultant force of inertia force and gravity, so the following expression can be obtained: In Formula (33), m i is the weight of each component; .. Simultaneously using Equations (32) and (33), the coordinates of ZMP point can be obtained: In order to make the robot move dynamically without tipping over, ZMP should fall on the line connecting the foot ends of the two supporting legs. In this case, the stable condition of the robot's dynamic motion is that ZMP should fall on the connecting line between R1 and L3, and Equation (35) should be satisfied: When the robot moves with a bipod gait, it is difficult for the center of gravity of the robot to fall onto the connecting line between the two supporting legs, so the method of judging the stability condition by zero moment point will fail. It takes a certain time for the robot to move from steady-state to dumping. If the robot can adjust its posture during this time, it can avoid dumping. Therefore, when the movement gait is determined, the subsequent posture sequence of each posture of the robot can be estimated, so as to calculate the time T 1 required for the robot to move from a stable state to an unbalanced state. If the response time T of the robot to adjust its posture is shorter than T 1 , the robot can complete the stable adjustment and realize the dynamic stability.

One-Leg Simulation Analysis
In this section, the SolidWorks Motion plug-in was used to simulate and analyze the motion characteristics of the robot. The input analog were data points of the servo turning angle calculated from the inverse kinematics, with the interpolation type Akima spline curve. The single-leg simulation results are presented in Figure 14. The maximum lifting speed of the foot end could reach 86 mm/s (Figure 14b), while the maximum lifting acceleration of the foot end could reach 413 mm/s 2 (Figure 14c). This result verified the high dynamic motion capability of this mechanism. Figure 14b, c also show that there was no sudden change in both velocity and acceleration of the foot end during the motion. This result verified the correctness of the foot-end trajectory planning method described in Section 3. Table 1 shows the material information table for each component. Figure 15 shows the trajectory of the foot end in this simulation. the robot to move from steady-state to dumping. If the robot can adjust its posture during this time, it can avoid dumping. Therefore, when the movement gait is determined, the subsequent posture sequence of each posture of the robot can be estimated, so as to calculate the time T1 required for the robot to move from a stable state to an unbalanced state. If the response time T of the robot to adjust its posture is shorter than T1, the robot can complete the stable adjustment and realize the dynamic stability.

One-Leg Simulation Analysis
In this section, the SolidWorks Motion plug-in was used to simulate and analyze the motion characteristics of the robot. The input analog were data points of the servo turning angle calculated from the inverse kinematics, with the interpolation type Akima spline curve. The single-leg simulation results are presented in Figure 14. The maximum lifting speed of the foot end could reach 86 mm/s (Figure 14b), while the maximum lifting acceleration of the foot end could reach 413 mm/s 2 (Figure 14c). This result verified the high dynamic motion capability of this mechanism. Figure 14b, c also show that there was no sudden change in both velocity and acceleration of the foot end during the motion. This result verified the correctness of the foot-end trajectory planning method described in Section 3. Table 1 shows the material information table for each component. Figure 15 shows the trajectory of the foot end in this simulation.

Physical Prototype Experiments
In the field experiment, the robot was equipped with a nine-axis IMU for acceleration measurement, and the rotation speed of the servo was tuned to 0.2 r/s (the maximum speed of servo operation). The single-leg trajectory planning scheme presented in Section 3 was introduced into the robot, and the robot moved forward for 20 s on flat ground in the laboratory with the tripod gait and the bipod gait. Figure 16 is the experimental environment of the robot.

Physical Prototype Experiments
In the field experiment, the robot was equipped with a nine-axis IMU for accel measurement, and the rotation speed of the servo was tuned to 0.2 r/s (the ma speed of servo operation). The single-leg trajectory planning scheme presented in 3 was introduced into the robot, and the robot moved forward for 20 s on flat gro the laboratory with the tripod gait and the bipod gait. Figure 16 is the experiment ronment of the robot.

Physical Prototype Experiments
In the field experiment, the robot was equipped with a nine-axis IMU for acceleration measurement, and the rotation speed of the servo was tuned to 0.2 r/s (the maximum speed of servo operation). The single-leg trajectory planning scheme presented in Section 3 was introduced into the robot, and the robot moved forward for 20 s on flat ground in the laboratory with the tripod gait and the bipod gait. Figure 16 is the experimental environment of the robot. As shown in Figure 11, the forward direction of the robot was the positive d of the X-axis. First, the robot moved forward with a tripod gait. Figure 17a is an i the acceleration of the robot moving along the X-axis changing with time. The acce of the robot showed a periodic trend of first increasing, then decreasing, and then ing. The reason for this is that the robot's action switching in the tripod gait invo acceleration and deceleration processes, and thus, the ideal uniform linear motion appear. The absolute value of the acceleration of the robot in the X-axis directio reach 4.1 mm/s 2 , which indicates that the robot had high dynamic motion capabil Figure 17b is an image of the acceleration of the robot moving along the X-a bipod gait. When the robot moved forward with a bipod gait, the frequency of ch acceleration and speed was higher, and the absolute peak value of acceleration 7.8 mm/s 2 , which put the robot in a state of dynamic equilibrium and improved namic motion capability. As shown in Figure 11, the forward direction of the robot was the positive direction of the X-axis. First, the robot moved forward with a tripod gait. Figure 17a is an image of the acceleration of the robot moving along the X-axis changing with time. The acceleration of the robot showed a periodic trend of first increasing, then decreasing, and then increasing. The reason for this is that the robot's action switching in the tripod gait involved the acceleration and deceleration processes, and thus, the ideal uniform linear motion did not appear. The absolute value of the acceleration of the robot in the X-axis direction could reach 4.1 mm/s 2 , which indicates that the robot had high dynamic motion capability. As shown in Figure 11, the forward direction of the robot was the positive direction of the X-axis. First, the robot moved forward with a tripod gait. Figure 17a is an image of the acceleration of the robot moving along the X-axis changing with time. The acceleration of the robot showed a periodic trend of first increasing, then decreasing, and then increasing. The reason for this is that the robot's action switching in the tripod gait involved the acceleration and deceleration processes, and thus, the ideal uniform linear motion did not appear. The absolute value of the acceleration of the robot in the X-axis direction could reach 4.1 mm/s 2 , which indicates that the robot had high dynamic motion capability. Figure 17b is an image of the acceleration of the robot moving along the X-axis with bipod gait. When the robot moved forward with a bipod gait, the frequency of change in acceleration and speed was higher, and the absolute peak value of acceleration reached 7.8 mm/s 2 , which put the robot in a state of dynamic equilibrium and improved its dynamic motion capability.    Figure 17b is an image of the acceleration of the robot moving along the X-axis with bipod gait. When the robot moved forward with a bipod gait, the frequency of change in acceleration and speed was higher, and the absolute peak value of acceleration reached 7.8 mm/s 2 , which put the robot in a state of dynamic equilibrium and improved its dynamic motion capability.
To further observe the motion performance of the robot moving forward with two gaits, we integrated the acceleration images of Figure 17a, b once to derive the velocity images of both, and the results are shown in Figure 18. Comparing Figure 18a,b, it could be seen that the robot moves forward with a tripod gait with lower frequency and lower amplitude, and the velocity varies slightly around the average value, which also proves the superior stability of the tripod gait. gaits, we integrated the acceleration images of Figure 17a, b once to derive the velocity images of both, and the results are shown in Figure 18. Comparing Figure 18a,b, it could be seen that the robot moves forward with a tripod gait with lower frequency and lower amplitude, and the velocity varies slightly around the average value, which also proves the superior stability of the tripod gait.
The advantage of the bipod gait is the dynamic stability and higher speed: On the one hand, the high frequency of speed changes reflects the dynamic stability of the robot. On the other hand, from Figure 18b, it could be found that the robot reached a peak velocity of 390 mm/s (130% of the moveable body length per second) and an average velocity of 174 mm/s (58% of the moveable body length per second) during 20 s of movement, which is 49.5% higher than the peak velocity and 34.5% higher than the average velocity of the tripod gait. However, the robot's motion speed fluctuated considerably above and below the average value, so we could see that the robot's speed improved when it moved with a bipod gait, but its motion stability was not satisfactory. Another set of data should be used to measure the stability of the robot's motion when walking with different gaits. Ideally, the motion of the robot on the horizontal plane should be in a horizontal stable state; that is, the displacement in the Z-axis direction is zero, but this was not the case in practice. The acceleration in the Z-axis direction can be integrated twice to obtain the displacement of the robot on the Z-axis, which represents the motion turbulence of the robot along the Z-axis. First, the robot moved forward with a tripod gait. The displacement of the robot on the Z-axis in the actual movement process is shown in Figure 19a. The absolute value of the maximum forward displacement of the robot on the Z-axis is 3.5 mm (equivalent to 2.5% of body height), the absolute value of maximum reverse displacement is 8.5 mm (equivalent to 6.1% of body height), and the absolute value of average value is 3.7 mm (equivalent to 6.1% of body height). The reason for this situation is that the The advantage of the bipod gait is the dynamic stability and higher speed: On the one hand, the high frequency of speed changes reflects the dynamic stability of the robot. On the other hand, from Figure 18b, it could be found that the robot reached a peak velocity of 390 mm/s (130% of the moveable body length per second) and an average velocity of 174 mm/s (58% of the moveable body length per second) during 20 s of movement, which is 49.5% higher than the peak velocity and 34.5% higher than the average velocity of the tripod gait. However, the robot's motion speed fluctuated considerably above and below the average value, so we could see that the robot's speed improved when it moved with a bipod gait, but its motion stability was not satisfactory. Another set of data should be used to measure the stability of the robot's motion when walking with different gaits.
Ideally, the motion of the robot on the horizontal plane should be in a horizontal stable state; that is, the displacement in the Z-axis direction is zero, but this was not the case in practice. The acceleration in the Z-axis direction can be integrated twice to obtain the displacement of the robot on the Z-axis, which represents the motion turbulence of the robot along the Z-axis. First, the robot moved forward with a tripod gait. The displacement of the robot on the Z-axis in the actual movement process is shown in Figure 19a. The absolute value of the maximum forward displacement of the robot on the Z-axis is 3.5 mm (equivalent to 2.5% of body height), the absolute value of maximum reverse displacement is 8.5 mm (equivalent to 6.1% of body height), and the absolute value of average value is 3.7 mm (equivalent to 6.1% of body height). The reason for this situation is that the movement conversion of the robot in the forward movement with a tripod gait involved the lifting and lowering movement conversion of the legs, which led to the fact that the robot's center of gravity was not always at the same horizontal height. Consequently, the robot bumped up and down slightly along the Z-axis. Finally, the degree of motion turbulence in the Z-axis direction of the robot is reflected by variance: (36) the lifting and lowering movement conversion of the legs, which led to the fact that the robot's center of gravity was not always at the same horizontal height. Consequently, the robot bumped up and down slightly along the Z-axis. Finally, the degree of motion turbulence in the Z-axis direction of the robot is reflected by variance:  Figure 19b is the displacement change on the Z-axis when the robot advanced with the bipod gait. From the image, it can be seen that the maximum displacement and the average displacement of the robot on the Z-axis were both larger. This is because the robot's motion changed frequently in the bipod gait, which enabled it to achieve a dynamic balance. Its variance is as follows: By comparison, it can be seen that the robot's degree of bumpiness on the Z-axis was far lower and that its performance was more stable when walking in the tripod gait than in the bipod gait. However, regardless of the bipod gait or tripod gait being used, the robot did not show excellent stable movement, and there was also a big fluctuation in the stable tripod gait. This is because the parts of the leg mechanism were mostly 3D-printed, and the overall stiffness of the leg was low. Consequently, there was a big vertical and horizontal vibration in the robot movement. The displacement variation on the Z-axis when the robot advances with a bipod gait. Figure 19b is the displacement change on the Z-axis when the robot advanced with the bipod gait. From the image, it can be seen that the maximum displacement and the average displacement of the robot on the Z-axis were both larger. This is because the robot's motion changed frequently in the bipod gait, which enabled it to achieve a dynamic balance. Its variance is as follows: By comparison, it can be seen that the robot's degree of bumpiness on the Z-axis was far lower and that its performance was more stable when walking in the tripod gait than in the bipod gait. However, regardless of the bipod gait or tripod gait being used, the robot did not show excellent stable movement, and there was also a big fluctuation in the stable tripod gait. This is because the parts of the leg mechanism were mostly 3D-printed, and the overall stiffness of the leg was low. Consequently, there was a big vertical and horizontal vibration in the robot movement.

Conclusions
In this paper, we introduced a design method and implemented a hexapod robot; the contribution of this paper are as follows. First, a six-link mechanism was designed. This mechanism can realize the transformation from small driving motion to large output motion, thus enhancing the dynamic motion capability of a legged robot. Second, the robot single-leg trajectory planning and a planning method for tripod and bipod gait are proposed and verified for feasibility. The tripod gait ensures the stability of the robot running on an unstructured terrain, while the bipod gait ensures the high speed of the robot on a flat terrain. Simulations and experiments verified that our method can improve the dynamic motion capability of the hexapod robot.
Future work will enhance the hexapod robots' sensing ability and establish a dynamic gait transition method for hexapod robots on various unstructured terrains.