Robots in Architecture Forum

KUKA|prc - parametric robot control for Grasshopper => Support => Topic started by: Matt Johnson on February 19, 2019, 01:10:34 AM

Title: X Y Z A B C to grasshopper plane
Post by: Matt Johnson on February 19, 2019, 01:10:34 AM
I'm trying to move my Kuka to a position in space, record it's Actual Position (X Y Z A B C), and then make a plane in Grasshopper to match that position so I can return to it in future programs.  XYZ is straightforward enough, but can anyone shed light on how ABC translates the axes of a plane? I've tried simply rotating a World XY plane around the World Z,Y, and X axes in turn, but that doesn't work.  Thanks for any thoughts!
Title: Re: X Y Z A B C to grasshopper plane
Post by: lim_zhang on February 19, 2019, 09:25:10 AM
google euler angle
Title: Re: X Y Z A B C to grasshopper plane
Post by: Johannes @ Robots in Architecture on February 19, 2019, 12:37:17 PM
Hello,

Take care that the transformations need to be in the right order and depend on each other.
So if you rotate around one axis, the next rotation axis usually gets transformed as well.
I'm not on my development PC at the moment so I cannot look at the code right away unfortunately. Just remember that KUKA|prc by default uses X as the tool axis.

Best,
Johannes
Title: Re: X Y Z A B C to grasshopper plane
Post by: Johannes @ Robots in Architecture on February 19, 2019, 12:39:47 PM
I found a useful file that I made a while ago, see attached.
Note that there isn't just one solution, so if the values don't match up it might still be correct.

Best,
Johannes
Title: Re: X Y Z A B C to grasshopper plane
Post by: Matt Johnson on February 22, 2019, 06:00:38 PM
Thanks for the script Johannes, it works perfectly!  I didn't realize that I had to do the B and C rotations around the transformed axes from the previous rotation. 

Title: Re: X Y Z A B C to grasshopper plane
Post by: Johannes @ Robots in Architecture on February 22, 2019, 06:01:45 PM
Great!