General conversion between different coordinate system types (KUKA, Fanuc, ABB, etc)

  • Part 2


    To do frame arithmetic, frames do not really help! We need the transformation matrice.


    What do do?

    - let's call the reference coordinate system from previous post C

    - the Target Frame (or target coordinate sytem from previous post) coordinate system C1


    Checking the contents of Notepad we can (will) see:

    - translation (shift along the reference coordinate system - yellow part)

    - axes of the target coordinate system are divided into pieces of the reference coordinate system (blue part)


    By now we have a matrice with four columns and only three rows!

    For matrice multiplication we need a matrice 4x4


    The red marked row fullfill this requirement without changing the result of the matrice



    For this thread we are only have a look for the values in the blue field and there are some more restrictions:

    - coordinate system must follow the right hand rule (x:thumb, y: index finger; z: middle finger). There is also an easier way: draw x-axis horizonal, y-axis vertical (as learned at school) put a box with lower left corner to the origin of your xy-coordinate system and the upper left corner will show the z-direction (in my area z-axis would go up). You can check that by calculating the determint of the rotation matrice with a result of +1

    - the sum of x*x+y*y+z*z must be one; in word 1.0 - reason:radius of the sphere equals 1.0


    next part will be a closer look to the rotation matrice


    so long

  • AD
  • With the rotation matrix, is there ever a case where the bottom row would ever be anything but 0,0,0,1? I've heard of using this area to scale or skew a matrix, but never seen it in action.


    Also, what about left hand coordinate systems? I looked into using Unity to create a kinematic model of a robot, but found that it uses a left had coordinate system. Converting from right hand to left is pretty trivial for translations, but didn't look that easy for rotations. Like every other project I want to work on, I got swamped with work and it got put on the back burner.

    Check out the Fanuc position converter I wrote here!

  • The matrix shown in post #21 is actually a transformation matrix (includes the blue, yellow and red fields). The matrix consists of 4 rows and 4 columns [mat4x4 or SE(3)]


    The rotation matrix is only the blue part [mat, mat3x3 or SO(3)]. For scaling you would use a mat3x3 like [[sx, 0, 0], [0, sy, 0],[ 0,0,sz]]


    The 4th row must always be 0,0,0,1! Otherwise there will be a different result.


    Left hand rule:

    Instead of using the right hand use the left hand (x:thumb, y: index finger; z: middle finger)


    Result:

    2 axes match, 3rd axis in opposite direction


    pictures in one of the next parts

  • Part 3


    There are different ways to draw a coordinate system. Here is the example on how I do it



    Adding up the squares in a row or column the result must be 1


    Coordinate System follow which rule ? Right Hand Rule (RHR) or Left Hand Rule (LHR)




    By comparing the coordinate systems K0-K1 and KO-K2 the rotation matrices are created and then checked for RHR or LHR.


    In order t create a LHR out of RHR you need to inverse either one or all axes

  • Part 4


    Elementary rotations

    In the past we created a rotation matrix by comparing the target coordinate system with the reference coordinate system.


    This time we will use another way to create this matrices


    X- Rotation:

    The x rotation is not changing the position of the x-axis (shown as red numbers).

    According to the tool kit:

    x: out (positive rotation direction CCW); y: right ;z: up


    2nd column: projection of y'-axis to y-axis (cos(angle) and z-axis (sin(angle))

    3rd column: projection of z'-axis to z-axis (-sin(angle) and z-axis (cos(angle))



    Y- Rotation:

    The y rotation is not changing the position of the y-axis (shown as red numbers).

    According to the tool kit:

    y: in (positive rotation direction CW); x: right ;z: up


    1st column: projection of x'-axis to x-axis (cos(angle) and z-axis (-sin(angle))

    3rd column: projection of z'-axis to x-axis (sin(angle) and z-axis (cos(angle))



    Z- Rotation:

    The z rotation is not changing the position of the z-axis (shown as red numbers).

    According to the tool kit:

    z: out (positive rotation direction CCW); x: right ;y: up


    1st column: projection of x'-axis to x-axis (cos(angle) and y-axis (sin(angle))

    2nd column: projection of y'-axis to x-axis (-sin(angle) and y-axis (cos(angle))


    Now the bad news:

    For combined rotations you have to use matrix multiplications and this has to be done in a certain sequence


    Good news:

    There are only 24 combinations

  • Part 5


    In my last part I promised you 24 combinations, here they are



    As technician I always start with the worst case scenario.


    Taking the gray ones out will end up with 12 combinations!

    (they are just the inverse of the blue or orange ones)


    So, take the blue or orange ones and just put the calculated angles in reverse order (instead of a1,a2 and a3 just bring them up as a3, a2 and a1)


    After I checked all the conversions there will another reduction - more in the next part


    By the way: if you find any errors - keep them - I have plenty of them

  • Sorry, I'm a bit late to the party, but if you install RDK you will get our Python library where you can find the algorithms/code we use to convert from one Euler format to the other.

    C:/RoboDK/Python/robodk.py


    Ctrl-F -> "def Pose_2_"

    You will find Pose_2_ABB, Pose_2_Kuka, etc.
    And pose to Pose_2_TxyzRxyz


    Hope it helps.


    Jeremy

    RoboDK - Simulation and Offline programming software for industrial and collaborative robots.

    Visit us at RoboDK.com
    Take a look at our tutorial videos on our YouTube channel.

  • Final Report - Part 1


    For me it was very interesting to find an answer for the question


    So, here's a question: is there a general-use tool for converting coordinates from any robot brand to any other? XYZ is obviously XYZ, but every brand uses a different Euler angle sequence -- KUKA uses Rz-Ry'-Rx", Fanuc uses Rx-Ry'-Rz", Kawasakis use (used to use?) Rz-Ry'-Rz", and of course ABB uses quaternions....

    There is actually no tool to answer ALL of your questions


    In fact, I'd be even more interested in a set of algorithms, or even a useable rule set, that I could use to write a script of my own, and/or could implement at will in different languages. A simple tool would be nice, but the ability to write my own reliable converter would be best. Especially when some obscure or new brand shows up that uses a completely unique Euler sequence (given that there are over 30 different valid Eulers....)

    In one of these posts you will find an algorithm to solve all of your problems

    (I also would like to understand why and how)

    I've seen some books lay out the formulae for converting a particular robot's coordinates to/from a matrix, and I know that doing so is a key part of doing the conversion, but every book only ever concentrates on a single "brand" of coordinates. I've never seen the conversion process all assembled and explained across all types.

    so, here is the answer to the question:



    Key is the Rotation Matrix


    In Final Report - Part 2

    I will show you the results


    In Final Report - Part 3

    I will give you some useful links


    Afterwards Thread from my side is closed

    (I will answer questions)

  • In Final Report - Part 2



    checking for needed transformation matrices and made the calculations

    results as expected


    Now the idea


    For one robot the transformation matrix will be created

    This transformation matrix then will be used to calculate the poses for the other robots


    And here are the results:




    For new robots check what type of transformation matrix is used (maybe already available) and the routtine for recalculating the angles

  • For all:

    I have a little queston:


    I set angle rot.y to 180.0 degrees



    What is the answer you get?


    This information would be very helpful and also the name of the rotations (rot.z e.g. (KUKA "A", ABB "EZ")


    Thank You very much in advance

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now