Ask Your Question

Define KDL tree structure in C++

asked 2019-02-21 08:11:17 -0600

Ravi Joshi gravatar image

This question is not completely related to ROS. However since KDL is used heavily inside ROS, I am requesting and posting here.

I have a URDF file, which I could parse and build KDL tree using kdl_parser using the following way:

KDL::Tree my_tree;
if (!kdl_parser::treeFromFile("robot.urdf", my_tree)){
    std::cout << "Failed to construct kdl tree"<< std::endl;

However, due to a project limitation, I can not use ROS and hence unable to use kdl_parser. Please note that I am working on Windows OS. Below is a snippet of KDL tree of my robot which contains only revolute joints:

image description

Please note that the above image is a part of the big tree, however, to keep this post shorter I cropped it and added leaf nodes.

Since I am not able to parse the URDF file, I am thinking to construct the KDL tree manually. Although, it is not good practice and I am limited with resources here.

Can someone please explain me how to construct a KDL tree for the above image? All the joints are revolute and I am only interested in performing forward Kinematics.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-22 06:41:29 -0600

See here and here for more info. Should be pretty straight forward.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-02-21 08:11:17 -0600

Seen: 221 times

Last updated: Feb 22 '19