Skip to content

Skip obsolete MuJoCo fields when constructing named indexers - #567

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/525-ignore-obsolete-mujoco-struct-fields-20261011
Open

sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/525-ignore-obsolete-mujoco-struct-fields-20261011

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Fixes #525. Also addresses the same obsolete-field lookup failure described in #509.

Changes

MuJoCo releases can remove model/data attributes while locally generated field-size metadata still mentions them. Skip attributes that are absent from the runtime object, just as the existing named-indexing logic already skips non-array and structured fields.

Add tests that inject stale MjModel and MjData metadata, verify that missing fields are ignored, and confirm that present fields remain accessible by name.

Verification

  • dm_control/mujoco/index_test.py: 692 passed, including both new regression tests.
  • The tests used generated MuJoCo binding files copied locally for runtime validation. Those generated bindings are not included in this PR.
  • No changes to simulation stepping, memory layout or metadata generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mujoco 3.3.6 is breaking dm_control

1 participant