Go Down

Topic: Inverse Kinematics for Hexapod (Read 6516 times) previous topic - next topic


Hello everyone,

        I'm making a hexapod with 3-DOF leg, i have made the mechanical assemblies. But the confusion is that ho to implement the Kinematics, I searched a lot, bt since i don't have a basic knowledge in kinematics, i'm not getting understood it even i have spent a lot of time for it.  please help me with a code or something like that to make my hexapod work.
Thank you


Start simple. Forget IK, just implement a simple tripod gait to get it to walk. You can
find dozens of examples of tripod gaits on the internet with a search. Once you do
that, you can worry about IK later on, but probably 99% of hexapod builders don't
use IK.


I recently built a hexapod, well it took me many months to program it :) I used inverse kinematics, I found the following site helpful -> http://www.engineer-this.com/IK.shtml The IK wasn't that hard to figure out. The biggest problem for me was coding the whole walking gait based on a timer (millis). I didn't want to use the delay function as I wanted to let the micro controller do lots of other things.
You can read about my hexapod on my blog: http://www.bajdi.com/category/bajdupod-996r/


Months? I would think you could get a basic tripod gait going in a day or so. All the legs do exactly
the same thing, just two groups of 3, timed 180 deg out of phase.


Programming a basic walking gait using servo.write(angle) and then a delay is very easy.
Then you get something like this: https://vimeo.com/61460555

I'm not much of a programmer, the challenge for me was to program it using inverse kinematics and using a timer. That's a lot harder for someone that is new to programming.
A couple of months later I ended up with this:
I can now remote control (by using another Arduino as a remote and 2 nRF24L01 modules) it, and make it walk in every direction. With the remote I can let it do preprogrammed "moves". Also has an autonomous obstacle avoiding mode using ultrasonic sensors and with the WiiCamera sensor it can track IR light. I also added 18 leds, 16 of them controlled by 2 shift registers. Mixing all those things in one sketch took me a lot of time to get right. My last sketch is over 1500 lines of code. But I'm sure someone with better programming skills could do it a lot simpler. 


I would always recommend doing the easy thing first, and then try the harder stuff.


Inverse Kinematics can be rather difficult to figure out.  There is usually a significant amount of difficult math involved.  Though you might be able to look it up online as I'm sure someone has worked out at least the basics (Though it might be different with your particular style of servo).

However it is quite easy to approximate them, just by thinking through the basics of how the robot moves and implementing it using basic commands.

If you don't want to use delays, you can set up a scheduler instead and have the software execute that way.  This way you can do other things at the same time.

Go Up