Acquiring RGB images using Replicator crashes IsaacSim

I have code running in an IsaacSim Extension which captures and saves and RGB image taken using Replicator.

import omni.replicator.core as rep
RESOLUTION = (512, 512)
...
def rgb_capture(cam:prims_utils.Usd.Prim):
    cam_render = rep.create.render_product(
        camera=str(cam.GetPrimPath()), 
        resolution=RESOLUTION
    )

    # Annotators capture data from rendered frames
    rgb = rep.AnnotatorRegistry.get_annotator("rgb")
    #depth = rep.AnnotatorRegistry.get_annotator("distance_to_camera")
    rgb.attach([cam_render])
    #depth.attach([cam_render])
    
    rep.orchestrator.step(rt_subframes=-1)
    save_annotator_data(rgb.get_data(), "rgb")

However, when running the above code, IsaacSim crashes. I looked at the logs and found this Error message:

2023-08-11 22:50:12 [25,576ms] [Warning] [carb.crashreporter-breakpad.plugin] compressing 2 files into ‘C:/Users/btehrani/AppData/Local/ov/data/Kit/Isaac-Sim/2022.2\93f329e5-6654-4f6f-a908-46a02a8d00c1.dmp.zip’ for upload.
2023-08-11 22:50:12 [26,333ms] [Warning] [carb.crashreporter-breakpad.plugin] preventing upload of minidump due to user opt-out: ‘C:/Users/btehrani/AppData/Local/ov/data/Kit/Isaac-Sim/2022.2\93f329e5-6654-4f6f-a908-46a02a8d00c1.dmp.zip’
2023-08-11 22:50:13 [26,333ms] [Error] [carb.crashreporter-breakpad.plugin] Wrote dump file ‘C:/Users/btehrani/AppData/Local/ov/data/Kit/Isaac-Sim/2022.2\93f329e5-6654-4f6f-a908-46a02a8d00c1.dmp.zip’
2023-08-11 22:50:13 [26,334ms] [Error] [carb.crashreporter-breakpad.plugin] dump file size is 1577432 bytes, file is readable.
2023-08-11 22:50:15 [28,347ms] [Fatal] [carb.crashreporter-breakpad.plugin] Crash detected in pid 27256 thread 22540

Attached is the log file from the above error:
kit_20230811_154946.log (1.1 MB)

Is there a way to capture images with Replicator and prevent IsaacSim from crashing?

Platform:

  • Windows 11
  • RTX 3080 Ti
  • Processor: 12th Gen Intel(R) Core™ i9-12900H
  • IsaacSim v. 2022.2.1

Replying to post as I found a work around.

Using the following code:

import omni.isaac.synthetic_recorder as synth
...
await synth.orchestrator.step_async()

instead of
rep.orchestrator.step(rt_subframes=-1)

allowed the code to run without crashing.

I based the code off the following resource:
Annotators Information — extensions latest documentation (nvidia.com)

1 Like