Error when using world.scene.add() after opening a stage with stage_utils.open_stage()

Hello,

I have been getting an error when using Isaac sim 2023.1.0. I am trying to create a physics material and bind it to a collider. I need to do it for many .usd files of objects. When I try to add the object using world.scene.add function, it gives me the following error. I include my code at the end.

Traceback (most recent call last):
File “/home/felipe/Documents/isaac_sim_grasping/helpful_scripts/fix_objects.py”, line 63, in
world.scene.add(PhysicsMaterial(path = j +“/base_link/collisions/mesh_0/physics_material”,
File “/home/felipe/.local/share/ov/pkg/isaac_sim-2023.1.0/exts/omni.isaac.core/omni/isaac/core/world/world.py”, line 147, in scene
return self._scene
AttributeError: ‘World’ object has no attribute ‘_scene’. Did you mean: ‘scene’?

Code:

       world = World()
       with tqdm(total=len(objs)) as pbar:
                  for j in objs:      
                              #Instanceable mesh
                              path = os.path.join(objects_directory,j,'instanceable_meshes.usd')
                              open_stage(path)

                              world.scene.add(PhysicsMaterial(path = j +"/base_link/collisions/mesh_0/physics_material",
                                                              name = 'physics_material'))

                              object = get_prim_at_path(j)
                              it = traverse_stage()

Hi,

have you managed to solve this issue? I’m experiencing a similar problem.