CS325 Lab 3 - Rigid Motions
Objectives:
- Understand composition of transformations
- Understand homogeneous transformations
- Be able to perform rigid motions
- Download robot.zip. We are going to use
MATLAB to look at transformations Extract the files and then open
MATLAB. Under the File Menu select Set Path and add the robot folder
to your search path.
- The files you were given define many useful robotic functions and the
reference documentation is included in the zip file as well as
here.
- We will start by plotting a rotation of pi/2 on the x-axis followed by a
rotation of pi/2 on the current y-axis by entering the following commands in
the Command Window:
T = rotx(pi/2)*roty(pi/2)
plot(quaternion(T))
Make sure that you understand the resulting rotation and verify that
rotations are not commutative -- i.e. we can't perform the rotations in the
reverse order and get the same result.
- Perform the following fixed rotations: rotate by pi/2 about the
x-axis followed by a rotation of pi/2 on the fixed y axis.
Plot and make sure you understand the result.
- The function tr2eul takes a transformation matrix T and returns the
three euler angles. Compute these for the previous transformation.
Then verify that the results give you the rotation about z, rotation about
the current y, and rotation about the current z, by computing this rotation
and seeing that you get the same result.
- The function tr2rpy takes a transformation matrix T and returns the
roll, pitch, and yaw angles. Compute these for the previous
transformation. Then verify that the results give you the yaw rotation
about x, pitch rotation about the fixed y, and roll rotation about the fixed
z, by computing this rotation and seeing that you get the same result.
- Compute the homogeneous transformation matrix, H, for a
translation of 4 units on the x-axis, followed by a rotation of pi/2 about
the z-axis, followed by a translation of -2 on the current x-axis. Use
this matrix to compute this rigid transformation of the point [1 0 0] by
using the command:
H * [1;0;0;1]
Note that we had to use a homogenous representation of the point. Also
the function transl(x,y,z) will return a translation matrix.
Make sure that you understand the resulting point coordinates.
- 2-39 on p 70 of your text.
- Hand in ANNOTATED plots and printouts from MATLAB. Your
annotations should explain all your results.