# How to determine the direction of X-Axis in Denavit Hartenberg process? [Sketch inside]

The rules of assigning axes for DH parameters are (as I know them): 1- Z: in the direction of the axis of rotation/translation of revolute/prismatic joints. 2- X: perpendicular to the previous Z axis but not colinear with the current Z-axis. 3- Y: fill the cartesian coordinate.

But my question is: how do you assign the direction of X axis? you can have two directions for X-axis when assigning it. See the picture below

The DH method is ambigous. There are multiple solutions which are correct and leat to the same TCP pose.

Try to make a minumum amount of changes in the coordinate systems with the transition. If you can choose the x axis pointing in the same direction as the previous one then do so. If not, you can try to anticipate how the next X axis should be or how the TCP X direction will be and try to match that. In other words, as a rule of thumb, the more 0-s in the DH table the better.

• Thank you. So for the picture attached, both answers are correct but the left one makes calculating the parameters easier, right? Commented Mar 19, 2019 at 12:22
• At first sight, yes, but I did not do DH in a long time. If you can write the transformation matrix and it leads to the CS then is correct.
– 50k4
Commented Mar 19, 2019 at 12:44

You should use right-handed coordinate system, that means if you curl your palm/fingers of your right hand from +x to +y, then your thumb direction shows the +z direction.

For DH you have to follow these rules ,

• But both of the solutions I attached in the picture satisfies the right hand rule. Commented Mar 19, 2019 at 12:22