# Straight Gait Research of a Small Electric Hexapod Robot
## 1 Introduction  
With the advent of the artificial intelligence era, robots are more closely related to human society [1]. Compared with wheeled robots, legged robots have better terrain adaptivity and flexibility, which can complete specific tasks [2]. A hexapod robot is a typical legged robot. When the hexapod robot moves, it has at least three support legs, which is conducive to obtain stability and fault tolerance movement [3]. Meanwhile, compared with bipedal and quadruped robots, hexapod robots are generally easier to control to obtain static stable walking [4]. Looking back, there were great achievements in the field of hexapod robots. Genghis [5] was designed by MIT to detect outer space ground in 1989. Each leg of this small hexapod robot has a rotation joint with 2 DOF. Since then, many typical hexapod robots have been designed, such as CWRU [6], DLR Crawler [7], HITCR-II [8], LCR200 [9], etc. The above robots are all driven by electric motors. This mode generally has high efficiency and good controllability [10]. Of course, some typical hexapod robots are driven in other ways. Chiba University's COMET-IV [11] and NTUA's HexaTerra [12] are typical hydraulically driven hexapod robots. With their huge size and strong load capacity, they can be used in situations with complex terrain to perform specific tasks. Overall, the structure and control systems of hexapod robots are even more mature. Meanwhile, research of hexapod robots pays more attention to the perception of the environment as well as the improvement of the human-machine interaction experience [13].  
A hexapod robot is a complex machine consisting of many actuators, sensors, microcontrollers, and other devices [14]. At present, most hexapod robots are still used onspecific occasions. Their complex control systems and algorithms may cause high research costs. This paper designs a small electric hexapod robot for daily life called HexWalker II, which can be used in the fields of education, entertainment, investigation, and so on. We strive to make the robot have good performance and is easy to control under the condition of ensuring low development costs, to shorten the distance between the hexapod robot and people's lives, which is meaningful in the present era.  
Many factors need to be considered when designing a hexapod robot, including mechanism, control architecture, and control algorithm [15], among which gait planning is the key [4]. A gait can be described as a sequence of leg motions coordinated with a sequence of body motions for transporting the robot's body to move [16]. The study of robot gait is important for improving the stability and flexibility of motion, adapting to different terrains, optimizing energy consumption, and so on. This paper focuses on the research of straight gait planning of the hexapod robot. The robot in this paper adopts periodic gaits, including tripod gait, quadrangular gait, and pentagonal gait. By making improvements on the basis of the traditional hexapod robot gait planning method, a comprehensive gait planning scheme was designed. To further improve the reliability of robot motion, a simple and effective yaw angle correction algorithm is proposed based on kinematics analysis and the PD controller. Finally, the experimental results verify the rationality of the gait planning scheme and motion control algorithm. This paper makes the following contributions:  
1. Compared to the traditional hexapod robot gait planning method, the strategy \"increasing duty factor\" is introduced to ensure the stability of robot motion;
2. All kinds of gaits are described based on the discretization and time sequence diagram, and the robot gait conversion scheme is designed. This is so that the robot can flexibly transform among various gaits to ensure the integrity and coordination of the motion, which is less studied in the previous research;
3. A yaw angle correction algorithm is proposed based on kinematics analysis and the PD controller to reduce the motion error of the robot.