MJCF <option> gravity, timestep and impratio are accepted and silently dropped, while cone and condim already warn

Author: omnilink-techCreated Aug 27, 2026Updated Sep 7, 2026
LabelsenhancementP1

genesis/utils/mjcf.py already implements exactly the right discipline for this, with the reasoning written into the code:

python
# Friction features the model declares but the rigid options leave disabled parse to
# inert values; warn so their absence in the simulation is no surprise

and then warns on three: mj.opt.cone vs rigid_options.friction_cone, geom_condim >= 4 vs enable_torsional_friction, and geom_condim >= 6 vs enable_rolling_friction.

Three neighbouring <option> fields get no such treatment. Searching genesis/utils/mjcf.py:

cone       3 occurrences
condim     9 occurrences
gravity    0
timestep   0
impratio   0

impratio is the one I would flag first, because it is already a first-class Genesis option -- genesis/options/solvers.py declares impratio: PositiveFloat | None = None, documented as resolving to 100 with the elliptic cone (1 under enable_mujoco_compatibility) and 1 otherwise. So an MJCF declaring impratio="10" is accepted at load and silently replaced by Genesis's own resolution. That is the same class as the opt.cone case you already warn about, on the same options object, one field over.

It is not an academic field either: impratio is the single knob that decides whether a pinch holds under an elliptic cone, and MuJoCo Menagerie hands and grippers set it deliberately. A user porting one of those models gets a different grasp with no indication why.

<option gravity> and <option timestep> are unread and unwarned in the same way.

For contrast, and worth saying because it makes this a gap in one path rather than a project posture: your URDF importer is thorough -- it reads dynamics.friction, dynamics.damping, limit.effort, safety_controller.k_velocity, and translates <mimic> into an equality constraint. That last one is notable; MuJoCo's own URDF parser drops <mimic> entirely, so Genesis is ahead of it there.

The minimal change is extending the existing warning block to opt.impratio, opt.gravity, opt.timestep and opt.integrator -- completing a pattern you already wrote rather than importing one.

Happy to send that as a PR with a small MJCF fixture declaring impratio="10" and timestep="0.001", showing the compiled values the solver actually uses against the authored ones, if that would be welcome.

Source: Genesis-Embodied-AI/genesis-world