Omni.replicator not writing data

I followed this tutorial and used the given script in the script editor and I also tried to run this using python.sh file using standalone python script running method, a folder directory is being generated in my /HOME/omni.replicator_out dir but there are no files inside the folder.

import omni.replicator.core as rep


      with rep.new_layer():

            camera = rep.create.camera(position=(0, 0, 1000))

            render_product = rep.create.render_product(camera, (1024, 1024))

            torus = rep.create.torus(semantics=[('class', 'torus')] , position=(0, -200 , 100))

            sphere = rep.create.sphere(semantics=[('class', 'sphere')], position=(0, 100, 100))

            cube = rep.create.cube(semantics=[('class', 'cube')],  position=(100, -200 , 100) )

      with rep.trigger.on_frame(num_frames=10):
            with rep.create.group([torus, sphere, cube]):
                  rep.modify.pose(
                  position=rep.distribution.uniform((-100, -100, -100), (200, 200, 200)),
                  scale=rep.distribution.uniform(0.1, 2))

      # Initialize and attach writer
      writer = rep.WriterRegistry.get("BasicWriter")

      writer.initialize( output_dir="trial4", rgb=True,   bounding_box_2d_tight=True)

      writer.attach([render_product])

      rep.orchestrator.preview()


Can anyone please tell me what is the issue or what I am doing wrong ?

After your script (generating your randomization graph) you will either need to run (in script editor):

import asyncio
# one frame
asyncio.ensure_future(rep.orchestrator.step_async())

# OR run continously
asyncio.ensure_future(rep.orchestrator.run_async())

Or you can use the UI:

If you are running as a standalone app, make sure you use the non-async methods:

rep.orchestrator.step() or rep.orchestrator.run()

Here are some more isaac related tutorials / snippets using replicator:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.