gazebosim / gz-mujoco

27 stars 4 forks source link

Improve logic for creating unique names. #45

Closed azeey closed 2 years ago

azeey commented 2 years ago

🎉 New feature

Summary

The new logic uses MJCF's Namescope to check if a given name exists in a given namespace. If so it adds an incrementing numeric suffix until a unique name is found.

Test it

Run test_name_collisions.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 #45 (f0797a6) into main (0bef4bb) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #45   +/-   ##
=======================================
  Coverage   97.09%   97.09%           
=======================================
  Files          14       14           
  Lines         482      482           
=======================================
  Hits          468      468           
  Misses         14       14           
Impacted Files Coverage Δ
...at_to_mjcf/sdformat_to_mjcf/converters/geometry.py 92.30% <ø> (-0.12%) :arrow_down:
...format_to_mjcf/sdformat_to_mjcf/converters/link.py 100.00% <ø> (ø)
...ormat_to_mjcf/sdformat_to_mjcf/converters/joint.py 96.96% <100.00%> (+0.04%) :arrow_up:

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 0bef4bb...f0797a6. Read the comment docs.