gazebosim / gz-mujoco

27 stars 4 forks source link

MJCF to SDF: Add Material #42

Closed ahcorde closed 2 years ago

ahcorde commented 2 years ago

Signed-off-by: ahcorde ahcorde@gmail.com

πŸŽ‰ New feature

Summary

Add Material

I have two issues:

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 #42 (e19d5a2) into main (7faaf8d) will decrease coverage by 0.33%. The diff coverage is 92.15%.

@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
- Coverage   97.54%   97.20%   -0.34%     
==========================================
  Files          18       19       +1     
  Lines         773      824      +51     
==========================================
+ Hits          754      801      +47     
- Misses         19       23       +4     
Impacted Files Coverage Ξ”
...o_sdformat/mjcf_to_sdformat/converters/material.py 91.48% <91.48%> (ΓΈ)
...cf_to_sdformat/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 7faaf8d...e19d5a2. Read the comment docs.

azeey commented 2 years ago

According with XML Reference, tight now we only support gridsize="1 1". There is other way to define textures, please review this field gridlayout: string, β€œβ€¦β€¦β€¦β€¦β€ and share your thoughts. This way is not defined ignition, this may require some work in other ignition libraries

I have created an issue about the difference in texture mapping between Gazebo and Mujoco for primitive shapes (#58). I want to test how it works with meshes as well, but we don't have mesh conversion yet. I think it's safe to say SDFormat doesn't support gridlayout, so we can just emit an warning/error if we see a file with that attribute.