Forward and inverse kinematics of a robot arm

Louis Woodhams, Washington University in St. Louis, Mechanical Engineering and Materials Science

Author Profile
Initial Publication Date: October 14, 2024

Summary

Students will cover the derivation of the forward kinematics of a robot arm with an end effector (effector position as a function of joint angle) and write a forward kinematics function. They will then cover solving for the inverse kinematics (joint angles as a function of effector position) using gradient descent. At the end of the exercise, students will experiment with different values of the learning rate and its affects on convergence rate.

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

Learning Goals

Students will get to see rotation matrices, Jacobian matrices, and gradient descent used in a practical application. MATLAB (including live scripts) is used as the development environment.

Context for Use

This exercise was developed for engineering students in a sophomore level numerical methods class. It assumes basic knowledge of MATLAB and calculus. Students should be able to complete this exercise in ~45 minutes in small groups of 2-4 students.

Description and Teaching Materials

The entire activity is guided within the live script robotArmDemo.mlx. Student questions are provided in the RobotActivity.docx document, which could be easily adapted. There is an additional derivation for an extension exercise given in the Using_Newton-Rapheson_for_inverse_kinematics.pdf document.
Matlab files for the robot arm activity (Zip Archive 319kB Oct11 24) 
Worksheet associated with the exercise (Microsoft Word 2007 (.docx) 22kB Oct11 24) 
Newton-Raphson additional derivation (Acrobat (PDF) 199kB Oct11 24) 
exercise_complete.zip (Zip Archive 319kB Oct11 24)


Assessment

Students should have working code at the end of the activity and should be able to answer the questions on the worksheet.