mujoco icon indicating copy to clipboard operation
mujoco copied to clipboard

Error Importing MuJoCo Scene in Unity

Open michaeljrose opened this issue 2 years ago • 5 comments

Hi,

I'm a student and I'm trying to use the MuJoCo Unity plug-in and HAPTIX to study human performance of referred robotic arm control.

I'm looking for some help with simply importing a model (MPL.xml for example) in Unity. I have the plug-in directory, native MuJoCo library (version 2.3.7 in the appropriate location and named properly), and mjhaptix150 all downloaded and am able to add the packages.json file to Unity (packages loads as version 2.3.8, running on Unity 2022.3.8f1 on Windows 10) but when I go to import a MuJoCo scene from the Assests tab, I receive the following error message.

image

I've been following the same instructions that collaborators had success with in a similar project and have tried importing models with older versions of the packages.json file and older versions of Unity to no avail, so I was wondering if anyone knows how to get passed this error message?

Thanks, Michael

michaeljrose avatar Aug 29 '23 17:08 michaeljrose

Did you try doing what the error message is suggesting you do? Older models might not load in newer MuJoCo versions.

kevinzakka avatar Aug 29 '23 17:08 kevinzakka

Hello, I recommend updating the imported XML to the newer version of MuJoCo by editing the xml, defining either autolimits, or setting limited="true" in the defaults for tendons.

Balint-H avatar Aug 30 '23 12:08 Balint-H

Thank you both for the comments, I tried to edit the XML code in a couple different ways -- either removing the range fields from the two tendons where it appears or by adding limited="true" to those two lines -- but am getting a different error message when I try to play it. I'm not sure where the parameter "native" is as it isn't in the MPL.xml file...

I'm also not super experienced with this type of coding so apologies if it's something obvious

image

michaeljrose avatar Aug 30 '23 18:08 michaeljrose

Could you check the extension of the mesh files being loaded?

Balint-H avatar Sep 04 '23 08:09 Balint-H

It looks like these are the mesh files being loaded, the standard ones from the mjhaptix150/model/MPL/mesh folder, which are .STL files. This folder is called out in the console as the meshes locations source image

michaeljrose avatar Sep 04 '23 15:09 michaeljrose