4 Inverse Kinematics and Jacobian for Serial Manipulators
Elissa Ledoux
1) Inverse Kinematics
Theory
Inverse kinematics (IK) is the mathematical mapping from end effector pose (x, y, z, roll, pitch, yaw) to joint positions (d’s, ‘s).
Similarly to forward kinematics, this relationship is independent of force and torque and assumes that each joint in the chain has one degree of freedom (or is two joints). IK is more difficult than FK for serial robots because multiple solutions are possible, but it is easier than FK for parallel robots because only one solution is possible.
The goal of IK is to find all solutions to the base-to-tip transformation . The method is to take the first three rows of and solve for all d’s and . This results in 12 equations (one per element of the reduced 3×4 matrix) and n unknowns. Typically n < 6 so a solution is almost always possible. Closed-form analytical solutions (as opposed to numerical solutions) are ideal. The possible cases for a serial manipulator are:
- no solution (point is outside robot’s workspace)
- one solution (point is on edge of workspace)
- multiple solutions (point is inside workspace)
- impossible solutions (point is inside workspace but not possible for the end effector to reach at the given orientation, such as points inside the robot itself or that would require to the robot to do contortions)
For a detailed explanation of inverse kinematics, watch the video below.
Video: Inverse Kinematics Intro (click link for closed-caption version)
This theory is applied in examples below showing how to determine the inverse kinematics for two robots, one in 3D space (an RRP Stanford Manipulator), and one in 2D space (an RR planar manipulator).
Quick Quiz
Examples
The video below demonstrates how to solve the inverse kinematics for an RRP Stanford Manipulator.
Video: IK Example – RRP Stanford Manipulator (click link for closed-caption version)
The video below demonstrates how to solve the inverse kinematics for a 2-link RR manipulator.
Video: IK Example – Two Link (RR) Manipulator (click link for closed-caption version)
2) Jacobian
Theory
The Jacobian is a matrix expressing the derivative of end effector position with respect to joint variables:
Each element is the derivative of the pose variable with respect to the joint variable corresponding to each row and column.
- In 3D space, the Jacobian is a 6×6 matrix. The rows represent the end effector pose variables: x, y, z, roll, pitch, yaw from top to bottom. The columns represent the joint variables: or d for each joint.
- In 2D space, the Jacobian is a 3×3 matrix (or occasionally a 2×2 if there are only 2 joints). The rows represent the end effector pose variables: x, y, and yaw from top to bottom. The columns represent the joint variables: or d for each joint.
For forward and inverse kinematics (position), the Jacobian relates tip pose to joint positions:
For derivative kinematics (velocity), the Jacobian relates task space velocities (end effector) to joint space velocities (joints):
or
For a detailed explanation about the Jacobian, watch the video below.
Video: Jacobian Introduction (click link for closed-caption version)
For an n-link robot with joint variables … , and a forward kinematics homogeneous transformation matrix , there are two methods for finding the Jacobian:
- Basic method (for simple robots, n < 3)
- Formula method (for complex robots, n > 3)
The next sections will walk through the steps to find a Jacobian for a two-link RR robot using first the basic method and then the formula method.
Basic Method and Example
For an n-link robot with joint variables … , and a forward kinematics base-to-tip homogeneous transformation matrix , the procedure to solve using the basic method is:
- Write position equations for the tip in the world frame (base frame)
- Take the derivative to find velocity
- Put the equations in matrix form
The video below demonstrates how to derive the Jacobian for a 2-link RR manipulator using the basic method.
Video: Two Link RR Manipulator Jacobian Example – Basic Method (click link for closed-caption version)
Formula Method and Example
For an n-link robot with joint variables … , and a forward kinematics base-to-tip homogeneous transformation matrix , the procedure to solve using the formula method is:
0. Determine the forward kinematics matrix (if not given).
1. Write position equations for all joint origins in the world frame
2. Write all joint axis vectors
3. Do math by category (, , revolute joints, prismatic joints) as follows:
- For the linear Jacobian : assume all joints are fixed and look at the end effector velocity:
- For the angular Jacobian : look at the rotation of frame i relative to frame i-1 :
The video below demonstrates how to derive the Jacobian for a 2-link RR manipulator using the formula method.
Video: Two Link RR Manipulator – Formula Method (click link for closed-caption version)
The video below demonstrates how to derive the Jacobian for an RRP SCARA robot using the formula method.
Video: RRP Robot Jacobian Example (click link for closed-caption version)
Quick Quiz
Applications
The Jacobian has many applications in robotics. It can be used to:
- Find singular configurations of a robot
- Plan and execute motion trajectories
- Coordinate motion (position, velocity, and acceleration)
- Derive dynamic equations of motion
- Find required joint torque given end effector forces and torques
- Resolve redundancies (when there are more joints than DoF of the operating space)
The Jacobian can be used with inverse kinematics to determine the required joint speeds to drive a robot’s tip at a certain speed. For example, if you are programming a welding robot, and the robot must weld along a line at a constant tip velocity, the joint speeds will not necessarily be constant. However, using the equation , you can calculate the required joint speeds for the entire path.
The Jacobian can be used with forward kinematics to determine velocity at any point on the robot’s arm. In this situation, you would place a point p at the desired location on the arm to track, and write the Jacobian up to that point using the formula method with p instead of . Then using the equation , with the new Jacobian, you can determine velocity of the point in question.
The Jacobian can be used to relate joint torques and end effector forces using the equation , where represents joint torques (n x 1 vector), J is the Jacobian (6xn), and F is the end effector “wrench” (6×1 vector of xyz forces and roll-pitch-yaw torques). The exponent T means “transpose”: switching the rows and columns of a matrix. So to apply a certain force at the end effector, the joint torque can be easily calculated using that formula. To determine force applied for known joint torque, perform the inverse: . The Jacobian in this instance does not need to be square like it does for kinematics.
3) Singularities
Theory
Manipulator singularities occur when joint axes align or lock. This is a bad situation! Singularities result in the manipulator losing a degree of freedom and therefore the ability to move in a certain direction at that instant. Bounded end effector velocities result in infinite joint velocities, and bounded joint torques result in unbounded end effector force and torque. Finally, there are infinite possible solutions to the inverse kinematics for that end effector pose. Singularities should be avoided at all costs, otherwise the robot could break.
For a detailed explanation of robot singularities, watch the video below.
Video: Robot Singularities (click link for closed-caption version)
In 2D space, singularities occur when the robot’s joint axes lock out, yielding only one solution to the robot’s IK. These are points on the edge of the workspace (when the robot is stretched out at full extension), or when two of the links are doubled back on each other, completely aligning.
In 3D space, singularities occur when joint axes align and there are infinite solutions for the robot’s IK. For a standard 6-axis robot, this can occur when joints 1, 4, and 6 (or some combination of those) align. For a visualization of a standard 6R robot moving to near-singularity poses, watch the video below from Mecademic.
Video: What are robot singularities? by Mecademic
Mathematically, singularities occur when the determinant of the Jacobian = 0. So if J = 0, and desired tip speed is a number represented by , you can see that joint speeds would try to shoot to infinity to achieve that in the equation .
There are two methods to find singularities:
- Inspection
- Calculation
These methods are explained below and illustrated with examples.
Examples
To solve singularities by calculation,
- Write the FK position equations for the robot tip
- Take the derivative to find velocity
- Put the velocity equations in matrix form
- Set det(J) = 0 and solve for joint variables q
The video below demonstrates how to find the singularities for a 2-link RR manipulator using math.
Video: 2-Link RR Manipulator Singularity Example (click link for closed-caption version)
To solve singularities by observation:
- Look at the robot’s joint alignment
- Visually determine the singularity angles
The video below demonstrates how to find the singularities for two different PR robots by observation and prove them with math.
Video: PR Robot Singularities (click link for closed-caption version)