Author
Topic: Inverse Kinematics Help (Read 1512 times)

I have little experience with trigonometric functions, and was seeing if anyone can help me get some algorithms running for inverse kinematics. I have read of the robot arm tutorial with the inverse kinematics stuff and understood most of it, except the part with "psi" and "theta". I thought that those words are like variables that values assigned too (more programming experience then trig), if that's right, what symbol do they correspond to? Just one more thing, I'll be running the algorithms that are processing intense on my computer.

Psi and theta are just Greek letters that are commonly used to represent angles when applying equations to a geometry scenario, such as you posted. There is not set value for this letter, essentially it is just a variable that can be used to represent an angle.It is more so convention that Greek letters are used to label angles.

When you are writing programs you don't have to use these symbols, you can use any unique letter in your program. For example Psi could be swapped for A and theta could be swapped for B to make programming simpler.

I realized a couple days ago that I would need a robot arm with 4 DOF instead of the 3 DOF arm example. I have looked at various websites and haven't found the equations that do what is needed. Also, the base angle could be ignore and have the inverse kinematics work in 2D. If anyone knows how to do this or could point me in the right direction it would be appreciated.The FBD is attached...

The thing with IK is that a two-segment IK has a closed form solution (well, two solutions, as it's a quadratic equation.) Three segments can still be reduced to two, if you use the first axis to select a solution plane and then sove the two-segment case. This is what I do for my quadroped walker, for example -- the hip points the legs in the right direction; the two knees position the tip of the foot in the right place.

For more than three segments, or for the case of three segments that are all co-planar, you no longer have a nice quadratic equation that gives you the solution. There are generally infinitely many solutions, and the math is not closed-form anymore. There are two solutions used in general: Iterative solutions, and overconstrained solutions.

The idea behind iterative solutions is that, if you start out with a particular solution, and then move the goal a small way, then you can look for the smallest delta to the IK solution that solves for the new goal. This is popular in animation software, for example, where two characters may be holding hands, and we want the contact point to be roughly between the center of gravity of the two characters. The draw-back is that you're not guaranteed anything in particular about the solution, because what it is depends on how you got there.

The idea behind over-constraining is to add constraints to the solution that aren't necessarily encoded in the physics, and thus reduce it to a set of two-segment problems you can solve in order. For example, for a three-segment leg, getting the toe-top at a particular point could be done where the last segments joint is positioned anywhere on a circle around the desired end point. If you define that the last segment joint should always be straight up from the contact point, for example, the circle collapses to a point, and you can solve the first two segments for that point, and then solve the last segment trivially to reach the goal. (The "walker" solution I suggest above is actually a special case of this method.)

So, if you're not comfortable with the math just yet, now's probably a good time to pull up the textbooks, or go to khanacademy.org or mathworld.wolfram.com to brush up on it!

Thanks for the response, it answered a lot of my questions. I have been reading up on IK and think I have found a paper publish by MIT that seems to have all the information necessary to begin coding it into the algorithms to control the arm. I will most definitely read about the two solutions you mentioned and work on my math skills from some of those sites you mentioned, I haven't obtained the math skills yet (in Algebra 2 right now). Tell me what you think about the paper, here is the link ↓

This is not actually a "paper" (as that typically means a peer-reviewed journal publication,) it is lecture notes / course materials for a class at MIT that teaches these things.That being said, that's exactly what you want -- if you can figure this out, you'll be in good shape!The more I get into robots, the more I find that the math I learned from computer graphics, animation, and physics simulation is totally applicable, btw. That shows all those who said computer games would amount to nothing ;-)

Oh, never really knew the definition of a "paper" thanks for the advice =) I'll start getting it coded for the robot arm. When ever i get it finish i'll be sure to post the code that i ended up with, for others to use...

ps: I going to keep playing and making computer games

~Thanks Idan

Logged

There are 10 types of people in the world: those who understand binary, and those who don't.