# Is there any fault in my kinematic diagram?

I was doing forward kinematic test on a 6 D.O.F anthropomorphic robotic manipulator. So I modeled my kinematic diagram by D-H notation. But I am confused. Because I have simplified some terms here. I am showing you my workings.  Sorry. I know that they are hard to read and thanks for your support.

You write down the kinematics of your robot as a series of simple transforms, translations and rotations. In MATLAB this would be:

>> s = 'Rz(q1) Tz(L1) Tx(L2) Ry(q2) Tz(L3) Ry(q3) Tz(L4) Tx(L5) Rx(q4) Tx(L6) Ry(q5) Tx(L7) Rx(q6)';


in words: rotate about the z-axis by q1, translate in the z-direction by L1, translate in the x-direction by L2, rotate about the y-axis by q2 etc. Note that q2, q3 and q5 have the opposite rotation sense to your diagram because my tool can't express a rotation about the negative y-axis.

Then this string can be factorised into DH parameters terms using the Robotics Toolbox for MATLAB:

>> DHFactor(s)
DH(q1, L1, L2, -90).DH(q2+90, 0, -L3, 0).DH(q3, 0, -L4, 90).DH(q4, L6+L5, 0, -90).DH(q5+180, 0, 0, 90).DH(q6+90, L7, 0, -90).Rz(-90)
In DHFactor, parseString is done

ans =
DH(q1, L1, L2, -90).DH(q2+90, 0, -L3, 0).DH(q3, 0, -L4, 90).DH(q4, L6+L5, 0, -90).DH(q5+180, 0, 0, 90).DH(q6+90, L7, 0, -90).Rz(-90)


and the result is a series of Denavit-Hartenberg terms, different to yours because of the y-axis direction. Note also there is a constant rotation, a tool transform, at the end of the sequence.

You could create a robot model by first defining the symbolic lengths then creating a SerialLink robot object

>> L1=1.33; L2=0.4; L3=1.1; L4=0.23; L5=0.766; L6=0.344; L7=0.244;
>> r = eval( dh.command('myrobot') )
r =

myrobot:: 6 axis, RRRRRR, stdDH, fastRNE
+---+-----------+-----------+-----------+-----------+-----------+
| j |     theta |         d |         a |     alpha |    offset |
+---+-----------+-----------+-----------+-----------+-----------+
|  1|         q1|       1.33|        0.4|    -1.5708|          0|
|  2|         q2|          0|       -1.1|          0|     1.5708|
|  3|         q3|          0|      -0.23|     1.5708|          0|
|  4|         q4|       1.11|          0|    -1.5708|          0|
|  5|         q5|          0|          0|     1.5708|    3.14159|
|  6|         q6|      0.244|          0|    -1.5708|     1.5708|
+---+-----------+-----------+-----------+-----------+-----------+
tool:    t = (0, 0, 0), RPY/xyz = (-90, 0, 0) deg


and then compute the forward kinematics for zero joint angles

>> r.fkine([0 0 0 0 0 0])
ans =
-1         0         0     1.266
0         1         0         0
0         0        -1      2.66
0         0         0         1


and plot it as a stick figure

>> r.plot([0 0 0 0 0 0]) -- Peter Corke, developer of Robotics Toolbox for MATLAB

• Thank you very much sir for giving your precious time. But sir I have some confusions here that I want to clarify first. 1. According to D-H notation isn't each of the rotations must have to be along the z axis? Then why are you defining some rotation by ' Ry(q2) ' rather than ' Rz(q2) ' or the rule is (in MATLAB) we HAVE TO define everything according to the base frame and after that "dh" will come into play? 2.Why my D-H table isn't matching with yours one? for negative y axis? or there is any mistake in my one? – Rakibul Islam Prince Aug 2 '19 at 4:12
• DH convention says rotation has to be about z, but it can be easier to think about rotation as about whatever axis is convenient, in this case base frame. The factorisation converts this to an equivalent set of transformations that obeys the rules of DH parameters. The sense or angular rotation for my case is different for the axes mentioned. – Peter Corke Aug 2 '19 at 5:57
• ok Sir. Then, are both of these table(yours and mine) meaning the same? – Rakibul Islam Prince Aug 2 '19 at 6:00
• Sir, I am facing problem with the code also.everytime an error shows up "java.lang.IllegalArgumentException: bad transform angle" while executing the "r = eval( dh.command('myrobot') )" command. – Rakibul Islam Prince Aug 2 '19 at 14:44
• The described inverse kinematics problem with 6dof is way to complicated for a mathematical software. Some matrix multiplication features aren't enough to solve the inverse kinematics problem of a robot arm. The preferred choice over the Matlab software is a natural language processing software like NLTK which is a python library. – Manuel Rodriguez Aug 3 '19 at 17:41