gazebosim / gz-mujoco

27 stars 4 forks source link

MJCF to SDFormat: Support defaults for assets (meshes and materials) #98

Closed azeey closed 2 years ago

azeey commented 2 years ago

🎉 New feature

Summary

Currently, we only support defaults for items under <worldbody>. This adds support for applying defaults to <mesh> and <material> which are under <assets>. This is needed to convert a non-public model that uses defaults for <mesh>.

Test it

test_defaults.py

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 #98 (87380ac) into main (578f6e0) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
+ Coverage   95.14%   95.15%   +0.01%     
==========================================
  Files          24       24              
  Lines        1173     1177       +4     
==========================================
+ Hits         1116     1120       +4     
  Misses         57       57              
Impacted Files Coverage Δ
...ormat_mjcf/mjcf_to_sdformat/converters/material.py 95.65% <100.00%> (ø)
...sdformat_mjcf/mjcf_to_sdformat/converters/world.py 97.56% <100.00%> (+0.08%) :arrow_up:
sdformat_mjcf/src/sdformat_mjcf/utils/defaults.py 82.05% <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 578f6e0...87380ac. Read the comment docs.