NivaarExam PrepOfficial exam papers ↗

22-Mec-B12 Robotics · December 2018

Question 3 of 7: Frame diagram and the transform relating two frames through a graph (20 marks)

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

Paper format. National Exams, December 2018 — 16-Mec-B12 Robotics. Closed book, three hours, one 8.5″×11″ two-sided formula sheet and an approved Casio or Sharp calculator permitted. Seven questions, each of equal value (20 marks); the rubric states that five questions constitute a complete paper and that only the first five in the answer book are marked. As a study resource all seven are solved here. Marks shown in parentheses are the printed sub-part values.

Notation. The paper's own nomenclature is used throughout: $\hat{X}_A,\hat{Y}_A,\hat{Z}_A$ are the unit vectors of frame $\{A\}$; a leading superscript as in ${}^{A}V$ names the frame the vector is referenced to; and ${}^{B}_{A}T$ is the transform of frame $\{A\}$ expressed relative to $\{B\}$. This is Craig's convention, so Craig's modified (distal) Denavit–Hartenberg parameters are used for the link tables.

Reference texts.

Question 3: Frame diagram and the transform relating two frames through a graph (20 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given. Three homogeneous transforms tying four frames $\{U\}$, $\{A\}$, $\{B\}$ and $\{C\}$ together; the rotation blocks are 3-decimal roundings of exact rotations.

Given data
TransformRotationTranslation
${}^{U}_{A}T$$R_Z(30^\circ)$$[11,\ -1,\ 8]^{T}$
${}^{B}_{A}T$$R_X(30^\circ)$$[0,\ 10,\ -20]^{T}$
${}^{C}_{U}T$$R_X(30^\circ)R_Z(30^\circ)$$[-3,\ -3,\ 3]^{T}$

Find. (a) the frame diagram, and (b) the transform of $\{C\}$ relative to $\{B\}$.

T of {A} rel. {U}T of {A} rel. {B}T of {U} rel. {C}unknown: {C} rel. {B}{U}{A}{B}{C}arrow tail = reference frame, arrow head = described frame
Figure 3.1 — part (a): the frame diagram. Each solid arrow is one of the given transforms, drawn from the reference frame to the described frame; the dashed arrow is the unknown ${}^{B}_{C}T$. Traversing an arrow backwards means using the inverse.

Approach. Draw the graph, read off a path from $\{B\}$ to $\{C\}$, and chain the transforms along it, inverting whenever the path runs against an arrow.

  1. Build the graph (part a). Each given transform is one edge. ${}^{U}_{A}T$ points $\{U\}\!\rightarrow\!\{A\}$, ${}^{B}_{A}T$ points $\{B\}\!\rightarrow\!\{A\}$ and ${}^{C}_{U}T$ points $\{C\}\!\rightarrow\!\{U\}$. Only one route joins $\{B\}$ to $\{C\}$: $\{B\}\rightarrow\{A\}\rightarrow\{U\}\rightarrow\{C\}$, of which the last two legs are travelled against the arrows.
  2. Write the chain (part b). Following the route and inverting the two reversed edges, $$ {}^{B}_{C}T = {}^{B}_{A}T\ {}^{A}_{U}T\ {}^{U}_{C}T = {}^{B}_{A}T\left({}^{U}_{A}T\right)^{-1}\left({}^{C}_{U}T\right)^{-1}. $$ The mnemonic is that adjacent sub/superscripts cancel: $B\!-\!A$, $A\!-\!U$, $U\!-\!C$ leaves $B\!-\!C$.
  3. Invert the two edges in closed form. Using $[\,R^{T}\ |\ -R^{T}p\,]$ again, $$ {}^{A}_{U}T = \begin{bmatrix} 0.866 & 0.5 & 0 & -9.026 \\ -0.5 & 0.866 & 0 & 6.366 \\ 0 & 0 & 1 & -8 \\ 0 & 0 & 0 & 1\end{bmatrix}, \qquad {}^{U}_{C}T = \begin{bmatrix} 0.866 & 0.433 & 0.25 & 3.147 \\ -0.5 & 0.75 & 0.433 & -0.549 \\ 0 & -0.5 & 0.866 & -4.098 \\ 0 & 0 & 0 & 1\end{bmatrix}. $$ For example the first translation follows from $-R_Z^{T}(30^\circ)[11,-1,8]^{T} = -[9.026,\,-6.366,\,8]^{T}$.
  4. Collapse the last two factors first. Multiplying right to left keeps the intermediate result meaningful — ${}^{A}_{C}T$ is the camera frame seen from $\{A\}$: $$ {}^{A}_{C}T = {}^{A}_{U}T\ {}^{U}_{C}T = \begin{bmatrix} 0.5000 & 0.7500 & 0.4330 & -6.5752 \\ -0.8660 & 0.4330 & 0.2500 & 4.3171 \\ 0 & -0.5000 & 0.8660 & -12.0980 \\ 0 & 0 & 0 & 1 \end{bmatrix}. $$
  5. Premultiply by ${}^{B}_{A}T$ to finish. $$ {}^{B}_{C}T = \boxed{\begin{bmatrix} 0.5000 & 0.7500 & 0.4330 & -6.5752 \\ -0.7500 & 0.6250 & -0.2165 & 19.7876 \\ -0.4330 & -0.2165 & 0.8749 & -28.3183 \\ 0 & 0 & 0 & 1 \end{bmatrix}} $$ so the origin of the camera frame sits at $[-6.5752,\ 19.7876,\ -28.3183]^{T}$ in $\{B\}$.
  6. Check the answer is itself a rigid transform. The rotation block satisfies $R^{T}R = I$ and $\det R = +1$ to within $2\times 10^{-3}$, the residual coming entirely from the 3-decimal rounding of $0.866$ and $0.433$ in the printed data. A larger residual would signal a multiplication slip rather than rounding.
Question 3 — results
ItemResult
(a) Route through the graph$\{B\}\rightarrow\{A\}\rightarrow\{U\}\rightarrow\{C\}$ (last two legs inverted)
(b) ${}^{B}_{C}R$ — row 1$[\,0.5000,\ 0.7500,\ 0.4330\,]$
(b) ${}^{B}_{C}R$ — row 2$[-0.7500,\ 0.6250,\ -0.2165\,]$
(b) ${}^{B}_{C}R$ — row 3$[-0.4330,\ -0.2165,\ 0.8749\,]$
(b) ${}^{B}P_{C\,\text{ORG}}$$[-6.5752,\ 19.7876,\ -28.3183]^{T}$