File Exchange

image thumbnail

Examples of Basic Iterative Algorithms for Inverse Kinematics.

version (26.4 KB) by Ugo Pattacini
A couple of examples showing the pseudo-inverse and Jacobian transpose inverting the kinematics.


Updated 16 Oct 2015

View License

Two simple models are provided showing the characteristics of basic iterative algorithms for the inversion of kinematics, namely the Jacobian transpose, its pseudo-inverse and the damped least-squares (DLS). The pro's and con's can be compared interactively for a serial two-links and a three-links chains. For the latter the gradient-projection method is also given to couple a secondary task exploiting the redundancy of the manipulator.

Cite As

Ugo Pattacini (2020). Examples of Basic Iterative Algorithms for Inverse Kinematics. (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (9)

ilham azad


Binbin TAN

Thank you, just downloaded and learn from your simulation.It's a good example!

@Pedro, thanks a lot for spotting this out.
I've provided the fix in the latest release.


Hello. I downloaded and run your files. At first glance I realized that the example of the three_link robot was producing some strange behaviors. Browsing over the equations I see that you have a mistake in the Jacobian. You are feeding -sin(theta1) and cos(theta1) to the third component of the matrix. The correct term should be -sin(theta1+theta2+theta3), and cos(theta1+theta2+theta3). After these changes the example of the three link arm works perfectly fine. Great examples by the way.


very good work for 2 links and 3 links (redundant robot)

Yu Ang Tan

Mohanraj S



The bug is really fixed herein.

Archive refactored

Fixed bug spotted by Pedro Miranda on the Jacobian computation of the 3-links chain example.

Just fixed a typo in the description

changes in Description field

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux