DCM.to_axisangle
DCM.to_axisangle() → Tuple[ndarray, float] : Return axis-angle representation of the DCM.
code
Defining a *rotation matrix* :
The axis-angle representation of is obtained with:
for the **rotation angle**, and:
for the **rotation vector**.
Note
The axis-angle representation is not unique since a rotation of
about is the same as a
rotation of about .
Returns:
: - **axis** (*numpy.ndarray*) – Axis of rotation.
- **angle** (*float*) – Angle of rotation, in radians.
Examples
```defaultR = DCM(rpy=[10.0, -20.0, 30.0]) R.view() DCM([[ 0.92541658, -0.31879578, -0.20487413], [ 0.16317591, 0.82317294, -0.54383814], [ 0.34202014, 0.46984631, 0.81379768]])
R.to_axisangle() (array([ 0.81187135, -0.43801381, 0.38601658]), 0.6742208510527136) ```