ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

KDL for arm

asked 2011-03-23 20:23:08 -0500

Nutan gravatar image

updated 2014-01-28 17:09:24 -0500

ngrennan gravatar image

I'm trying to build a KDL representation of an arm. I am confused by what kind DH used. One kind is rotating z then rotating x axis. Another is rotating x then rotating z axis. My model is the latter. which one does the KDL library use?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2011-03-29 19:04:28 -0500

updated 2011-04-09 01:31:21 -0500

There are two different DH conventions, there is the original Denavit Hartenberg convention and the modified one published in Craig's Introduction to Robotics. KDL's chains are build up using Joints that can rotate about any axis, for DH you have to pick a rotation about the Z axis. For the offset between the current/previous and the next/current joint KDL uses plain homogeneous transformation matrices (Frame) since this is a lot more flexible, a Frame can easily be created from DH parameters, KDL supports both conventions, so if you want to build a chain using DH parameters you should do something like the following:

chain.addSegment(Segment(Joint(Joint::RotZ),Frame::DH(double a, double alpha, double d, double theta)));


chain.addSegment(Segment(Joint(Joint::RotZ),Frame::DH_Craig1989(double a, double alpha, double d,double theta)

-- Ruben

edit flag offensive delete link more


It is very useful. thanks, Ruben
Nutan gravatar image Nutan  ( 2011-03-30 15:35:35 -0500 )edit

Important: the initial row of the DH parameters should be added as a Joint::Fixed and not a Joint::RotZ.

jbohren gravatar image jbohren  ( 2012-04-26 18:27:32 -0500 )edit

answered 2011-03-28 10:00:21 -0500

Miguel Prada gravatar image

Hi Nutan,

As far as I can tell KDL does not directly support DH parameters to specify the kinematic chain. This is because this representation is quite limited (e.g. can't manage branching mechanisms).

I'd recommend you to use URDF, which is a XML based robot description file format which can be easily parsed into a KDL chain using kdl_parser.

You can find lots of information on both URDF and kdl_parser in the robot_model stack docs at

edit flag offensive delete link more


I will try kdl_parser. Thank you!
Nutan gravatar image Nutan  ( 2011-03-30 15:37:03 -0500 )edit

answered 2011-04-04 01:18:55 -0500

bit-pirate gravatar image

For KDL-specific questions I also recommend their mailing list(s):

edit flag offensive delete link more

Question Tools


Asked: 2011-03-23 20:23:08 -0500

Seen: 2,379 times

Last updated: Apr 09 '11