# Why my kinematic diagram is not giving the same position and orientation while forward kinematics test?

I am sharing my matlab code so that you can also generate the simulation .

L1=1.33; L2=0.4; L3=1.1; L4=0.23; L5=0.766; L6=0.344; L7=0.244;
dh=[
0 L1 L2 1.571 0 0
0 0 L3 0 0 1.571
0 0 L4 1.571 0 0
0 L5+L6 0 1.571 0 3.1416
0 0 0 1.571 0 3.1416
0 L7 0 0 0 0];
r.plot([2.269 -1.0472 0.5236 1.0472 -1.571 1.0472])
r.fkine([2.269 -1.0472 0.5236 1.0472 -1.571 1.0472])
r.teach


I did model it for analyzing the 6 D.O.F manipulator showing the picture

my kinematic model

But it is not giving the same forward kinematic result when I run the test-

rather my model gives

look those inputs described by "J_i" and "q_i" are the same. But the output position and orientation is not matching.

They didn't use d-h notation for finding forward kinematics. But I have used "d-h notaion" .Does this make any difference?

What is the possible cause of this? I am also sharing the way I assigned the frames

Now my only question is- "WHAT IS THE PROBLEM HERE?" Why these two aren't matching? Is there any mistake in my kinematic diagram or in my D-H table?