# How can i use PoseAdd() in relation to my custom feature

**URL:** <https://forum.universal-robots.com/t/how-can-i-use-poseadd-in-relation-to-my-custom-feature/31600>\
**Category:** General Application Help: How do I?\
**Created:** [November 28, 2023, 10:20am UTC](https://forum.universal-robots.com/t/how-can-i-use-poseadd-in-relation-to-my-custom-feature/31600 "2023-11-28T10:20:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrikmohar450](https://avatars.discourse-cdn.com/v4/letter/p/77aa72/32.png) [@patrikmohar450](https://forum.universal-robots.com/u/patrikmohar450)\
**Post date:** [November 28, 2023, 10:20am UTC](https://forum.universal-robots.com/t/how-can-i-use-poseadd-in-relation-to-my-custom-feature/31600/1 "2023-11-28T10:20:39Z")

</div>

So im trying to move my tcp in my custom feature using poseAdd()…i cannot use poseadd() in relation to the base feature because of offset of the work table…so for example i want to use PoseAdd(waypoint1,p[0.1,0,0]) so that i make another waypoint 100mm in x direction.

---

<div class="post-metadata">

**Author:** ![g.dimitrieski1](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@g.dimitrieski1](https://forum.universal-robots.com/u/g.dimitrieski1)\
**Post date:** [November 28, 2023, 12:22pm UTC](https://forum.universal-robots.com/t/how-can-i-use-poseadd-in-relation-to-my-custom-feature/31600/2 "2023-11-28T12:22:13Z")

</div>

Hi Patrick,

you need to use the pose\_trans() function in combination with pose\_inv() to transform the coordinate system first.  
Try:  
pos = pose\_trans(pose\_inv(waypoint1), p[0.1,0,0,0,0,0])  
movej(pos)  
the result should be relative movement in the waypoint1 coordinate system for 100mm along its X axis.

BR,  
Goce

---

<div class="post-metadata">

**Author:** ![patrikmohar450](https://avatars.discourse-cdn.com/v4/letter/p/77aa72/32.png) [@patrikmohar450](https://forum.universal-robots.com/u/patrikmohar450)\
**Post date:** [November 28, 2023, 12:48pm UTC](https://forum.universal-robots.com/t/how-can-i-use-poseadd-in-relation-to-my-custom-feature/31600/3 "2023-11-28T12:48:36Z")

</div>

Thank you for your reply…ive tried pose\_trans() but i failed to understand what the function actualy does…can you explain how your answer would work…i know you put in two parameters (pose from, pose to) but how does that tell the robot that it should move in the custom feature

---

<div class="post-metadata">

**Author:** ![g.dimitrieski1](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@g.dimitrieski1](https://forum.universal-robots.com/u/g.dimitrieski1)\
**Post date:** [November 28, 2023, 2:36pm UTC](https://forum.universal-robots.com/t/how-can-i-use-poseadd-in-relation-to-my-custom-feature/31600/4 "2023-11-28T14:36:30Z")

</div>

Sure,

I am sorry i just realised that i made a misstake ,  
pos = pose\_trans(waypoint1, p[0.1,0,0,0,0,0])

should actually be:  
pos = pose\_trans(pose\_inv(waypoint1), p[0.1,0,0,0,0,0])

What the pose\_inv function does is it calculates the transformation matrix from the coordinate system of Waypoint1 to the BaseCoordinate system. Think of it like alligning the Custom Coordinate system to the Base.

---

<div class="post-metadata">

**Author:** ![patrikmohar450](https://avatars.discourse-cdn.com/v4/letter/p/77aa72/32.png) [@patrikmohar450](https://forum.universal-robots.com/u/patrikmohar450)\
**Post date:** [December 1, 2023, 8:27am UTC](https://forum.universal-robots.com/t/how-can-i-use-poseadd-in-relation-to-my-custom-feature/31600/5 "2023-12-01T08:27:56Z")

</div>

But how does a program know on which feature should be used, or is waypoint1 supposed to be a feature in this solution?

---

<div class="post-metadata">

**Author:** ![g.dimitrieski1](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@g.dimitrieski1](https://forum.universal-robots.com/u/g.dimitrieski1)\
**Post date:** [December 4, 2023, 8:46am UTC](https://forum.universal-robots.com/t/how-can-i-use-poseadd-in-relation-to-my-custom-feature/31600/6 "2023-12-04T08:46:58Z")

</div>

Waypoint1 is actually represented by a coordinate system with 3 positional and three orientation coordinates in the Base coordinate system. That is all what is needed, you can also define it as a feature and use it in the same way in the calculation.
