File Exchange

image thumbnail

Implementation of the Denavit-Hartenberg (DH) parameters in MATLAB

version (99.6 KB) by Auralius Manurung
Simple and straight-forward implementation of DH-parameters in MATLAB.


Updated 14 Oct 2017

GitHub view license on GitHub

Simple and straight-forward implementation of DH-parameters in MATLAB
This can be used to execute forward kinematics of the robot to find position and orientation of every link of the robot.
There are two different conventions on implementation of DH-parameters. This one uses the standard DH parameters which can as well be found in this book: The results have been validated with Peter Corke's RVC toolbox (
cgr prefix means the code is code-generation ready.
ncgr means the code is NOT code-generation ready.


Forward kinematics
Homogenous transformation of each link of the robot
Numerical jacobian
Simple visualization, it can also be animated
Inverse kinematics with the pseudo-inverse method and damped least square method.
Code generation ready.

Comments and Ratings (7)

@Hendric Kjellstrom
It is entirely kinematic simulation. So you stimulate the system with position input.

As for the plotting, it need more tweak.
I hve a better version here:

You might want to look at it.

i want to use anfis system to calculate forward kinematic equation in matlab can you please help me

Hello, I have been looking through the files (I like it) and I am wondering.

What is driving the simulation (external forces)? What makes it move?

When I am using the prismatic joints, the final plot stretches out and becomes disfigured, what may be the cause of this?

27.10.2016 --> Updated to include pseudo-inverse kinematic.

red = x-axis
green = y-axis
blue = z-axis

I don't understand which color is the X axis, and same for Z and Y axis.



Updated the description.

Updated the description..

updated the information

Code generation ready!

Updated the title.

Updated to include pseudo-inverse kinematic.

Added link for getting more information

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