gazebosim / gz-mujoco

25 stars 4 forks source link

MJCF to SDFormat: Fix index generation for visuals and collisions #97

Closed azeey closed 2 years ago

azeey commented 2 years ago

🦟 Bug fix

Summary

The index generation was not working properly because the variables NUMBER_OF_VISUAL and NUMBER_OF_COLLISION were not being incremented. The function prefix_name_with_index does increment the passed index, but it's incrementing a copy since integers are immutable in python.

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 #97 (d5098cc) into main (0d7ed5f) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #97      +/-   ##
==========================================
+ Coverage   95.12%   95.14%   +0.01%     
==========================================
  Files          24       24              
  Lines        1170     1173       +3     
==========================================
+ Hits         1113     1116       +3     
  Misses         57       57              
Impacted Files Coverage Δ
sdformat_mjcf/src/sdformat_mjcf/utils/sdf_utils.py 90.98% <ø> (-0.08%) :arrow_down:
.../sdformat_mjcf/mjcf_to_sdformat/converters/link.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 0d7ed5f...d5098cc. Read the comment docs.