# UR3 transformation matrix

**URL:** <https://forum.universal-robots.com/t/ur3-transformation-matrix/27636>\
**Category:** Technical Questions\
**Created:** [March 28, 2023, 6:17am UTC](https://forum.universal-robots.com/t/ur3-transformation-matrix/27636 "2023-03-28T06:17:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon40303980](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@anon40303980](https://forum.universal-robots.com/u/anon40303980)\
**Post date:** [March 28, 2023, 6:17am UTC](https://forum.universal-robots.com/t/ur3-transformation-matrix/27636/1 "2023-03-28T06:17:16Z")

</div>

Hi,

I am trying to develop a special purpose device with the Ur3 model robot arm. I aim to obtain a workspace by pairing the robot arm and the optical navigation system with each other. Since the robot arm will do the critical work, I decided to transfer the coordinate system of the robot arm to the optical navigation system. For this purpose, I obtained the transformation matrices of all system elements and created a trial loop from robot base to tool tip, from tool tip to Polaris, from Polaris to optical marker, respectively. The tool tip is set to be pivoted to the tool type on both the optical navigation and the robot side. When I multiply the matrices I mentioned above, respectively, I need to find the coordinates of the target marker tip according to the robot base. But unfortunately I get very different coordinate data. When I evaluate the optical navigation system separately, it works in harmony with the algorithm I have. The x, y, z and rpy orientation data I got from the robot seems to be correct in itself. But when I map these two different spaces to each other, a problem arises. I haven’t found a solution so far. I am willing to listen to those who will work on a similar issue and make suggestions.

Note: In addition to this information, UR has prepared an excel document showing the Denavit Hartenberg parameters of each robot and how these parameters work. So I decided to do a trial to compare it with the robot’s data. I updated the parameters in this excel document according to the CB3 UR3 parameters and transferred the joint angles that I gave to the physical robot to the table. When I examined the results, the x, y and z data were correct, but the angles required for orientation were inconsistent with the robot side. This one is a little weird.

Thanks.

---

<div class="post-metadata">

**Author:** ![tizh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/tizh/32/4176_2.png) [@tizh](https://forum.universal-robots.com/u/tizh)\
**Post date:** [March 28, 2023, 6:42am UTC](https://forum.universal-robots.com/t/ur3-transformation-matrix/27636/2 "2023-03-28T06:42:16Z")

</div>

Hi,

it is Rotation vector that UR used in its system, but not RPY or Euler Angle. explanation as below.

UR has script to convert Rotation vector to RPY.

in the Excel, it shall be RPY I think.

[https://www.universal-robots.com/articles/ur/application-installation/explanation-on-robot-orientation/](https://www.universal-robots.com/articles/ur/application-installation/explanation-on-robot-orientation/)

[https://www.universal-robots.com/articles/ur/programming/rpy-tofrom-rotation-vector/](https://www.universal-robots.com/articles/ur/programming/rpy-tofrom-rotation-vector/)

Hope the info helps.

---

<div class="post-metadata">

**Author:** ![mr.magnuso](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@mr.magnuso](https://forum.universal-robots.com/u/mr.magnuso)\
**Post date:** [March 28, 2023, 6:43am UTC](https://forum.universal-robots.com/t/ur3-transformation-matrix/27636/3 "2023-03-28T06:43:51Z")

</div>

Have you consulted the following description of UR robot orientation?  
[https://www.universal-robots.com/articles/ur/application-installation/explanation-on-robot-orientation/](https://www.universal-robots.com/articles/ur/application-installation/explanation-on-robot-orientation/)

Best regards  
Magnus

---

<div class="post-metadata">

**Author:** ![anon40303980](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@anon40303980](https://forum.universal-robots.com/u/anon40303980)\
**Post date:** [March 28, 2023, 6:59am UTC](https://forum.universal-robots.com/t/ur3-transformation-matrix/27636/4 "2023-03-28T06:59:19Z")

</div>

UR displays the orientation data as a rotation vector, but it also provides the opportunity to view it as rpy radians or degrees when desired via the gui. So I used the angles as they should be. The main purpose is to obtain the rotation matrix and then the transformation matrix. I am getting these correctly. My problem arises when I want to map two different spaces together.

---

<div class="post-metadata">

**Author:** ![anon40303980](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@anon40303980](https://forum.universal-robots.com/u/anon40303980)\
**Post date:** [March 28, 2023, 7:00am UTC](https://forum.universal-robots.com/t/ur3-transformation-matrix/27636/5 "2023-03-28T07:00:10Z")

</div>

Yes, I reviewed this article.

---

<div class="post-metadata">

**Author:** ![anon40303980](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@anon40303980](https://forum.universal-robots.com/u/anon40303980)\
**Post date:** [March 28, 2023, 7:55am UTC](https://forum.universal-robots.com/t/ur3-transformation-matrix/27636/6 "2023-03-28T07:55:45Z")

</div>

I prepared a simple data example. As you can see in the result, x,y and z values are different each other. Polaris data are given as quaternions, and I convert them into rotation matrix with Polaris coversion script.

 ![SS1.PNG](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/9/90acef3b7241ee3d7acce723b57a1957a3691225.jpeg)  
 ![SS2](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/e/e7833b1c4404d52f1cd803803c54c6e31c175ad6.png)

Not: Tr matrix is Base to T.Tip
