combining shapes into one class

This commit is contained in:
Abhishek Joshi
2024-04-04 21:10:15 -04:00
parent 09bc73e117
commit f1fa9c0b8b
5 changed files with 205 additions and 340 deletions
+8 -6
View File
@@ -1,19 +1,21 @@
import mujoco
from mujoco.usd import exporter
# from mujoco.usd import exporter
import exporter
if __name__ == "__main__":
# load a model to mujoco
m = mujoco.MjModel.from_xml_path("/Users/abhishek/Documents/research/mujoco/model/humanoid/humanoid.xml")
m = mujoco.MjModel.from_xml_path("/Users/abhishek/Documents/research/mujoco/model/car/car.xml")
d = mujoco.MjData(m)
# create an instance of the USDExporter
exp = exporter.USDExporter(model=m)
mujoco.mj_step(m, d)
for i in range(100):
mujoco.mj_step(m, d)
exp.update_scene(d)
exp.update_scene(d)
exp.save_scene(filetype="usda")
exp.save_scene(filetype="usd")