gazebosim / gz-mujoco

27 stars 4 forks source link

Fix default class and names so generated xml doesn't contain `/` #94

Closed azeey closed 2 years ago

azeey commented 2 years ago

🦟 Bug fix

Summary

I tried to convert dm_control/dm_control/suite/dog.xml and encountered an error

FileNotFoundError: Line 166: error while parsing element <mesh>: during initialization of attribute 'file' of element <mesh>: [Errno 2] No such file or directory: 'dog_assets\\/BONEC_1.stl'

The problem seem is that we are telling pymjcf to escape / characters and that is interfering with the slash in file paths. The solution here is to go back to ensure that the / is not generated in our output MJCF files.

Checklist

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

codecov[bot] commented 2 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@60beb59). Click here to learn what that means. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #94   +/-   ##
=======================================
  Coverage        ?   95.11%           
=======================================
  Files           ?       24           
  Lines           ?     1167           
  Branches        ?        0           
=======================================
  Hits            ?     1110           
  Misses          ?       57           
  Partials        ?        0           
Impacted Files Coverage Δ
...sdformat_mjcf/mjcf_to_sdformat/mjcf_to_sdformat.py 100.00% <100.00%> (ø)
...sdformat_mjcf/sdformat_to_mjcf/converters/joint.py 97.56% <100.00%> (ø)
...sdformat_mjcf/sdformat_to_mjcf/sdformat_to_mjcf.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 60beb59...d0564e3. Read the comment docs.