roboticslibrary / rl-examples

Kinematics, dynamics, geometry, and path planning definitions for the Robotics Library (RL).
https://www.roboticslibrary.org/
40 stars 14 forks source link

UR5e Kinematics #7

Closed githubuser0xFFFF closed 3 years ago

githubuser0xFFFF commented 3 years ago

In our software we use the Robotics Library for visualisation of a real UR5e robot. I succesfully integrated the VRML model and MDL kinematics reading the rlCoachMdl source code. Everything works quite well - so first I would like to thank you for this great library.

I have two questions regarding the UR5e kinematics. I noticed that the rlmdl folder contains two xml files for UR5 robot:

Which file is the right one for an UR5e robot? The second file contains the name UR5 (Serie 3). But I cannot find any information about Serie 3. I only find UR5 and UR5e on the UR homepage. At the moment we use the universal-robots-ur5 file, but we noticed that the kinematics does not match the kinematics of the UR5 perfectly. We tested this with the URsim simulator because it should use the default Denavit-Hartenberg parameters without any additional hardware calibration offset.

In the software we visualized the TCP with a yellow sphere. We noticed, that the spere moves sligthly if we rotate around the TCP. The following two pictures show this. In the first one, the green arrow of the axis cross points into the sphere:

ur_tcp1

After the rotation, the TCP sphere is slightly off:

ur_tcp2

In the teach pendant visualization, the TCP sphere is perfectly at the same location:

ur_teach_pendant_tcp

So I think, this is an indication, that the kinematics parameters do not perfectly match. It does not matter if we use universal-robots-ur5 or universal-robots-ur5-3 for kinematics. We simply read the joints from the robot and pass it to the rl kinematics.

Did you use the kinematics parameters from this site:

https://www.universal-robots.com/articles/ur/application-installation/parameters-for-calculations-of-kinematics-and-dynamics/

Do you have the original files that you used for building the MDL XML files?

Any idea what I can do to fix this?

Thank you, Uwe

rickertm commented 3 years ago

The UR robots apparently have various revisions, not only in software, but also on the mechanical side. The kinematics in universal-robots-ur5.xml match revision 1 of the UR5 (now referred to as CB1 in urcontrol.conf on the controller), while universal-robots-ur5-3.xml matches revision 3 (CB3). The new UR5e again has slightly different kinematic properties. The repository does not yet include a file for it. but I can add one.

The kinematic and dynamic properties were extracted from the urcontrol.conf.* files available on the UR controller. The geometry files are converted from the UR3.STEP, UR5.STEP, and UR10.STEP files that were available on the UR support page at that time. These however do not fully match the kinematic descriptions (measured both in SolidWorks 2015 and FreeCAD, see below). I contacted the UR support regarding this in December 2015 but never received a reply.

urcontrol.conf.UR3 (V3.2.18744)
a = [0.00000, -0.24365, -0.21325,  0.00000,  0.00000,  0.0000]
d = [0.1519, 0.00000, 0.00000, 0.11235, 0.08535, 0.0819]

UR3.STEP
a = [0.00000, -0.24365, -0.213,  0.00000,  0.00000,  0.0000]
d = [0.1519,  0.00000,  0.00000,  0.1104,  0.0834,  0.0824]
urcontrol.conf.UR5 (V3.2.18744, equal to rev. 3)
a = [0.00000, -0.42500, -0.39225,  0.00000,  0.00000,  0.0000]
d = [0.089159,  0.00000,  0.00000,  0.10915,  0.09465,  0.0823]

UR5.STEP (close to rev. 1)
a = [0.00000, -0.425, -0.39243,  0.00000,  0.00000,  0.0000]
d = [0.0892,  0.00000,  0.00000,  0.109,  0.093,  0.082]
urcontrol.conf.UR10 (V3.2.18744)
a = [0.000, -0.612, -0.5723, 0.000000, 0.0000, 0.0000]
d = [0.1273,  0.000,  0.0000, 0.163941, 0.1157, 0.0922]

UR10.STEP
a = [0.000, -0.6121, -0.5722, 0.000000, 0.0000, 0.0000]
d = [0.128, 0.000, 0.0000, 0.16389, 0.1157, 0.0922]
githubuser0xFFFF commented 3 years ago

@rickertm Thank you for this information. If you could add a file for the UR5e, this would be awesome. My plan was to create the files by myself but this does not look so easy and I think you are a lot quicker so this would be great. It would also help me to learn and understand how to translate the parameters into a MDL xml file.

To ease creation of the file, I collected all required informations for you:

Here are the Denavit-Hartenberg parameters:

https://www.universal-robots.com/articles/ur/application-installation/parameters-for-calculations-of-kinematics-and-dynamics/

I copied the urcontrol.conf.UR5 file from the URSim simulator - the Denavit-Hartenberg parameters match the one from the link above:

urcontrol.conf.UR5.txt

For the latest UR5 CAD file a login is required on the UR homepage. I downloaded the model for you, zipped it and put it into my Dropbox for some days:

https://www.dropbox.com/s/l7tgxe9hkxc30k4/eSeries_UR5e_20210223.zip?dl=0

Thank you for your help.

rickertm commented 3 years ago

Thank you for providing the controller file and the CAD model. I've just added kinematics and geometry models for the UR5e to the repository in 21cef495c3878e4a3a8983ef7b8bd26465fd8caa.

githubuser0xFFFF commented 3 years ago

Thank you for providing a UR5e model so quickly. I just tested it and it works perfetly. The TCP of the new UR5e model is perfectly on point when rotating the UR5e in the simulator. So the kinematics seems to match perfect now and the new CAD model even looks a little bit more realistic and nicer :o)

Thank you very much for your great support.