Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#552 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Confronta dm_control/mjcf/schema.xml a HEAD con la versione precedente alla rigenerazione 985d0940^, concentrandoti sulle dichiarazioni sensor/contact, actuator/jointinparent e custom/numeric data. Riproduci i tre casi dell’issue, quindi esegui la test suite di mjcf e aggiungi test di regressione che mostrino che contact parsing, le attach()-joint references e i numeric arrays funzionano di nuovo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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. <sensor> lost its <contact> child

from dm_control import mjcf
xml = """<mujoco>
  <worldbody><body name="b"><joint name="j" type="slide"/><geom name="g" size="0.1"/></body></worldbody>
  <sensor><contact name="cs" geom1="g" num="1" data="found" reduce="netforce"/></sensor>
</mujoco>"""
mjcf.from_xml_string(xml)
# KeyError: "Line ...: error while parsing element <contact>: '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:

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

root = mjcf.RootElement(model='m')
root.custom.add('numeric', name='x', data=[1, 2, 3])
# ValueError: during initialization of attribute 'data' of element <numeric>: 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.

Lingua principale
Python
Stelle
4.7k
Fork
765
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google-deepmind/dm_control

Tutte le issue di google-deepmind/dm_control

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.