# Straight Gait Research of a Small Electric Hexapod Robot
## 4 Straight Gait Planning  
### Increase of the Duty Factor  
The main periodic gaits of the hexapod robot include the tripod gait, quadrangular gait, and pentagonal gait. In the tripod gait, three legs can swing at the same time, while two legs can swing at the same time in the quadrangular gait, and only one leg can swing at a time in the pentagonal gait. In this paper, when the robot starts to move until at least one leg moves from the swing phase to the support phase, it is considered that the robot has completed one \"step\". In a cycle, all legs are required to complete a change in the swing phase and support phase. Therefore, each cycle of the triangular gait contains two steps, while the quadrangular gait and pentagonal gait, contains three and six steps, respectively.  
Duty factor (\(\beta\)) is the time fraction of a cycle time when a particular leg is in the support phase [31]. Duty factor can be expressed as:  
\[\beta=\frac{t_{stance}}{t_{cycle}}=\frac{t_{stance}}{t_{swing}+t_{stance}} \tag{5}\]  
where \(t_{cycle}\) is the total time of a cycle; \(t_{stance}\) and \(t_{swing}\) are the time that a particular leg is in the support phase and the swing phase in a cycle, respectively. In most of the previous gait planning schemes of hexapod robots, there is no case that six legs support the ground simultaneously in the gait cycle. For a single leg, it will only swing in one step in a cycle, while it will be in the support phase in other steps. Thus, the duty factors of the tripod gait, quadrangular gait, and pentagonal gait are 1/2, 2/3, and 5/6 respectively. \(\beta\) can also be expressed as:  
\[\beta=\frac{t_{stance}}{t_{swing}+t_{stance}}=\frac{aT}{T+aT} \tag{6}\]  
where \(T\) is the total time of each step; \(a\) is a quantity, which represents that the single leg is completely in the support phase during \(a\) steps in a walking cycle. The time sequence diagram of the robot walking forward in the general tripod gait is shown in Figure 5a [32].  
Figure 4: Foot trajectory relative to \(\{O_{ig}\}\): (**a**) Position variations in the X and \(Z\) directions; (**b**) Foot trajectory in the XZ plane.  
The part of the shadow indicates that the leg is in the support phase, while the white part means the swing phase.  
This paper puts forward the strategy of \"increasing duty factor\", which aims to reduce foot slip and attitude fluctuation when the swing phase and the support phase switch. There is the stage where all six legs are in the support phase in each step. In each step, according to the previous gait planning, if a leg turns to be in the swing phase, it will not swing immediately, but is still in the support phase in the front \(kT\) (\(k\) is a factor between 0 and 1), supporting the body to move with other legs that are in the stance phase. The leg will swing in the next \((1-k)T\), and finally, make the foot swing to the planned position at the end of the step. Figure 5b-d depicts the time sequence diagram of the three gaits according to this strategy.  
Based on this strategy, the duty factor becomes:  
\[\beta=\frac{(a+k)T}{(1-k)T+(a+k)T} \tag{7}\]  
\(a\) is determined by the gait type, while \(k\) can be set by trial according to the actual situation. Of course, \(k\) should not be set too large. It needs to leave enough swing time for the leg in one step. In the experiments of this paper, \(k\) is set to 0.2, so that the duty factors of tripod gait, quadrangular gait, and pentagonal gait become 3/5, 11/15, and 13/15.