Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Frame A and point 

Mathinline
bodyp
lie on the plane
Mathinline
bodyz=0.3
:

Image Removed

Note that unit vector 

Mathinline
body--uriencoded--z_%7B\mathrm%7BA%7D%7D
is pointing out of the screen. The coordinates of point 
Mathinline
bodyp
are (2.1, 0.5, 0) when expressed in frame A. Frame B lies in the same plane and has the orientation shown below:

Image Removed

(a) Find the rotation matrix 

Mathinline
body--uriencoded--%7B%7D%5e%7B\mathrm%7BA%7D%7D\!R_%7B\mathrm%7BB%7D%7D
that relates the orientation of frames A and B. Use any strategy to check your answer and explain why it is correct.

(b) For part (b) only, suppose the origins of frames A and B are coincident. Use your answer from part (a) and the expression 

Mathinline
body--uriencoded--p_%7B\mathrm%7BA%7D%7D = %7B%7D%5e%7B\mathrm%7BA%7D%7D\!R_%7B\mathrm%7BB%7D%7D \ p_%7B\mathrm%7BB%7D%7D
to compute
Mathinline
body--uriencoded--p_%7B\mathrm%7BB%7D%7D
. Recall that rotation matrices are orthogonal, which means that
Mathinline
body--uriencoded--\left( %7B%7D%5e%7B\mathrm%7BA%7D%7D\!R_%7B\mathrm%7BB%7D%7D \right)%5e%7B-1%7D = \left( %7B%7D%5e%7B\mathrm%7BA%7D%7D\!R_%7B\mathrm%7BB%7D%7D \right)%5e%7B\operatorname%7BT%7D%7D
.

(c) Now suppose the origin of frame B is at 

Mathinline
body--uriencoded--3.7 x_%7B\mathrm%7BA%7D%7D + 1.1 y_%7B\mathrm%7BA%7D%7D + 0 z_%7B\mathrm%7BA%7D%7D
relative to the origin of frame A. What is the transformation matrix 
Mathinline
body--uriencoded--%7B%7D%5e%7B\mathrm%7BA%7D%7DT_%7B\mathrm%7BB%7D%7D
that relates frames A and B?

(d) Use your answer from part (c) and the expression below to compute

Mathinline
body--uriencoded--p_%7B\mathrm%7BB%7D%7D
:

Mathblock
alignmentcenter
\begin{Bmatrix}p_{\mathrm{A}}\\1\end{Bmatrix} = {}^{\mathrm{A}}T_{\mathrm{B}} \begin{Bmatrix}p_{\mathrm{B}}\\1\end{Bmatrix}

(e) Sketch frame A, frame B, and point 

Mathinline
bodyp
to confirm that your answer to part (d) is correctIn this problem, we will use the OpenSim API to check the solution to problem 7.3 Introduction to transformation matrices. (If you haven't completed that problem yet, please start there.)

(a) Download and install OpenSim.

(b) Read the Common Scripting Commands and Scripting in the GUI pages in the OpenSim documentation.

(c) Define frame A and point p in a model. You can do this by writing a script that creates a new model, or you could add components to an existing model. For simplicity, the instructions here will add components to the arm26 model. First, open arm26.osim. Next, type the following in the ScriptingShell Window, filling in the missing information as indicated:

Code Block
languagepy
themeMidnight
linenumberstrue
model = getCurrentModel()
sphere = modeling.Sphere(0.02)
transA = modeling.Transform( modeling.Vec3(a,b,c) )  #fill in a,b,c
pofA = modeling.PhysicalOffsetFrame(model.getGround(), transA)
pofA.setName('pofA')
model.addComponent(pofA)
pofA.attachGeometry(sphere)
m = modeling.Marker('p', pofA, modeling.Vec3(a,b,c) )  #fill in a,b,c
model.addMarker(m)
model.finalizeConnections()
model.print('step1.osim')

(d) Close the arm26 model and open step1.osim. You will see a sphere at the origin of frame A and a marker at point p. Next, we will add frame B. Type the following in the ScriptingShell Window, filling in the missing information as indicated:





.


Expand
titleSolution (only visible by instructors; please contact us to request access)

Include Page
S7.3 Introduction to transformation matrices
S7.3 Introduction to transformation matrices

...