Skip to the content.

Useful Notes and Equations

For a comprehensive and thorough summary of the theory, check MuChenSun’s wonderful note here.

My own notes:

fig_3_1.png

fig_3_2.png

fig_3_3.png

fig_3_4.png

fig_3_5.png

fig_3_6.png

Useful Equations:

For \(R = \text{Rot}(\hat{v}_{i},-90^{\circ})\), if:

  1. \(R^{\prime}_{ab} = RR_{ab}\), then the rotation is about \(\hat{v}_{a}\) (in frame {a});
  2. \(R^{\prime}_{ab} = R_{ab}R\), then the rotation is about \(\hat{v}_{b}\) (in frame {b}).

Adjacent Common Subscripts Cancellation Rule: if two subscripts are adjacent and common, then they can be cancelled. This rule applies to the product of two rotation matrix and the product of one rotation matrix with a vector.

Matrix Exponentials \(\hat{\omega}\theta = \vec{v} = \frac{1}{\lvert v \rvert} \begin{bmatrix} \frac{v_{1}}{\lvert v \rvert} \\ \frac{v_{2}}{\lvert v \rvert} \\ \frac{v_{3}}{\lvert v \rvert} \\ \end{bmatrix}\)

Adjoint representation formula: \(\left[\text{Ad}_{T}\right] = \begin{bmatrix} R & 0 \\ [p]R & 0 \\ \end{bmatrix} \in \mathbb{R}^{6\times6}\)


Textbook Exercises Attempts

Exercise 3.1 In terms of the \(\hat{x}_{s}\), \(\hat{y}_{s}\), \(\hat{z}_{s}\) coordinates of a fixed space frame {s}, the frame {a} has its \(\hat{x}_{a}\)-axis pointing in the direction (0,0,1) and its \(\hat{y}_{a}\)-axis pointing in the direction (−1,0,0), and the frame {b} has its \(\hat{x}_{b}\)-axis pointing in the direction (1, 0, 0) and its \(\hat{y}_{b}\)-axis pointing in the direction (0, 0, −1).

fig_3_7.png

\(p^{\prime}\) should be interpreted as moving the location of the point without changing the reference frame. The reason is that the two adjacent subscripts are \(b\) and \(s\), which aren’t common and therefore cannot be canceled. \(p^{\prime\prime}\) should be interpreted as changing coordinates from {s} to {b} frame without moving the point \(p\). The reason is that the two adjacent subscripts are common and can therefore be canceled. This cancellation indicates coordinate change.

Exercise3.2 Let \(p\) be a point whose coordinates are \(p=\left( \frac{1}{\sqrt{3}},-\frac{1}{\sqrt{6}},\frac{1}{\sqrt{2}}\right)\) with respect to the fixed frame \(\hat{x}-\hat{y}-\hat{z}\). Suppose that \(p\) is rotated about the fixed-frame \(\hat{x}\)-axis by 30 degrees, then about the fixed-frame \(\hat{y}\)-axis by 135 degrees, and finally about the fixed-frame \(\hat{z}\)-axis by −120 degrees. Denote the coordinates of this newly rotated point by \(p^{\prime}\).

Exercise 3.3 Suppose that \(p_{i} \in \mathbb{R}^{3}\) and \(p^{\prime}_{i} \in \mathbb{R}^{3}\) are related by \(p^{\prime}_{i} = Rp_{i},\text{where} i = 1, 2, 3\), for some unknown rotation matrix \(R\). Find, if it exists, the rotation \(R\) for the three input–output pairs \(p_{i} \Rightarrow p^{\prime}_{i}\), where: \(\begin{align} \begin{split} p_{1} &= (\sqrt{2}, 0, 2) \Rightarrow p^{\prime}_{1} = (0, 2, \sqrt{2}), \\ p_{2} &= (1,1,-1) \Rightarrow p^{\prime}_{2} = (\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}},-\sqrt{2}), \\ p_{3} &= (0, 2\sqrt{2}, 0) \Rightarrow p^{\prime}_{3} = (-\sqrt{2},\sqrt{2},-2) \\ \end{split} \end{align}\)

Easy question. Since \(R\left[p_{1}^{T}, p_{2}^{T}, p_{3}^{T}\right] = \left[(p^{\prime}_{1})^{T}, (p^{\prime}_{2})^{T}, (p^{\prime}_{3})^{T}\right]\), then \(R\) can be found if the inverse of the term exists: \(R=\left[(p^{\prime}_{1})^{T}, (p^{\prime}_{2})^{T}, (p^{\prime}_{3})^{T}\right]\left[p_{1}^{T}, p_{2}^{T}, p_{3}^{T}\right]^{-1}\).

Exercise 3.5 Find the exponential coordinates \(\hat{\omega}\theta \in \mathbb{R}^{3}\) for the SO(3) matrix \(\begin{bmatrix} 0 & -1 & 0 \\ 0 & 0 & -1 \\ 1 & 0 & 0 \\ \end{bmatrix}\)

