# Asset Import issue. Replicator. Isaac Sim

**URL:** <https://forums.developer.nvidia.com/t/asset-import-issue-replicator-isaac-sim/269609>\
**Category:** Isaac Sim\
**Created:** [October 16, 2023, 12:38pm UTC](https://forums.developer.nvidia.com/t/asset-import-issue-replicator-isaac-sim/269609 "2023-10-16T12:38:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hunter11743](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@hunter11743](https://forums.developer.nvidia.com/u/hunter11743)\
**Post date:** [October 16, 2023, 12:38pm UTC](https://forums.developer.nvidia.com/t/asset-import-issue-replicator-isaac-sim/269609/1 "2023-10-16T12:38:05Z")

</div>

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.

```python
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.

---

<div class="post-metadata">

**Author:** ![Simplychenable](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/simplychenable/32/271930_2.png) [@Simplychenable](https://forums.developer.nvidia.com/u/Simplychenable)\
**Post date:** [October 16, 2023, 7:12pm UTC](https://forums.developer.nvidia.com/t/asset-import-issue-replicator-isaac-sim/269609/2 "2023-10-16T19:12:18Z")

</div>

> 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`

---

<div class="post-metadata">

**Author:** ![ahaidu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/ahaidu/32/177510_2.png) [@ahaidu](https://forums.developer.nvidia.com/u/ahaidu)\
**Post date:** [October 26, 2023, 4:11pm UTC](https://forums.developer.nvidia.com/t/asset-import-issue-replicator-isaac-sim/269609/4 "2023-10-26T16:11:47Z")

</div>

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
