# How to obtain end effector orientation angles respect to the global reference/fixed reference axes X0, Y0 and Z0?

12 views (last 30 days)
NICOLÒ MOSCHINI on 1 Feb 2021
Answered: Yiping Liu on 3 Feb 2021
I'm working on a PUMA 560 manipulator. My purpose is to control the manipulator in order to reach a given position and orientation of the end effector. I want to define the desired orientation by using a serie of three rotations around the global reference axes, namely around X0 axis, Y0 axis and then Z0 axis. During the control loop I need to determine the current value of these three angles, how can I do it? I need this representation because the angular velocities obtained by this formula:
are respect to the global reference axes. I need to know these velocities in the control loop, also because I want to determine the end effector orientation angles by interpolation, in this way i will avoid the Euler angles discontinuity (but I'm still using an intutive representation), but I need to determine in some way the initial values of these three angles.
The Robotic System Toolbox has functions as 'tform2eul' or 'rotm2eul', but the obtained angles are computed by using Euler representations, so rotations around a local reference. If the rotation matrix obtained by using the Euler ZY'X'' convention is equal to the one obtained by using Roll-Pitch-Yaw convention (namely, a serie of rotations around X0, Y0 and Z0 axes and about the same angles), can I obtain Roll-Pitch-Yaw angles by using the function 'angles=tform2eul(T,'ZYX')' and by considering Roll=angles(3), Pitch=angles(2) and Yaw=angles(1)? Is it right or is wrong? Thank you so much for your time.

Yiping Liu on 3 Feb 2021
In general, the intrinsic rotations Z−Y′−X'' by angles γ, β, α are equivalent to the extrinsic rotations X−Y−Z by angles α, β, γ i.e. the Roll-Pitch-Yaw angles.
tform2eul by default returns ZYX angles (Z-Y'-X'' in that order) that represents an intrinsic rotation - so the solution you proposed is correct.

R2020b

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!