Find \(\theta\) first by \(\begin{align} \begin{split} 1+2c_{\theta} &= \text{tr}(R)=0 \\ \theta&= \frac{2\pi}{3} \\ \end{split} \end{align}\)

Then find \(\hat{\omega}\) by \(\begin{align} \begin{split} 2s_{\theta} \begin{bmatrix} \omega_{1} \\ \omega_{2} \\ \omega_{3} \\ \end{bmatrix} &= \begin{bmatrix} r_{32} - r_{23} \\ r_{13} - r_{31} \\ r_{21} - r_{12} \\ \end{bmatrix} = \begin{bmatrix} 0-(-1) \\ 0-1 \\ 0-(-1) \\ \end{bmatrix} \\ \hat{\omega} &= \frac{1}{ 2s_{\frac{2\pi}{3}} } \begin{bmatrix} 1 \\ -1 \\ 1 \\ \end{bmatrix} = \frac{1}{\sqrt{3}}\begin{bmatrix} 1 \\ -1 \\ 1 \\ \end{bmatrix} \\ \end{split} \end{align}\)

The exponential coordinate \(\hat{\omega}\theta\) can therefore be found as \(\begin{align} \begin{split} \hat{\omega}\theta &= \left( \frac{2\pi}{3} \right) \left( \frac{\sqrt{3}}{3} \begin{bmatrix} 1 \\ -1 \\ 1 \\ \end{bmatrix}\right)\\ \end{split} \end{align}\)

Exercise 3.16 In terms of the \(\hat{x}_{s}, \hat{y}_{s}, \hat{z}_{s}\) coordinates of a fixed space frame {s}, frame {a} has its \(\hat{x}_{a}\)-axis pointing in the direction \((0,0,1)\) and its \(\hat{y}_{a}\)-axis pointing in the direction \((−1, 0, 0)\), and frame {b} has its \(\hat{x}_{b}\)-axis pointing in the direction \((1, 0, 0)\) and its \(\hat{y}_{b}\)-axis pointing in the direction \((0, 0, −1)\). The origin of {a} is at \((3,0,0)\) in {s} and the origin of {b} is at \((0,2,0)\) in {s}.

fig_3_8.png

fig_3_9.png

By the drawing above, \(T_{1}\) corresponds to a rotation about \(\hat{x}_{a}\) of \(-90^{\circ}\) plus a translation about \(\hat{y}_{a}\) of \(2\) units. This behaviour is predicted by the adjacent subscripts cancellation rule.

\[\begin{align} \begin{split} T_{2} &= TT_{sa}\\ &=\begin{bmatrix} 0 & -1 & 0 & 3 \\ 1 & 0 & 0 & 2 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}\\ \end{split} \end{align}\]

fig_3_10.png

By the drawing above, \(T_{2}\) corresponds to a rotation about \(\hat{x}_{s}\) of \(-90^{\circ}\) plus a translation about \(\hat{y}_{s}\) of \(2\) units. This behaviour is predicted by the adjacent subscripts cancellation rule.

Truncate the meaningless last row of the vector, we have

\[p_{s} = \begin{bmatrix} 1 \\ 5 \\ -2 \\ \end{bmatrix}\]

\(p^{\prime}\) should be interpreted as moving the location of point \(p_{s}\) without changing the reference frame, because the two adjacent subscripts are not common and cannot be cancelled.

\[\begin{align} \begin{split} p^{\prime\prime} &= T_{sb}^{-1}p_{s}\\ &= T_{bs}p_{s}\\ &= \begin{bmatrix} 1 \\ -3 \\ 0 \\ \end{bmatrix}\text{last row truncated.}\\ \end{split} \end{align}\]

\(p^{\prime\prime}\) should be interpreted as changing the reference frame from {s} to {a} of point \(p_{s}\) without moving its location, because the two adjacent subscripts are common and can therefore be cancelled.

Then, using the adjoint representation formula, we have \(\left[\text{Ad}_{T_{sa}}\right] = \begin{bmatrix} 0 & 0 & 1 & \; & 0 & 0 & 0 \\ -1 & 0 & 0 & \; & 0 & 0 & 0 \\ 0 &-1 & 0 & \; & 0 & 0 & 0 \\ \,&\, &\, & \, &\, &\, &\, \\ 0 &-3 & 0 & \; & 0 & 0 & 1 \\ 0 & 0 & 0 & \; &-1 & 0 & 0 \\ 0 & 0 &-3 & \; & 0 &-1 & 0 \\ \end{bmatrix}\) Finally, we have \(\mathscr{V}_{a} = \begin{bmatrix} 1 \\ -3 \\ -2 \\ -9 \\ 1 \\ -1 \\ \end{bmatrix}\)

