The Denavit-Hartenberg Convention
Learning Objectives
- Name the four Denavit-Hartenberg parameters , , , , say which one is the joint variable for a revolute and for a prismatic joint, and read each one off a drawing.
- Assign link frames step by step on a three-joint arm, including the cases of intersecting and parallel axes, and fill in the table.
- Write the link transform of the classic convention and of the modified convention, and say which convention a given source uses.
- Check forward kinematics computed from a table against a product of transforms written directly from the geometry, numerically.
- Recognize what goes wrong when a table written for one convention is fed to the formula of the other.
Context & Motivation
forward-kinematics-of-serial-manipulators wrote the pose of the end effector as a product of link transforms, and homogeneous-transformations-for-robot-poses gave each factor its meaning: a matrix that places one frame in another. Nothing in that recipe says where each link frame should sit. With frames placed freely, each link transform needs six numbers, three for position and three for orientation.
Denavit and Hartenberg (1955) proposed rules for placing the frames so that only four numbers per link remain. Modern Robotics (Lynch and Park, Appendix C) reports that they also showed four to be the minimum. The payoff is a compact table: one row per joint, one column per parameter, one moving entry per row. Murray, Li and Sastry (1994) noted that DH parameters were available for standard industrial robots and used by most commercial simulation and programming systems, and toolkits such as the Robotics Toolbox for Python still build arm models from them.
The trouble is that two incompatible versions of the rules are in common use, and both are called "DH". A table is meaningless unless you know which one wrote it.
Core Theory
Vectors are columns, and a matrix gives the pose of frame in frame , so . Products are read left to right as motions of the current (moving) frame. Angles are positive by the right-hand rule about the named axis. Write and .
The idea: only x and z moves
Both conventions put a axis on every joint axis. For a revolute joint, is the axis of rotation. For a prismatic joint, points in the direction of positive travel. Between two consecutive joint axes there is a common normal, the line that meets both at right angles, and the axis is laid along it. With those two choices, getting from one frame to the next takes only a rotation and a translation along and a rotation and a translation along . Lateral motion along is never needed, which is where the saving from six numbers to four comes from.
The four numbers are:
| parameter | name | measured |
|---|---|---|
| link length | along the common normal, between the two joint axes | |
| link twist | angle between the two joint axes, about the common normal | |
| link offset | along a joint axis, between two consecutive common normals | |
| joint angle | angle between two consecutive common normals, about a joint axis |
For a revolute joint is the variable and , , are constants. For a prismatic joint is the variable and is constant. The conventions differ in which joint axis gets which frame index, and so in the order of the four motions.
The classic convention
In the classic convention (also called standard or distal), the axis of joint is , and frame sits at the far end of link . The rules:
- Put along the axis of joint .
- Put along the common normal from to , with origin where that normal meets .
- Then is the distance from to along , the angle from to about , the distance from to the foot of along , and the angle from to about .
The link transform is a rotation and a translation along , then a translation and a rotation along the new :
The modified convention
In the modified convention (also called proximal), the axis of joint is , and frame sits at the near end of link , on its own joint. The parameters keep their meanings but the twist and length that lead into joint carry the index :
A rotation about commutes with a translation along , and the same holds for , so some sources write the factors as . That is the same matrix.
Who uses which
- Modern Robotics (Lynch and Park), Appendix C: the modified form, with parameters , , , and exactly the matrix above. The book does not use the word "modified". Its main text uses the product of exponentials instead of DH.
- Murray, Li and Sastry (A Mathematical Introduction to Robotic Manipulation), Chapter 3, Section 2.3: the classic matrix, with the joint angle written .
- Robotics Toolbox for Python documentation: classes
RevoluteDHandRevoluteMDH, and a flag that is true "for modified Denavit-Hartenberg notation (eg. Craig's textbook)" and false "for standard Denavit-Hartenberg notation (eg. Siciliano, Spong, Paul)". - Wikipedia, "Denavit-Hartenberg parameters": names Craig's Introduction to Robotics (3rd edition) as a book that uses the modified parameters.
Modern Robotics also warns that some authors put the joint axis on instead of , and concludes that "it is essential to include a concise description of the link frames together with the parameter values."
Special cases
- Intersecting axes. There is no common normal, so and is taken perpendicular to the plane of the two axes. Either of its two directions works, and the choice flips the sign of .
- Parallel axes. There are infinitely many common normals. Pick the one that zeroes the most parameters, usually .
- Base and tool. The rules leave the first and last frames partly free. Choose them to zero parameters. A frame displaced sideways along cannot be reached with and motions (Modern Robotics gives a pure translation along as the example), so a tool frame is often added as one extra constant transform after the table.
Worked Examples
Example 1: frames on an articulated arm, step by step
The arm has a vertical base joint, a horizontal shoulder joint at height m, and a horizontal elbow joint parallel to the shoulder. The upper arm is m and the forearm, measured to the tool tip, is m. The lengths are assumed.
Step 1, axes. Joint 1 axis: vertical through the base. Joint 2 axis: horizontal, perpendicular to the plane of the arm. Joint 3 axis: parallel to joint 2, through the elbow.
Step 2, classic axes. on joint 1, pointing up. on joint 2 and on joint 3, both pointing the same way, chosen so that a positive lifts the arm. With pointing along the arm at , this makes at .
Step 3, frame 1. and intersect at the shoulder, so and is the shoulder. must be perpendicular to both, so it is horizontal, in the plane of the arm. The angle from (up) to about is , since sends to . The shoulder is m up , so .
Step 4, frame 2. , so the common normal is chosen along the upper arm: points from shoulder to elbow, is the elbow, , , .
Step 5, tool frame. at the tip, along the forearm, : , , .
| (m) | (m) | |||
|---|---|---|---|---|
| 1 | ||||
| 2 | ||||
| 3 |
At the product gives a tip at : arm horizontal, stretched along , as the frames were drawn. At :
Example 2: checking the table against a direct product
The check must not reuse the table. Describe the same arm by its physical motions: turn about the vertical by , rise , pitch up by (a rotation about ), move along the arm, pitch by , move :
At the same angles its last column is , which also matches the plane-geometry formula with . The rotation parts differ, and : the direct frame keeps its axis on the joint axis, the DH frame puts there. That offset is a choice of tool frame, so it must be the same at every configuration. With rng = numpy.random.default_rng(5) and 1000 configurations drawn from rng.uniform(-pi, pi, (1000, 3)), the largest entry of was . With the sign of flipped to , the same test fails at once: positive now lowers the arm, and at the example angles the tip lands at height m instead of m.
Example 3: the same arm in the modified convention
Now sits on joint . Frame has vertical (joint 1) with its origin at shoulder height. Frame has on the shoulder axis, at the shoulder. Frame has on the elbow axis, at the elbow. The tip needs one more constant row, since no joint lives there.
| (m) | (m) | |||
|---|---|---|---|---|
| 1 | ||||
| 2 | ||||
| 3 | ||||
| tool |
The final pose equals the classic to on the same 1000 configurations. The intermediate frames do not agree, and that is the visible difference between the conventions:
textframe classic origin classic z modified origin modified z {1} (0, 0, 0.4) shoulder shoulder axis (0, 0, 0.4) vertical (joint 1) {2} (0.306, 0.177, 0.754) elbow axis (0, 0, 0.4) shoulder shoulder axis {3} (0.641, 0.370, 0.650) tip elbow axis (0.306, 0.177, 0.754) elbow axis
Classic frame is on joint , modified frame is on joint . Anything indexed by frame, such as a center of mass or an inertia written "in frame 2", changes meaning between the two.
Example 4: a prismatic joint, and mixing conventions
A SCARA-type arm has two vertical revolute joints and a vertical prismatic joint that moves the tool down. Assume a shoulder height m and link lengths m and m. In the classic convention points down along the travel, so , and the variable sits in the column:
| (m) | (m) | |||
|---|---|---|---|---|
| 1 | ||||
| 2 | ||||
| 3 |
At the tip is , which is . The modified table, rows , , , gives the same pose to over 1000 random configurations from the same generator.
Now the common mistake. Feed the classic table of Example 1 into the modified formula at : the tip comes out at , m from the true . The modified table fed to the classic formula is off by m. Neither error raises an exception, since both results are valid rigid transforms. Only a check against an independent computation, as in Example 2, catches it.
Common Misconceptions & Pitfalls
- "A DH table describes the robot." It describes the robot plus a convention plus a set of frame choices. Without the convention, the same numbers placed the tip m away in Example 4.
- " is the length of link ." It is the distance between two joint axes along their common normal. Modern Robotics points out that it "does not necessarily correspond to the actual length of the physical link".
- "The table is unique." At intersecting and parallel axes, and at the base and tool, the rules leave choices. Two correct tables for the same arm can differ in signs and zeros.
- "Classic and modified differ by a shift of index." The index shifts, the order of the factors changes, and the frames move to different joints (Example 3). The final pose agrees only if the tool row is handled.
- "Any frame can be a DH frame." A sideways offset along cannot be expressed, so tools are often attached with one extra fixed transform.
Summary
The Denavit-Hartenberg rules put a axis on every joint and an axis on every common normal, which reduces each link transform to four parameters: link length , twist , offset and joint angle , with variable for a revolute joint and variable for a prismatic one. The classic convention puts joint on and uses . The modified convention puts it on and uses . Modern Robotics and Craig use the modified form, Murray, Li and Sastry, Spong, Siciliano and Paul the classic one, according to the sources above. On a three-joint articulated arm both tables reproduced a direct product of transforms to , while a table read with the wrong formula missed by m without any warning.