mujoco icon indicating copy to clipboard operation
mujoco copied to clipboard

IOException: Error loading the model: XML Error: problem reading attribute 'range' Element 'joint', line 1

Open kaizu3 opened this issue 1 year ago • 3 comments

Hi,

I'm a (student / professor / engineer) and I'm trying to use MuJoCo for a project.

I'm looking for some help with this error when I import the humanoid mujoco scene or any mujococ scene in unity I get this error ""IOException: Error loading the model: XML Error: problem reading attribute 'range' Element 'joint', line 1 "".

Here is a screenshot / video, illustrating my question: image

Please

kaizu3 avatar May 01 '23 18:05 kaizu3

If you input a path to the text box called "Debug File Name" (at the top of the "Mj Global Settings" component) you can save the XML that's generated from your scene. You can then inspect it (in particular, search for mentions of "range") and see which element is causing the problem. Is this a fresh import from the humanoid XML, or a scene/prefab you've been modifying?

erez-tom avatar May 01 '23 21:05 erez-tom

It is a fresh import and i tried multiple models from different sources and versions of mujoco and i get the same error. I tried it in mujoco and it worked just fine. I linked the xml debug file if you can see any problem. Thank you very much for offering to help.

HUMANOID.txt

kaizu3 avatar May 02 '23 00:05 kaizu3

It seems more related to CultureInfo, where a float like 75.00 is converted to 75,00 in some countries (I'm french)

I'm currently facing the same problem where range is wrongly converted in my debug XML range="-75,00018 75,00018"

Funny fact, every other float value is well converted.

It should use MjEngineTool.MakeLocaleInvariant($"{RangeLower} {RangeUpper}"));

stonfute avatar Jun 05 '24 13:06 stonfute