In this series of tutorials, we’ll go over the basics of manipulator robot kinematics. This involves parameterizing the geometry of the robot in a standardized fashion, allowing us to compute the pose of each link - including the endeffector, where the robot typically interacts with the environment - in terms of the joint variables. This is known as direct kinematics. We’ll then present differential kinematics which defines how changes in the joint variables relate to changes in link poses. Finally, we’ll investigate the problem of inverting the kinematics equations in order to compute how the joints need to be controlled to achieve a desired motion of the robot’s endeffector.
Let’s begin by introducing the type of robot we’ll initially be modeling and controlling in our simulator - a fixed-base manpulator.
The robot consists of a chain of rigid links connected by controllable joints - typically electric motors or pneumatic/hydraulic piston linkages. One end of the chain is constrained to a base - for example, rigidly fixed to the ground or a tabletop - while the other end is connected to an endeffector - for example, a gripper - for interaction with the environment.
Fixed-base manipulators are a good place to start learning about kinematics, dynamics and control; much of the theory translates to legged robots, with the main difference being that manipulators are inherently stable (can’t fall over).
Consider a simple grasping task shown below; the three key components of manipulator control we’ll go over are manipulator forward kinematics, endeffector path planning and manipulator inverse kinematics.
These form a sort-of closed loop control - starting from forward kinematics to determine where the gripper is in space, followed by path planning and inverse kinematics for manipulator trajectory planning, and then joint-level control to move individual joints according to the plan.
In this post we’ll start with forward kinematics, learning how to parameterize the manipulator geometry based on a standardized form so that we can compute the pose of each link from measured joint angles.
The goal of forward (direct) kinematics is to find a mapping - via a sequence of homogeneous transformations - which descibes the pose of the end-effector with respect to the base in terms of the joint variables.
A note on terminology
The term forward in this context refers to a function which takes the joint state as input and outputs the Cartesian state of link(s). More generally, we say that forward kinematics maps from the joint space to the so-called operational space where we “operate on” (interact with) the environment. As we’ll introduce later, the opposite is inverse kinematics which maps from the operational space back into the joint space.
The term direct refers to the fact that we’re mapping from joint positions to operational space Cartesian pose. It’s also useful to work with differential kinematics, which maps joint velocities to Cartesian twist (linear + angular velocity).
So, in total, we have four different ways of looking at manipulator kinematics - forward direct, forward differential, inverse direct, and inverse differential. We’ll talk about forward direct kinematics in this post and forward differential kinematics in the next post. We’ll leave all of inverse kinematics to a future post.
Consider an open chain of links connected by joints as shown below.
Here, the first link - Link 0 - is the fixed base. Each joint, denoted by , provides the structure with a single degree of freedom (DOF). Notice that joint is always the first to affect link ; this difference in indexing is a common cause of confusion.
Attached to each link from 0 (base) to is the link frame denoted by ; the coordinate transformation from frame to frame is then
where each homogeneous transformation is incremental (defined relative to the preceding link) and is thus a function of only one joint variable.
The direct kinematics function from the end-effector to the base also requires transformations from link 0 to the base and from link to the end-effector; these are typically constant transformations. The direct kinematics function is thus written as
where we introduce to denote the vector of all joint states.
In the previous section, we described loosely how direct kinematics allows us to compute the homogeneous transform of the endeffector - or any frame in between - relative to the base. We also introduced link frames and made the choice to locate them each at the origin of the preceding joint. However, we didn’t actually describe how to define the axes of each link frame - and as it turns out, there are a number of reasonable ways to go about this. Probably the most well-known is the Denavit-Hartenberg convention.
This convention describes how to define the link frames such that computation of the direct kinematics function is accomplished in a general, systematic fashion. It’s a bit complicated to visualize in three dimensions, so if it’s still confusing I suggest checking out this video which does a great job at visualizing the process of defining frames. That said, the basic rules are as follows.
The frame corresponding to the link is located at joint and is defined as follows:
Consider the three-link planar (z-axes are out of the page) manipulator having three revolute joints as below:
In total, there are links and frames (one at each joint and one at the endeffector). With the frames chosen as above, we can uniquely specify the manipulator geometry with four parameters:
Note that we consider each joint to have one DOF, meaning only one of and can be variable for each link. More complex joints having multiple DOFs (eg spherical joints like your shoulder) are treated as combinations of single-DOF joints sharing the same origin. More on that later.
In this setup, Link is located between Frames and ; the homogeneous transformation between these frames as a general function of the DH parameters is given by
Consider again the three-link planar arm, for which we’ve highlighted the homogeneous transformation between the first and second link:
Note that since and , the rotational and translational portions of the transformation matrix are two-dimensional, as expected for a planar arm. This is not the case for more complex manipulators, as we will see below.
The ultimate goal is generally to compute the endeffector pose (rotation + translation), since this is usually the point on the robot which interacts with the world. Since the three links are identical in this case, the homogeneous transformation between successive links is
where we introduce and for brevity. The homogeneous transformation which describes the pose of the endeffector relative to the base is composed as intriduced earlier:
Substituting in the transform definitions (including the base to frame zero transform, which is the identity since they are identical frames) we have
which multiplies out to
where we introduce the notation and and so forth. Illustrated graphically:
Whew! Let’s check out some more complex manipulator structures now. Disclaimer: I copied the following diagrams from the aforementioned text (Siciliano et al) but plan to revisit this and create some nicer-looking 3d diagrams for these structures.
The spherical arm consists of two co-located revolute joints, followed by our first prismatic (translation) joint. Note that both and are nonzero; however, only one of these can be variable for a single joint. In this case, is the joint’s DOF and is fixed. This is made clear from the use of a cylinder to illustrate the joint; a prismatic joint is shown as a cube, eg for the DOF .
The anthropomorphic arm is essentially a vertical two-link planar arm (latter two joints) with the first DOF providing rotation of the remainder of the structure within the (ground) plane.
In this tutorial, we introduced the basics for defining manipulator link frames via Denavit-Hartenberg parameters, as well as computing the incremental homogeneous transformations between successive links. We worked through the specifics for a three-link planar arm and a more complex anthropomorphic arm. Next, we’ll implement classes to define general manipulator kinematics based on this theory.Written on January 22nd , 2020 by Nick Rotella