# Offset X,Y in a Plane

**URL:** <https://forum.universal-robots.com/t/offset-x-y-in-a-plane/15410>\
**Category:** URScript\
**Created:** [July 12, 2021, 9:33am UTC](https://forum.universal-robots.com/t/offset-x-y-in-a-plane/15410 "2021-07-12T09:33:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.hammerton](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@m.hammerton](https://forum.universal-robots.com/u/m.hammerton)\
**Post date:** [July 12, 2021, 9:33am UTC](https://forum.universal-robots.com/t/offset-x-y-in-a-plane/15410/1 "2021-07-12T09:33:09Z")

</div>

I’m having a problem with offsetting Positions relative to a Plane!  
I’m using a Robotiq Camera to locate parts stored on a rack.  
when the part is found the Robot moves to the position of the part OK.  
I then grab the TCP pose using get\_actual\_tcp\_pose().  
Now I do some maths to calculate 20 X & Y values on the circumference of a circle (X,Y) positions.  
update the task position and move to each position to perform a task.  
This works fine in Base.

My problem is that I want to adjust X & Y Relative to the Plane.  
I’ve tried to use pose\_trans(Point,Plane) to adjust the position data to the plane but the results are totally unexpected.

---

<div class="post-metadata">

**Author:** ![anon32310726](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anon32310726](https://forum.universal-robots.com/u/anon32310726)\
**Post date:** [July 12, 2021, 10:31am UTC](https://forum.universal-robots.com/t/offset-x-y-in-a-plane/15410/2 "2021-07-12T10:31:28Z")

</div>

hi m,

try to use pose\_trans(inv(plane),Point)

it will give your point relitive to your plane.

to see the outcome you can have a pop up before your move comand so it will give some more sense.

kind regards,

Corné

---

<div class="post-metadata">

**Author:** ![chase.fearing](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/chase.fearing/32/2351_2.png) [@chase.fearing](https://forum.universal-robots.com/u/chase.fearing)\
**Post date:** [July 12, 2021, 5:20pm UTC](https://forum.universal-robots.com/t/offset-x-y-in-a-plane/15410/3 "2021-07-12T17:20:10Z")

</div>

Keep in mind that pose\_trans() uses the tool coordinate system as a reference. So make sure the offset measurement is in the same frame of refence as the tool (i.e. X+ is X+, etc.)

---

<div class="post-metadata">

**Author:** ![m.hammerton](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@m.hammerton](https://forum.universal-robots.com/u/m.hammerton)\
**Post date:** [July 13, 2021, 9:09am UTC](https://forum.universal-robots.com/t/offset-x-y-in-a-plane/15410/4 "2021-07-13T09:09:06Z")

</div>

Thankyou Corne,

That worked perfectly.  
It all seems so logical when you see the answer!

By using the pose\_trans(inv(plane),point)  
I was able to transpose the get\_actual\_tcp\_pose() to base, do the Maths offset to get 20 X,Y Values and then move to the positions with the plane enabled in the move.
