SCARA kinematics & teaching mode
From D–H parameters to a MATLAB teaching interface: forward kinematics and three documented validation poses for an RRP SCARA arm.
Project overview
This case study covers Part 2 only: the design and kinematic analysis of a three-joint SCARA arm with two revolute joints and one prismatic joint. I derived its homogeneous transformation matrix, implemented the model using Peter Corke’s Robotics Toolbox and developed a MATLAB Live Script teaching interface.
The engineering
The challenge
Translate a physical SCARA geometry into consistent coordinate frames, then make the resulting joint-to-Cartesian relationship usable in a teaching-mode simulation.
My contribution
Derived the forward-kinematics model, mapped it to Robotics Toolbox Link objects, developed the wireframe teaching interface and documented three pose checks.
Approach & implementation
Use standard D–H transformations with a negative shoulder offset and a π axis flip. Implement the prismatic joint explicitly, apply the tool transform, and compare analytical coordinates with MATLAB outputs at home, a 90° elbow pose and full extension.
Results & lessons
What the project achieved
The report’s screenshots show home at (0.600, 0, 0.040) m, elbow at 90° at (0.300, 0.300, 0.040) m, and 0.100 m extension at (0.600, 0, −0.060) m. The displayed home matrix matches the analytical model. Tiny Y values around 10⁻¹⁷ m are floating-point round-off.
Limitations & next steps
This is a kinematic simulation, not a physical accuracy or dynamics test. Three pose checks do not establish correctness throughout the workspace. Collision detection, torque limits, trajectory execution and physical calibration are outside the evidence. The report’s Table 3 labels the home orientation Rot-Z(π); the displayed matrix diag(1, −1, −1) is actually Rot-X(π). The original pages are preserved, with the corrected interpretation used here.
Calculations & proof
1. Geometry and frame convention
Lengths are in metres; revolute angles are in radians. The physical dimensions d₃ and d₄ become the D–H link lengths a₁ and a₂. To avoid confusing physical dimensions with D–H offsets, the table below uses the link index explicitly.
| Link | θ | d | a | α | Joint |
|---|---|---|---|---|---|
| 1 | q₁ | 0.30 | 0.30 | 0 | Revolute |
| 2 | q₂ | −0.06 | 0.30 | π | Revolute |
| 3 | 0 | q₃ + 0.20 | 0 | 0 | Prismatic |
The π twist turns the tool Z-axis downward. Positive q₃ therefore lowers the tool. In MATLAB, link 3 uses d = q₃ and the additional 0.20 m is applied through the tool transform instead.
2. Transformation derivation
Aᵢ = Rz(θᵢ) Tz(dᵢ) Tx(aᵢ) Rx(αᵢ). Here cᵢ = cos(qᵢ), sᵢ = sin(qᵢ), c₁₂ = cos(q₁ + q₂), and s₁₂ = sin(q₁ + q₂).
Multiplying A₁A₂ gives c₁c₂ − s₁s₂ = c₁₂ and c₁s₂ + s₁c₂ = s₁₂. The translation is x = 0.3c₁ + 0.3(c₁c₂ − s₁s₂), y = 0.3s₁ + 0.3(s₁c₂ + c₁s₂), z = 0.3 − 0.06 = 0.24.
The final translation is z = 0.24 − (q₃ + 0.20) = 0.04 − q₃. Rotation is unchanged by the final prismatic translation.
3. Numerical checks
| Pose (q₁, q₂, q₃) | x calculation | y calculation | z calculation |
|---|---|---|---|
| Home (0, 0, 0) | 0.3(1 + 1) = 0.600 | 0.3(0 + 0) = 0 | 0.04 − 0 = 0.040 |
| Elbow (0, π/2, 0) | 0.3(1 + 0) = 0.300 | 0.3(0 + 1) = 0.300 | 0.04 − 0 = 0.040 |
| Extension (0, 0, 0.1) | 0.3(1 + 1) = 0.600 | 0.3(0 + 0) = 0 | 0.04 − 0.1 = −0.060 |
At home, R = diag(1, −1, −1) = Rx(π). This corrects the Rot-Z(π) label in the report’s verification table.
4. Try the forward kinematics
Adjust the joints or select a documented pose. This browser calculation explains the report’s model; it is not the original MATLAB application.
5. Original calculations and proof images
Open the evidence below at full size. The complete Part 2 pages retain every calculation, code snippet, slider setting and test image from the report.
Media & resources
1 / 19 · MATLAB proof — elbow at 90 degrees
Let’s talk about this project.
I’m happy to walk through the design decisions, challenges and what I would improve next.
Contact Peter