gazebosim / gz-usd

Command line tools to convert SDFormat to USD and viceversa
Apache License 2.0
20 stars 5 forks source link

Error: Could not find the 'robot' element in the xml file #9

Open Zhehui-Huang opened 2 years ago

Zhehui-Huang commented 2 years ago

When I transfer sdf model to usd model. I met the issue below. Error: Could not find the 'robot' element in the xml file at line 109 in /build/urdfdom-VnCcob/urdfdom-1.0.4+ds/urdf_parser/src/model.cpp Errors encountered: Error Code 1: Msg: Unable to read file:model.sdf

Here is the sdf file: https://github.com/bitcraze/crazyflie-simulation/blob/main/gazebo-ignition/crazyflie/model.sdf

scpeters commented 2 years ago

What software are you using to load this model?

I noticed some inconsistencies by running ign sdf --check on this file and it complains about the unrecognized frame attribute used with <pose> elements. This attribute has been renamed to relative_to in SDFormat version 1.7+, and this file is using 1.8. If you are not actually using any features from SDFormat 1.8 you can try setting the version to 1.6 or just deleting the empty frame attributes.

joshuacv commented 2 years ago

Try changing the name of your file from model.sdf to something else. I dont know why but this made a difference for me. An issue for this has been raised.

refer to #8

ashBabu commented 3 months ago

I had the same issue. ROS2 humble, Gazebo garden. I cloned sdformat_urdf in my ros2_ws, built and it works fine.