# How to rotate a pose

**URL:** <https://forum.universal-robots.com/t/how-to-rotate-a-pose/40079>\
**Category:** URScript\
**Created:** [June 3, 2025, 1:04pm UTC](https://forum.universal-robots.com/t/how-to-rotate-a-pose/40079 "2025-06-03T13:04:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luca-0](https://avatars.discourse-cdn.com/v4/letter/l/41988e/32.png) [@luca-0](https://forum.universal-robots.com/u/luca-0)\
**Post date:** [June 3, 2025, 1:04pm UTC](https://forum.universal-robots.com/t/how-to-rotate-a-pose/40079/1 "2025-06-03T13:04:51Z")

</div>

Hello,

I’m trying to pick up a part than can be rotated, but the further its rotated, the further my TCP is away from where its supposed to be.

there is a sensopart camera that sends the location of my part to my UR10e. When the part moves but does not rotate, they UR10e will always pick it up right in the middle, but when I rotate the part aswell, suddenly my cobot fails to pick it up in the middle. (the TCP is correct and the camera has been calibrated)

using this pose that contains the variables in the proper form, with both pose\_trans and pose\_add it will not stay accurate.  
Am I supposed to use something else to make the TCP turn to the proper angle?

var\_1=p[dx,dy,0,0,0,dz]

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![francis](https://avatars.discourse-cdn.com/v4/letter/f/ac8455/32.png) [@francis](https://forum.universal-robots.com/u/francis)\
**Post date:** [June 4, 2025, 5:03am UTC](https://forum.universal-robots.com/t/how-to-rotate-a-pose/40079/2 "2025-06-04T05:03:48Z")

</div>

hi @luca-0

i had a similar problem in the past.  
try reading this answer on my post.

> [@Rotate TCP in Rx direction only](https://forum.universal-robots.com/t/rotate-tcp-in-rx-direction-only/35398/5):
>
> Hi @francis If you want to program just a rotation, you have to keep in mind that the last 3 elements in the pose array are of a rotation vector type. We cannot, or at least very difficultly, interpret this. When we want a rotation, we think in the “RPY” type. This means that, if you want a rotation of 179deg around your y-axis of your chosen TCP (your Y-axis points outward of the tool flange), then you can accomplish this by doing these steps: A rotation of 179deg, transform it to radians: …

basically, where thinking in terms of RPY but we need to convert that to rotation vector using rpy2rotvec()  
(hopefully, i understood it correctly)
