CS325 Lab 4 - Forward Kinematics
Objectives:
- Understand the DH convention
- Be able to derive forward kinematics
- Download linktr.m and
robottr.m and save these in your robot directory. The linktr
function returns the transformation matrix for a link given the alpha, a,
theta, and d values. The robottr function returns the transformation
matrix for the three-link robot that we used as an example in class.
- Consider the following three-link robot:

The base is a revolute joint, above this there is a second revolute joint
and then there is a prismatic joint. The height from the base to the
second joint is 1 unit.
We derived the following DH parameters:
| Link |
a |
alpha |
d |
theta |
| 1 |
0 |
pi/2 |
1 |
variable |
| 2 |
0 |
pi/2 |
0 |
variable |
| 3 |
0 |
0 |
variable |
pi/2 |
- We will use the robot toolbox to create a model of the robot.
The link command link([alpha a theta d sigma],'standard') will create
a link object with the given DH parameters. The parameter sigma should
be 0 for a revolute joint and 1 for a prismatic joint.
So for example to create the first link:
L1 = link([pi/2,0,0,1,0],'standard)
Create the three links and then you can create the robot:
r = robot({L1 L2 L3})
You can plot the robot for various values of the joint variables. For
example to plot with theta1=0, theta2=pi/2 and d3=.5:
plot(r, [0 pi/2, .5])
- Use robottr to calculate the position of the tool for various values of
the joint variables:
If the tool is at [0 0 0] in the tool coordinates multiplying the robot
translation matrix and [0;0;0;1] should give you the coordinates of the tool
with respect to the base coordinates. What would be the position of
the tool when theta1=0, theta2=pi/2 and d3=.5?
- 3-5 on p 113 of your text. Draw the diagram of the coordinate
frames and verify your DH parameters by building and plotting the robot in
MATLAB.
- 3-7 on p 113 of your text. Draw the diagram of the coordinate
frames and verify your DH parameters by building and plotting the robot in
MATLAB.
- The kinematic data for Armand is given in the file
armand.m. Try out plotting Armand for various joint values to
verify that this data is correct. The home values are given in the
vector qz.
- Hand in written work plus ANNOTATED plots and printouts from MATLAB. Your
annotations should explain all your results.