MuJoCo-Tutorial icon indicating copy to clipboard operation
MuJoCo-Tutorial copied to clipboard

ValueError: XML Error: Schema violation: unrecognized attribute: 'sensornoise'

Open LutzFassl opened this issue 1 year ago • 3 comments

Describe the bug I wanted to give this a try and installed as suggested. However immediately get this error when running. Suggestion: use versions in your requirements.txt file to make sure your tutorial still works after breaking changes of dependencies

To Reproduce Steps to reproduce the behavior:

  1. Install in a new conda environment on Win10 as you described
  2. python run.py
  3. See error:
(mujoco-tut)` D:\Eigene Dateien\Eigene Dokumente\Programmierung\20 Python\38 RL Ant\01 Tests\Mujoco-Tutorial>python run.py
Traceback (most recent call last):
  File "D:\Eigene Dateien\Eigene Dokumente\Programmierung\20 Python\38 RL Ant\01 Tests\Mujoco-Tutorial\run.py", line 13, in <module>
    main()
  File "D:\Eigene Dateien\Eigene Dokumente\Programmierung\20 Python\38 RL Ant\01 Tests\Mujoco-Tutorial\run.py", line 7, in main
    sim = Biped(xml_path)
  File "D:\Eigene Dateien\Eigene Dokumente\Programmierung\20 Python\38 RL Ant\01 Tests\Mujoco-Tutorial\examples\biped.py", line 21, in __init__
    super().__init__(xml_path)
  File "D:\Eigene Dateien\Eigene Dokumente\Programmierung\20 Python\38 RL Ant\01 Tests\Mujoco-Tutorial\mujoco_base.py", line 15, in __init__
    self.model = mj.MjModel.from_xml_path(xml_path)  # MuJoCo model
ValueError: XML Error: Schema violation: unrecognized attribute: 'sensornoise'

Element 'flag', line 8

Desktop (please complete the following information):

  • Windows 10

LutzFassl avatar Dec 25 '24 16:12 LutzFassl

If you just want to run run.py, you can comment out sensornoise and change xml/biped.xml line 8 to <flag contact="enable" energy="enable"/>, I don't know if this is the same as the original, btw I'm a newbie in learning mujoco.

Hollow-D avatar Jan 08 '25 15:01 Hollow-D

Thanks Hollow-D,I also found this https://mujoco.readthedocs.io/en/3.1.4/changelog.html indicate that the sensornoise no longer exist in mujoco

TianqiYu123 avatar Mar 24 '25 09:03 TianqiYu123

Changed the mujoco requirement to mujoco==3.1.3 and installed that version. That fixed the issues.

EmmanuelMess avatar Nov 09 '25 19:11 EmmanuelMess