# Fault-Tolerant Tripod Gait Planning and Verification of a Hexopod Robot
## 4 Trajectory Planning of the F-TT Gait  
The trajectory planning includes two parts: the motion trajectory of the COG, and the swing trajectory of the foot end. By controlling the joint of the legs supported on the ground, the control of the COG can be realized. The leg swinging in the air needs to meet certain constraints. The control of the attitude of the body is not involved, only the displacement and velocity in the X- and Y-axis is considered. In order to verify the feasibility of the F-TT gait, the linear uniform motion of the robot on an even road is planned.  
For the transfer legs, to reduce the impact, two aspects should also be taken into consideration: one is that the velocity at the posterior extreme position (PEP) and anterior extreme position (AEP) is 0; the other is that there is no jump in the acceleration curve [27]. The motion of the transfer phase can be divided into two directions, namely, longitudinal and vertical motion. The longitudinal motion needs to meet the following conditions:  
\[\left\{\begin{array}{c}y_{t=0}={}^{w}p_{0y}\\ y_{t=T_{t}}={}^{w}p_{0y}+\lambda\\ \dot{y}_{t=0}=\dot{y}_{t=T_{t}}=0\end{array}\right. \tag{18}\]  
where \({}^{w}p_{0y}\) is the current location of the legs in Y-axis.  
The locomotion of the transfer leg in the vertical direction is lifted at the AEP, reaches the highest point at the middle position (MP) and is then put down at the PEP, so the vertical locomotion trajectory should satisfy the following conditions:  
\[\left\{\begin{array}{c}z_{t=0}=z_{t=T_{T}}={}^{w}p_{0z}\\ z_{t=T_{t}/2}={}^{w}p_{0z}+h\\ \dot{z}_{t=0}=\dot{z}_{t=T_{t}}=0\end{array}\right. \tag{19}\]  
where \(h\) is the stride height.  
Figure 12: F-TT gait locomotion with coxa initialization angle adjustment in leg 1 fault state.  
Figure 13: F-TT gait locomotion with coxa initialization angle adjustment in leg 2 fault state.  
The velocity components of the foot end \(\dot{x}_{e}\), \(\dot{y}_{e}\) and \(\dot{z}_{e}\) are assumed to be:  
\[\left\{\begin{array}{c}\dot{x}_{e}=0\\ \dot{y}_{e}=c_{1}-c_{1}cos(\frac{2\pi}{T_{t}}t)\quad t\in[0,T_{t}]\\ \dot{z}_{e}=c_{2}sin(\frac{2\pi}{T_{t}}t)\end{array}\right. \tag{20}\]  
where \(c_{1}\) and \(c_{2}\) are constant. Through the initial conditions, the displacement of the foot end is obtained:  
\[\left\{\begin{array}{c}x_{e}={}^{w}p_{0x}\\ y_{e}=-\frac{\lambda}{2\pi}sin(\frac{2\pi}{T_{t}}t)+\frac{\lambda}{T_{t}}t+{}^ {w}p_{0y}\quad t\in[0,T_{t}]\\ z_{e}=\frac{h}{2}-\frac{h}{2}cos(2\pi\frac{t}{T_{t}})+{}^{w}p_{0z}\end{array}\right. \tag{21}\]  
The COG moves forward at a uniform speed, so the velocity during walking is:  
\[\left\{\begin{array}{c}\dot{x}_{b}=0\\ \dot{y}_{b}=S/T\\ \dot{z}_{b}=0\end{array}\right. \tag{22}\]  
The displacement equation is as follows:  
\[\left\{\begin{array}{c}x_{b}={}^{w}p_{0x}\\ y_{b}=S/T\times t+{}^{w}p_{0y}\;\;t\in[0,T]\\ z_{b}={}^{w}p_{0z}\end{array}\right. \tag{23}\]  
According to the foot trajectory planned in Equation (21) and Equation (23), the foot trajectory curve during a period is shown in Figure 14.  
After obtaining the trajectory of the COG and the foot, the angular velocity of the leg joint can be solved.  
From Equation (16), the F-TT gait we proposed applies a different duty factor to different legs. The duty factor \(\kappa_{2}\) of \(L_{2}\) is 1/3, and that of the other legs is 2/3, which results in the period of the transfer phase of \(L_{2}\) (\(T_{tL2}\)) being twice that of the other non-fault legs (\(T_{t}\)'). The relationship between \(T_{tL2}\), \(T_{t}\)', and \(T\) is:  
\[T_{tL2}=(1-\kappa_{2})T=2T_{t}\text{'} \tag{24}\]  
Because of the identity of the leg motion cycle, the period of the support phase of \(L_{2}\) (\(T_{sL2}\)) is half that of the other non-fault legs (\(T_{s}\)'). The relationship between \(T_{sL2}\), \(T_{s}\)', and \(T\) is:  
\[T_{sL_{2}}=\kappa_{2}T=\frac{1}{2}T_{s}\text{'} \tag{25}\]  
Figure 14: Foot trajectory curve of the hexapod.