| Version 4 (modified by , 8 years ago) ( diff ) |
|---|
Add gait
From my point of view, implementing gaits is certainly the most tricky part of multi-legs robot programming. Let me explain why.
Unlike wheels-based robots, feet can't slip on the ground, and must be lifted, moved, and put again on the ground in a certain order at a certain speed. This is what we call a gait.
For each foot (or group of feet) of the robot, there are two phases: the swing phase (transfer), and the stance phase (support). The gait defines the order of changing between these phases, and computes all successive feet positions so the robot follows the wanted trajectory.
There are many papers describing gaits, mostly found from insects studies. For 6-legs robots, tripod, tetrapod, ripple and wave are the most common ones (there are many site showing them). These gaits are called periodic, as they reproduce the same pattern over and over. Well, not exactly...
Usually, when we switch on a multi-legs robot, all legs are at neutral position: all feet are grounded, and all coxa are in mid-position. This is similar for us humans when we don't walk: our feet are side by side. But when a robot (or a human) is walking, its feet never reach that neutral position (try to walk this way, you will understand why!). So, there are special sequences to do when starting or stopping.
For a 2-steps gait (like the tripod gait of an hexapod), this is easy to do: the group of swinging legs directly reaches it's target position from neutral, while the groups of stancing legs move back at the same time of the same amount, because they have the same distance to move. For gaits with a higher number of steps, this can't be done anymore! Let's see on a graph (only 1 complete step shown):
Note: the gaits are shown using the same step speed. As we can see, wave gait is much slower than tripod gait, as it needs more steps to complete a full stride. On the other hand, there are always 5 legs on the floor, instead of 3, so the robot could carry much more weight. In real life, insects constantly switch from one gait to another, according to the task they have to do.
Here, swinging phases are shown by dashed rising lines, stancing phases are show by plain falling lines. We clearly see that except for the tripod gait, the feet are never at neutral position all at the same time. So, before reaching the periodic cycle, we need to use a start sequence. And to quit the periodic cycle, we need to use a stop sequence, to return to neutral.
These sequences are never mentioned in the papers talking about gaits: they where described by Edgar, a friend of mine, who helped me to solve this problem. Here is the current implementation of these start/stop sequences in Py4bot:
As you see, we use a swing phase for the legs out of phase in order to put them in the correct positions. Then, periodic cycle can be used.
A better implementation I'm currently working on is this one:
Here, the start/stop sequences are shorter.
There is another sequence we need to talk about, as it is used in the framework: the hop sequence. It is used when we need to change the feet neutral positions while at neutral position. As said, feet can't slip, so we need to do a complete walk sequence, without really moving. Here, legs only use the swing phase. Note that it is possible to adjust the feet neutral position while wlaking; in this case, no need to perform a hop sequence; new feet neutral positions are used to compute the new target during the swing phases.
Attachments (3)
- gaits_1.png (18.7 KB ) - added by 8 years ago.
- gaits_2.png (20.8 KB ) - added by 8 years ago.
- gaits_3.png (19.6 KB ) - added by 8 years ago.
Download all attachments as: .zip



