Converting from rotation matrices to axis angle at $\pi$

4.1k Views Asked by At

This formula converts rotation matrices to axis angle form:

$$\large \vec{r}=\frac{1}{2\sin{\theta}}[(r_{32}-r_{23})\hat{i}+(r_{13}-r_{31})\hat{j}+(r_{21}-r_{12})\hat{k}]$$

However it is undefined at $\pi$ and $-\pi$ . So is there any other formula for this special case? Thanks in advance!

1

There are 1 best solutions below

5
On BEST ANSWER

In this case one should directly calculate the axis of rotation represented by the unit vector $v$ from Rodrigues formula for a rotation matrix $R$

$R=I+\sin(\theta)S(v)+(1-\cos(\theta))S^2(v)$

where $S(v)$ is a skew-symmetric matrix assigned to the vector $v$

$S(v)=\begin{bmatrix} 0 & -v_z & v_y \\ v_z & 0 & -v_x \\ -v_y & v_x & 0 \end{bmatrix}$

One can check that additional relation $S^2(v)=vv^T-I$ is fulfilled and taking this into account and $\theta=\pi$ we obtain $R=I+2(vv^T-I)$ and then $vv^T=(R+I)/2$.

Having $vv^T=\begin{bmatrix} v_x^2 & v_y v_x& v_zv_x \\ v_xv_y & v_y^2& v_z v_y\\ v_x v_z & v_y v_z & v_z^2 \end{bmatrix}$ we can calculate $v = [ v_x \ \ v_y \ \ v_z]^T $.