Define KDL tree from URDF file outside ROS
I have a URDF file of my robot, I am trying to define KDL tree inside C++ something like following:
KDL::Tree my_tree;
if (!kdl_parser::treeFromFile("robot.urdf", my_tree)){
std::cout << "Failed to construct kdl tree"<< std::endl;
return false;
}
The above code works with ROS. However, in another project, which is not a ROS project, I need to construct this KDL tree. This computer doesn't have ROS and sadly the OS is Windows.
How to install kdl_parser without using ROS.
_PS: I do not want to install ROS on Windows for this task._
So as this is Windows, KDL is ROS agnostic and you state you don't want to install ROS, I'm thinking this is no longer a question suitable for ROS Answers.
If you feel otherwise, please clarify.
For the non-ROS integrated version of KDL, see orocos/orocos_kinematics_dynamics.
Note: parsing URDFs is possible "without ROS", but things like
package://
URIs and substitution args will most likely not work, limiting you signficantly.@gvdhoorn: Thank you very much. I am looking into the GitHub you shared. However, I am still not able to find out the API to parse URDF without ROS. Can you please once again explain
how to parse URDF without ROS"
? Maybe you can write down this as an answer! It can solve my issue! Thanks again.Please note that all the joints are revolute and I am only interested in performing forward Kinematics. I am not interested in any graphics and just a skeleton (line) model is fine for me.