Need help with gait sequences for quad

I need help with motion sequences, the following code for the microcontroller, as defined by the movement, these numbers are loaded into the variables?

if (GaitType == 1){ //Ripple Gait 12 steps
LRGaitLegNr = 1;
RFGaitLegNr = 3;
LMGaitLegNr = 5;
RRGaitLegNr = 7;
LFGaitLegNr = 9;
RMGaitLegNr = 11;

     NrLiftedPos = 3;
     HalfLiftHeigth = TRUE;
     TLDivFactor = 8;     
     StepsInGait = 12;   
     NomGaitSpeed = 100;
 }

What I’m trying to do is change the code to control a robot with 4 legs, someone can lend a hand, or know if you can.

Thanks

Check out my Felix project or Jonny’s Iron Wolf project.

you might also want to check this out too.
viewtopic.php?f=8&t=6521

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.

Ok, thanks, I’m looking but do not understand why these values are loaded:

LRGaitLegNr = 1;
RFGaitLegNr = 3;
LMGaitLegNr = 5;
RRGaitLegNr = 7;
LFGaitLegNr = 9;
RMGaitLegNr = 11;

As places the initial position of the legs, where this variable is used and for what?
That makes the load these values?

Sorry but I am very newbie.

Thanks and Merry Christmas.

Xan posted some info about that in his project page.

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.

The numbers are not coordinates, they are just numbers in one gait sequence. The numbers tell each leg in what cycle to be lifted within the sequence.

ok, Zenta, then the numbers indicate when the foot is lifted off the ground?. and according to the number put on each leg makes a different sequence?

Hi,

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.

Hope this helps.

Xan