This question came to mind, and I couldn´t come up with a good answer. I´m asking this as a generic question, so robot/KSS specific details can be thought of as a decently fresh version.
I have no use case at the moment for this, so this is more for curiosity than business.
Given is p1 and p2 of type FRAME. Whom both are referring to the same arbitrary base ($WORLD) in sketch attached.
Imagine that all elements of p1 and p2 are different. Translations and rotations.
The question is:
Is it possible to find the offset frame needed to go from p1 to p2 (or the other way around) by using the geometric operator?
e.g. so a PTP UnknownBaseShift:p1 would end up at p2
or a PTP p1:UnknownToolShift would end up at p2
How would you get/calculate either UnknownBaseShift or UnknownToolShift in the example above?
The translations would not be the problem but the rotations seems trickier as they cannot be added/subtracted directly.
I´m sure that this could be brute forced by deep diving into really hardcore calculations but I sense there is a prettier way of doing this.
Before someone asks why someone would ever do something like this.
I imagine this as a way to "tie" points to other points instead of bases, to make code more reusable and less error prone.
The not so elegant way that I have in mind currently is:
1. Set a temporary base which is equal to p1
2. With the same base selected that p1 is thought in move robot to p2
3. Switch base to the temporary base and read out from $POS_ACT the current robot position. And those numbers should be the required offset frame.
Depending on which IPO FRAME that is selected either BASE or TOOL I presume you would get the required shift in either BASE or TOOL this way.
I believe method above to be a load of crap. Does anyone have anything better?