Step 1
Forward kinematics
Chain one homogeneous transform per joint and link to get the gripper's full pose from the joint angles.
What it computes
Forward kinematics (FK) maps joint angles to the pose of the gripper: where it is and which way it points. Every other arm algorithm (IK, Jacobians, planning, control) calls it.
Homogeneous transforms
A pose is a matrix that holds a rotation and a position :
Multiplying two transforms applies one after the other, each in the frame the previous one left you in. So FK of a serial arm is a product: one rotation per joint, and one translation per link.
This arm's chain
Start at the base on the table. The base joint turns about , and each pitch joint turns about the current axis. Every link runs along the current axis:
| metres | 0.12 | 0.30 | 0.25 | 0.12 |
The last column of is the grasp point, and the third column of is the direction the gripper points.
See it in context
Pick & Place step 2 derives the same position with trigonometry. Transforms scale to any arm, and they give you the orientation for free.
Your task
Implement rot_z(a), rot_y(a) and fk(q), which returns the matrix . The program then moves through three poses and draws your gripper frame at each one: x red, y green, z blue. The grader compares fk with the simulator on 30 random poses.