Professional Documents
Culture Documents
ROBOTICS LABSHEET-5
ROBOTICS LABSHEET-5
4)Find R = eul2r(0.1,-0.2,0.3)
Find tr2eul(R)
ANS)
R = eul2r(0.1,-0.2,0.3)
disp("Convert eulerian angles to rotational matrix:")
disp(R)
angles = tr2eul(R)
disp("Convert back to orthogonal angles");
disp(R);
orthogonality_check = R * R';
rounded_check = round(orthogonality_check, 10);
is_orthogonal = isequal(rounded_check, eye(3));
disp(is_orthogonal);
Observation:
The `eul2r` function in MATLAB converts a set of Euler angles into a
rotation matrix \( R \). This matrix \( R \) represents the same
rotation described by the Euler angles. The `tr2eul` function takes the
rotation matrix \( R \) and converts it back into Euler angles. To verify
the orthogonality of \( R \), one checks if \( R \cdot R^T \) equals the
identity matrix \( I \).
An interesting observation is that when one of the Euler angles is
changed to a negative value, the resulting rotation matrix is different.
Furthermore, when using `tr2eul` to convert this new rotation matrix
back into Euler angles, the regenerated angles may not match the
original ones. This discrepancy arises due to the periodic nature of
Euler angles and the fact that the `tr2eul` function restricts its output
to the range from \(-\pi\) to \(\pi\). As a result, different sets of Euler
angles can correspond to the same physical rotation. This means that
although the numerical values of the angles may differ, they still
represent the same orientation in space.