RoboDK Forum
Mat - Comau conversion question可打印版本

+- RoboDK Forum (//www.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN)
+--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API)
+--- Thread: Mat - Comau conversion question (/Thread-Mat-Comau-conversion-question)



Mat - Comau conversion question-Dagas-02-25-2020

Hi,
I'm using the RoboDK API for C#, while working with target poses, I had a conversion problem from Mat to Comau, I wanted to have the same order as in the RoboDK GUI for coordinates.

Code:
Mat targetPose = target.Pose();
double[] pos = targetPose.ToXYZRPW();
For example in my case
Code:
pos[] = {500, 400, 600, 180, 0, 0}

In RoboDK the first and third rotation are switched so I tried to use ToComau() instead of ToXYZRPW() but it does not simply switch the rotations resulting in this:
Code:
pos[] = {500, 400, 600, 0, 90, 180}

What I'm doing wrong?
Thanks in advance,
Dagas