as_euler() returns intrinsic Euler angles for sequence (see
robot_rotation()); the middle angle lies in \([-\pi/2, \pi/2]\) for
Tait-Bryan sequences and \([0, \pi]\) for proper Euler sequences, and
the outer angles lie in \([-\pi, \pi)\). At gimbal lock only the sum
or difference of the outer angles is determined; the third (last)
angle is then set to zero. as_axis_angle() returns
a list with a unit axis and angle in \([0, \pi]\); the axis is
c(0, 0, 1) for the identity. as_rotvec() returns
\(\theta u\). For planar rotations as_axis_angle() returns the
signed angle.
Examples
R <- robot_rotation(euler = c(0.3, -0.2, 0.1), sequence = "ZYX")
as_euler(R, "ZYX")
#> [1] 0.3 -0.2 0.1
as_axis_angle(R)
#> $axis
#> [1] 0.3378807 -0.4807199 0.8091632
#>
#> $angle
#> [1] 0.3815648
#>