How to calculate IK

Ive been working on a hexapod robot and trying to get it to walk and look good as its doing so. I have a sequencer program but its very limited on what can be done. Ive managed to get it to walk thanks to help from the peopke on this forum but it sucks and is slow.

Any way i would like to learn IK so i can make my bot walk right but i have no idea how to calculate the problem. Ive looked at many tutorials but they only focus on the what and not the how. I understand the what but not the how. And im no mathematician.

Please any help would be appreciated.

I wrote this guide exactly
I wrote this guide exactly for that: http://tote.readthedocs.org/en/latest/ik.html
If you have any questions or ideas on how to improve it, I’m open to suggestions.

I looked and im sure it will
I looked and im sure it will help those that have a basic grasp of trig but i have no Trig experience. I know as high as algebra thats it besides a lil geometry.

Lets start off with basic.

What is the proper way to make the measurements needed to begin with. In what postions do the legs need to be in.

Ok going oscar’s tutorial
Ok going oscar’s tutorial here…

http://blog.oscarliang.net/inverse-kinematics-and-trigonometry-basics/

I looked up cosines, sines, and tangent and found this.............

https://www.mathsisfun.com/sine-cosine-tangent.html

So now I have a better understanding of the Gamma part of the equation.

But yea the measuring points would be very useful.

Ok some of this is a lil
Ok some of this is a lil obvious just took me a minute to see that. Let’s start with this pic since it’s the most common…

B3D78B4B-FB00-463D-94F0-42505FC02BA2_zpslwleatx1.jpg

Z-axis the center pivot of the coxa servo joint. A is the hip joint. So measurement one is the distance from the center of the coxa joint to the center of the hip joint.

B is the center joint of the femur joint. So the next measurement will be from A to B center joint to center joint...

P is the bottom of the tibia so I then need to measure between B and P. Then To solve the triangle I need to measure from P back A.

If that sounds right then my next task is figure out the X,Y measurements. Any input would be appreciated.

The x, y and z are given.
The x, y and z are given. That’s where you want your leg to be. The output is α, β and γ, which are the angles to which you need to set the servos in the leg (I called them ankle, knee and hip, because that’s easier to remember). That gives you the inverse kinematics for a single leg.

