I need help with motion sequences, the following code for the microcontroller, as defined by the movement, these numbers are loaded into the variables?
this is my 4dof leg quadruped. working with quads mean extra programming for balance. here you will find ways of shifting the body while walking. the codes can be used in for 3dof.
Zenta Hi I have read the draft Xan, but not entiwndo that difference to put 2 or 11, if the coordinate of a leg would not have to have (x, y) two coordinates. I do not understand why it only gets a coordinate.
I’ve splitted your posts in to a separate topic to keep the original topic pure phoenix code based. (Updates, changes, etc)
About your question:
The gait in your quote is a 12 steps gait. This refers to this picture:
About the configuration: StepsInGait - A whole gait sequence takes 12 steps. All the legs will follow the pattern as shown in the image. NrLiftedPos - 3 of the steps are located off the ground (blue). All the other steps are on the ground. TLDivFactor - There are 8 movements involved to get from position 3 to position 11. Shown as red arrows
So these settings give the movement pattern for all legs.
Now, you don’t want to have all legs go up at the same time. So you should give them an order in which they go up. This is given with the initial leg positions. The bot reaches his initial position every 12 gait sequence steps. Imagine that you take a snapshot from the bot on exactly that moment.
On the snapshot you will see that:
The Left Rear leg is up, shown as positions 1 in the image
The Right Front leg is fully stretched forward, shown as position 3 in the image
The Right Middle leg is fully stretched backward and will be the next to lift, shown as position 11 in the image.
etc.
If you take another snapshot on the next gait sequence you will see that all legs have moved to there next position.
The Left Rear leg has moved to position 2, just above the place where it will touch the ground.
The Right Front leg has moved a little bit in to position 4
The Right Middle leg has moved up in the air to position 12
The gait sequence will move to the next step after the move finished, placing the legs in the next position. If the gait sequence reached the StepsInGait value it will return to the initial position and starts over.
So what you want to do in configure where all legs are in the first snapshot. The code will take care of all further movement.
*Fun to try: place all legs on position 1. You’ll see the bot “swim” then start changing one leg init position at the time. I’m pretty sure you will get is pretty fast once you see the effect.