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

Define KDL tree structure in C++

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

ravijoshi 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 -0600

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

Question Tools

2 followers

Stats

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

Seen: 580 times

Last updated: Feb 22 '19