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

• 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....

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....)

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.

• ## Jump to the most helpful post

• As far as I know, no. I'd be interested in something like that though.

There is this tool by Windsor Technologies. Down side is that it is closed source, and it only works with ABB, Kuka, and Fanuc.

I find as long as you can convert whatever brands flavor of orientation representation to a rotation matrix, you are good. Going from a rotation matrix to another flavor of orientation is usually not too bad.

Check out the Fanuc position converter I wrote here! Now open source!

Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

• The key would be the rotation matrice

Depending on the sequence of rotations there are different ways on how to interpret the individual values of the rotatation matrices.

A helpful tool would be python using the sympy module as a start in order to get the sympolic rotation matrice.

KUKA is using rot.z(A) rot.y'(B) rot.x"(C)

I order to reverse the sequence to get rot.x(C) rot.y(B) rot.z(A) you just have to transpose the first matrice

I will try to create the program you are asking for and will share my results (maybe just to get punished) or somebudy find it useful

I will not start with euler angles but cardan (also called Tait-Bryan) angles

• I will try to create the program you are asking for and will share my results (maybe just to get punished) or somebudy find it useful

Cool!

I will not start with euler angles but cardan (also called Tait-Bryan) angles

Well, T-B angles are a particular subset of Euler angles, aren't they? Been a long time since I read up on them, but IIRC a T-B is an Euler that doesn't repeat any axes. So KUKA and Fanuc would be T-B, but Kawasaki (Rz-Ry'-Rz") would not be (but would still be an Euler).

• RoboDK also shows the different calculations

Yeah, I was thinking I'd use RoboDK to check my work.

Although... I could have sworn ABBs did X-Y'-Z", like Fanuc, instead of KUKA-Style. Although anything important in ABB is all Quaternions, so... hm, does the Euler sequence make a difference with Quats?

• One person thought to call everything euler angles (until now I could not figure out who)

Basic difference between euler and Cardan or T-B:

as you mentioned:

euler angles rotate

(Rz-Ry'-Rz")

around two axes (you example (first rotation Rz and last rotation Rz))

Cardan or T-B angles rotate

X-Y'-Z"

all three axes

So later on they came up with the stupid idea:

all rotations are euler angles (even the basic rotations)

but

real euler rotations are called now proper euler rotations

Cardan or T-B rotions are called now extended euler rotations

To me it looks like one professor just wanted to get rid of a couple of students (this guy invented the new name) and ask: what rotations are euler rotations?

You can choose any answer but you would not pass the test

History:

Cardano was born 1501

Euler represent his results 1785

T-B came later

• My first results with a short explanation

The former picture was not correct (Extrensic) for our thread!

This the basics of calculating the angles for the different robots

The symbolic transformation matrice was created using sympy in a python script.

How to read it:

s: sine

c: cosine

1: first rotation

2: second rotation

3: third rotation

• This is an example of the calculation

Step 1:

create the rotation matrice

Step 2:

check symbolic rotation matrice for the robot you want to calculate the angles

Step 3:

do the calculations

(hint: in KUEWEG.SRC check MAT_TO_RPY)

Next will be ABB and other robots (more information needed)

I hope this helped so far

• @SkyFire

answer to your post #7

In accordance to this video Fanuc (and ABB) using the rotation as shown in this table

Euler sequence make a difference with Quats, see example

gives the result

q1 = 0.80670746 q2 = 0.53898536 q3 = -0.19617472 q4 = 0.14224392 (first command)

q1 = 0.80670746 q2 = 0.14224392 q3 = -0.19617472 q4 = 0.53898536 (second command)

(the blue line is the correct one)

• I was using RoboDK to get all the angles given by a comau robot (Z->Y'->Z'') and transformed for other robot types.

In a first step create a routine which creates a rotation matrice for the specific angle rotation sequence.

There is a difference ZYX (intrinsic) and XYZ (extrinsic)

If you start with fanuc angles you just need to transpose the matrice and you have the matrice you need to calculate the angles for the other robots

• In most of the documentation you will find a "square root" being involved. This means that you have to calculate two sets of angles.

The way introduced here will give you only one set of angles. Starting with the first rotation the other two angles will be computed by taking the first angle into account.

The lines with blue and red characters are just to double check that the correct data used

• The feedback was not as expected.

My conclution:

Everyone knows everything, so I will close my channel on that, no more suggestions or examples

• No, don't do that! I've just been buried enough that I haven't been able to sit down and really dig into your results.

• Updated version of rotation matrices

robot-forum.com/attachment/32885/

Z->Y'->X''

is the rotation sequence rot.z(A)*rot.y'(B)*rot.x(C)

X->Y->Z

you have to transpose the X->Y'->Z'' rotation matrice with the angles negated

r = (rot.x(-A)*rot.y(-B)*rot.z(-C)).T

or take the Z->Y'->X'' rotation matrice and do the same angle calculation

(reversed order)

Z->Y'->Z''

is the rotation sequence rot.z(Z0)*rot.y'(Y)*rot.z''(Z1)

## Images

• Example

For the angle calculation the same contents of the rotation matrice is used

(calculated from one angle set using the corresponding rotation matrice)

post #14 shows how to calculate the euler angles Z0,Y, Z1

KUEWEG.SRC (check MAT_TO_RPY) shows how to calculate the T-B angles A,B,C

(for Fanuc and Motoman in reversed order)

This way of doing the angle calculation also handels the gimbal lock

With 4 routines:

2 calculations of the rotation matrice

2 calculations of the angle values

ABB, KUKA, Nachi, Fanuc, Motoman, Adept, Comau and Kawasaki are covered

• Part 1

Because of all the feed back I've got probably a revision course (repetitorium) would be helpful

So, let's start with the basics as mentioned in post #1 of this thread

In robotics we talk a lot about frames, positions or poses.

This picture shows how a frame could be interpreted:

The yellow arrow starts at the origin of the reference coordinate system (the tiny one) and ends at the origin of the Target frame. The shift in x, y and z is marked yellow (300,0,400) in the Notepad.

(this is common to most robots)

The blue marked stuff in Notepad (whole bunch of numbers) is not (very) clear to most of us. These numbers in the blue rectangle are called rotation matrice and defines the rotation between reference coordinate system and coordinate system of the Target Frame (or vice versa - who knows)

So, most of the robot manufacurer start their movements with:

x 300.0, Y 0.0, Z 400.0 (just to follow the example)

By know you should understand three out of six numbers: we already made 50% of the definition of a frame

will be cont'd

## 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!
Sign in
Already have an account? Sign in here.