The next part is to calculate the inverse kinematics for the body. You take the attachment points of the individual legs and the angles at which they stick out, and convert the coordinates from the body’s reference frame to the leg’s, so then you can use them in the leg inverse kinematics to get the angles. You usually use affine transformations for that (https://en.wikipedia.org/wiki/Transformation_matrix#Affine_transformations) to change the basis of your coordinates (https://en.wikipedia.org/wiki/Change_of_basis). While this looks complicated, you don’t really need to understand it, just use the formulas for rotation and shift.

Then you use a similar technique to add “virtual vehicle” coordinates. The idea is that the body of the robot might be shifted or rotated in reference to its direction of movement.

Finally, when you start doing advanced navigation stuff, you might want to have world coordinates, where robot knows its own position and heading.

All right thank you for your
All right thank you for your post but how exactly do I come up with the measurements for X,Y,Z?

I'm really not trying to be a smart @$$ but I've read a lot of kinematics articles trying to figure this out and I've not found one that actually tells you how to do the most important part. Taking the measurements. It tells you much about the actual equations but not what you need to know to even start the equation. Why is that???! Setiously!!!!

Ok Duane, I think the equation you gave to me calculate servo might be wrong. I was experimenting with the sequencer and noticed that when I tell the servo to move 45 degrees from 0 (90 degrees) it actually turns more like 75-80. And when I bring up the legs 20 dgrees it's more like 35-45degrees.

This should be the link to
This should be the link to the equation. I think the 4160number may be wrong.

https://www.robotshop.com/letsmakerobots/torobot-software-help#comment-130312

Thanks for the post by the way. That helps a lot. I'm gonna study it for a while and get back to you. You know I'm gonna have questions.

How do you have your legs
How do you have your legs labeled?

Also will Oscarliangs tutorial still work this way?

Ok so looking at your first pic we'll start with the blue cross or leg number one.

Ok am I to understand that the X axis is the measurement from the center of the coxa joint to the center joint of the tibia joint?

And the Y axis is the distance the leg will travel to its forward position?

So how do I find the Z-axis?

I would really like to do
I would really like to do this the right way with calculating my own stuff and writing my own programs to run it but I have no idea where to start. Im Hoping also that this thread will help people like me who have the same problem of where to start and what to do since I can’t find what I need. It would be nice to have all the info In one place.

I would rather do this the right way any way then cheat and end up having to learn it any way. Besides I don't know enough about coding to even begin trying to match someone else's code to my Hex.

So I'm asking if you guys here can please teach me how to program my bot. I am so willing to learn, but you gotta tell me where to start and what to do. Can we make it plain and start with the very first step? I'm itching to start!!!

I was looking around for
I was looking around for another robot controller system and was interested in buying an Arbotix set but it seems the people at Arbotix have no idea of what the difference is between an FTDI tt232 chip and a UART cp2102 chip. Now I’m talking about bridge device chips here.any way they keep calling thier bridge devices UART when uses the ttl232 chip.

Why does that matter you ask. Well my computer will not recognize FTDI devices using chips like the ttl232. I've tried everything and started threads and even talked to the un-helpful people at FTDI who won't even talk to me anymore. They just gave up.

Any way

I'm never gonna get my hexapod walking just sitting here so it would be super helpful if we could start the process of learning IK and how to implement it on my bot.

Ready when you guys are!!!

Hmmmmmmmmmm. Are you sure? I
Hmmmmmmmmmm. Are you sure? I know for a fact that this device…

http://www.trossenrobotics.com/uartsbee

...........will not work with my computer because it uses the ft232 chip.

So where would I hook the device to? On my Multiwii I still hook it up through the FTDI port but I see the Arbotix controller has 3 inputs.

oops double post
oops double post

FTDI Chips

I typically use Linux and have not experienced any problems talking to either the FTDI or CP2102 chips I did have problems getting the CP driver setup with Windows 7 and failed completely with Windows 8.

A couple of months ago there was an issue where FTDI was trying to detect bogus chips and crippling itself. Progress on my hexapod has been stalled for a couple of years now so hearing about your progress could be inspirational.

Yea that FTDI problem was
Yea that FTDI problem was and still is a pain in the @$$. Supposedly it’s been fixed but no go here with windows7. And I already have a cp2102 bridge device so I’ll just need some header ins since my hook up is female to male.

https://www.robotshop.com/letsmakerobots/how-calculate-ik#comment-131293 umm what does this mean.

Mini clone and perf board?
Mini clone and perf board? What does it make?

What is the NED program you mentioned? Can you share a link.

I'm really diggin that frame set. It might be because it's blue but please tell me about it.

Ok I’m trying to understand
Ok I’m trying to understand what you were telling me up top.

For Y I want that measurement to be where (I want my) my foot ends up in its forward position?

But from the diagrams I'm seeing it looks like X is the measurement from the coxa center to the tibia servo in neutral position?

And the Z is the measurement of the height of where the coxa pivots on the chassis?

Would Z be a floating number since the height of the chassis will move during different modes.

And I want the legs to move within these measurements?

Ok to find the forward
Ok to find the forward position of the middle legs i moved the front left and middle left legs together until right before they touch themselves. Did the same with the right side. From the coxa centerline across the leg i have X-47mm across (in neutral) and then i measured the center of same as the Y=32mm before it touches the front in rear position. So it moves 32mm

Ok heres a question. To find
Ok heres a question. To find the Tan i have to divide opposite=Y by adjacent=X. Does that mean…

32 divided by 47 or

47 divided by 32 or

Also what is this equation telling me to do?

99C01B05-3538-4608-9C75-BEBD99F9185D_zpsv6ioavd6.jpg

I know im looking for the length of L but dont understand the symbols.

Ok guys i could use a lil
Ok guys i could use a lil help here.

I know the square root sign but im confused about the meaning of the 2 in front.

The axis Z with 2 behind it, is that a square function or to the 2nd power?

L= is the line that divides A1 and A2 it runs from the floor level (bottom of tibia) to the height of tge Z-Axis. I need to know L to solve A1 and A2