# Reading coordinates in same plane in which I'm writing them

**URL:** <https://forum.universal-robots.com/t/reading-coordinates-in-same-plane-in-which-im-writing-them/24177>\
**Category:** Robot Communication\
**Created:** [September 30, 2022, 6:37pm UTC](https://forum.universal-robots.com/t/reading-coordinates-in-same-plane-in-which-im-writing-them/24177 "2022-09-30T18:37:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@robert](https://forum.universal-robots.com/u/robert)\
**Post date:** [September 30, 2022, 6:37pm UTC](https://forum.universal-robots.com/t/reading-coordinates-in-same-plane-in-which-im-writing-them/24177/1 "2022-09-30T18:37:27Z")

</div>

I’m new to controlling robots so I’m hoping this is a dumb question but I’ve spent significant time trying to answer it myself.

I am using the rtde protocol with Python to control a UR5 robot and various other test equipment. I used the example\_control\_loop.py and record.py scripts from this webpage to learn how to control and monitor the robot respectively → [Real-Time Data Exchange (RTDE) Guide - 22229](https://www.universal-robots.com/articles/ur/interface-communication/real-time-data-exchange-rtde-guide/)

When controlling the robot I wanted to specify coordinates in a plane we defined on the pendant that was square with our target object. When reading the actual\_TCP\_pose, however, it always seems to be in the Base coordinate system instead of the plane we defined.

Is there any way for me to read the coordinates from the plane I use for movement?

---

<div class="post-metadata">

**Author:** ![efn](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@efn](https://forum.universal-robots.com/u/efn)\
**Post date:** [October 3, 2022, 8:52am UTC](https://forum.universal-robots.com/t/reading-coordinates-in-same-plane-in-which-im-writing-them/24177/2 "2022-10-03T08:52:28Z")

</div>

Hello Robert,

You will have to transform your coordinates to the custom plane. I have not done this “outside” of UR graphical/script programming, and I’m not entirely sure how the math works, but here it looks like this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/6/64ce793a4c8fe002eeb13e4c1277321e69f8b746.png)  
WP1 is a waypoint placed in [0, 0, 0, 0, 0, 0] with regards to feature Point\_1.  
Point\_1 is placed in [0.4, 0.25, 0, 3.14159, 0, 0] with regards to the base feature. 🙂

Some of the math is described here, so you should be able to replicate it in Python afaik: [Universal Robots - URScript: Move with respect to a custom feature/frame](https://www.universal-robots.com/articles/ur/programming/urscript-move-with-respect-to-a-custom-featureframe/)

---

<div class="post-metadata">

**Author:** ![robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@robert](https://forum.universal-robots.com/u/robert)\
**Post date:** [October 3, 2022, 12:37pm UTC](https://forum.universal-robots.com/t/reading-coordinates-in-same-plane-in-which-im-writing-them/24177/3 "2022-10-03T12:37:37Z")

</div>

Thank you very much. I’m surprised that I can write to but not read from my custom plane but if a matrix transformation is what’s necessary then I guess that’s what I’ll do.
