adding demo script branch

This commit is contained in:
Abhishek Joshi
2024-03-18 15:23:46 -05:00
parent 069708a599
commit 66c044fcf4
4 changed files with 34 additions and 12 deletions
+19
View File
@@ -0,0 +1,19 @@
import mujoco
from mujoco.usd import exporter
if __name__ == "__main__":
# load a model to mujoco
m = mujoco.MjModel.from_xml_path("/Users/abhishek/Documents/research/mujoco/model/cards/cards.xml")
d = mujoco.MjData(m)
# create an instance of the USDExporter
exp = exporter.USDExporter(model=m)
mujoco.mj_step(m, d)
exp.update_scene(d)
exp.save_scene(filetype="usd")