# Fault-Tolerant Tripod Gait Planning and Verification of a Hexopod Robot
## 2 The Modeling of Hexapod Robot
### Kinematics Model
\right]^{T}(i=1,2,\ldots,6) \tag{6}\]  
where \(\beta_{Li}^{T}=\left[\beta_{Li1},\beta_{Li2},\beta_{Li3}\right]^{T}\) represents the joint angle of the leg \(i\), and \(x_{b}=\left[x,y,z,\theta_{1},\theta_{2},\theta_{3}\right]^{T}\) is the under-actuated passive degrees of freedom of the hexapod body, which represents the displacement and angle of the body in three directions of the world coordinate system. \(\sum O_{b}\) and \(\sum O_{w}\) can be regarded as connected by a virtual manipulator with six degrees of freedom, while \(\left[x,y,z,\theta_{1},\theta_{2},\theta_{3}\right]\) can be regarded as six under-actuated passive virtual degrees of freedom variables of the manipulator. It can be seen that the motion state of the hexapod robot in \(\sum O_{w}\) is actually determined by the 18 leg joints and the position and attitude of the body. The velocity \(\dot{e}_{i}\) of leg \(i\) in the world coordinate system can also be connected with the velocity \(\dot{q}\) of the joint angle of the robot through the Jacobian matrix; the relationship is:  
\[\dot{e}_{i}=J_{Li}\Big{[}\beta_{Li}^{T}\dot{x}_{b}^{T}\Big{]}^{T} \tag{7}\]  
If the velocity of any foot end is given, the velocity in joint space can be obtained by:  
\[\Big{[}\beta_{Li}^{T}\dot{x}_{b}^{T}\Big{]}^{T}=J_{Li}{}^{-1}\dot{e}_{i} \tag{8}\]  
The Jacobian matrix of the foot end of leg \(i\) can be expressed by:  
\[J_{Li}=\left[ \begin{array}{cc}J^{b_{Li}}&J^{b_{b}}\end{array} \right] \tag{9}\]  
where \(J^{b_{Li}}\) represents the part of Jacobian matrix related to leg \(i\), and \(J^{b_{b}}\) represents the part related to body posture. The Jacobian matrix \(J^{b_{Li}}\) related to leg \(i\) can be obtained by the partial derivative of Equation (4). Give the result as follows:  
\[J_{e}=\left[ \begin{array}{cc}-Asin\beta_{1}^{i}&-Bcos\beta_{1}^{i}&-l_{3} cos\beta_{1}^{i}sin\beta_{23}^{i}\\ Acos\beta_{1}^{i}&-Bsin\beta_{1}^{i}&-l_{3}sin\beta_{1}^{i}sin\beta_{23}^{i} \\ 0&C&l_{3}cos\beta_{23}^{i}\end{array} \right] \tag{10}\]  
where \(A=l_{1}+l_{2}cos\beta_{2}^{i}+l_{3}cos\beta_{23}^{i}\), \(B=l_{2}sin\beta_{2}^{i}+l_{3}sin\beta_{23}^{i}\), \(C=l_{2}cos\beta_{2}^{i}+l_{3}cos\beta_{23}^{i}\). A transformation is needed for \(J_{e}\) to transform to the world coordinate system:  
\[j_{e}^{b_{Li}}={}^{w}R_{b}J_{e} \tag{11}\]  
The Jacobian matrix of the foot end is also affected by the passive degree of freedom of the body. In the passive degree of freedom, the influence of body displacement is linear, while the attitude is affected by the configuration of leg \(i\), so it can be expressed as follows:  
\[J^{b_{b}}=\left[I\,{}^{w}R_{b}\times{}^{b}e_{i}\right] \tag{12}\]  
Although the body has no corresponding drive to achieve the movement, by imposing certain restrictions on the foot end, the movement of body can be represented by the leg joints. \(x_{c}\in\mathbb{C}^{k}\) represents the \(k\) constrained degrees of freedom of the foot end, and the Jacobian matrix is \(J_{c}\). According to Equation (9), the Jacobian matrix of any foot end contains the parts corresponding to the joint and the part corresponding to the body. For a support foot of the robot, its displacement and velocity can be considered as 0, that is \(e_{c}=\dot{e}_{c}=0\), so:  
\[\dot{e}_{c}=J_{c}\dot{q}=\left[ \begin{array}{cc}J_{c}^{b_{L}}&J_{c}^{b} \end{array} \right]\left[ \begin{array}{c}\dot{q}_{L}\\ \dot{x}_{b}\end{array} \right]=0 \tag{13}\]  
where \(q_{L}=\left[\beta_{L1}^{T},\beta_{L2}^{T},\beta_{13}^{T},\beta_{L4}^{T},\beta_ {15}^{T},\beta_{16}^{T}\right]^{T}\). Equation (14) can be derived from Equation (13). \[\dot{x}_{b}=-J_{c}^{b_{b}}+J_{c}^{b_{L}}\dot{q}_{L} \tag{14}\]  
where \(J_{c}^{b_{b}}\in\mathbb{C}^{k\times 6}\), \(J_{c}^{b_{b}}\) is the pseudoinverse of \(J_{c}^{b_{b}}\). When the movement of one foot is constrained, \(k=3\), the motion of passive degrees of freedom is not completely eliminated.