# How to implement pose\_trans() in python

**URL:** <https://forum.universal-robots.com/t/how-to-implement-pose-trans-in-python/15922>\
**Category:** General Application Help: How do I?\
**Created:** [August 11, 2021, 9:34am UTC](https://forum.universal-robots.com/t/how-to-implement-pose-trans-in-python/15922 "2021-08-11T09:34:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon38429663](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@anon38429663](https://forum.universal-robots.com/u/anon38429663)\
**Post date:** [August 11, 2021, 9:34am UTC](https://forum.universal-robots.com/t/how-to-implement-pose-trans-in-python/15922/1 "2021-08-11T09:34:34Z")

</div>

Hi!

I’m trying to implement the pose\_trans() function in Python to control UR10 robot in real time with RTDE. In order to achieve it, I tried to convert a pose variable in a homogeneous transformation matrix and operating with it.

The problem is that the rotation matrix I got is not the correct one.

How can I implement pose\_trans() function to operate with pose variables? If it is not posible, how could I calculate the homogeneous transformation matrix properly from pose variables (p[X, Y, Z, Rx, Ry, Rz])?

Thanks in advanced!

---

<div class="post-metadata">

**Author:** ![pho](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/pho/32/2275_2.png) [@pho](https://forum.universal-robots.com/u/pho)\
**Post date:** [August 13, 2021, 1:39am UTC](https://forum.universal-robots.com/t/how-to-implement-pose-trans-in-python/15922/2 "2021-08-13T01:39:14Z")

</div>

I think this may have what you are looking for in it.

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

---

<div class="post-metadata">

**Author:** ![anon38429663](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@anon38429663](https://forum.universal-robots.com/u/anon38429663)\
**Post date:** [August 13, 2021, 7:40am UTC](https://forum.universal-robots.com/t/how-to-implement-pose-trans-in-python/15922/3 "2021-08-13T07:40:37Z")

</div>

Hi!

Thanks for your help but the problem I had was that i did not know how the pose variables represent the orientation. I thought this representation is made by using RPY angles but by default, UR robots use rotation vector.

I attach the link I found to find out this information: [Universal Robots - Explanation on robot orientation](https://www.universal-robots.com/articles/ur/application-installation/explanation-on-robot-orientation/)

Thanks again!

---

<div class="post-metadata">

**Author:** ![anon68291184](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@anon68291184](https://forum.universal-robots.com/u/anon68291184)\
**Post date:** [May 31, 2022, 7:39am UTC](https://forum.universal-robots.com/t/how-to-implement-pose-trans-in-python/15922/4 "2022-05-31T07:39:53Z")

</div>

Continuing the discussion from [How to implement pose\_trans() in python](https://forum.universal-robots.com/t/how-to-implement-pose-trans-in-python/15922):

Hi daniel i tried to use the pose\_trans and inverse fuctions in python but i didnt got the vales can you please share the python code?
