# Straight Gait Research of a Small Electric Hexapod Robot
## 6 Experiments
### Comparison and Transformation of Different Types of Gait  
Three experiments are used to compare the results when the robot walks forward by using the tripod, quadrangular, and pentagonal gaits. In these three experiments, except for the different gait types, the other motion parameters are the same. The robot walks for 12 s using the tripod gait, 24 s using the quadrangular gait, and 60 s using the pentagonal gait. This way, for each gait, the theoretical walking distance is 360 mm. Table 5 shows the RMSE of the attitude angle data and the actual walking distance in the three experiments. From the tripod gait to the pentagonal gait, although the robot slows down, the attitude fluctuation and yaw also basically decrease, which means the stability of the robot's motion is better. Since the quadrangular gait and the pentagonal gait require more steps, it may make the robot foot slip phenomenon more obvious to a certain extent, and increase the robot's walking distance error [36]. Combing the actual needs, users can set suitable gait types and parameters on the mobile device.  
Figure 18 shows the foot trajectories of leg 1, leg 2, and leg 3 in the X direction in an experiment on gait transformation. Correspondingly, the attitude variations are shown in Figure 19. At first, the robot receives the command of walking forward using the tripod gait, but in the process of movement, it receives a command of walking forward using the quadrangular gait. After receiving the new command, the robot stops at 9 s. At this time, the foot positions of the robot's legs can be expressed as \(\{5,\,-5,\,-5,\,5,\,5,\,5\}\) (\(P_{T\_2}\)). To enter the cycles of quadrangular gait, the robot can adjust the foot positions by only one steps in situ: \(\{5,\,-5,\,-5,\,5,\,5,\,-5\}\) (\(P_{T\_2}\)) \(\rightarrow\)\(\{5,\,0,\,-5,\,5,\,0,\,-5\}\) (\(P_{Q\_2}\)), corresponding to 9 s\(\sim\)10 s. Then, the robot walks using the quadrangular gait and receives a command of walking backward using the tripod gait in 16 s\(\sim\)17 s. In 17 s\(\sim\)19 s, the robot completes two steps to adjust the foot position of three legs. The change process of foot positions is: \(\{-5,\,5,\,0,\,-5,\,5,\,0\}\) (\(P_{Q\_1}\))\(\rightarrow\)\(\{-5,\,5,\,5,\,-5,\,5\}\)\(\rightarrow\)\(\{-5,\,5,\,5,\,5,\,-5,\,5\}\) (\(P_{T\_1}\)). After that, the  
\begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Data Type**} & **Data in the Experiment with the Strategy** & **Data in the Experiment without the Strategy** \\ \hline The mean of the roll data & \(0.156^{\circ}\) & \(0.205^{\circ}\) \\ The mean of the pitch data & \(-0.263^{\circ}\) & \(-0.118^{\circ}\) \\ The mean of the yaw data & \(-0.804^{\circ}\) & \(-1.127^{\circ}\) \\ The SD of the roll data & \(0.453^{\circ}\) & \(0.710^{\circ}\) \\ The SD of the pitch data & \(0.428^{\circ}\) & \(0.659^{\circ}\) \\ The SD of the yaw data & \(1.056^{\circ}\) & \(1.011^{\circ}\) \\ The RMSE of the roll data & \(0.479^{\circ}\) & \(0.739^{\circ}\) \\ The RMSE of the pitch data & \(0.502^{\circ}\) & \(0.669^{\circ}\) \\ The RMSE of the yaw data & \(1.327^{\circ}\) & \(1.514^{\circ}\) \\ \hline \hline \end{tabular}
\end{table}
Table 4: Comparison of data in two experiments.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Data Type**} & **Experimental Data** & **Experimental Data** & **Experimental Data** \\  & **of Tripod Gait** & **of Quadrangular Gait** & **of Pentagonal Gait** \\ \hline The mean of the roll data & \(-0.063^{\circ}\) & \(0.060^{\circ}\) & \(0.121^{\circ}\) \\ The mean of the pitch data & \(-0.091^{\circ}\) & \(-0.009^{\circ}\) & \(-0.178^{\circ}\) \\ The mean of the yaw data & \(-0.840^{\circ}\) & \(-0.837^{\circ}\) & \(-0.525^{\circ}\) \\ The SD of the roll data & \(0.385^{\circ}\) & \(0.398^{\circ}\) & \(0.236^{\circ}\) \\ The SD ofrobot begins to walk backward for four cycles using the tripod gait, and finally returns to the initial state. The whole process conforms to the gait transformation scheme designed before.