# KDL for arm

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 close merge delete

Sort by » oldest newest most voted

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)));


or

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


-- Ruben

more

It is very useful. thanks, Ruben
( 2011-03-30 15:35:35 -0600 )edit

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

( 2012-04-26 18:27:32 -0600 )edit

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 http://www.ros.org/wiki/robot_model

more

I will try kdl_parser. Thank you!
( 2011-03-30 15:37:03 -0600 )edit

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

more