Isaac Sim Version
5.1.0
Operating System
Ubuntu 22.04
GPU Information
- Model: RTX 3090
- Driver Version: 575.64.03
Topic Description
Detailed Description
In IsaacSim 5.1, If I create a material from a MDL file, the simulation will hang when I call sim.reset(), and with full experience file
No such problem in IsaacSim 5.0
Code:
import os
import isaacsim
use_full_exp_file = True
simulation_app = isaacsim.SimulationApp(
launch_config={"headless": False},
experience=os.path.join(os.path.dirname(isaacsim.__file__), "apps/isaacsim.exp.full.kit") if use_full_exp_file else "",
)
import omni
from pxr import UsdGeom
from isaacsim.core.api import SimulationContext
def create_minimal_mdl_material():
stage = omni.usd.get_context().get_stage()
# Get the path to the minimal MDL file
script_dir = os.path.dirname(os.path.abspath(__file__))
mdl_path = os.path.join(script_dir, "minimal_test.mdl")
print(f" MDL file: {mdl_path}")
print(f" File exists: {os.path.exists(mdl_path)}")
# Create material
UsdGeom.Scope.Define(stage, "/World/Looks")
material_path = "/World/Looks/TestMaterial"
omni.kit.commands.execute(
"CreateMdlMaterialPrim",
mtl_url=mdl_path,
mtl_name="MinimalMaterial",
mtl_path=material_path,
select_new_prim=False,
)
print(f" ✓ Material created at: {material_path}")
def demonstrate_bug():
sim = SimulationContext(
physics_dt=1/60,
rendering_dt=1/60,
backend='torch',
device='cuda:0',
)
create_minimal_mdl_material()
print(" ⚠ THIS IS WHERE IT HANGS - IsaacSim will become unresponsive")
sim.reset()
# If we get here, the bug is fixed in your version
print(" ✓ sim.reset() completed successfully!")
def main():
demonstrate_bug()
if __name__ == "__main__":
try:
main()
finally:
simulation_app.close()
minimal_test.mdl:
mdl 1.5;
import ::base::*;
import ::df::*;
import ::anno::*;
export material MinimalMaterial()
[[
::anno::display_name("Minimal Material"),
::anno::description("Simplest possible MDL material for bug reproduction")
]]
= material(
surface: material_surface(
scattering: df::diffuse_reflection_bsdf(
tint: color(0.5, 0.5, 0.5) // Simple gray color
)
)
);
Additional Information
What I’ve Tried
Switch back to isaac sim 5.0 version, it works.
Or set the use_full_exp_file to false, it works