openai / mujoco-py

MuJoCo is a physics engine for detailed, efficient rigid body simulations with contacts. mujoco-py allows using MuJoCo from Python 3.
Other
2.83k stars 810 forks source link

load_model_from_xml function doesn't work in example body_interaction.py and other examples #680

Open wxyyoyo opened 2 years ago

wxyyoyo commented 2 years ago

Describe the bug I am running example body_interaction.py in mujoco-py-master/examples folder. And get the bug as follow: Failed to load XML from string. mj_loadXML error: b'XML parse error at line 0, column 0:\nFailed to open file\n'

It looks as the function load_model_from_xml cannot parse the string variable MODEL_XML written in the file. I am running on Windows 10; python 3.8; anaconda; Mujoco 210; mojuco_py 2.1.2.14

However, the other function load_model_from_path works fine in another example: disco_fetch.py file, which looks like have more trouble for the others.

Any suggestions or help? Thanks a lot!

Xiaoyu

kevincheng3 commented 2 years ago

I have the same problem. I can not load file from xml string. But when the string is saved as a *.xml file, it can be successfully loaded with the load_model_from_path API