Update_to_usd not enabled

The following code is mean to simply load a particle sampled cube. The cube is suspended in air and as such one would expect the particles to fall nicely on the ground. That does not happen and they just remain suspended without moving. This works in isaac 2022.2.0 but not in 2023.1.0 or 2023.1.1.

from omni.isaac.kit import SimulationApp

CONFIG = {"renderer": "RayTracedLighting", "headless": False}
simulation_app = SimulationApp(CONFIG)

from omni.isaac.core import SimulationContext, utils  # noqa E402
from omni.isaac.core.utils.viewports import set_camera_view

simulation_context = SimulationContext(backend="torch", device="cuda:0", set_defaults=False)
# set_camera_view([2.5, 2.5, 2.5], [0.0, 0.0, 0.0])

# Configure the physics scene to use GPU dynamics for particles (fluids)
print(f"------------------------------------------------         Configure Physics Context       ----------------------------------------------------")
physics_context = simulation_context.get_physics_context()
physics_context.enable_ccd(False)
physics_context.enable_gpu_dynamics(True)


print(physics_context.get_physx_update_transformations_settings())
physics_context.set_physx_update_transformations_settings(update_to_usd=True)
print(physics_context.get_physx_update_transformations_settings())
# Loading the cube with the particle sampler as a reference
utils.stage.add_reference_to_stage("particle_cube.usda", "/cube_reference")
# utils.prims.create_prim("/World/Table_1", usd_path="particle_cube.usda", translation=(0.55, -1.0, 0.0))

simulation_app.update()
simulation_context.initialize_physics()
simulation_context.play()

init_context = simulation_context.physics_sim_view
# print(init_context.get_physx_update_transformations_settings())
while simulation_app.is_running():
    simulation_context.step(render=True)

simulation_context.stop()
simulation_app.close()

I’ve noticed that if I go to Window>Physics>Settings the update_to_usd is not enabled. Enabling the particles are instantly updated to the positions one would expect them to be after falling. The issue seems to be that even though update_to_usd was set in physics context it is not actually when the simulation starts.

particle_cube.usda (286.7 KB)

The settings are saved in the usda file, the loading of the particle_cube.usda file overwrites the set settings on the lines above.
Would swapping the lines work?
Regards
Ales

Thanks for your reply Ales. Unfortunately loading the usda before configuring the physics doesn’t change the behaviour. Furthermore if it was an issue of the settings getting overwritten by the usda woul;dn’t the same behaviour be seen in 2022.2.0?

Sorry I was off last week, is not the problem here that you have omni.physx.fabric extension enabled? Particles defined through a point instancer are not updated through fabric. If you disable omni.physx.fabric extension then things should work.

Regards,
Ales

Thanks, that does seem to solve the issue. Would particles defined by sampling work with the fabric extension?

I am afraid that just particle cloth is supported through omni.physx.fabric, the point instancer fast code path is not hooked property in the hydra implementation.
Sorry about that,
Regards
Ales