Inverse Kinematics

Hi, I wanted to make an hexapod for some time but had no idea how I was going to deal with the huge ammount of code it requires for it to make a single step.
After recently researching a bit I discovered about Inverse Kinematics, and how it could really make the coding of a walking robot so much easier.
If we simplify this to a single leg/arm, my question is, how do I program Inverse Kinematics in arduino so that I only need to give him the coordinates and it positions the leg correctly?
Every thing I see in the internet talking about this, refers specific programs for virtual animation, or software to control robotic arms with your computer. But for arduino, I didn't find a single tutorial or library.
The closest thing I found was this: Learn about Robot Inverse Kinematics
But it's been 2 years since my last math class and although I remember the basics of trigonometry I've no idea what's that Atan2 thing for example... Going to university studying something that has nothing to do with maths made me a bit slow in this. :-/
Also, I've found absolutely no information ragarding 3d positioning, only 2d.
Is there some kind of formula or library that can be used to simplify this?
Thanks in advance for your help. :wink:

The best advice I can give you is to poke around the lynxmotion forums. A lot of their robots use inverse kinematic algorithms. I dont believe any libraries have been made for IK or even any real code published for arduino(at least not that ive seen), but I know there is a lot for for the basic atom so to translate, you might have to learn a little basic code.

Check here: http://www.lynxmotion.com/images/html/proj103.htm its for a biped, but its pretty well written.

btw, atan2 is a version of arctangent function that takes two arguments and yields only one absolute angle, instead of atan() which just takes the ratio of the two arguments and returns that angle and the same angle plus 180 degrees (atan2 is exact, atan isnt)

Thanks, I do understand Basic as I understand C (not much), but what software should I use to access the code? Can you post the relevant bit of code here?
I never used anything from Lynxmotion, can that SSC-32 sequencer handle IK, and can it be interfaced with arduino? It seems pretty powerful, what exactly does it do?
I'm a bit confused here.
If this guy shared his code it'd be much easier: Arduino - robot arm following mouse - YouTube

After reading the 1st site I posted better, it doesn't seem that difficult.
And I found a cool processing program and code here: iDatoBato Laboratories: Inverse Kinematics and Processing
I guess it's just a matter of rewriting it to the arduino.
I'll try to build an arm when I have the time. And maybe try to make a rotating base for it with 3d coordinates.
Thanks for your help.

The ssc32 is just a servo sequencer, all it does is listen to serial commands to find out where to move servos and update them. It has no brains. Most lynxmotion bots use something called the bot board which is a basic atom processor (think basic stamp on steroids). That will be what runs the IK programs as well as any navigation and control programs. So if you wanted to use an arduino, you would just replace the basic atom with the arduino and could still use the ssc32 for running the servos (I dont think any arduino other than the mega can easily run 18 servos at a time). To be honest, if you wanted to make it a little easier on yourself and already know as much basic as c, i would suggest you just getting a microp that runs basic. that way you could use the code posted on lynxmotion more directly and could get help from there if you needed it too.

Most code you can view directly in txt editors like notepad. here's one for the phoenix hexapod controlled by a ps2 controller and basic atom using ik. I found it here:http://www.lynxmotion.com/images/html/proj102.htm also check this page http://www.lynxmotion.com/ViewPage.aspx?ContentCode=projects&CategoryID=20
there are even some excel file explanations of ik algorithms.

point firefox here to read the code: http://www.lynxmotion.com/images/files/phoen1.3.bas

I had tried reading it with notepad but it seemed not to work. Weird, now it does. ::slight_smile:
Anyway, that link with the excel examples is great! I think now I'm understanding the basics of ik much better.
I could get a basic microp but I already have the arduino... I think I'll try building an IK arm in arduino and see if I can do it first.
Unfortunatelly I don't have time for it right now, but when I do I'll post it here.
Thanks for your help knuckles904!