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.
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!
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.
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.
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…
Thanks, but I already downloaded it yesterday.
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.
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:
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
Gaiting engine - commands what gait to use, how high the legs should lift in each “step” and how many steps
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
angle to pwm - this is just a simple trig calculation based on the angle of each joint and converts to appropriate PWM
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!
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
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.
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.
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.
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…
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.