-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Intro
Hi!
I am a graduate student at UBC using MuJoCo for robotics research in Unity. I am trying to import a Unitree G1 MJCF model into the MuJoCo Unity plugin and am running into mesh loading failures during import.
My setup
MuJoCo version tested: 3.6.0 and 3.3.7
API: MuJoCo Unity plugin
OS: Windows 11 Pro
Architecture: x64
Unity Editor version: 6000.3.9f1
What's happening? What did you expect?
When importing an MJCF model with mesh assets in the MuJoCo Unity importer, the import fails with:
IOException: Error loading the model: Error: no decoder found for mesh file '.../pelvis.STL'
Element name 'pelvis', id 0, line 20
Mujoco.MjEngineTool.LoadModelFromFile (...)
Mujoco.MjImporterWithAssets.ImportFile (...)
Mujoco.MjImporterEditorWindow.Apply ()
I expected the model to import successfully, or at least for supported mesh formats such as STL / OBJ to be recognized by the decoder system.
I tried the following:
- MuJoCo 3.6.0
- MuJoCo 3.3.7
- original .STL meshes
- converting the STL meshes to binary STL
- converting meshes to .obj
- using content_type="model/stl" and content_type="model/obj"
Steps for reproduction
Steps for reproduction
- Create a blank Unity project.
- Add the MuJoCo Unity package from a tagged MuJoCo repo checkout. I tried both 3.6.0 and 3.3.7.
- Copy the matching Windows mujoco.dll into C:\Users\YourName\MuJoCo as described in the docs.
- Open the MuJoCo importer in Unity.
- Clone the unitree_mujoco repo and try to import this MJCF file: https://github.com/unitreerobotics/unitree_mujoco/blob/main/unitree_robots/g1/g1_23dof.xml.
- Observe the import failure with no decoder found for mesh file.
- I also reproduced the same behavior after converting the referenced meshes to OBJ and updating the MJCF accordingly.
Minimal model for reproduction
Clone the unitree_mujoco repo and try using this xml file: https://github.com/unitreerobotics/unitree_mujoco/blob/main/unitree_robots/g1/g1_23dof.xml
Code required for reproduction
No custom code is needed beyond using the Unity importer UI.
The failure occurs when clicking import/apply in the MuJoCo Unity importer.
Confirmations
- I searched the latest documentation thoroughly before posting.
- I searched previous Issues and Discussions, I am certain this has not been raised before.