Calculating TCP

  • Hi all,


    How compute TCP from 4 different point:


    Measured P1{ X -1212.375 ,Y 3785.411, Z 1180.433, A -0.93, B 47.263, C -92.214}
    Measured P2{ X -1150.558 ,Y 3911.037, Z 1180.013, A 48.827, B 47.309, C -92.209}
    Measured P3{ X-1464.654 , Y 3785.021, Z 1163.455, A 28.075, B -2.869, C -106.945}
    Measured P4{ X -1283.76 , Y 3676.609, Z 1132.282, A -26.651, B 20.973, C -71.511}


    I know how compute center of sphere, But I get :


    {X-1316,739144363, Y 3913,6685403798,Z 845,4296028114 }, this is reference point of measure, but I need compute relative to the Flange system


    KUKA compute:
    {X 175.143,Y 301.955, Z 139.15}


    How get these result mathematically?


    Robot: KUKA KR210

    Edited once, last by ambersat ().

  • I assume you already did sanity checks and verified that points are on sphere etc.


    what do you get if you use
    INV_POS(P1):PC


    where PC is frame with your computed sphere center

    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


  • I assume you already did sanity checks and verified that points are on sphere etc.


    what do you get if you use
    INV_POS(P1):PC


    where PC is frame with your computed sphere center


    Hi,


    {POS: X 173.8236, Y 300.3997, Z 138.2551, A -47.26606, B 6.962621E-01, C 91.50240},


    This is great, but how to get this answer mathematically?

  • Take a look at the german robot forum:


    http://www.roboterforum.de/rob…r/11462/msg55090#msg55090


    Calculate the flange orientation matrices and flange positions from the four flange frames:


    R_1 * t + r_1 = P with orientation matrix R_1 = R_1(A_1, B_1, C_1) and position r_1 = [X_1, Y_1, Z_1]^(T)
    R_2 * t + r_2 = P with orientation matrix R_2 = R_2(A_2, B_2, C_2) and position r_2 = [X_2, Y_2, Z_2]^(T)
    R_3 * t + r_3 = P with orientation matrix R_3 = R_3(A_3, B_3, C_3) and position r_3 = [X_3, Y_3, Z_3]^(T)
    R_4 * t + r_4 = P with orientation matrix R_4 = R_4(A_4, B_4, C_4) and position r_4 = [X_4, Y_4, Z_4]^(T)


    The vector t = [X_TCP, Y_TCP, Z_TCP] is the unknown TCP and the point P is the reference point used by the XYZ 4-point method.
    Rearrange the equations and eliminate the reference point P:


    R_1 * t + r_1 = R_2 * t + r_2
    R_1 * t + r_1 = R_3 * t + r_3
    R_1 * t + r_1 = R_4 * t + r_4


    Rearrange:


    [R_1 - R_2] [r_2 - r_1]
    [R_1 - R_3] [ t ]= [r_3 - r_1]
    [R_1 - R_4] [r_4 - r_1]


    9x3 3x1 9x1


    Solve the overdetermined system of the form A x = b. Good luck :zwink:


    Bye Puck

  • Here is some code I wrote for a C# application. It may not be super helpful given the language you're working in but here's hoping.

  • http://www.convertalot.com/sphere_solver.html


    and btw, one can right click on page and view source to see Java code:


    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

  • I was able to calculate the center of the sphere, but I can't use this point to get the TCP .

    {X 446.54, Y 47.42,Z 361.08 }, this is reference point (the center of the sphere), but I need compute relative to the Flange system which is { X 91.818 , Y -1.55 ,Z 215.789 } computed by KUKA


    THANK YOU

    Edited once, last by fares f ().

  • Quote

    relative to the Flange system witch is { X 91.818 , Y -1.55 ,Z 215.789 }

    that is a witch...

    to do a transform, it is not enough to know flange translation, one also needs flange orientation.

    translation is only a vector indicated by X,Y,Z. orientation is defined by angles A,B,C.


    orientation angles are needed to form 3x3 rotational matrix which is key part of the general transform.

    transform combines rotation matrix and translation into 4x4 matrix. multiplication by this 4x4 matrix is what KUKA calls geometric operator etc.



    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

  • that's what i did .i have my own forward kinematics and it works good (same results as those for KUKA).

    and as i told you i got the reference point which is the center of sphere by 4 point method . all what i need now is how to Get the average inverse transformation from center of sphere to A6 flange.


    thank you .

  • Herse some more C# but it should be pretty easy to read.

    point has 3 elements XYZ, origin has 6 elements XYZABC, and return has 3 elements XYZ

    GetRange is taking a subset of a 1D array.

    MatNeg is negating a matrix.

    MatToRot is getting A,B,C values from a rotation matrix.

  • you need angles

    Quote

    that's what i did ....all what i need now is how to Get the average inverse transformation from center of sphere to A6 flange.



    not that i can see, your post only shows translation (X,Y,Z):


    Quote

    {X 446.54, Y 47.42,Z 361.08 }, this is reference point (the center of the sphere), but I need compute relative to the Flange system which is { X 91.818 , Y -1.55 ,Z 215.789 }


    if center of sphere is at {X 446.54, Y 47.42,Z 361.08 }

    and flange is at { X 91.818 , Y -1.55 ,Z 215.789 }

    you get infinite number of solutions because robot can rotate about center of the flange so that center would still be at { X 91.818 , Y -1.55 ,Z 215.789 } but orientation angles would be different.


    if you want to know how to get from flange to center of sphere it is important to know the flange orientation.

    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