"""Skip reopening the stage - it's already loaded (367 prims). Just prepare() it in place to test whether the threading violation is specific to the reopen, not to editing per se.""" import sys REPO = "/home/dasha/robozon-sorter" if REPO not in sys.path: sys.path.insert(0, REPO) for _m in [k for k in list(sys.modules) if k.startswith("robozon_sorter")]: del sys.modules[_m] import importlib importlib.invalidate_caches() import omni.usd import isaacsim.core.experimental.utils.app as app_utils from robozon_sorter.sim import plow_cell_9045 stage = omni.usd.get_context().get_stage() print("current stage:", stage.GetRootLayer().identifier, "prims:", len(list(stage.Traverse()))) info = await plow_cell_9045.prepare(stage, belt_speed=1.0, script_control=True) print("prepare OK:", info)