gz-usd icon indicating copy to clipboard operation
gz-usd copied to clipboard

While running sdf2usd URDF parser throws an error if the input file is named "model.sdf"

Open joshuacv opened this issue 2 years ago • 0 comments

While trying to convert an sdf file, I came across this problem that if the model is named model.sdf, the gz-usdf throws this an error. The error seems to be coming from the urdf parser (I dont see a reason why the urdf parser is called for parsing the sdf file)

Environment

  • OS Version: Ubuntu 20.04
  • Source build: Main branch and looks like commit number is 6fb572b5ed3c4cf165de158b193a33cace6ef2b5

Description

  • Expected behavior: convert .sdf files to .usd files
  • Actual behavior: An error is thrown (details below)

Steps to reproduce

  • Follow the steps in #6 to install gz-usd using the relevant USD branch
  • Test if sdf2usd works
    • navigate to the test/sdf folder in gz-usd
    • sdf2usd basic_shapes.sdf basic_shapes.usda
    • This should work
  • Rename the basic_shapes file to model.sdf
  • Run the coverter using sdf2usd model.sdf model.udsa ->should produce this error

Output

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

Other details

  • sdfformat version is sdfformat12 (was built from source)
  • usd release branch (1c2b097a48edd78abeffb0e7b4c8adfec4d14060) - built from source

joshuacv avatar Aug 05 '22 09:08 joshuacv