Ask Your Question
0

Define KDL tree structure in C++

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

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
1

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

See here http://orocos.org/wiki/main-page/kdl-... and here http://docs.ros.org/melodic/api/oroco... 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

2 followers

Stats

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

Seen: 76 times

Last updated: Feb 22