Isaac Sim variant switching issue

Isaac Sim Version

5.1.0

Operating System

Windows 11

GPU Information

  • Model: 4090
  • Driver Version: 581.80

Topic Description

Detailed Description

(Describe the issue in detail, including what you were trying to do, what you expected to happen, and what actually happened)

I was trying to test the usd variants, and i found serval issue:

  1. when changing variants. the usd wont change until you reload payload.
  2. even after reload payload, the collision wont switch accrodingly. and you need to start and end simulation to make it change.

Screenshots or Videos

Hi, Thanks for the reporting. The behaviors you saw came from how USD variants, payloads, and the physics scene were cached and evaluated in Isaac Sim; you need to force both the USD composition and the PhysX scene to update when you switch variants.

  • Variant changes often only take effect in the composed stage when the payload is reloaded or the layer is dirtied; otherwise, the stage continues to show the previously composed prims.
  • The PhysX scene is built from the USD stage at specific points (e.g., when starting simulation), so collision shapes and rigid bodies are not always rebuilt immediately when you change variants during an active session.

So it’s not a bug, it’s expected ?

how do i force both the USD composition and the PhysX scene to update when you switch variants with python code? thanks

Hi, Switching variants with Python should follow this pattern:

  1. Set the USD variant on the stage:
import omni.usd
from pxr import Usd

stage = omni.usd.get_context().get_stage()
prim = stage.GetPrimAtPath("/World/MyRobot")
variant_set = prim.GetVariantSet("config")
variant_set.SetVariantSelection("payload_heavy")
stage.Flush()  # ensure composition updates

This forces the stage to reevaluate the variant composition immediately.

  1. Reapply or modify collision/rigidbody schemas to match the new variant geometry:
    When using Isaac Lab, call the collision schema helpers after the variant switch:
from isaaclab.sim import schemas as sim_schemas

collider_cfg = sim_schemas.CollisionCfg()  # configure as needed
sim_schemas.define_collision_properties("/World/MyRobot", collider_cfg, stage=stage)

These helpers explicitly re-author and update collision APIs on the current prims, ensuring the new mesh gets the right colliders.

  1. Trigger a physics scene rebuild step:
    • Stop simulation, then start again (this is the most reliable way to ensure the PhysX scene re-reads the stage).
1 Like