gazebosim / gz-mujoco

25 stars 4 forks source link

Do not try to export builtin textures #96

Closed azeey closed 2 years ago

azeey commented 2 years ago

🦟 Bug fix

Summary

When exporting textures, if the texture is a builtin (eg. checker), the converter raises

 AttributeError: 'NoneType' object has no attribute 'prefix'

This PR fixes it by checking if the file attribute is present and set to a non-None value.

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

Merging #96 (e360bd0) into main (03ac0d4) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #96   +/-   ##
=======================================
  Coverage   95.11%   95.11%           
=======================================
  Files          24       24           
  Lines        1167     1168    +1     
=======================================
+ Hits         1110     1111    +1     
  Misses         57       57           
Impacted Files Coverage Δ
...sdformat_mjcf/mjcf_to_sdformat/mjcf_to_sdformat.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 03ac0d4...e360bd0. Read the comment docs.