# Moving Wobj by Robtarget

**URL:** <https://tech-community.robotics.abb.com/t/moving-wobj-by-robtarget/10477>\
**Category:** RAPID Programming\
**Tags:** wobj, wobjdata\
**Created:** [November 30, 2021, 9:21am UTC](https://tech-community.robotics.abb.com/t/moving-wobj-by-robtarget/10477 "2021-11-30T09:21:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dzmitry](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/dzmitry/32/1828_2.png) [@Dzmitry](https://tech-community.robotics.abb.com/u/Dzmitry)\
**Post date:** [November 30, 2021, 9:21am UTC](https://tech-community.robotics.abb.com/t/moving-wobj-by-robtarget/10477/1 "2021-11-30T09:21:17Z")

</div>

Hi,

I have a point P1made in wobj\_1 and point P2 made in wobj0. I need to create wobj\_2 that way that the coordinate P2 in wobj\_2 should be the same as P1 in wobj\_1.

Are there some functions like “Adjust Robtargets” that can do that?

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [November 30, 2021, 8:08pm UTC](https://tech-community.robotics.abb.com/t/moving-wobj-by-robtarget/10477/2 "2021-11-30T20:08:15Z")

</div>

Can you elaborate some more please? Is it really just one point or are you talking many points? Is wobj\_2 exactly the same as wobj\_1 or different?

---

<div class="post-metadata">

**Author:** ![Dzmitry](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/dzmitry/32/1828_2.png) [@Dzmitry](https://tech-community.robotics.abb.com/u/Dzmitry)\
**Post date:** [December 1, 2021, 7:04am UTC](https://tech-community.robotics.abb.com/t/moving-wobj-by-robtarget/10477/3 "2021-12-01T07:04:41Z")

</div>

Yes, it’s just one point.

wobj\_2 is not the same as wobj\_1.

---

<div class="post-metadata">

**Author:** ![guillaumebatun](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@guillaumebatun](https://tech-community.robotics.abb.com/u/guillaumebatun)\
**Post date:** [December 6, 2021, 2:33pm UTC](https://tech-community.robotics.abb.com/t/moving-wobj-by-robtarget/10477/4 "2021-12-06T14:33:34Z")

</div>

I have not tested this but basically this is a matrix equation.  
Both poses have in common that they end up in the same pose wrt to the robot base.  
So P2 in wobj2 = P1 in wobj1  
PoseMult(Wobj2.pose,P2.pose) = PoseMult(Wobj1.pose,P1.pose)

PoseMult(PoseMult(Wobj2.pose,P2.pose),PoseInv(P2.pose)) = PoseMult(PoseMult(Wobj1.pose,P1.pose),PoseInv(P2.pose))  
this is what I am unsure about, does the left side equal wobj2 now?

Wobj2.pose = PoseMult(PoseMult(Wobj1.pose,P1.pose),PoseInv(P2.pose))  
Try it out! :smile:

---

<div class="post-metadata">

**Author:** ![Dzmitry](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/dzmitry/32/1828_2.png) [@Dzmitry](https://tech-community.robotics.abb.com/u/Dzmitry)\
**Post date:** [December 7, 2021, 11:18am UTC](https://tech-community.robotics.abb.com/t/moving-wobj-by-robtarget/10477/5 "2021-12-07T11:18:15Z")

</div>

> [@guillaumebatun](#):
>
> I have not tested this but basically this is a matrix equation.  
> Both poses have in common that they end up in the same pose wrt to the robot base.  
> So P2 in wobj2 = P1 in wobj1  
> PoseMult(Wobj2.pose,P2.pose) = PoseMult(Wobj1.pose,P1.pose)
> 
> PoseMult(PoseMult(Wobj2.pose,P2.pose),PoseInv(P2.pose)) = PoseMult(PoseMult(Wobj1.pose,P1.pose),PoseInv(P2.pose))  
> this is what I am unsure about, does the left side equal wobj2 now?
> 
> Wobj2.pose = PoseMult(PoseMult(Wobj1.pose,P1.pose),PoseInv(P2.pose))  
> Try it out! :smile:

Thanks, I’ll try it

---

<div class="post-metadata">

**Author:** ![Karra](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@Karra](https://tech-community.robotics.abb.com/u/Karra)\
**Post date:** [February 4, 2025, 9:36am UTC](https://tech-community.robotics.abb.com/t/moving-wobj-by-robtarget/10477/6 "2025-02-04T09:36:37Z")

</div>

I tried this code, [guillaumebatun](https://forums.robotstudio.com/profile/guillaumebatun), and it’s working. Thanks a lot for the tip!

---

<div class="post-metadata">

**Author:** ![Karra](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@Karra](https://tech-community.robotics.abb.com/u/Karra)\
**Post date:** [February 4, 2025, 9:36am UTC](https://tech-community.robotics.abb.com/t/moving-wobj-by-robtarget/10477/7 "2025-02-04T09:36:38Z")

</div>

I tried this code, [guillaumebatun](https://forums.robotstudio.com/profile/guillaumebatun), and it’s working. Thanks a lot for the tip!

---

<div class="post-metadata">

**Author:** ![Karra](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@Karra](https://tech-community.robotics.abb.com/u/Karra)\
**Post date:** [February 4, 2025, 9:36am UTC](https://tech-community.robotics.abb.com/t/moving-wobj-by-robtarget/10477/8 "2025-02-04T09:36:38Z")

</div>

> [@guillaumebatun](#):
>
> I have not tested this but basically this is a matrix equation.  
> Both poses have in common that they end up in the same pose wrt to the robot base.  
> So P2 in wobj2 = P1 in wobj1  
> PoseMult(Wobj2.pose,P2.pose) = PoseMult(Wobj1.pose,P1.pose)
> 
> PoseMult(PoseMult(Wobj2.pose,P2.pose),PoseInv(P2.pose)) = PoseMult(PoseMult(Wobj1.pose,P1.pose),PoseInv(P2.pose))  
> this is what I am unsure about, does the left side equal wobj2 now?
> 
> Wobj2.pose = PoseMult(PoseMult(Wobj1.pose,P1.pose),PoseInv(P2.pose))  
> Try it out! :smile:

Nice code, [guillaumebatun](https://forums.robotstudio.com/profile/guillaumebatun)! It’s working for me. Thanks for the tip!!!
