Asset Import issue. Replicator. Isaac Sim

Hello!
Question:
Noticing a certain behaviour with omni replicator. Dont know if its an implementation fault from my end, or an actual issue in my install.

def get_card(rep: omni.replicator.core):
    print("Hello")
    usds = rep.utils.get_usd_files(card_dir, recursive=True)

    print(*usds,
          sep='\n')
    card = rep.randomizer.instantiate(
        usds,
        size=1,
        # mode='scene_instance'
    )
    print(card)

    with card:
        rep.modify.pose(
            position=rep.distribution.uniform((-1, -1, -1), (1, 1, 1)),
            scale=10.0,
            rotation=rep.distribution.uniform((0, 0, 0), (0, 0, 0))
        )
    print("Pose Modified")
    return card.node
...

with rep.new_layer():

    card_dir = ('C:/[USER]/Omiverse/Content/Scenes/Meshes_USD/Deck3')

    rep.randomizer.register(dome_lights)
    rep.randomizer.register(get_card)

    surface = rep.create.disk(scale=1, visible=False, position=(0, 0, 0))

    camera = rep.create.camera(position=(9.00, 8.20, 8.00),
                               focal_length=24,
                               look_at=surface)
    render_product = rep.create.render_product(camera, resolution=(1024, 1024))

    with rep.trigger.on_frame(num_frames=10):
        for i in range(6): # <-- numcards
            rep.randomizer.get_card(rep)
        rep.randomizer.dome_lights(rep)

This is just a debug code to replicate the asset import issue.

The code executes perfectly in script editor on first run.
[To disambiguate: Run: Ctrl+Enter,
not replicator.start()]

However from the second run, the number of cards previously imported dont respond and an empty scene is generated. To be clear, the sampledAssets folder in scene contains n items, but they donot hold their corresponding meshes.

Now in second run if n_run2 > n_run1, the difference in number spawns meshes.

My Question is:
Is this an expected behaviour?
If so, why a loop call to the same function, differs from a second run?

Ideally i want to have random instantiation of 1 card at axis aligned using this function. And then group it randomly in stacks and further. The stacks and grouping will have specific constraints which is why its not done here. Should i be going about the instantiation differently?

Also is there a way to maintain and read the log generated by isaace sim after a crash or more?

Note: Function is defined in a diff file from the script.

Also is there a way to maintain and read the log generated by isaace sim after a crash or more?

i believe you can find the Isaac Sim log in two directories generally speaking (there will be subfolder(s) containing versions of the app you’ve installed in them, so navigate into the corresponding folder for the .log):

  • Isaac Sim log -
    Windows - C:\Users\%username%\.nvidia-omniverse\logs\Kit\Isaac-Sim
    Linux - ~/.nvidia-omniverse/logs/Kit/Isaac-Sim

  • Isaac Sim App Selector log -
    Windows - C:\Users\%username%\.nvidia-omniverse\logs\Kit\Isaac-Sim_App_Selector
    Linux - ~/.nvidia-omniverse/logs/Kit/Isaac-Sim_App_Selector

Hi there,

as I understood from your issue you are calling the graph generation multiple times (Ctrl+Enter). The issue might be that the generated graph results are accumulated. Can you try removing the \Replicator scope from stage everytime you re-generate the graph (Ctrl+Enter). Let me know if this fixes the issue for you.

Best,
Andrei