gazebosim / gz-mujoco

25 stars 4 forks source link

Prototype #29

Closed ahcorde closed 2 years ago

ahcorde commented 2 years ago

πŸŽ‰ New feature

Summary

This draft PR holds a prototype to convert from mjcf to sdformat and viceversa.

Test it

git clone https://github.com/gazebosim/gz-mujoco/ -b ahcorde/mjcf2sdformat
cd gz-mujoco
pip install -e sdformat_to_mjcf
pip install -e mjcf_to_sdformat
pip install -e sdformat_mjcf_utils
python -m mjcf_to_sdformat.mjcf2sdformat <path_to_dm_control>/dm_control/suite/pendulum.xml | tee output.sdf
python -m sdforma_to_mjcf.dformat2mjcf <gzim>/examples/worlds/<name>.sdf | tee output.xml

acrobat

mujoco_rolling_shapes

pendulum_exported_from_mujoco

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.

ahcorde commented 2 years ago

This PR was splitted in smalls PRs: