A Fast Gait Switching Method for Hexapod Robots Based on IMU
By using IMU in a hexapod robot to measure the three-axis attitude angle and judge the terrain environment, and dynamically switch gait, the problem of gait switching time in the prior art is solved, and the ease of gait control and walking stability are achieved.
Patent Information
- Application Number
- CN202310660355.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-06
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2043-06-06
AI Technical Summary
The existing gait switching methods of hexapod robots have problems such as complex algorithms, many parameters and poor real-time performance, which leads to a long time-consuming gait switching.
The IMU-based hexapod robot gait quick switching method is used to measure the three-axis attitude angle through IMU, and the terrain environment is judged based on the standard deviation of the attitude angle, and the triangular, four-angular and five-angular gaits are dynamically switched.
The simplicity and walking stability of the hexapod robot are realized, and the simplicity and efficiency of gait switching are improved.
Smart Images

Figure CN116873070B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a robot control method, especially a method for rapid gait switching of a hexapod robot based on an IMU. Technical Background
[0002] With the rapid development of legged robots, their types are becoming increasingly rich, such as bipedal, quadrupedal, hexapod, and octopod robots. Compared with bipedal and quadrupedal robots, hexapod robots have more diverse gait forms, stronger structural stability, and better environmental adaptability. They can walk and cross obstacles in the wild with complex road conditions, and complete transportation operations in unstructured environments that cannot be completed by wheeled or tracked vehicles. They have very broad application prospects in fields such as forest logging, mining, underwater construction, nuclear industry, military transportation and detection, and planetary exploration.
[0003] The gait forms of hexapod robots are diverse. The more classic ones are the tripod gait, the tetrapod gait, and the pentapod gait. Among them, in the tripod gait, three legs act as the support phase at any movement moment. On the premise of ensuring the stability of the hexapod robot, it is the gait with the fastest movement speed and the highest walking efficiency, but relatively speaking, its stability is lower than the other two gaits. In the tetrapod gait, four legs act as the support phase at any movement moment. Its movement speed is between the tripod gait and the pentapod gait, with a moderate walking speed, walking efficiency, and movement stability. In the pentapod gait, five legs act as the support phase at any movement moment. It is the gait with the slowest movement speed, but it has the best stability and the largest load-bearing capacity. Each of the three gaits has its own characteristics, so we need to select a suitable gait as the walking gait of the hexapod robot in different scenarios and ground conditions, which involves the problem of gait switching of the hexapod robot.
[0004] At present, there are many gait switching methods for hexapod robots. The most classic and widely studied and discussed one is the CPG control method. However, these control methods all have some deficiencies: the algorithm generation is too complex to achieve free switching between various gaits; there are many parameters, the parameter tuning process has a large amount of calculation, and the real-time performance is poor; the switching between gaits takes a long time. Summary of the Invention
[0005] The purpose of the present invention is to propose a method for rapid gait switching of a hexapod robot based on an IMU in view of the deficiencies existing in the prior art. This method has the characteristics of simple gait control and stable and reliable walking of the hexapod robot.
[0006] The purpose of the present invention is achieved through the following technical solutions: A method for rapid gait switching of a hexapod robot based on an IMU, including the following content:
[0007] S1: Determine the triangular, quadrangular, and pentagonal gaits of the hexapod robot according to the parameters of the hexapod robot.
[0008] S101: Denote the maximum movement distance of a single leg of the hexapod robot relative to the fuselage as S, and evenly disperse it into 11 points. The 11 points are +5, +4, +3, +2, +1, 0, -1, -2, -3, -4, -5 in sequence. Among them, 0 is the initial position (i.e., in the movement direction, the touchdown point of the foot end is at the same position as the root of the thigh), +5 is the forward transition position, -5 is the backward transition position, and the distance between adjacent points is 1 / 10S. In addition, the "right front leg, left front leg, right middle leg, left middle leg, right hind leg, left hind leg" among the six legs are defined as legs 1 to 6 in sequence.
[0009] In triangular gait, there are two motion states for the six legs of the hexapod robot. In the right state, the position points where legs 1 to 6 are located in sequence are {+5, -5, -5, +5, +5, -5}; in the left state, the position points where legs 1 to 6 are located in sequence are {-5, +5, +5, -5, -5, +5}. The motion state changes once in sequence every T seconds, and the robot moves a distance of S; a cycle period is 2T. The motion state changes once in sequence every T seconds, and the robot moves a distance of S; a cycle period is 2T.
[0010] In quadrangular gait, there are three motion states for the six legs of the hexapod robot. When n = 1, the position points where legs 1 to 6 are located in sequence are represented as {0, +5, +5, -5, -5, 0}; when n = 2, the position points where legs 1 to 6 are located in sequence are represented as {-5, 0, 0, 5, 5, -5}; when n = 3, the position points where legs 1 to 6 are located in sequence are represented as {5, -5, -5, 0, 0, 5}. The motion state changes once in sequence every T seconds, and the robot moves a distance of 1 / 2S; a cycle period is 3T;
[0011] When in the pentagonal gait, there are six combinations of motion states for the six legs of the hexapod robot. When in the state of n = 1, the position points where the first to sixth legs are located in sequence are represented as {+5, -1, -5, +1, -3, +3}; when in the state of n = 2, the position points where the first to sixth legs are located in sequence are represented as {+3, -3, +5, -1, -5, +1}; when in the state of n = 3, the position points where the first to sixth legs are located in sequence are represented as {+1, -5, +3, -3, +5, +1}; when in the state of n = 4, the position points where the first to sixth legs are located in sequence are represented as {-1, +5, +1, -5, +3, -3}; when in the state of n = 5, the position points where the first to sixth legs are located in sequence are represented as {-3, +3, -1, +5, +1, -5}; when in the state of n = 6, the position points where the first to sixth legs are located in sequence are represented as {-5, +1, -3, +3, -1, +5}; The motion state changes in sequence once in T seconds, and the robot moves a distance of 1 / 5S; A cycle period is 6T;
[0012] S103: When moving in the same gait, the motion states change in sequence, and the position points corresponding to each leg change: If it is a supporting leg and the value becomes smaller (larger), the position of the foot end of this leg on the ground remains unchanged, and the motor rotates according to the program instructions, using the friction of the ground to support the fuselage to move forward (backward); If it is a swinging leg and the value becomes larger (smaller), then this leg lifts and strides forward (backward) swing.
[0013] S2: Install an IMU inertial sensor at the center of gravity position of the hexapod robot in advance, and use the IMU to measure and read the three-axis attitude angles of the hexapod robot in real time; The coordinate setting method of the three-axis attitude angles is: The Z-axis is perpendicular to the ground, the X-axis is the forward direction of the hexapod robot, and the Y-axis is perpendicular to both the X-axis and the Z-axis at the same time.
[0014] S3: Process and judge the read three-axis attitude angles of the robot;
[0015] S301: Assign the read three-axis attitude angles of the robot to the roll angle β and the pitch angle γ respectively, and calculate the standard deviation σ of the three-axis attitude angles using the standard deviation formula (3):
[0016]
[0017] S302: After obtaining the standard deviation angle σ, set the demarcation deviation angles σ1 and σ2 for the three gait switches according to the terrain environment; Specifically: The position height of the highest point in the terrain is measured in advance as h, the width of the robot is recorded as b, and the maximum critical angle σ is calculated max :
[0018]
[0019] Then let σ1 = 1 / 3σmax , σ2 = 2 / 3σ max , and 0 ≤ σ1 < σ2;
[0020] Then, make a judgment according to the following criteria:
[0021] When 0 ≤ σ < σ1, the hexapod walks in a triangular gait. If it is in a quadrangular or pentagonal gait, switch to the triangular gait; when σ1 ≤ σ < σ2, the hexapod walks in a quadrangular gait. If it is in a triangular or pentagonal gait, switch to the quadrangular gait; when σ2 ≤ σ, the hexapod walks in a pentagonal gait. If it is in a triangular or quadrangular gait, switch to the pentagonal gait.
[0022] S4: According to different judgment results, the hexapod robot switches between different walking gaits.
[0023] A1: Before the switch of various gaits, the motion states of the same gait are consistent. When the gait before switching is the triangular gait, move uniformly to the motion state of left and then enter the switch; when the gait before switching is the quadrangular gait, move uniformly to the motion state of n = 1 and then enter the switch; when the gait before switching is the pentagonal gait, move uniformly to the motion state of n = 1 and then enter the switch.
[0024] A2: The time taken for the mutual switch between various gaits from receiving the switching instruction to moving to the initial motion state of the switch is within one motion cycle.
[0025] A3: The switching process between various gaits is completed during movement.
[0026] A4: The switching process between various gaits uniformly uses the triangular gait for switching, and all can achieve two-step switching. In the first step, the movement speed of the hexapod robot is the same as the movement speed before switching; in the second step, the movement speed of the hexapod robot is the same as the movement speed after switching.
[0027] There are a total of six mutual switching methods between the triangular, quadrangular, and pentagonal gaits, namely triangular gait → quadrangular gait, triangular gait → pentagonal gait, quadrangular gait → triangular gait, quadrangular gait → pentagonal gait, pentagonal gait → triangular gait, and pentagonal gait → quadrangular gait. Among them: Denote the first leg, the fourth leg, and the fifth leg as group Ⅰ legs, and the second leg, the third leg, and the sixth leg as group Ⅱ legs.
[0028] Compared with the prior art, the present invention has the following characteristics:
[0029] The present invention discretizes the movement distance of the foot end of the hexapod robot on the ground and designs the corresponding triangular, quadrangular, and pentagonal gaits of the hexapod robot, making the gait control of the hexapod robot more convenient.
[0030] The present invention utilizes an IMU to measure the three-axis attitude angles of a hexapod robot, processes them, obtains the basis for judging the stability of the hexapod robot, and selects different gaits according to different situations, thereby improving the walking stability of the hexapod robot.
[0031] The present invention has made a detailed design for the gait switching scheme during the movement of the hexapod robot. By using the triangular gait as the switching gait, two-step switching between any two gaits can be achieved, greatly improving the simplicity and efficiency of gait switching of the hexapod robot.
[0032] A method for rapid gait switching of a hexapod robot based on an IMU according to the present invention is applicable to the vast majority of hexapod robots and has strong universality. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a schematic flowchart of the specific implementation of the present invention.
[0034] Figure 2 It is a distribution diagram of discrete points of the single-leg movement of the hexapod robot according to the present invention.
[0035] Figure 3 It is a schematic diagram of the serial numbers of the six legs of the hexapod robot according to the present invention.
[0036] Figure 4 It is a schematic diagram of two motion states of the hexapod robot in the triangular gait.
[0037] Figure 5 It is a schematic diagram of three motion states of the hexapod robot in the quadrangular gait.
[0038] Figure 6 It is a schematic diagram of six motion states of the hexapod robot in the pentagonal gait.
[0039] Figure 7 It is a schematic diagram of the three-axis attitude angle coordinates.
[0040] Figure 8 It is a specific flowchart for switching from the triangular gait to the quadrangular gait.
[0041] Figure 9 It is a specific flowchart for switching from the triangular gait to the pentagonal gait.
[0042] Figure 10 It is a specific flowchart for switching from the quadrangular gait to the triangular gait.
[0043] Figure 11 It is a specific flowchart for switching from the quadrangular gait to the pentagonal gait.
[0044] Figure 12 It is a specific flowchart for switching from the pentagonal gait to the triangular gait.
[0045] Figure 13 Specific flowchart for switching from pentapod gait to tetrapod gait Specific implementation method
[0046] A method for rapid gait switching of a hexapod robot based on IMU includes the following:
[0047] S1: Determine the tripod, tetrapod, and pentapod gaits of the hexapod robot according to the parameters of the hexapod robot;
[0048] S101: Denote the maximum movement distance of a single leg of the hexapod robot relative to the fuselage as S, and evenly scatter it into 11 points. Among them, 0 is the initial position (that is, when the thigh is perpendicular to the fuselage and the calf is parallel to the thigh, in the forward direction of the robot, the position of the foot tip contact point is the same as that of the thigh root), +5 is the forward transition position (that is, at 1 / 2S in the positive movement direction from the 0 position), -5 is the backward transition position (that is, at 1 / 2S in the negative movement direction from the 0 position), and the 11 points are +5, +4, +3, +2, +1, 0, -1, -2, -3, -4, -5 in sequence. The distance between adjacent points is 1 / 10S. In addition, the "right front leg L1, left front leg L2, right middle leg L3, left middle leg L4, right hind leg L5, left hind leg L6" among the six legs are defined as legs 1 to 6 in sequence (see Figure 3 ).
[0049] S102: In the tripod gait, there are two movement states for the six legs of the hexapod robot from 1 to 6; the position points where the six legs are located in sequence are {+5, -5, -5, +5, +5, -5} (denoted as right) and {-5, +5, +5, -5, -5, +5} (denoted as left). It can be seen from Figure 4 that: during the process of left transforming to right, legs 2, 3, and 6 always touch the ground as support legs, while legs 1, 4, and 5 always leave the ground as swing legs. After the process ends, the fuselage moves forward by a distance of S; during the process of right transforming to left, legs 1, 4, and 5 always touch the ground as support legs, while legs 2, 3, and 6 always leave the ground as swing legs. After the process ends, the fuselage moves forward by a distance of S. Changing the movement state once in sequence takes T seconds, and the robot moves a distance of S; one cycle is 2T, and the robot moves a distance of 2S in one cycle.
[0050] In the tetrapod gait, there are three movement states for the six legs of the hexapod robot. The position points where the six legs are located in sequence are represented as {0, +5, +5, -5, -5, 0}, {-5, 0, 0, 5, 5, -5}, and {5, -5, -5, 0, 0, 5}, which are denoted as n = 1, n = 2, and n = 3 in sequence; it can be seen from Figure 5It can be known that during the process of n = 1 transitioning to n = 2, legs 1, 2, 3, and 6 always touch the ground as support legs, while legs 4 and 5 always leave the ground as swing legs. After the process ends, the fuselage moves forward a distance of one-half S; during the process of n = 2 transitioning to n = 3, legs 2, 3, 4, and 5 always touch the ground as support legs, while legs 1 and 6 always leave the ground as swing legs. After the process ends, the fuselage moves forward a distance of one-half S; during the process of n = 3 transitioning to n = 1, legs 1, 4, 5, and 6 always touch the ground as support legs, while legs 2 and 3 always leave the ground as swing legs. After the process ends, the fuselage moves forward a distance of one-half S. The state changes in sequence once every T seconds, and the robot moves a distance of 1 / 2 S; one cycle is 3T, and the robot moves a distance of 3 / 2 S.
[0051] In the pentagonal gait, there are six combinations of motion states for the six legs of the hexapod robot. The position points that the six legs are in successively are represented as {+5, -1, -5, +1, -3, +3}, {+3, -3, +5, -1, -5, +1}, {+1, -5, +3, -3, +5, +1}, {-1, +5, +1, -5, +3, -3}, {-3, +3, -1, +5, +1, -5}, and {-5, +1, -3, +3, -1, +5}, which are represented as n = 1, n = 2, n = 3, n = 4, n = 5, and n = 6 in sequence; from Figure 6 It can be known that during the process of n = 1 transitioning to n = 2, legs 1, 2, 4, 5, and 6 always touch the ground as support legs, while leg 3 always leaves the ground as a swing leg. After the process ends, the fuselage moves forward a distance of one-fifth S; during the process of n = 2 transitioning to n = 3, legs 1, 2, 3, 4, and 6 always touch the ground as support legs, while leg 5 always leaves the ground as a swing leg. After the process ends, the fuselage moves forward a distance of one-fifth S; during the process of n = 3 transitioning to n = 4, legs 1, 3, 4, 5, and 6 always touch the ground as support legs, while leg 2 always leaves the ground as a swing leg. After the process ends, the fuselage moves forward a distance of one-fifth S; during the process of n = 4 transitioning to n = 5, legs 1, 2, 3, 5, and 6 always touch the ground as support legs, while leg 4 always leaves the ground as a swing leg. After the process ends, the fuselage moves forward a distance of one-fifth S; during the process of n = 5 transitioning to n = 6, legs 1, 2, 3, 4, and 5 always touch the ground as support legs, while leg 6 always leaves the ground as a swing leg. After the process ends, the fuselage moves forward a distance of one-fifth S; during the process of n = 6 transitioning to n = 1, legs 2, 3, 4, 5, and 6 always touch the ground as support legs, while leg 1 always leaves the ground as a swing leg. After the process ends, the fuselage moves forward a distance of one-fifth S. The state changes in sequence once every T seconds, and the robot moves a distance of 1 / 5 S; one cycle is 6T, and the robot moves a distance of 6 / 5 S.
[0052] S103: During the same gait movement, the movement states change sequentially, and the corresponding position points of each leg change. If the value of the supporting leg decreases (increases), the position of the foot end of this leg on the ground remains unchanged, and the motor rotates according to the program instructions, using the friction of the ground to support the fuselage to move forward (backward); if the value of the swinging leg increases (decreases), then this leg lifts and strides forward (backward).
[0053] S2: Use the IMU to measure the three-axis attitude angles of the hexapod robot and read them.
[0054] An IMU inertial sensor is pre-installed at the center of gravity position of the hexapod robot, and the publication and subscription of IMU information are realized using the principle of ros topic communication (prior art): Publication: Turn on the IMU according to the IMU usage instructions. At this time, the real-time IMU signal will be transmitted through the USB port, and the data type transmitted is a quaternion ([x, y, z, w]), which is used to represent the current position state of the hexapod robot; Subscription: Receive the quaternion and convert it into attitude angles (roll angle β and pitch angle γ).
[0055]
[0056] γ = arcsin(2(xz - yw))(2)
[0057] S3: Process and judge the values of the IMU attitude angles.
[0058] Assign the attitude angles of the hexapod robot calculated by formulas (1) and (2) to the roll angle β (the angle of rotation around the X-axis, with the X direction being the movement direction of the robot) and the pitch angle γ (the angle of rotation around the Y-axis; the Z-axis is perpendicular to the ground, and the Y-axis is perpendicular to both the X-axis and the Z-axis) respectively, and use the standard deviation calculation formula:
[0059]
[0060] After calculating the standard deviation angle σ of the attitude angle through the known roll angle β and pitch angle γ, make the following judgments according to the deviation angle:
[0061] Set the deviation angles σ1 and σ2 for the boundary of the three gait switches according to the specific environment and other requirements; specifically:
[0062] The position height of the highest point in the terrain is measured in advance as h, the width of the robot is denoted as b, and the maximum critical angle σ is calculated max :
[0063]
[0064] Let σ 1 = 1 / 3σ max σ 2 = 2 / 3σmax and 0 ≤ σ 1 < σ 2 ;
[0065] Then, it is compared with the deviation angle σ calculated by formula (3), and the following judgments are made:
[0066] When 0 ≤ σ < σ1, the triangular gait is adopted for walking. If it is a four-legged or five-legged gait, it is switched to the triangular gait; when σ1 ≤ σ < σ2, the four-legged gait is adopted for walking. If it is a triangular or five-legged gait, it is switched to the four-legged gait;
[0067] When σ2 ≤ σ, the five-legged gait is adopted for walking. If it is a triangular or four-legged gait, it is switched to the five-legged gait.
[0068] S4: According to different judgment results, the hexapod robot switches between different walking gaits.
[0069] S401: Before the switching of various gaits, the motion states of the same gait are consistent. When the gait before switching is the triangular gait, it moves uniformly to the motion state of left and then enters the switching; when the gait before switching is the four-legged gait, it moves uniformly to the motion state of n = 1 and then enters the switching; when the gait before switching is the five-legged gait, it moves uniformly to the motion state of n = 1 and then enters the switching.
[0070] S402: The time taken for the mutual switching between various gaits from receiving the switching instruction to moving to the initial motion state of switching is within one motion cycle.
[0071] S403: The switching process between various gaits is completed during movement.
[0072] S404: The switching process between various gaits uniformly adopts the triangular gait for switching, and two-step switching can be achieved. In the first step, the motion speed of the hexapod robot is the same as the motion speed before switching; in the second step, the motion speed of the hexapod robot is the same as the motion speed after switching. (The ratio of the motion speeds of the three gaits is triangular gait: four-legged gait: five-legged gait = 10:5:2)
[0073] There are a total of six mutual switching methods between the triangular, four-legged, and five-legged gaits, namely triangular gait → four-legged gait, triangular gait → five-legged gait, four-legged gait → triangular gait, four-legged gait → five-legged gait, five-legged gait → triangular gait, and five-legged gait → four-legged gait. (Denote leg 1, leg 4, and leg 5 as group I legs, and leg 2, leg 3, and leg 6 as group II legs)
[0074] The specific switching process is as follows:
[0075] B1: Triangular gait → four-legged gait
[0076] Before switching, the hexapod robot moves to the left motion state of the triangular gait. In the first step, the legs of Group I act as the swing phase, swing to the corresponding position, and the legs of Group II act as the support phase, supporting the fuselage to move forward a distance of S, and the hexapod robot advances a distance of S; in the second step, the legs of Group II act as the swing phase, swing to the corresponding position, and the legs of Group I act as the support phase, supporting the fuselage to move forward a distance of 1 / 2S, and the hexapod robot advances a distance of 1 / 2S. After the gait switching is completed, the hexapod robot moves to the motion state of the quadrangular gait with n = 1.
[0077] B2: Triangular gait → Pentagonal gait
[0078] Before switching, the hexapod robot moves to the left motion state of the triangular gait. In the first step, the legs of Group I act as the swing phase, swing to the corresponding position, and the legs of Group II act as the support phase, supporting the fuselage to move forward a distance of S, and the hexapod robot advances a distance of S; in the second step, the legs of Group II act as the swing phase, swing to the corresponding position, and the legs of Group I act as the support phase, supporting the fuselage to move forward a distance of 1 / 5S, and the hexapod robot advances a distance of 1 / 5S. After the gait switching is completed, the hexapod robot moves to the motion state of the pentagonal gait with n = 6.
[0079] B3: Quadrangular gait → Triangular gait
[0080] Before switching, the hexapod robot moves to the motion state of the quadrangular gait with n = 1. In the first step, the legs of Group I act as the swing phase, swing to the corresponding position, and the legs of Group II act as the support phase, supporting the fuselage to move forward a distance of 1 / 2S, and the hexapod robot advances a distance of 1 / 2S; in the second step, the legs of Group II act as the swing phase, swing to the corresponding position, and the legs of Group I act as the support phase, supporting the fuselage to move forward a distance of S, and the hexapod robot advances a distance of S. After the gait switching is completed, the hexapod robot moves to the left motion state of the triangular gait.
[0081] B4: Quadrangular gait → Pentagonal gait
[0082] Before switching, the hexapod robot moves to the motion state of the quadrangular gait with n = 1. In the first step, the legs of Group I act as the swing phase, swing to the corresponding position, and the legs of Group II act as the support phase, supporting the fuselage to move forward a distance of 1 / 2S, and the hexapod robot advances a distance of 1 / 2S; in the second step, the legs of Group II act as the swing phase, swing to the corresponding position, and the legs of Group I act as the support phase, supporting the fuselage to move forward a distance of 1 / 5S, and the hexapod robot advances a distance of 1 / 5S. After the gait switching is completed, the hexapod robot moves to the motion state of the pentagonal gait with n = 6.
[0083] B5: Pentagonal gait → Triangular gait
[0084] Before switching, the hexapod robot moves to the pentapod gait n = 1 motion state. In the first step, the legs of Group Ⅰ act as the swing phase, swinging to the corresponding position, and the legs of Group Ⅱ act as the support phase, supporting the fuselage to move forward a distance of 1 / 5S, and the hexapod robot advances a distance of 1 / 5S. In the second step, the legs of Group Ⅱ act as the swing phase, swinging to the corresponding position, and the legs of Group Ⅰ act as the support phase, supporting the fuselage to move forward a distance of S, and the hexapod robot advances a distance of S. After the gait switching is completed, the hexapod robot moves to the triangular gait right motion state.
[0085] B6: Pentapod gait → Quadruped gait
[0086] Before switching, the hexapod robot moves to the quadruped gait n = 1 motion state. In the first step, the legs of Group Ⅰ act as the swing phase, swinging to the corresponding position, and the legs of Group Ⅱ act as the support phase, supporting the fuselage to move forward a distance of 1 / 5S, and the hexapod robot advances a distance of 1 / 5S. In the second step, the legs of Group Ⅱ act as the swing phase, swinging to the corresponding position, and the legs of Group Ⅰ act as the support phase, supporting the fuselage to move forward a distance of 1 / 2S, and the hexapod robot advances a distance of 1 / 2S. After the gait switching is completed, the hexapod robot moves to the quadruped gait n = 2 motion state.
Claims
1. A rapid gait switching method for a hexapod robot based on IMU, comprising the following steps: S1: Determine the triangular, quadrangular, and pentagonal gaits of the hexapod robot according to the parameters of the hexapod robot; S2: Install an IMU inertial sensor at the center of gravity position of the hexapod robot; use ros topic communication to publish and subscribe to IMU information, and measure and read the three-axis attitude angles of the hexapod robot in real time; S3: Process and judge the read three-axis attitude angles; S4: According to different judgment results, the hexapod robot performs corresponding walking gait switching; the switching process between various gaits uniformly uses the triangular gait for switching, and all can achieve two-step switching; The specific content of step S3 is as follows: S301: Assign the read three-axis attitude angles of the hexapod robot to the roll angle β and the pitch angle γ respectively, and calculate the standard deviation σ of the three-axis attitude angles using the standard deviation formula (3): (3) S302: Set the boundary deviation angles σ1 and σ2 according to the terrain environment, and let 0 ≤ σ1 < σ2; then make the following judgments on the calculated σ: When 0 ≤ σ < σ1, use the triangular gait for walking, and if it is in the quadrangular or pentagonal gait, switch to the triangular gait; when σ1 ≤ σ < σ2, use the quadrangular gait for walking, and if it is in the triangular or pentagonal gait, switch to the quadrangular gait; When σ2 ≤ σ, use the pentagonal gait for walking, and if it is in the triangular or quadrangular gait, switch to the pentagonal gait.
2. The method for rapid gait switching of a hexapod robot based on IMU according to claim 1, characterized in that: The specific content of step S1 is as follows: S101: Denote the maximum movement distance of a single leg of the hexapod robot relative to the fuselage as S, and evenly scatter it into 11 points, and the distance between adjacent points is 1 / 10S; among them, 0 is the initial position, +5 is the front transition position, and -5 is the rear transition position; the "right front leg, left front leg, right middle leg, left middle leg, right rear leg, left rear leg" among the six legs are defined as legs 1 to 6 in sequence; S102: In the triangular gait, the six legs of the hexapod robot have two motion states, and the position points where legs 1 to 6 are located in sequence are the right state {+5, -5, -5, +5, +5, -5} and the left state {-5, +5, +5, -5, -5, +5}; The motion state changes in sequence once every T seconds, and the robot moves a distance of S; a cycle period is 2T; In the quadrangular gait, the six legs of the hexapod robot have three motion states, and the position points where legs 1 to 6 are located in sequence are represented as {0, +5, +5, -5, -5, 0}, {-5, 0, 0, 5, 5, -5}, and {5, -5, -5, 0, 0, 5}, which are represented as n = 1, n = 2, n = 3 in sequence; the motion state changes in sequence once every T seconds, and the robot moves a distance of 1 / 2 S; a cycle period is 3T; In the pentagonal gait, the six legs of the hexapod robot have six motion states, and the positions of legs one to six are respectively represented as {+5, -1, -5, +1, -3, +3}, {+3, -3, +5, -1, -5, +1}, {+1, -5, +3, -3, +5, +1}, {-1, +5, +1, -5, +3, -3}, {-3, +3, -1, +5, +1, -5} and {-5, +1, -3, +3, -1, +5}, respectively represented as n=1, n=2, n=3, n=4, n=5, n=6; the sequential motion state changes once in T seconds, and the robot moves 1 / 5 S distance; one cycle period is 6T; S103: When the same gait movement is performed, the movement states are sequentially changed, and the position point corresponding to each leg is changed: if the value of the supporting leg becomes smaller or larger, the position of the foot of the leg on the ground does not change, and the motor rotates according to the program instructions, using the friction of the ground to support the body to move forward or backward accordingly; if the value of the swinging leg becomes larger or smaller, the leg is lifted and swung forward or backward accordingly.
3. The method for rapid gait switching of a hexapod robot based on IMU according to claim 2, wherein: The coordinates of the three-axis attitude angles in step S2 are set as follows: the Z axis is perpendicular to the ground, the X axis is the forward direction of the six-legged robot, and the Y axis is perpendicular to both the X axis and the Z axis.
4. The method for rapid gait switching of a hexapod robot based on an IMU according to claim 3, characterized in that: The S4 step is specifically as follows: S401: before switching, the movement states of the same gait are consistent; when the gait is a triangular gait before switching, the gait moves uniformly to the movement state of left before switching; when the gait is a quadrangular gait before switching, the gait moves uniformly to the movement state of n=1 before switching; when the gait is a pentagonal gait before switching, the gait moves uniformly to the movement state of n=1 before switching; S402: The time taken for switching between various gaits from receiving the switching instruction to moving to the initial motion state of the switching is within one motion cycle; S403: The switching process between various gaits is completed while walking; S404: The switching process between various gaits uniformly adopts triangular gait for switching, and can achieve two-step switching; in the first step, the movement speed of the six-legged robot is consistent with the movement speed before switching; in the second step, the movement speed of the six-legged robot is consistent with the movement speed after switching.
5. The gait rapid switching method of the hexapod robot based on IMU according to claim 4, wherein The S4 step is specifically as follows: There are a total of six ways to switch between triangle, four-corner and pentagonal gaits, namely triangle gait → four-corner gait, triangle gait → pentagonal gait, four-corner gait → triangle gait, four-corner gait → pentagonal gait, pentagonal gait → triangle gait, pentagonal gait → four-corner gait; among them: leg number one, leg number four, and leg number five are group I of legs, and leg number two, leg number three, and leg number six are group II of legs.
6. The method for rapid gait switching of a hexapod robot based on an IMU according to claim 5, characterized in that: In the step S4, the steps of switching from the triangular gait to other gaits are: B1: Triangular gait → Quadrangular gait Before switching, the hexapod robot moves to the left motion state of the tripod gait; in the first step, the legs of Group I act as the swing phase and swing to the corresponding position, while the legs of Group II act as the support phase to support the fuselage to move forward by a distance of S, and the hexapod robot moves forward by a distance of S; in the second step, the legs of Group II act as the swing phase and swing to the corresponding position, while the legs of Group I act as the support phase to support the fuselage to move forward by a distance of 1 / 2S, and the hexapod robot moves forward by a distance of 1 / 2S; after the gait switching is completed, the hexapod robot moves to the motion state of the quadrangle gait with n = 1. B2: Tripod gait → Pentapod gait Before switching, the hexapod robot moves to the left motion state of the tripod gait; in the first step, the legs of Group I act as the swing phase and swing to the corresponding position, while the legs of Group II act as the support phase to support the fuselage to move forward by a distance of S, and the hexapod robot moves forward by a distance of S; in the second step, the legs of Group II act as the swing phase and swing to the corresponding position, while the legs of Group I act as the support phase to support the fuselage to move forward by a distance of 1 / 5S, and the hexapod robot moves forward by a distance of 1 / 5S; after the gait switching is completed, the hexapod robot moves to the motion state of the pentapod gait with n = 6.
7. The method for rapid gait switching of a hexapod robot based on an IMU according to claim 6, characterized in that: In the step S4, the steps for switching the quadrangle gait to other gaits are: B3: Quadrangle gait → Tripod gait Before switching, the hexapod robot moves to the motion state of the quadrangle gait with n = 1; in the first step, the legs of Group I act as the swing phase and swing to the corresponding position, while the legs of Group II act as the support phase to support the fuselage to move forward by a distance of 1 / 2S, and the hexapod robot moves forward by a distance of 1 / 2S; in the second step, the legs of Group II act as the swing phase and swing to the corresponding position, while the legs of Group I act as the support phase to support the fuselage to move forward by a distance of S, and the hexapod robot moves forward by a distance of S; after the gait switching is completed, the hexapod robot moves to the left motion state of the tripod gait. B4: Quadrangle gait → Pentapod gait Before switching, the hexapod robot moves to the motion state of the quadrangle gait with n = 1; in the first step, the legs of Group I act as the swing phase and swing to the corresponding position, while the legs of Group II act as the support phase to support the fuselage to move forward by a distance of 1 / 2S, and the hexapod robot moves forward by a distance of 1 / 2S; in the second step, the legs of Group II act as the swing phase and swing to the corresponding position, while the legs of Group I act as the support phase to support the fuselage to move forward by a distance of 1 / 5S, and the hexapod robot moves forward by a distance of 1 / 5S; after the gait switching is completed, the hexapod robot moves to the motion state of the pentapod gait with n = 6.
8. The method for rapid gait switching of a hexapod robot based on an IMU according to claim 7, wherein: In the step S4, the steps for switching the pentapod gait to other gaits are: B5: Pentapod gait → Tripod gait Before switching, the hexapod robot moves to the motion state of the pentapod gait with n = 1; in the first step, the legs of Group I act as the swing phase and swing to the corresponding position, while the legs of Group II act as the support phase to support the fuselage to move forward by a distance of 1 / 5S, and the hexapod robot moves forward by a distance of 1 / 5S; in the second step, the legs of Group II act as the swing phase and swing to the corresponding position, while the legs of Group I act as the support phase to support the fuselage to move forward by a distance of S, and the hexapod robot moves forward by a distance of S; after the gait switching is completed, the hexapod robot moves to the right motion state of the tripod gait. B6: Pentapod gait → Quadrangle gait Before switching, the hexapod robot moves to the motion state of the four-corner gait with n = 1. In the first step, the legs of Group Ⅰ perform the swing phase and swing to the corresponding position, while the legs of Group Ⅱ perform the support phase and support the fuselage to move forward by a distance of 1 / 5S, and the hexapod robot advances by a distance of 1 / 5S. In the second step, the legs of Group Ⅱ act as the swing phase and swing to the corresponding position, while the legs of Group Ⅰ act as the support phase and support the fuselage to move forward by a distance of 1 / 2S, and the hexapod robot advances by a distance of 1 / 2S. After the gait switching is completed, the hexapod robot moves to the motion state of the four-corner gait with n = 2.
Citation Information
Patent Citations
Hexapod robot for electric power facility inspection
CN112067049A
Gait generation and attitude control method for walking robot on rugged slope terrain
CN114995476A