Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Implementing Inverse Kinematics (gamasutra.com)
84 points by beluis3d on Aug 8, 2017 | hide | past | favorite | 25 comments


This is a terrible way to do IK. It is numerically unstable and will give vastly different solutions upon slight changes to the input. Coordinated Cyclic Descent using twist and swing quaternions give much better results:

http://www.tandfonline.com/doi/abs/10.1080/2165347X.2013.823...


CCD is good. FABRIK is even easier to implement, as is super stable: https://medium.com/unity3danimation/create-your-own-ik-in-un...


(typo: all instances of "Jacobian Transform" should be replaced by "Jacobian Transpose".)

This post only scratches the surface. There are many interesting topics in IK. Joint weights, null space optimization when the robot is overactuated wrt the end effector, self-intersection, singularities, stability when reaching for unreachable points, hybrid position/force control, ...


Another interesting point is that from a numerical optimization point of view, the Jacobian transpose method is analogous to gradient descent, while using its (pseudo) inverse is basically the Gauss-Newton algorithm.


Very interesting. I like the connections to Gradient Descent and Gauss-Newton Algorithm.


Thanks for the feedback. Can you speak more to "null space optimization", "self intersection", and "hybrid position/force control"? High level descriptions of the situations would be helpful, thanks. Or links to resources.


3-joint inverse kinematics doesn't have a unique solution. You need an additional metric to pick the solution you want. Closest to previous position? Best looking?

2-joint inverse kinematics has a simple analytical solution, which can be found in robotics textbooks.


Often things like the normal of the end effector is important. Other important factors are reducing power consumption (and thus motor heat) by taking into account system momentum and static torque on joints.

I've even seen 5-joint arms in factories for when the robot needs to reach around something in order to drill a hole or install a component.


What about for the limit which I guess would be like a tentacle?


Do you know a good text book about inverse kinematics for humanoid robots (such as Aldebaran Nao)?


A little old, but still one of the best resources for humanoid control: http://www.cds.caltech.edu/~murray/mlswiki/index.php/Main_Pa...

It has a chapter on closed-form IK for simple structures, and one on Jacobian transpose control.


Seconded! A classic.


Not strictly robotics, but I learned most of math required for inverse kinematics from this "David Vernon. Machine Vision" book.

http://homepages.inf.ed.ac.uk/rbf/BOOKS/VERNON/toc.htm

Take a look at this chapter: http://homepages.inf.ed.ac.uk/rbf/BOOKS/VERNON/Chap008.pdf


"Robotics: Modelling, Planning and Control" by B. Siciliano et al.


The problem essentially reduces to finding the roots of a system of polynomials. This article suggests solving the system basically with Newtons method (generalized to higher dimensions). But an alternative approach is to use Groebner bases[1] which can give you not just a single (arbitrary) solution (which is what Newtons method produces) but all solutions. SymPy has a good implementation of groebner bases if you want to try it out.

[1] http://www.scholarpedia.org/article/Groebner_basis


Can anyone with experience comment on the FABRIK algorithm [1] for solving IK? There's an online demo here [2] Basically, do you think the FABRIK method would be better than the Jacobian methods for a use-case in 3-dimensional space only (e.g. being used on a robotic arm)? There's a project I am interested in joining that involves IK and just want to know a 3rd-party opinion.

[1] http://www.andreasaristidou.com/FABRIK.html

[2] https://weffe.github.io/InverseKinematics/


The FABRIK system is more stable and easier to implement. Check here for my review on FABRIK, plus pseudo-code: https://medium.com/unity3danimation/create-your-own-ik-in-un...


Why are ahead-of-time inverse kinematics so much more popular than feedback control methods? The numerical iteration involved in this method seems a lot more expensive than the iteration used in feedback control, which is also simpler to implement.

Does anybody know?


In a robot you use inverse kinematics to decide at what angle you should be setting your joint angles and then feedback control set the joints to the correct angle (in a very simple robot). I'm not aware of any feedback control mechanism that would turn xyz-space feedback to joint-angle-space control without going through an inverse-kinematics step.


In both cases, you have to transform between the goal in operational space (e.g. end effector pose) and the joint positions. One drawback of using the Jacobian inverse approach for control is that command values can get arbitrarily large in singular configurations (of course there are more advanced techniques to handle these cases).


How is Jacobian transpose control an ahead-of-time IK? And how would you do IK without at least approximating the Jacobian?


Is the idea oft this, that joints get adjusted automatically and I only have to position the last one?


Yes. The difficulty is that the more joints there are, the more possible solutions there can be.


I see, but are all valid?

I have the feeling my hand/arm works like this and always does it the same, probably so the least work is required?


Our arms have an entire subspace of possible solutions (you can move your elbow around while keeping your hand in place). In robotics, there are a couple of measures that can be minimized/maximized while computing inverse kinematics. Work is one of them but also time to reach the goal configuration or its "dexterity" for moving on in a future command.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: