# Move relative to Plane feature 2

**URL:** <https://forum.universal-robots.com/t/move-relative-to-plane-feature-2/18341>\
**Category:** URScript\
**Created:** [December 24, 2021, 1:10am UTC](https://forum.universal-robots.com/t/move-relative-to-plane-feature-2/18341 "2021-12-24T01:10:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaulC](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@PaulC](https://forum.universal-robots.com/u/PaulC)\
**Post date:** [December 24, 2021, 1:10am UTC](https://forum.universal-robots.com/t/move-relative-to-plane-feature-2/18341/1 "2021-12-24T01:10:47Z")

</div>

I am trying to move relative to a plane feature. I have reviewed the content already at these links:

> [@MoveL relative to a plane feature](https://forum.universal-robots.com/t/movel-relative-to-a-plane-feature/837):
>
> Hello, I’m having troubles with feature coordinates-system, for a problem that seemed me easy, but after hours of trying and searching, I decided to post a topic. I’m searching for a way to use a plane feature, to move the robot TCP relatively to this plane (in script). As we can do in the manual mode when we select the feature to ask your help. I already saw answers from that thread that concerns a relatively close problem ([How to get tcp pose in feature coordinates?](http://forum.universal-robots.com/t/how-to-get-tcp-pose-in-feature-coordinates/495)), but I can’t achieve to…

> [@How to get tcp pose in feature coordinates?](https://forum.universal-robots.com/t/how-to-get-tcp-pose-in-feature-coordinates/495/2):
>
> I’ve answered my own question. So for anyone else who runs into this, result=pose\_trans(pose\_inv(pose2),pose1) x offset = result[0] y offset = result[1] Assuming, of course, that your x and y axes of the feature plane and your tool are pointing the same direction. If not, it should be a simple 2D coordinate transformation if you know the angle of rotation. [image]

however I don’t think it gives me the complete answer. To summarise I wish to:

1. Find the position relative to a plane feature. As already discussed this can be done with:  
p\_2=pose\_trans(pose\_inv(p\_1),Plane\_1)

where p\_1 is the position in the base coordinate system.  
Plane\_1 is the plane feature that I wish to reference.  
p\_2 is the point relative to Plane\_1.

1. I then wish to add offsets relative to the position in Plane\_1.  
e.g.  
p\_2\_offset = p\_2  
p\_2\_offset[0] = p\_2\_offset[0] + x\_offset  
p\_2\_offset[1] = p\_2\_offset[1] + y\_offset

2. Now the main problem is how do I now translate this offset position back to the base coordinate system. Logically I thought I should try the following:

p\_3 = pose\_trans(pose\_inv(p\_2\_offset),pose\_inv(Plane\_1))

where pose\_inv(Plane\_1) gives the position of the base coordinate system relative to Plane\_1 coordinate system. I have tested the code and it doesn’t give the correct result. Does anyone have any ideas?
