Hexapod gait transition?

Hi everyone,

in some future days I want to build a hexapod robot, but it’s important for me to build and program everything myself. So I recently started to dive into the mathematics behind a hexapod, including IK, moving in any direction without turning, walking curves (not done yet) and so on.

Now I encountered the problem how to achieve a (relatively) smooth transition between two gaits, for example a simple tripod gait and a 6-step ripple gait. I already implemented these two gaits and a wave gait. Since I am new to building a hexapod robot (I even do not have ANY hardware lol) I hoped to benefit from the experience of someone around here. :unamused:

If someone is interested in what I’ve done yet, I can attach the Matlab .m files with all the stuff on demand…
Thanks in advance for your help!

Greetings,
Furcatus

Hi Furcatus,

I am working on an Hexapod robot too. I have recently done the IK analysis as well. May I ask you how many DoF has each leg? I would be extremely grateful if you could attach your m files.

Thanks Luis

Hello Luis,

my legs have 3DOF, like those standard hexapod legs everywhere around :wink:
I attached the .m-Files, I hope they can help you in any way.

Greetings,
Furcatus
hexapod.zip (3.31 KB)

Your simulation is amazing!

Could you tell me any useful book where I can find body Inverse kinematics? As I told you I have already the inverse kinematics for every leg but I need to translate the leg origin to the body origin.

Once again, you have done an amazing job.

Cheers.

I think Xan post this a while back

Theory of Applied Robotics
Kinematics, Dynamics, and Control
Second Edition

Wow, this seems to be a very useful book. I’m lucky, I can get it for free because I am a student…
@luis: I don’t completely understand what you mean. I think you simply have to add the leg origin vector relative to the body origin to all your leg points, it depends on how you made your IK…

Greets

Yes, I got a bit lost. It is a simple translation from the origin of the robot to the starting point of the leg.

I have the book in a pdf… (I think) send me your email and I will send you the book.

Thanks, but I already downloaded it yesterday. :wink:
In my simulation, I also made the IK relative to the leg origin, but this origin can be specified, so there is no separate coordinate system for each leg. Do you simulate your IK in any way? I can take a look on it if you want.

Yup, that book is awesome. I bought that a few years ago when I was working on my Phoenix at the time, and pretty much all the info is there within the first three chapters.

Just remember to read ALL of the first few chapters. The answer is in between the lines. I don’t remember exactly which , but I remember re-reading that over and over and a light bulb turned on in my head since the answer was something the author just casually mentions.

:laughing:

EDIT:

I also want to mention something. I’ve mentioned this before, but it’s something that I, and many others I’m sure, have confused about when we were implementing our own IK engine.

IK engine DOES NOT equal walking.

IK engine is merely used for translation of global (body) coordinates to local (where the tips of the legs should be). Once that’s calculated, you have to translate that into pulses for these PWM servos that we use (which the SSC-32 takes care of).

A GAIT is different in that half the legs needs to travel to that calculated location, but the other legs have to be lifted and set back to a location where when looped, it causes locomotion.

So in my experience, from top level to low level code:

  1. Navigation engine (uses sensors to feed back body coordinates and rotation X, Y, Z) OR takes inputs from robot controller to put in body coordinates and rotation coordinates

  2. Gaiting engine - commands what gait to use, how high the legs should lift in each “step” and how many steps

  3. IK engine - Takes the value from Gaiting engine and translates that into local coordinates for each leg and spit out what angle each servo of each leg needs to be

  4. angle to pwm - this is just a simple trig calculation based on the angle of each joint and converts to appropriate PWM

  5. SSC-32 to the rescue - The ssc-32 simplifies this last step so much, I take it for granted a lot that this thing is a workhorse on its own. I tip my hats off to those who uses timers hservo command in the ARC-32 because that’s another layer of complication! :wink:

What’s the book? Where can it be downloaded?

Alan KM6VV

Edit:

OK, I did find the book, but broken up in little “glimpses”. Can you send copy?

Thanks!

Hi Alan,

I’m sorry, but I have free access to the book via springerlink because I’m a student. I’m not allowed to share the account with others, otherwise it would be illegal filesharing :frowning:

But back to topic:
Thanks Tom for the descriptions, but I know about how to do the IK for the legs and calculate the pwm values for the servos. My problem is how to switch the gait of the robot >>during walking<<. It would be great if someone knows a solution for that.

Greets

You need to switch gaits when the legs are in the same position in both the gaits, i.e., make a similar step in the two gaits. Then when you get to that step, you can switch the pointers.

Alan KM6VV

The problem is that there is no position in any gait where all legs have the same position as in another gait. Another point is, when changing the gait, the robot also changes velocity. So the robot has to accelerate/decelerate during the transition sequence.

Furcatus

Sounds like you’re out of luck, unless you slow to a stop first. I’d make the sequences have a “transition” step.

Alan KM6VV

The key to this challenge is dynamic gait. I don’t know the answer myself, but it’s on my “to do” list. Check out Matt Dentons work, his hex engine are able to solve this. Sadly his work isn’t open source…

Hi KM6VV,

Give me your email address, and I will email it to you. I have a copy on my computer.

Thanks,

Sorry Furcatus for the late reply, I had to ask for my supervisor permisson since my project in enclosed in an European project. I cannot send you the whole simulation, but the IK and FK are attached in the zip file.

Hexapod.zip (1.79 KB)

Thanks, but it sounds like it’s only released to schools.

Alan KM6VV

It is kinda on the way round. Schools and universities usually pay editors to get all their books and publications.