google-deepmind / google-deepmind/dm_control

Schema regeneration in 985d0940 dropped three declarations MuJoCo 3.12 accepts (contact sensor, jointinparent references, custom numeric arrays)

Offen
#552 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
4.7k
Forks
764
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Commit 985d0940 regenerated `dm_control/mjcf/schema.xml` and dropped three declarations that were present before and that MuJoCo 3.12 still accepts. All three reproduce at HEAD (6b3298d) with mujoco 3.12.0.

**1. `` lost its `` child**

```python
from dm_control import mjcf
xml = """


"""
mjcf.from_xml_string(xml)
# KeyError: "Line ...: error while parsing element : 'contact'"
```

`mujoco.MjModel.from_xml_string(xml)` loads the same model fine.

**2. `jointinparent` degraded from reference to string on all nine actuator elements**

Because it is no longer a `type="reference" reference_namespace="joint"` attribute, `attach()` does not prefix the joint name, and the composed model fails to compile:

```python
child = mjcf.RootElement(model='child')
body = child.worldbody.add('body', name='b')
body.add('joint', name='j', type='hinge')
body.add('geom', name='g', size=[0.1])
child.actuator.add('general', name='a', jointinparent='j')
parent = mjcf.RootElement(model='parent')
parent.attach(child)
mjcf.Physics.from_mjcf_model(parent)
# Error: unknown transmission target 'j' for actuator id = 0
```

**3. `custom/numeric` `data` degraded from float array to string**

```python
root = mjcf.RootElement(model='m')
root.custom.add('numeric', name='x', data=[1, 2, 3])
# ValueError: during initialization of attribute 'data' of element : Expect a string value: got [1, 2, 3]
```

This worked on the prior release.

In all three cases the pre-regeneration schema (`985d0940^`) had the correct declaration; restoring those three pieces fixes all three without affecting the rest of the mjcf test suite. PR incoming with the restore plus regression tests. If the preferred fix is in the schema generator rather than the checked-in file, the repro set here should transfer directly.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Compare dm_control/mjcf/schema.xml at HEAD with the pre-regeneration version 985d0940^, focusing on the sensor/contact, actuator/jointinparent, and custom/numeric data declarations. Reproduce the three cases from the issue, then run the mjcf test suite and add regression tests showing contact parsing, attach() joint references, and numeric arrays work again.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
backend
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
76/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.