Add mj_loadUSD function. Change simulate to use that instead of manual spec compilation.

PiperOrigin-RevId: 780608874
Change-Id: I333238c756fe76b371518a7cdf9452b93da3540a
This commit is contained in:
Sam Haves
2025-07-08 10:03:02 -07:00
committed by Copybara-Service
parent e507e31922
commit 14972d2490
8 changed files with 121 additions and 48 deletions
+6
View File
@@ -18,6 +18,12 @@
#include <mujoco/mujoco.h>
#include <pxr/usd/usd/common.h>
// Given a USD file parse to a spec, then compile and return the low-level model.
//
// Particular care is taken for physics data to be lossless but visual
// data such as materials may be lossy.
MJAPI mjModel* mj_loadUSD(const char* filename, const mjVFS* vfs, char* error, int error_sz);
// Given a USD stage, this function will do a best effort conversion to
// mjSpec.
//