Direct Kinematics
Tags | Kinematics |
---|
Practical Tips and Tricks
DH tips and tricks
Remember that you need to align the x axis to point at the next joint, and you do this by rotating the .
Ordering of rotation
Follow the order of rotations as specified by the joints; failure to do so can yield a bogus result
Importance of
These are free parameters, meaning that they will be used to make the robot legal. This will be painfully apparent if you have a world frame whose doesn’t line up with the next joint. This is where the comes in.
If you are given axes → Derive DH parameters
If you are given axes, the derivation should be simple. Just propagate the frames using the four step method. At a given point :
- Using previous , find translation from the previous frame to the new frame along axis . Note that this may NOT be the final location of the frame because we have another translation later
- Using previous , find rotation along this axis that takes to . Often, this is some multiple of 90 degrees. Remember to use right hand rules
- Using the current , find the rotation along that takes to . Rembmer right hand rule. Also remember that prismatic joints may have a twist.
- Using current , find the translation along that takes us from where we are, to the next frame. Remember that revolute joints may have a displacement.
If done right, you should be able to traverse the whole robot through these cyclical sequence of translations and rotations. Note that the first two steps are interchaneable, and so are the last two steps.
If you are given DH parameter → derive axes
This is actually the more tricky variant of this problem because it requires you to work backwards. There’s a degree of dynamic problem solving in place, although there are some tips and tricks.
- Prismatic joints are annoying because technically, you can place the next frame anywhere along the line specified by . You may have to edit your response later
- Revolute joints can be tricky! Don’t assume that is at zero in the current configuration; in fact, it may definitely not be zero
- Don’t get fooled by angles! In the example below, 30 degrees contributes to the offset , but it the angle of the joint is actually 90 degrees
The general method is to build up the axes systematically. If you do it correctly, everything will be self-consistent. Building up the axes sysematically means doing the following:
- Propagate the new origin using , the previous frame, and the previous .
- Find the new using and the previous
- Find the new using and
If you are given nothing
If you start from scratch, know that you can define the axes quite arbitraily. So I would recommend doing the following
- Assign axes systematically without worrying about the angles or the lengths (recall: if overlapping , pick the that yields positive rotation
- Start with first, because their axis is known (they must be through a revolute joint and prismatic joint)
- always points to the next joint (if it’s not, you’re doing something wrong). Tiebreaker: if the frames overlap, pick that creates positive angles.
- Label your active angles and shifts. See above in how to derive DH parameters from an axis set.
Remember that an angle doesn’t influence any future links, so you won’t have to worry about any weird dependencies. If you are worrying about it, then you’re doing something wrong.
Common confusion is mixing up with . The first one is along the x axis of the previous frame, which is often zero. The second one is along the z axis of the current frame.
Links
A link
connects two joints. A joint can be revolute around the central axis, or it can be prismatic that moves along that central axis (note that it doesn’t affect the link itself, which is always rigid).
There are few properties we need to pay attention to.
Between two links
The two links have their own axes. With two axes, you can narrow down a common normal
.
The link length
, or in the diagram, is the length along the common normal from axis to axis . Note that the link may be weirdly shaped, but all you care about is this common normal. The common normal is the shortest distance between these axes.
If project the axis onto axis along the common normal, you’ll get an angle denoted as above, and it references the link twist
. Note that this is the same angle you’d have to twist axis along the common normal to get the joints to align. This also latches onto the theme of all rotations being represented by an axis and an angle.
Two special cases exist:
- First, if the links are overlapping, then the link length is 0.
- Second, if the links are parallel, then the link twist is 0.
Connecting links together (DH Parameters)
So we saw how link length and link twist are important parameters for a link. Now, this is a stationary property that doesn’t change with joint angle. So how does joint angle play into it?
Well, if we look at the next link, we realize that the angle between our current common normal and the next common normal is determined by . And the vertical offsets between the common normals are determined by , the prismatic offset. In revolute joints, changes but not . Vice versa for prismatic joints. However, it may be the case that revolute joints have a constant offset (because of the hardware), and prismatic joints have a constant rotation. This must be considered in the equations.
These four parameters: tell us how two links behave. These are known as the Denavit-Hartenberg
parameters. You can imagine telling us how the link works, and telling us how to orient the next link.
First and last links
With our four parameters, we can define for . But the first and last links are really weird. The first link is base → first joint, and the last link is last joint → end-effector tip.
You could specify the base as something different than the first joint, which would mean that you have non-zero . However, conventionally we assume that the base overlaps with the first joint, which means that the only non-zero property is or .
For the last link, we know that there is no extra joint, so must be 0. For simplicty, we also assume that the last joint is the end-effector, which means that as well. This is just for simplicity.
Notation
Rotational joints are denoted as “spools”. The spools rotate as if you had a pin in the hole that goes through the spool. Primatic joints are denoted as diamonds. They move along the axis that the diamonds pinch.
Attaching Frames to links
In general, for each joint, three of the Denavit-Hartenberg parameters will be fixed and one will be variable.
We can do this by using a fixed convention. First, let’s define the point of the frame of axis as the intersection of the shared normal and the axis vector.
Direction convention
Let point along the common normal to the next axis. Let point in the direction of the axis. The direction is actually arbitrary, but it influences how you define and the positivity of the angle.
If the axes intersect (like with a sphere joint), you will need to make a choice on the direction that points. Choose the direction such that the angle from axis to is positive.
Now, note that this is defined as the direction you would need to rotate axis to align with axis . This is consistent with using the right hand rule around axis .
First and last links
The first and last links are also tricky. As we mentioned above, we should try to set the base as close to the reference frame as possible. In revolute joints, that means setting , meaning that when , the base frame is the first frame. Simialrlly with prismatic joints, we want to pick something where .
And the last link math is similar; make sure that you set zero offset except for what the joint does. This corresponds to having the last joint be the end-effector.
Example: RRR
If we consider a planar robot with 3 joints, we can see how the parameters come together. You can see how frame 0 is the base, and how frame 1 aligns with frame 0 when . Because all joints are planar, the for all , and the is just the length of the link. So this is one of the simpler setups.
Good diagram
Propagation of Frames
Now the big question is this: given the DH parameters for the arm, can we derive the different frames?
The trick is that each of the DH parameters specify a particular transformation, and the composition is actually really simple. From frame , you want to…
- apply a rotation matrix to align the two joints. By construction, this means that you rotate around the x axis by degrees
- apply a translation to move joint to joint . Note that because you’re already aligned on the common normal, so you just have to translate the
- Apply a rotation (if needed) that represents the rotation of this next joint. Because you’re already aligned this is just a rotation around z
- Apply a translation (if needed) that represents the motion of the prismatic joint. Because you’re already aligned, this is just a translation with .
This can be written as
Which you can imagine as rotating the previous joint to align with the current one. Then, moving this joint to the current one. These are actions on the . Then, you rotate and translate around , which creates your current . Remember: first create the z from the x, then the x from the z.
And here’s what the operator looks like
The final homogenous matrix
Kinematics of Manipulators
Once you know how to bring us from one frame to another, you can map joint angles to positions and rotations!
Direct Kinematics
This brings us to the concept of direct kinematics
, which is mapping joint space coordinates to task space.