gazebosim / gz-mujoco

25 stars 4 forks source link

sdformat_to_mjcf: specify nconmax and njmax in SDFormat #69

Open scpeters opened 2 years ago

scpeters commented 2 years ago

Desired behavior

While running in MuJoCo a friction demo world converted from SDFormat, I got several error messages complaining about needing to increase nconmax and njmax and the simulated behavior was very weird. After increasing the values, I saw reasonable simulated behavior.

<mujoco model="default">
  <size nconmax="300" njmax="1000"/>
  <worldbody>
    ...
  </worldbody>
</mujoco>

It would be nice to be able to specify these values in an SDFormat file so they can be passed through to MJCF during conversion.

<sdf version="...">
  <world name="world_name" xmlns:mjcf="https://github.com/gazebosim/gz-mujoco">
    <mjcf:size nconmax="300" njmax="1000"/>
  </world>
</sdf>

Alternatives considered

Implementation suggestion

Additional context

azeey commented 2 years ago

This might be mitigated by https://github.com/gazebosim/gz-mujoco/pull/75.

scpeters commented 2 years ago

This might be mitigated by #75.

nice! that fixes the friction_demo from #70