# Get TCP position relative to a user made feature plane

**URL:** <https://forum.universal-robots.com/t/get-tcp-position-relative-to-a-user-made-feature-plane/21447>\
**Category:** Product Wishlist\
**Created:** [May 19, 2022, 6:06pm UTC](https://forum.universal-robots.com/t/get-tcp-position-relative-to-a-user-made-feature-plane/21447 "2022-05-19T18:06:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon43903668](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@anon43903668](https://forum.universal-robots.com/u/anon43903668)\
**Post date:** [May 19, 2022, 6:06pm UTC](https://forum.universal-robots.com/t/get-tcp-position-relative-to-a-user-made-feature-plane/21447/1 "2022-05-19T18:06:49Z")

</div>

Would like a script command to read the current TCP relative to a user coordinate plane.

Ex. I am picking parts from a table setup in a grid. For this application I will most likely create a feature plane of the pick table. Lets call that Table\_Plane. I would like to be able to monitor the position of the robot in Table\_Plane coordinates. This would make alot more sense than base coordinates.

it could work something like this.

get\_actual\_tcp\_pose(feature plane) enter 0 for base coordinates.

get\_actual\_tcp\_pose(Table\_Plane)

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [May 23, 2022, 12:44pm UTC](https://forum.universal-robots.com/t/get-tcp-position-relative-to-a-user-made-feature-plane/21447/2 "2022-05-23T12:44:21Z")

</div>

So if your TCP was right on the origin of the taught Feature you would want it to return [0,0,0, rx,ry,rz] correct?

---

<div class="post-metadata">

**Author:** ![anon43903668](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@anon43903668](https://forum.universal-robots.com/u/anon43903668)\
**Post date:** [May 23, 2022, 1:16pm UTC](https://forum.universal-robots.com/t/get-tcp-position-relative-to-a-user-made-feature-plane/21447/3 "2022-05-23T13:16:05Z")

</div>

yes. that is correct.

---

<div class="post-metadata">

**Author:** ![anon32693620](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@anon32693620](https://forum.universal-robots.com/u/anon32693620)\
**Post date:** [May 23, 2022, 1:51pm UTC](https://forum.universal-robots.com/t/get-tcp-position-relative-to-a-user-made-feature-plane/21447/4 "2022-05-23T13:51:08Z")

</div>

I believe you are looking for something like this:

```auto
desired_pose = pose_trans(pose_inv(feature_plane), get_actual_tcp_pose())

```

---

<div class="post-metadata">

**Author:** ![anon43903668](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@anon43903668](https://forum.universal-robots.com/u/anon43903668)\
**Post date:** [May 23, 2022, 2:22pm UTC](https://forum.universal-robots.com/t/get-tcp-position-relative-to-a-user-made-feature-plane/21447/5 "2022-05-23T14:22:05Z")

</div>

That will do it too. thought it would be nice if we could extract it with a single script command built into polyscope.
