gazebosim / gz-mujoco

25 stars 4 forks source link

Suggestions for default valued materials #63

Closed azeey closed 2 years ago

azeey commented 2 years ago

Summary

The default value of a materials rgba is [1 1 1 1], so I thought we should use that when material.rgba is None. This also increases test coverage by testing default values of emission and specular. The documentation on material.rgba also states

Note that textures are applied in GL_MODULATE mode, meaning that the texture color and the color specified here are multiplied component-wise. So, we should not discard the rgba values when setting textures.

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 #63 (8441891) into ahcorde/mjcf2sdf/material (5c9eb8a) will increase coverage by 0.22%. The diff coverage is 100.00%.

@@                      Coverage Diff                      @@
##           ahcorde/mjcf2sdf/material      #63      +/-   ##
=============================================================
+ Coverage                      96.98%   97.20%   +0.22%     
=============================================================
  Files                             19       19              
  Lines                            828      824       -4     
=============================================================
- Hits                             803      801       -2     
+ Misses                            25       23       -2     
Impacted Files Coverage Δ
...o_sdformat/mjcf_to_sdformat/converters/material.py 91.48% <100.00%> (+3.25%) :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 5c9eb8a...8441891. Read the comment docs.