Skip to content

Instantly share code, notes, and snippets.

@clynamen
Created January 28, 2016 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clynamen/b790ab4641a424a0ee15 to your computer and use it in GitHub Desktop.
Save clynamen/b790ab4641a424a0ee15 to your computer and use it in GitHub Desktop.

Lagrange, version C

The question says:

$ \Re_1 $ is obtained from $ \Re_0 $

using the following transforms:

1. a rotation $ Rot(i, 90) $ with respect to the fixed axes

We will call this HTM $ T_a $:

$ T_a = \begin{bmatrix} 1 & 0 & 0 & 0 \ 0&0&-1&0\ 0&1&0&0\ 0&0&0&1 \end{bmatrix} $

2. a translation $ \begin{bmatrix} 2&1&2\end{bmatrix}^T $ with respect to the fixed axes

We will call this HTM $ T_b $:

$ T_b = \begin{bmatrix} 1 & 0 & 0 & 2 \ 0&1&0&1\ 0&0&1&2\ 0&0&0&1 \end{bmatrix} $

3. a rotation $ Rot(j, 90) $ with respect to the mobile axes

We will call this HTM $ T_c $:

$ T_c = \begin{bmatrix} 0 & 0 & 1 & 0 \ 0&1&0&0\ -1&0&0&0\ 0&0&0&1 \end{bmatrix} $

We add a new frame of reference $ \Re_i $ that we consider as a zero frame. The given HTM matrix $ T_0 $ is the transform between $ \Re_0 $ and $ \Re_i$. In order to be clear we will rename $ T_0 $ as $ T_0^i $

Since $ \Re_1 $ is obtained from $ \Re_0 $, the $ T_0^i $ should not be involved. Indeed, even if the position or rotation of $ \Re_0 $ was different, the $ T_1^0 $ should be the same.

The given solution says that

$ T_1^0 = T_bT_a T_0^i * T_c$

This may be incorrect. The right HTM should be

$ T_1^0 = T_bT_a T_c$

In this last case

$ T_1^0 = \begin{bmatrix} 0 & 0 & 1 & 2 \ 1&0&0&1\ 0&1&0&2\ 0&0&0&1 \end{bmatrix} $

It should be noted that $ T_0^1 $ has a column $ t = \begin{bmatrix} 2 \1 \ 2\end{bmatrix}$ equal to the translation of step 2. This is ok since that was the only translation, and it was made w.r.t the fixed frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment