I have tried to load it using this helper function:
def get_parts(assembly_root_prim: Usd.Prim) -> list[RigidObject]:
paths = (c.GetPath().pathString for c in assembly_root_prim.GetChildren())
cfgs = (RigidObjectCfg(prim_path=p) for p in paths)
return [RigidObject(cfg) for cfg in cfgs]
However, the RigidObjects generated have _initialized: False and all the relevant properties do not exist. I can run the simulation and open the scene in Isaac sim and the file imports correctly and the rigid bodies exist in the tree, but the RigidObject view does not work. Including if I run the sim for a while and then try generating the RigidObject views.
Hello, can you try moving parts = get_parts(asm_prim) to before sim.reset()? The initialization of the views will happen on simulation start, so the RigidObjects should be created before starting simulation.
Question
I need to get RigidObject from a scene which is loaded from file and contains many rigid body xforms.
I have tried to load it using this helper function:
However, the RigidObjects generated have _initialized: False and all the relevant properties do not exist. I can run the simulation and open the scene in Isaac sim and the file imports correctly and the rigid bodies exist in the tree, but the RigidObject view does not work. Including if I run the sim for a while and then try generating the RigidObject views.
minimal script (edit)
I include an abridged version of my usd. It contains many of these parts 0001.usda
referencing rigid bodies such as: