Error while using kdl parser

asked 2016-11-01 22:34:24 -0500

ZainMehdi gravatar image

Hi, I am trying to use kdl_parser to parse my model in a tree. I have followed this tutorial and this is how my code looks like

 KDL::Tree my_tree;
 kdl_parser::treeFromFile("pr2.urdf", my_tree) ;

My urdf file is in src folder same as launch file. When i run y code I get following error

[ERROR] [1478057330.280260467]: Error document empty.
[ERROR] [1478057330.280322948]: Could not generate robot model

if i remove above chunk of code error disappears. I am not sure whats wrong here. would be thankful for help

edit retag flag offensive close merge delete

Comments

Are you sure URDF is formatted correctly? See 5.1 in URDF wiki.

JoshMarino gravatar image JoshMarino  ( 2016-11-01 22:46:33 -0500 )edit

robot name is: r2d2 ---------- Successfully Parsed XML --------------- root Link: axis has 3 child(ren) child(1): leg1 child(2): leg2 child(3): body child(1): head child(1): rod child(1): box

urdf seems fine ...

ZainMehdi gravatar image ZainMehdi  ( 2016-11-01 23:05:50 -0500 )edit