# Delta (offset) implementation on pre-built coordinates

**URL:** <https://forum.universal-robots.com/t/delta-offset-implementation-on-pre-built-coordinates/16992>\
**Category:** Technical Questions\
**Created:** [October 12, 2021, 2:59am UTC](https://forum.universal-robots.com/t/delta-offset-implementation-on-pre-built-coordinates/16992 "2021-10-12T02:59:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon35916969](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@anon35916969](https://forum.universal-robots.com/u/anon35916969)\
**Post date:** [October 12, 2021, 2:59am UTC](https://forum.universal-robots.com/t/delta-offset-implementation-on-pre-built-coordinates/16992/1 "2021-10-12T02:59:06Z")

</div>

Hi all,

I have a set of pre-built movement of with all the coordinates based on the Datum point.

Is there anyway that the UR able to offset based on the delta, without touching my pre-built coordinate?  
If yes, what is the function to be used?

Background:

Delta = New Input Point - Datum Point

.

---

<div class="post-metadata">

**Author:** ![miwa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/miwa/32/2986_2.png) [@miwa](https://forum.universal-robots.com/u/miwa)\
**Post date:** [October 12, 2021, 12:06pm UTC](https://forum.universal-robots.com/t/delta-offset-implementation-on-pre-built-coordinates/16992/2 "2021-10-12T12:06:52Z")

</div>

Hello,

Assuming you have your Datum point already taught as a feature, you can do this easily. If you don’t yet have a feature defined, you’ll need to define it, then reteach your waypoints relative to the feature.

You can use the pose\_trans() script function with a pose variable containing your offset to shift your feature. Position values for a pose must be in meters, and rotation values must be in radians. An example is below assuming you have named your feature “Datum”:

offset = p[0,0,0.50,0,0,0]  
Datum = pose\_trans(Datum, offset)

or

Datum = pose\_trans(Datum, p[0,0,0.50,0,0,0])

This would result in Datum being shifted 50mm in the positive z-direction of the Datum feature. If you had a Move command relative to Datum, all the waypoints in that move would follow this shift.

Downloads for the most recent CB3 and e-series script manuals are below if you would like to read more about the pose\_trans() and other motion script functions.

[https://www.universal-robots.com/download/manuals-cb-series/script/script-manual-cb-series-sw3154/](https://www.universal-robots.com/download/manuals-cb-series/script/script-manual-cb-series-sw3154/)  
[https://www.universal-robots.com/download/manuals-e-series/script/script-manual-e-series-sw-511/](https://www.universal-robots.com/download/manuals-e-series/script/script-manual-e-series-sw-511/)

---

<div class="post-metadata">

**Author:** ![anon35916969](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@anon35916969](https://forum.universal-robots.com/u/anon35916969)\
**Post date:** [October 22, 2021, 5:27am UTC](https://forum.universal-robots.com/t/delta-offset-implementation-on-pre-built-coordinates/16992/3 "2021-10-22T05:27:55Z")

</div>

Hi Miwa,

With this implementation, I received errors while running on the simulation. (Not all the point but some only)

It shows **"The robot cannot reach the requested pose. Script function movej is unable to find an inverse kinematics solution"**

Do you have any suggestion regards to this issue?

---

<div class="post-metadata">

**Author:** ![anon35916969](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@anon35916969](https://forum.universal-robots.com/u/anon35916969)\
**Post date:** [October 22, 2021, 7:05am UTC](https://forum.universal-robots.com/t/delta-offset-implementation-on-pre-built-coordinates/16992/4 "2021-10-22T07:05:45Z")

</div>

Am I correct to say the "offset applied " is out of the coverage by UR?

---

<div class="post-metadata">

**Author:** ![miwa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/miwa/32/2986_2.png) [@miwa](https://forum.universal-robots.com/u/miwa)\
**Post date:** [October 22, 2021, 1:41pm UTC](https://forum.universal-robots.com/t/delta-offset-implementation-on-pre-built-coordinates/16992/5 "2021-10-22T13:41:47Z")

</div>

Hello,

In my example, I said 0.50 would be a 50mm offset when I should have said 0.050. The position values need to be in meters.

Shifting the feature will move all points that are taught relative to it, so if you move the feature too far, yes, it is possible that some positions will now be out of reach of the robot.

If you were trying to apply the offset to only a single point, but that point is taught relative to a feature, things can get a little tricky. One option is to turn that waypoint into a relative waypoint if it’s some simple motion like picking/placing a part. Otherwise, the link below explains transforming points between coordinate systems.

[https://www.universal-robots.com/articles/ur/programming/urscript-move-with-respect-to-a-custom-featureframe/](https://www.universal-robots.com/articles/ur/programming/urscript-move-with-respect-to-a-custom-featureframe/)
