Robot Perception and Control

Kinematics and Control

Last updated: Jul / 25 /2024
Kashu Yamazaki
kyamazak@andrew.cmu.edu

Kinematics

Kinematics

Kinematics: study of a motion of the robot without considering the forces and torques producing the motion.

Kashu Yamazaki, 2024

Denavit–Hartenberg convention

The following four transformation parameters are known as D–H parameters:

  • : distance from to along .
  • : angle from to about .
  • : distance from to along .
  • : angle from to about .

Usually, and are constants that describe the geometry of the robot, while and are the variables that describe the motion of prismatic and revolute joints, respectively.

Kashu Yamazaki, 2024

Denavit–Hartenberg convention

In this convention, coordinate frames are attached to the joints between two links such that one transformation is associated with the joint , and the second is associated with the link . The coordinate transformations along a serial robot consisting of links form the kinematics equations of the robot as:

where each transformation can be implemented as a matrix using the DH parameters as:

def transform(a, alpha, d, theta):
    return Rot(theta, axis="z") @ Trans(d, axis="z") @ Trans(a, axis="x") @ Rot(alpha, axis="x")
Kashu Yamazaki, 2024

Forward Kinematics

Forward kinematics is the problem of finding the end-effector position and orientation of a robot manipulator given the joint angles and link lengths.

We can use the DH parameters of a robot to simply represent the forward kinematics as a chain of transformations starting from a base link, which connects to the origin.

def fk(theta):
    trans = np.identity(4)
    for (_a, _alpha, _d, _theta) in dh_params(theta):
        trans = trans @ transform(_a, _alpha, _d, _theta)
    return trans
Kashu Yamazaki, 2024

Forward Kinematics

Let's consider the right front leg joints (coordinate systems below):

#center

The DH parameters of the leg:

Link
0-1
1-2
2-3
3-4

From the table, we can construct the each transformation and the forward kinematics is given by the chain of those transformations as .

Kashu Yamazaki, 2024

Inverse Kinematics

Inverse kinematics (IK) is essentially the reverse operation of FK: computing configuration(s) to reach a desired workspace coordinate. Unlike forward kinematics, inverse kinematics cannot be solved in a closed-form expression (in general). If we can derive a closed-form expression through symbolic manipulations, we can use Analytical IK, otherwise we need to use numerical approach.

Analytical IK

  • Once the equations are derived, solutions are very fast to compute.
  • Often difficult or tedious to derive.
  • Only applicable to non-redundant robots (# DOFs = # of task space dimensions).

Numerical IK

  • need to define solution parameters or initial guesses
  • More generalizable
Kashu Yamazaki, 2024

Analytical Inverse Kinematics

Let's consider a 2D arm in 2D space as in the Figure.
From law of cosines:

Assuming solution exists (),

  • Note that elbow down and elbow up solutions () exist.

Then using the , we can find a as:

Kashu Yamazaki, 2024

Analytical Inverse Kinematics

Given the foot position , the joint positions for a typical quadruped leg is given as in paper:

where

  • the sign in determines the knee direction if the quadruped.
Kashu Yamazaki, 2024

Jacobian

The Jacobian matrix is a matrix of partial derivatives that describes how the robot's configuration affects the robot's end-effector position. The Jacobian matrix is defined as:

where is the end-effector position and is the joint angles.

If we consider the differentiation w. r. t. time, we can write the relationship between (or ) and .

Kashu Yamazaki, 2024

Basic Jacobian

Kashu Yamazaki, 2024

Numerical Inverse Kinematics

Given an initial guess that is close to a solution , the kinematics can be expressed as the Taylor expansion:

where is the coordinate Jacobian at .
By truncating the Taylor expansion at first order, we can obtain the approximation as:

Assuming that is square and invertible, we can solve for as:

  • In practice, pseudo-inverse of a Jacobian is used and we do not need to assume square and invertible.

We will iteratively update the guess until it converges to a solution.

Kashu Yamazaki, 2024

Kashu Yamazaki, 2024