\[\begin{align} \begin{split} \theta &= \cos^{-1}\left(\frac{\text{tr}(R_{sa})-1}{2}\right)=\frac{2\pi}{3}, \\ [\hat{\omega}] &= \frac{1}{2\sin(\theta)}(R_{sa}-R_{sa}^{T}) = \frac{\sqrt{3}}{3} \begin{bmatrix} 0 & -1 & -1 \\ 1 & 0 & -1 \\ 1 & 1 & 0 \\ \end{bmatrix} \\ \end{split} \end{align}\]
%% Exercise 3.16
%% (i)
R_sa = [0 -1  0;
        0  0 -1;
        1  0  0];
theta = acos(-1/2);
skew_omega = 1/(2*sin(theta)) .* (R_sa - transpose(R_sa));

Now we need to find \(v\). From the formula we know that \(v=G^{-1}(\theta)p\). Therefore, we need to first find \(G^{-1}(\theta)\) using, \(\begin{align} \begin{split} G^{-1}(\theta) &= \frac{1}{\theta}I-\frac{1}{2}[\theta]+\left( \frac{1}{\theta} - \frac{1}{2}\cot\frac{\theta}{2} \right)[\omega]^{2} \\ &= \begin{bmatrix} 0.3516 & 0.2257 & 0.3516 \\ -0.3516 & 0.3516 & 0.2257 \\ -0.2257 & -0.3516 & 0.3516 \\ \end{bmatrix} \\ v &= G^{-1}(\theta)p \\ &= \begin{bmatrix} 1.0548 \\ -1.0548 \\ -0.6772 \\ \end{bmatrix} \end{split} \end{align}\)

Since \(\omega\) does not equal to 0, we know that \(\mathscr{S}\) is just the normalized \(\mathscr{V}\). Therefore we have \(\mathscr{S} = (0.5774, -0.5774, 0.5774, 1.0548, -1.0548, -0.6772) ^{T}\) The unit screw axis \(\hat{s}\) is simply \([0.5774, -0.5774, 0.5774]^{T}\). Then find \(h=\frac{\hat{\omega}^{T}v}{\dot{\theta}}=0.8271\).

I = eye(3);     
inv_G = 1/theta .* I - 1/2 .* skew_omega + ( 1/theta - 1/2 * cot(theta/2) ) .* skew_omega^2;
p = [3; 0; 0];
v = inv_G * p;
skew_S = [skew_omega v;
          0  0   0   0];
s_hat = [0.5774; -0.5774; 0.5774]; % by hand
omega_hat = s_hat;
h = transpose(omega_hat) * v;

Because in \(v=-\omega\times q + h \omega\) there is a cross product, we need to solve a system of equations. Rearrange the aforesaid equation as \(v-h\omega = -\omega\times q\). Let \(q=(a,b,c)^{T}\). Then we have, \(\begin{align} \begin{split} \begin{bmatrix} 0.5773 \\ -0.5773 \\ -1.1548 \\ \end{bmatrix} &= -\left\lvert \begin{array}{ccc} i & j & k \\ 0.5773 & -0.5773 & 0.5773 \\ a & b & c \\ \end{array}\right\rvert \\ \end{split} \end{align}\)

\[\left[ \begin{array}{ccc|c} 0 & 0.5773 & 0.5773 & 0.5773 \\ -0.5773 & 0 & 0.5773 & -0.5773 \\ -0.5773 & -0.5773 & 0 & -1.1548 \\ \end{array} \right] \Longrightarrow q = \begin{bmatrix} 1 \\ 1 \\ 0 \\ \end{bmatrix}\]

At last, the screw axis represented in \(\{q,\hat{s},h\}\) form is

\[\{q,\hat{s},h\} = \left\{\begin{bmatrix} 1 \\ 1 \\ 0 \\ \end{bmatrix}, \begin{bmatrix} 0.5774 \\ -0.5774 \\ 0.5774 \\ \end{bmatrix}, 0.8271 \right\}\]

Here is the actual MATLAB code:

%% (j)
s_theta = [0; 1; 2; 3; 0; 0];
omega_theta = [0; 1; 2];
v = [3; 0; 0];
theta = norm(omega_theta);
hat_omega = omega_theta ./ theta;
bracket_omega = [      0       -hat_omega(3)  hat_omega(2);
                  hat_omega(3)      0             0;
                 -hat_omega(2)      0             0;       ];
exp_omega_theta = eye(3) + sin(theta).* bracket_omega + (1-cos(theta)) ...
                  .* bracket_omega^2;
G = eye(3) .* theta + (1-cos(theta)).*bracket_omega + (theta-sin(theta))...
    .* bracket_omega^2;
exp_S_theta = [exp_omega_theta   G*v;
                0     0    0      1 ];

The final result is, \(e^{[\mathscr{S}]\theta} = \begin{bmatrix} -0.6173 & -0.7037 & 0.3518 & 2.3602 \\ 0.7037 & -0.2938 & 0.6469 & 4.3396 \\ -0.3518 & 0.6469 & 0.6765 & -2.1698 \\ 0 & 0 & 0 & 1.0000 \\ \end{bmatrix}\)