1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. KUKA Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Find arbitrary offset frame between two Frames

  • Hes
  • April 24, 2022 at 10:03 PM
  • Thread is Resolved
  • Hes
    Reactions Received
    42
    Trophies
    2
    Posts
    243
    • April 24, 2022 at 10:03 PM
    • #1

    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?

    Images

    • ShiftFrameQuestion.jpg
      • 186.13 kB
      • 865 × 1,920
      • 15
  • Go to Best Answer
  • Online
    panic mode
    Reactions Received
    1,280
    Trophies
    11
    Posts
    13,087
    • April 24, 2022 at 10:42 PM
    • #2

    you did learn about algebra and matrices in school, right?

    in algebra

    x*1 = 1*x = x

    and if y=1/x

    then x*y = 1

    for any x<>0

    and you also know that

    x*y= y*x

    also you know that

    x*y*z=(x*y)*z = x*(y*z)

    matrix math has some similarities but there are differences too.:

    geometric operator is an equivalent of matrix multiplication.

    also convention is to use capital letters to denote matrix.

    so you know what identity matrix I is.

    I*A = A*I = A

    there is no division but one can multiply by an inverse of a matrix.

    and it is common to mark inverse of matrix A as A'

    A*A'=I

    and you also know that for matrices

    A*B<>B*A

    with that you can do the rest. so your question is if we know

    C=A*B,

    and values of A and C, can we determine B?

    well if we compute A' (an inverse of A) then

    A'*C =A'*A*B=I*B=B


    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • Hes
    Reactions Received
    42
    Trophies
    2
    Posts
    243
    • April 24, 2022 at 11:35 PM
    • #3

    Spotless explanation :smiling_face: this is exactly what I was looking for.

  • Online
    panic mode
    Reactions Received
    1,280
    Trophies
    11
    Posts
    13,087
    • April 25, 2022 at 12:49 AM
    • Best Answer
    • #4

    similar can be used to find point value in another base when robot did not move.

    R1:T1 = B1*P1 ; R1 is robot flange, B1 is base, T1 is tool

    R2:T2 = B2*P2 ; R2 is robot flange, B2 is another base, T2 is another tool

    but since we know that robot did not move, flange position is same

    R1:T1:T1'=B1:P1:T1'

    R2:T2:T2'=B2:P2:T2'

    R1=B1:P1:T1'

    R2=B2:P2:T2'

    and since flange position is the same R1=R2=R

    therefore it must be that B1*P1*T1'=B2*P2*T2'

    so if we know everything else we can compute one of the values, for example P2.

    to isolate P2, we need to get rid of B2 from the left, as well as T2 from the right.

    since e cannot divide, we need to use multiplication by inverse and always from the correct side.

    also for this to stay an equation, any operation we do, must be performed to both sides of it.

    B2'*(B2*P2*T2')*T2=B2'*(B1*P1*T1')*T2

    (B2'*B2)*P2*(T2'*T2)=B2'*B1*P1*T1'*T2

    I*P2*I=B2'*B1*P1*T11*T2

    P2=B2'*B1*P1*T1'*T2

    then expressing that in KRL that would be something like this:

    xP2=inv_pos(base_data[2]):base_data[1]:xP1:inv_pos(tool_data[1]):tool_data[2]

    that is a general form and if the bases are same

    B1=B2 then

    B2'*B1 = B2'*B2=I

    therefore

    inv_pos(base_data[2]):base_data[1] = I

    and this reduces to

    xP2=xP1:inv_pos(tool_data[1]):tool_data[2]

    and if the tool is the same

    inv_pos(tool_data[1]):tool_data[2] = I

    and this reduces to

    xP2=inv_pos(base_data[2]):base_data[1]:xP1

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download