## Forward Kinematic UR5 Matlab

Typically: "How do I... ", "How can I... " questions
Valenorf
Posts: 5
Joined: 10 May 2017, 21:35

### Forward Kinematic UR5 Matlab

Hi, i have a problem trying to solve the direct kinematic using matlab, for the given model. I want to calculate it symbolically, through the transformation given by the homogeneous matrices.
I used the DH extract tool for V-rep, but i can't understand why it gives me only 5 rows of the dh-table(there are 6 different joints).
I tried also to use the official parameters for the robot(and here the dh-table has 6 row as i was expected), but the end-effector position is quite different from the point shown in v-rep. I moved the robot in the (0,0,0) position of the world too.

I think the formulas used for the matrices is correct, i double checked them.

Thank you!

coppelia
Posts: 7680
Joined: 14 Dec 2012, 00:25

### Re: Forward Kinematic UR5 Matlab

Hello,

you have to add another joint at the base of the manipulator (i.e. at the exact position where your robot's origin is), just before extracting the DH parameters.

Cheers

francofusco
Posts: 11
Joined: 22 Apr 2017, 09:20

### Re: Forward Kinematic UR5 Matlab

Hi!
i can't understand why it gives me only 5 rows of the dh-table(there are 6 different joints)
The reason is that the DH parameters extractor works with couples of joints, and assumes the base-frame to be located at the first joint. It means that it will give you the offsets/rotations for 5 different couples of joints: (J1,J2) (J2,J3) ... (J5,J6). What are missing are the parameters relative to the couple J6/end-effector. Indeed, the e-e frame is not defined and that's why you won't get info about the related parameters.

You can define manually the Transformation from J6 to the end-effector (should just be a translation along the local z-axis and then a rotation of theta about z). If you want to use the terminal Force Sensor as EE frame, the parameter d should be 0.075m and theta equal to the joint angle.

I hope it will help!

Valenorf
Posts: 5
Joined: 10 May 2017, 21:35

### Re: Forward Kinematic UR5 Matlab

coppelia wrote:Hello,

you have to add another joint at the base of the manipulator (i.e. at the exact position where your robot's origin is), just before extracting the DH parameters.

Cheers
I inserted it, but the first row of the dh-table is a bunch of zeros. As francofusco said, seems to be missed the last frame. I put the last trasformation matrix as he saids to 0.075, and now the x and y position seems to be correct, but i have an error of 7.8 cm on the z axis left.

Valenorf
Posts: 5
Joined: 10 May 2017, 21:35

### Re: Forward Kinematic UR5 Matlab

Ok now seems to be correct, because the first joint position was not 0,0,0, but shifted a little bit in z-direction. So just an initial translation e now everything work. Thank you!

chinmay1296
Posts: 1
Joined: 13 Dec 2018, 20:00

### Re: Forward Kinematic UR5 Matlab

Hello,

I am trying to simulate the UR-3 robot using MATLAB. My problem is that the DH table that I have made by hand is not the same as the one which you get using the DH extractor. Also, when the DH extractor in Vrep says that theta is 90, does it mean that there is an offset of 90? The base of my robot is at the origin in the world frame but still I am not getting the correct answer.

Thank you

coppelia