Robot Kinematics Modelling with MATLAB Robotics System Toolbox

Thanacha Choopojcharoen, King Mongkut's University of Technology Thonburi, Institute of Field Robotics
Author Profile
Initial Publication Date: December 1, 2021

Summary

In this assignment, students must implement forward kinematics, inverse kinematics, and differential kinematics of 3-DOF robot and compare their implementation with the ones from MATLAB Robotics System Toolbox.

Share your modifications and improvements to this activity through the Community Contribution Tool »

Learning Goals

Given a physical description of a robot, students should be able to implement forward kinematics, inverse kinematics, and differential kinematics using MATLAB function with AND without the use of Robotics System Toolbox (RST). The toolbox allows students to verify their implementation and visualize their results.

Context for Use

This programming assignment was developed for a junior robotics course on the concepts of robot kinematics. Throughout the semester, 3 programming assignments are assigned along with 6 written assignments on the same concepts from the lecture. Students are given 4 weeks to complete each programming assignments. Students will have opportunities to develop their computational skills to program analytical tools for general robot kinematics.
According to the curriculum, students have completed multiple Onramp exercises, which includes MATLAB, Simulink, Stateflow, Signal Processing, and Control System.

Description and Teaching Materials

A preliminary reading on Robotics System Toolbox (RST) is given to students prior to the assignment. This allows students to familiarize themselves with modelling and creating robot kinematic model using RST. Based on the reading and concurrent lectures, students are tasked to complete 7-part assignment.
In the first part, students are asked to implement "Forward Pose Kinematics" with the use of RST, which computes pose of all associated coordinate frames of a generic n-DOF serial manipulator according to the modified Denavit-Hartenberg convention. A template "forwardKinematicsRST.m" is given to the students as well as the required API.
To test the implementation on an actual system, the second part asks the students to assign coordinate frames of a specific robot and export the STL files with Solidworks software. Although this part is accomplished without the use of MATLAB, it is an integral part of entire kinematics modelling process.
In the third part, students are asked to add graphics to the root model in MATLAB based on the STL files from the second part.
The fourth part requires students to implement the same forward pose kinematics without the use of RST. Students should use the information part 1-3 to verify their implementation.
The fifth part asks students to implement analytical inverse kinematics from the specific robot (in oppose to numerical approach that can be used for any generic robots). Students should use forward kinematics from the previous part to validate their results.
In the sixth part, students are tasked to implement a program that can compute "manipulator Jacobian" without the use of RST.
The last part of the assignments asks students to apply all written programs with a given robot and explain the process of implementation and validation in details.
Tutorial for Robotics System Toolbox (MATLAB Live Script 8kB Dec1 21)
Instruction for Programming Assignment (MATLAB Live Script 6kB Dec1 21)
a template for forward kinematics using RST (Matlab File 744bytes Dec1 21)
a template for forward kinematics without the use of RST (Matlab File 129bytes Dec1 21)

Teaching Notes and Tips

There are 2 options to implement this exercise. The first option is to include the Solidworks exercise. You may provide an example of defining coordinate frames in with different robots. However, the expectation is that students have learned how to assign coordinate frames in Solidworks.
If students have no access to Solidworks, one can use alternative software or omit this part of the assignment entirely. However, a proper set of STL files should be generated for students be the instructors.

Assessment

The assessment is divided into 2 separate parts. The first part involves testing the validity for generic robotics system, which consists of testing forwardKinematicsRST, addGraphics, forwardKinematics, and manipulatorJacobian with different robots.
The second part validates the result of inverseKinematicsRRP by using pre-written forward kinematics.

The solution for the assignment is obtained prior to grading, which is sued for comparing with student's works.

References and Resources

All lectures are pre-recorded and posted in EPIX Studio Youtube channel (in Thai). The site consists of various videos of the instructor explaining various concepts of robotics ranging from basic signal processing to robot trajectory generation.

Robot Terminology
https://www.youtube.com/watch?v=zz8z1UWXbCM&list=PLHnZZE5j6C64NVm8scndMVw4TooU-UWuB

Kinematics Modelling
https://www.youtube.com/watch?v=2bQX5cU7HfQ&list=PLHnZZE5j6C64SkhzUD6Fixm_uM2I-vgqC

Inverse Kinematics
https://www.youtube.com/watch?v=fZk5sS1ZwS4&list=PLHnZZE5j6C64M8cRX-58SQ8L9hGw_0B-C

Differential Kinematics
https://www.youtube.com/watch?v=pGPaLV35Mnk&list=PLHnZZE5j6C65J4-1t-azzmceXevAtWbRf