# Friday Facts 13: How to find DH parameters for your robot

So you’ve got Marlin firmware installed, your models ready to load into Robot Overlord and now the struggle is figuring out the Denavit–Hartenberg parameters. We’ll cover where to find critical dimensions, some of the pitfalls along the way, and compare with a few different models to help clear up any misunderstandings. It is assumed that you already absorbed an understanding of D-H parameters from places like the wikipedia link previously mentioned.

## Start with the data sheet

Commercial electronics products should have a *data sheet* or user manual. This is true for electronics components and it’s true for robot arms. The data sheet will have operating limits, physical limits, dimensions, use instructions, and more.

This is the dimension drawing for the 6-axis Sixi 3 robot.

## D-H parameters in Robot Overlord

Here are the D-H parameters from Robot Overlord for Sixi3 6-axis model. Dimensions here are in centimeters. thetaMax and thetaMin are the rotation limits on a given joint.

```
// name d r alpha theta thetaMax thetaMin modelFile
addBone(new RobotArmBone("X", 7.974, 0,270, 0,170,-170,"/Sixi3b/j1.obj"));
addBone(new RobotArmBone("Y", 9.131,17.889, 0,270,370, 170,"/Sixi3b/j2.obj"));
addBone(new RobotArmBone("Z", 0,12.435, 0, 0,150,-150,"/Sixi3b/j3.obj"));
addBone(new RobotArmBone("U", 0, 0,270,270,440, 100,"/Sixi3b/j4-6.obj"));
addBone(new RobotArmBone("V",15.616, 0, 90, 90,90+180,90-180,"/Sixi3b/j5-6.obj"));
addBone(new RobotArmBone("W", 5.15, 0, 0, 180,360, 0,"/Sixi3b/j6-6.obj"));
```

## Gotchas

It’s good to remember that the physical *point of rotation* (PoR) is not necessarily the same as the mathematical PoR. It’s tempting to think of the first PoR being where the shoulder meets the base, about 40mm up from the origin. Actually it is at the origin! Here is what it looks like illustrated by the Robot Overlord simulation

At each PoR there is a 3×3 matrix. Each matrix has red/green/blue lines meaning x/y/z axies, respectively. Notice that the *axis of rotation *is always the blue z axis. The first joint has a blue line pointing up, as does the 5th. The 7th matrix on the face of the hand is the attachment point for a tool.

The math model and the physical model are slightly different like that. It is important that the axis of rotation is in the right place. It is not crucial that the point of rotation be, say, right between two moving parts. Typically the PoR is constrained by the location of the previous and the next PoR. Each of them is also constrained by the D and R values – you cannot “move” from one link to the next along the green Y axis…ever.

## Compare and contrast

Here’s an image of a meca500 I found in their user manual.

Can you identify all 6 PoR? If the first joint (0) is at the origin, where are joint 3, 4, and 5?

## Final thoughts

Work out the mathematical model of your robot before you do the rest of the design. Nobody wants to be stuck with a model that is incompatible D-H parameters.

Add your arm to Robot Overlord and share it with us. We want to celebrate your greatness and collaborate together.