gazebosim / gz-mujoco

25 stars 4 forks source link

sdformat_to_mjcf: set friction parameter #70

Closed scpeters closed 2 years ago

scpeters commented 2 years ago

🎉 New feature

Part of #12.

Summary

Mujoco supports three friction parameters for a given geom as an array: [sliding_friction, torsional_friction, rolling_friction]. The pull request maps the //surface/friction/ode/mu parameter to the sliding_friction value. I've added a test and an example world with sliding boxes of varying friction coefficients.

Test it

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 #70 (d29e739) into main (56704dd) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #70   +/-   ##
=======================================
  Coverage   98.84%   98.85%           
=======================================
  Files          21       21           
  Lines        1992     2008   +16     
=======================================
+ Hits         1969     1985   +16     
  Misses         23       23           
Impacted Files Coverage Δ
...t_mjcf/tests/sdformat_to_mjcf/test_add_geometry.py 99.48% <100.00%> (+0.04%) :arrow_up:
...jcf/tests/sdformat_to_mjcf/test_name_collisions.py 95.58% <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 56704dd...d29e739. Read the comment docs.

scpeters commented 2 years ago

I don't understand why https://github.com/gazebosim/gz-mujoco/pull/70/commits/b9138c40492af878f77c4afe11f306d0d6553e4c didn't fix the coverage complaint