Skip to content

Bugs found when building MuJuCo with USD #3004

@Pap-let

Description

@Pap-let

Intro

Hi!

I am a graduate student at ECNU, I use MuJoCo for my research on EmbodiedAI.

My setup

MuJoCo with USD on arm64 MacOS 26.1

What's happening? What did you expect?

I built the mujuco myself with the MUJOCO_WITH_USD=True and expecting to drag and load usd files in the simulate.cc.
Here are some bugs I have met with.

  1. The official documentation on MuJuCo does not match the latest building pipeline, the document is still using USD_DIR to specify the self-built USD lib instead of the lastest pxr_DIR and does not mention that the user need to set MUJOCO_WITH_USD to True in order to build mujuco with usd.
  2. There seem to be some issue on the mjUSEUSD variable since I didn't find where it is defined in the whole project but its defination is checked in many src files such as "simulate/main.cc". Even if I set MUJOCO_WITH_USD to True I still can't drag and load usd files in simulate.cc. The simulate.cc won't print OpenUSD version as it is assumed to. It will try to load a usd file as an xml and throw XML Error because mjUSEUSD is never defined.
  3. According to the github update log there should be no need to manually set plugin info with export PXR_PLUGINPATH_NAME=/usr/local/lib/mujocoUsd/resources/*/plugInfo.json, the official documentation needs an update.

Steps for reproduction

  1. build the mujuco with usd using
cmake .. -DCMAKE_BUILD_TYPE=Release -DMUJOCO_WITH_USD=True
cmake --build . -j 30
sudo cmake --install . 
  1. run simulate and try drag and load a usd file, it will throw you some error with XML.

Confirmations

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions