A Brief Introduction to Robot Kinematics
First: kinematics. Kinematics is the study of motion of objects, but without concerning ourselves about the forces that cause that motion. It is really a study of geometry, or the geometry of motion, because we aren’t worried about things like forces, inertia, the effects of gravity, etc. From that perspective, it’s much more simple than something like dynamics (which is concerned with forces). So when we talk about robot kinematics, we’re talking about the geometry of the robot, and how that geometry changes as the robot moves. We have to define the kinematics of the robot well if we’re to understand how to move and control the robot.
There are a couple of ways of solving for the kinematics of a robot. Forward kinematics refers to the fact that we move ‘forward’ from the base of the robot, and determine the location of the end-effector by moving from the base to each successive link – we can do this using coordinate frames and the relative motion of adjacent links, and the geometry of the manipulator. So you start at the base and go to the end-effector. That’s forward kinematics. We define desired angles for each joint (joint 1 at 30 degrees, joint 2 at 60 degrees, and so on), and using some math, we can calculate the orientation and position of the end effector. Inverse kinematics is essentially the opposite. You start with a desired position and orientation of the end effector, and work backwards – calculating the required orientations of each joint to get to this position. This is useful if you know exactly where you want the end effector to be – you’d input this and the robot would calculate the necessary joint angles to achieve this position. What’s interesting about inverse kinematics is there can actually be multiple solutions to the problem, depending on the robot. In other words, there could be multiple combinations of joint angles that would result in the same position and orientation of the end effector. Think about holding your hand out in front of you. You can probably move your shoulder and elbow into different configurations with your hand remaining the same spot.
In both forward and reverse kinematics, the manipulator geometry is known – that is, the length of the links, the effective length between the links (basically the length of the joints, also known as link offset), twist angles, and the location of the base. Extend your arm out to your side with your elbow bent. If you follow from your shoulder (fixed) you can see the position of the link from your shoulder to your elbow, based on the rotation of your shoulder joint. Similarly, depending on how your elbow is bent, you can find you wrist, knowing how long your forearm is – and now you’ve found your very own end effector. Inversely – move your hand to pick up something. From the position of your hand, you can look backwards along your arm and determine the angles of your elbow and shoulder joints required. Boom. Forward and inverse kinematics demonstrated.
We can get into slightly more detail on the forward kinematics process, but really extensive time and effort is needed to understand and master the math behind this process. It’s not super straight-forward. But I’ll try to give a broad overview if you can forgive my brief explanation. We talked about how we need to put reference frames on each link. How do we do this? How can we just ‘put’ reference frames on a link? Where do they go? Is there some sort of procedure for doing this? You bet. In fact, there are a multitude of ways to do this, but some are more common than others. What we’ll learn here is a extremely common approach.
Denavit-Hartenberg (DH) Convention
DH convention is simply a procedure to define where the robot links and joints are, relative to each other. We can do this by using a bunch of references frames. We need this information to solve a bunch of robot problems.
First, we need to have a numbering system for the joints and links. The base of the robot (which is immobile, at least for the industrial manipulators we are discussing) is link 0. In our human arm example, 0 would be the base of your arm that does not move (essentially your torso). The first link after the base – the first moving link – is link 1. And so on. With joints the numbering is slightly different. The first joint is assigned 1, the second 2, and so on. Because of this numbering, joint 1 rotates with respect to link 0, and joint 2 rotates with respect to link 1. Your shoulder (joint 1) rotates with respect to your torso (link 0). Your elbow (joint 2) rotates with respect to your upper arm (link 1). That’s the numbering system – easy enough.
Now, we need a bunch of parameters to define the links and joints and how they are positioned and oriented with respect to each other. In total, we’ll need four parameters.
We need two parameters to define a link. Of course, the link length is one of the parameters, which is simple – literally the length of the link between it’s joints. The link twist is also required, which is a little bit more difficult to grasp. Basically the twist of the link is the angle measured from the joint at the end of the link to the joint at the beginning of the link. In other words, is the link “twisted” between two joints that rotate in different directions? If the two joints have parallel axes, then the twist of the link is zero.
We only need a couple more parameters, these are the link offset and joint angle. The link offset essentially refers to how offset the joints are from one another on either side of the link, If the link is straight and connects both links, the offset will be zero. If the link has a kink or bend in it, then it is likely that the joints will be offset. The joint angle is just a measure of how much ‘first’ joint is angled with respect to the ‘second’ joint along a link.
If you think about how to describe the position and orientation of links yourself, you’d likely realize too that these four parameters are required. Link length, duh. And of course we’d need to know what angle the joints are at, as well as whether any of the joints were rotated. And if the links are straight with no offset that would be fantastic – but it’s not always realistic, so we need to know if there are any offsets. And that’s it. That’s all you need. I’d like to note here before going on – it isn’t too important to fully understand these concepts as I’ve described them. Usually, forward and inverse kinematics are a large part of an undergraduate robotics course, and the process of learning it properly is fairly involved. But this should give you a rough idea of the basics.
What we’ve been discussing is the basics of what is called the Denavit-Hartenberg parameters (known as ‘DH’ for short). The DH process is a way of attaching reference frames (reference frames and coordinate system mean the same thing as far as I’m concerned – they are interchangeable) to the links that are connected in a kinematic chain – just like a standard robot manipulator. It is a standard convention that is often used when assigning reference frames to robot links. There is also a modified DH convention that is sometimes used as well. It was first developed in 1955 by Jacques Denavit and Richard Hartenberg, but it wasn’t until roughly 30 years later that it’s value was recognized for robotics. And again, there are many convention for attaching reference frames, but the DH convention remains popular and is often taught. This whole process of using parameters such as the four discussed above and reference frame convention may seem odd – why do it? – but it is necessary to describe with detail and consistency the location of each link in order to solve for the robot kinematics, and so a process like this is very necessary. But if you’re like me, it’s not very intuitive the first pass through. Myself and many fellow students struggled to learn this (and it can still be a struggle to actually apply it, especially if you don’t do it frequently). At some point I will add a good example illustrating the process, but for now, I think it’s more valuable to continue reading about the simpler concepts.