MEAM520: Intro To Robotics Course Notes

In MEAM520: Intro to Robotics, offered by University of Pennsylvania, and taught by Nadia Figueroa, students are taught the fundamentals in developing and testing algorithms on robot arms. Throughout this course, the Franka Panda is the main robot of discussion and students are required to write code to use the manipulator to perform certain tasks. After these labs, students compete in a pick and place competition to stack wooden cubes using the Panda. These are my notes for the major topics of this course.

credit: https://erdalpekel.de/?p=55

Part 1: Forward Kinematics 

Given the configuration specification shown on the left as the "neutral position" of the Franka robot, our first lab within this course was to determine the forward kinematics of this robot.

There were two methods that students could go down in order to solve this - either using the Denavit-Hartenberg (DH) parameters or simply using the transformation between relative coordinate frame pairs. I chose the latter.

First, let's define what we're trying to find in the first place. The problem statement of Forward Kinematics is as follows: given the angles/displacements of the revolute/prismatic joints of a robot, determine the position and orientation of the end-effector in the world frame.

The first step in this process is to determine what the coordinate frames of each joint are. This shown in the next section

Step 1. Coordinate Frames Determination

Using the specification above, we can see that each joint on the Franka Panda is revolute. With revolute joints, we ensure that the z-axis is aligned with the axis of rotation on the joint itself.

The figure on the right shows coordinate frames O_w to O_7, which indicate the world frame all the way to the 7th joint of the robot.

The configuration on the robot mimics the Franka's neutral position (except for the last frame since it is a little more complex than the rest).

Once again, keep in mind that all joints rotate around their z-axes.


Step 2. Define Transformation Matrices

Shown on the right is my process for determining the homogeneous transformation matrix for the given coordinate frame-pair O_0 and O_1. One thing to keep in mind is these coordinate frames are moving -- we want our robot to move! And so we parameterize this movement with variable theta. This theta is the angle of rotation on the z-axis of its coordinate frame.

If we look at the first element in row 0 and column 0 in the first matrix on the right, we end up with a cos(theta_0) because, at zero degrees, x_0 and x_1 are collinear, meaning their dot product can be defined as cos(theta_0).

When vectors are orthogonal, their dot product is zero. Which is why we define a lot of the elements in the middle column as zero, y_1 is orthogonal to both x_0 and y_0, and no value for theta_1 can change that! The final list of transformation matrices is shown below. After multiplying all of them and inputting some joint configuration, voila! You get your end effector position and orientation!

Part 2: Jacobian / Velocity Kinematics 

After being able to implement Forward Kinematics, the next big subject tackled in this course was Jacobian/Velocity Kinematics. The big goal with Jacobian Kinematics is to determine what the end effector velocity is based on the individual joint velocities.

Similar to position kinematics, there are both forward and inverse variants of velocity kinematics. It wouldn't be too useful if we couldn't extract what our joint velocities have to be given a specific desired end effector velocity.

After deriving inverse velocity kinematics, we are enabled to follow trajectories!

Carl Gustav Jacob Jacobi - Origin of Jacobian

Some Intuition

Shown on the image on the right, for a 2-link planar robot in this configuration, if we were to drive either joint in a counter-clockwise direction, we would see, on the end-effector, an instantaneous velocity pointing up.

This is the whole purpose of forward velocity kinematics: given a configuration, determine the velocity of the end-effector given the joint velocities.

Let's see next how to actually construct the Jacobian of our robot.


The Jacobian

For a robot manipulator, the Jacobian is an m x n matrix, where m is the degrees of control desired and n are the number of joints. For example for a 7 DOF robot requiring both linear and angular velocity control of its end-effector, the matrix is 6x7. Six rows because we are interested in linear and angular velocities for X, Y, and Z.

In the image on the right, epsilon represents the linear and angular velocities of the end-effector, J is the Jacobian and q_dot are the joint velocities.

Geometric Approach

For all joints on our manipulator, we can determine the relevant column in the Jacobian by simply using the expression shown below. By taking the cross product of the axis of the joint and the difference between the end-effector position/orientation and that of the joint in question, you can form the Jacobian column for that joint. This is the preferred method when determining the Jacobian.

Analytical Approach

Another approach to determine the Jacobian is by calculating the time derivatives of three values that represent the orientation of the end-effector frame. We did not use this method, so I will not write much about it.

An Example - Linear Velocity

For the robot on the right, let's say we are trying to determine the Jacobian column for linear velocity on joint two, the calculation looks like the following:

Angular Velocity

For the angular velocity, simply calculate the Forward Kinematic transformation matrix between the origin and the desired joint and the Jacobian column will be the first three rows of the third column of this matrix:


T_W_2 = T_W_0 @ T_0_1 @ T_1_2

jk_w_2 = T_W_2[:3, 2]