Error converting Collada to URDF

asked 2018-09-25 02:44:44 -0600

curi_ROS gravatar image

updated 2018-09-25 06:17:36 -0600

I have a .dae file from which I am trying to convert to extract a URDF format description of the kinematic structure to use in simulation. When i try the collada_urdf package i get this error:

$ rosrun collada_urdf collada_to_urdf *.dae *.urdf ;; Input file is: *.dae Error: 
Error document empty. at line 72 in /build/urdfdom-UJ3kd6/urdfdom-0.4.1/urdf_parser/src/model.cpp ERROR: Model Parsing the xml failed

I am unable to locate this model.cpp file anywhere.

I get the same error when i try to run the test provided along with the package.Same error and same line number which leads me to believe I've made some error building the package.I cloned the package into my workspace and ran a catkin_make to install it, which didn't throw any errors. What am I missing?

Should i edit the collada_to_urdf.cpp? and if so what do i edit?

edit retag flag offensive close merge delete

Comments

Is your command line literally rosrun collada_urdf collada_to_urdf *.dae *.urdf? If so, that is most likely the problem: collada_to_urdf does not support specifying multiple inputs and multiple outputs in one command.

If you're not doing that, please clarify.

gvdhoorn gravatar imagegvdhoorn ( 2018-09-25 03:01:59 -0600 )edit

I tried rosrun collada_urdf collada_to_urdf filename.dae and I get the same error:

Error: Error document empty. at line 72 in /build/urdfdom-UJ3kd6/urdfdom-0.4.1/urdf_parser/src/model.cpp ERROR: Model Parsing the xml failed

curi_ROS gravatar imagecuri_ROS ( 2018-09-25 03:05:57 -0600 )edit

i specified filenames for both the .dae file and the .urdf file and it still shows me the same error

curi_ROS gravatar imagecuri_ROS ( 2018-09-25 03:57:17 -0600 )edit

Is your Collada file just a mesh? Or does it contain other entities?

gvdhoorn gravatar imagegvdhoorn ( 2018-09-25 04:00:27 -0600 )edit

I'm unclear what you mean by entities.I can tell you that i had a .stp file that i wanted to convert to URDF.When i found out that conversion was not possible directly i exported a .dae version of that file in order to use the collada_to_urdf converter.

curi_ROS gravatar imagecuri_ROS ( 2018-09-25 05:12:40 -0600 )edit

Collada files can contain just meshes (ie: triangles and vertices) or actual robot kinematic structure, or both, or none of that.

Btw: "convert to URDF" is a bit of a strange statement: URDF is a description format, text based, with references to meshes. It's not a mesh format itself.

gvdhoorn gravatar imagegvdhoorn ( 2018-09-25 05:52:39 -0600 )edit

Ok.My Collada file contains the mesh and also the kinematic structure. Does collada_to_urdf only support describing of the mesh in the final URDF file from the .dae file? If i then want a similar description of the kinematic structure is there a similar package i can use?

curi_ROS gravatar imagecuri_ROS ( 2018-09-25 06:11:52 -0600 )edit