# Omnidirectional Jump of a Legged Robot Based on the Behavior Mechanism of a Jumping Spider
## 3 Methods
### Kinematics with Redundant DoF
#### 3.1.2 Inverse Kinematics Analysis  
According to the position vector of the robot foot relative to the reference coordinate system of the coxal joint, the four joint angles of the leg can be obtained. However, the four joint angles can  
Figure 3: Algorithm framework. be driven directly only through being given the position vector of the foot. Therefore, a constraint is added. Firstly, the rotation angle of the coxal joint (\(\theta_{1}\)) is solved by the algebraic method  
\[\theta_{1}=\mathrm{a}\tan(\frac{0}{\mathrm{tip}\mathrm{P}_{\mathrm{Y}}}{0} \mathrm{P}_{\mathrm{X}}). \tag{2}\]  
The rotation angles of the femur-patella joint (\(\theta_{2}\)), the tibia-metatarsus joint (\(\theta_{3}\)) and the metatarsus-tarsus joint (\(\theta_{4}\)) are solved by the geometric method. The base coordinate system {O} is assumed to attach to the coordinate system of the coxal joint. The mechanical leg is projected in the X-Z plane coordinate system, and the simplified model of the linkage is shown in Figure 4.  
In Figure 4, O represents the femoral-patella joint, A represents the tibia-metatarsus joint and B represents the metatarsus-tarsus joint. We have aligned the coxal joint and the femoral-patella joint at O for convenience in calculating the angles. The angle between the connecting rod BD and the \(X\) axis or the ground is \(\theta_{t}\); \(\theta_{t}\) is the attitude angle of the foot. The geometric relation between the links of the linkage mechanism can be obtained by \(\theta_{t}\) and \(\theta_{2}\), \(\theta_{3}\) and \(\theta_{4}\), which satisfy the constraint relation in Equation (3)  
\[\theta_{t}=\theta_{2}+\theta_{3}+\theta_{4}. \tag{3}\]  
The plane coordinate of D relative to O is (P\({}_{X}\), P\({}_{Z}\)). According to the projection principle, the relation between P\({}_{X}\), P\({}_{Z}\) and \({}^{0}_{tip}\)P\({}_{X}\), \({}^{0}_{tip}\)P\({}_{Z}\) is  
\[\left\{ \begin{array}{l}\mathrm{P}_{X}={}^{0}_{tip}\mathrm{P}_{X}/\cos\theta _{1}\\ \mathrm{P}_{Z}={}^{0}_{tip}\mathrm{P}_{Z}\end{array} \right.. \tag{4}\]  
In the \(\Delta\)OBE, according to cosine theorem, length \(L_{5}\) between O and B is  
\[\mathrm{L}_{5}=\sqrt{(\mathrm{P}_{X}-\mathrm{L}_{4}\cos(\theta_{t}))^{2}+( \mathrm{P}_{Z}+\mathrm{L}_{4}\sin(\theta_{t}))^{2}}. \tag{5}\]  
In the \(\Delta\)OAB, the \(\theta_{3}\) holds  
\[\theta_{3}=\arccos(\frac{\mathrm{L}_{5}{}^{2}-\mathrm{L}_{2}{}^{2}-\mathrm{L }_{3}{}^{2}}{2\mathrm{L}_{2}\mathrm{L}_{3}}). \tag{6}\]  
Figure 4: The simplified model of the linkage. O represents the femoral–patella joint, A represents the tibia–metatarsus joint, B represents the metatarsus–tarsus joint, and D represents the foot tip of the robot. In the \(\Delta\)OBE  
\[\tan\alpha=\frac{(\mathrm{L_{4}}\sin(\theta_{t})+\mathrm{P_{Z}})}{\mathrm{P_{X}}- \mathrm{L_{4}}\cos(\theta_{t})},\alpha=-\arctan(\frac{\mathrm{P_{Z}}+\mathrm{L_ {4}}\sin(\theta_{t})}{\mathrm{P_{X}}-\mathrm{L_{4}}\cos(\theta_{t})}). \tag{7}\]  
In \(\Delta\)OBF and \(\Delta\)ABF, they meet the following formula  
\[\beta=-\arcsin(\frac{\mathrm{L_{3}}\sin(\theta_{3})}{\mathrm{L_{5}}}). \tag{8}\]  
Thus, we can obtain  
\[\theta_{2}=\alpha+\beta=-\arctan(\frac{\mathrm{P_{Z}}+\mathrm{L_{4}}\sin( \theta_{t})}{\mathrm{P_{X}}-\mathrm{L_{4}}\cos(\theta_{t})})-\arcsin(\frac{ \mathrm{L_{3}}\sin(\theta_{3})}{\mathrm{L_{5}}}). \tag{9}\]  
From the constraints relation above, \(\theta_{3}\) solutions can be  
\[\theta_{4}=\theta_{t}-\theta_{2}-\theta_{3}. \tag{10}\]  
Hence, the inverse kinematics is  
\[\left\{ \begin{array}{l}\theta_{1}=\frac{\frac{\theta}{\mathrm{P_{Y}}}}{ \mathrm{i}\mathrm{P_{Y}}}\\ \theta_{2}=-\arctan(\frac{\mathrm{P_{Z}}+\mathrm{L_{4}}\sin(\theta_{1})}{ \mathrm{P_{X}}-\mathrm{L_{4}}\cos(\theta_{1})})-\arcsin(\frac{\mathrm{L_{3}} \sin(\theta_{3})}{\mathrm{L_{5}}})\\ \theta_{3}=\arcsin(\frac{\mathrm{L_{3}}^{2}-\mathrm{L_{3}}^{2}-\mathrm{L_{5}} ^{2}}{\mathrm{L_{5}}})\\ \theta_{4}=\theta_{t}-\theta_{2}-\theta_{3}\end{array} \right.. \tag{11}\]  
In this paper, we proposed a study based on bionic kinematics with redundant freedom.