This is an issue with Omniverse Replicator in Code.
I followed the documentation but the code doesn’t do anything and gives me this message. Is there something I’m missing?
Hello @jonathan.meitzler! I’ve asked the dev team for some help. Someone should reply shortly!
Hi @jonathan.meitzler Can you check to see if you have the latest up to date version of Code with Replicator? If you do have the latest, it would be good to get a log from you for further investigation.
Thanks!
I’m using 2022.1.2 because the latest version doesn’t seem to have the replicator menu up top that basically runs the replicator.
Regardless, here’s the code I used:
import omni.replicator.core as rep
with rep.new_layer():
camera = rep.create.camera(position=(0, 300, 1000))
render_product = rep.create.render_product(camera, (1024, 1024))
def move_shapes():
#shapes = rep.get.prims(path_pattern='[^M_]Cube$|[^M_]Cone$|[^M_]Sphere$')
shapes = rep.get.prims(semantics=[('class', 'Dasani'), ('class', 'Red_Gatorade'), ('class', 'Fanta')])
with shapes:
rep.modify.pose(
position=rep.distribution.sequence((-313, 0, 0), (0, 0, 0), (313, 0, 0)),
rotation=rep.distribution.uniform((0,-180, 0), (0, 180, 0)),
)
return shapes.node
rep.randomizer.register(move_shapes)
# Setup randomization
with rep.trigger.on_time(num=20, interval=2):
rep.randomizer.move_shapes()
writer = rep.WriterRegistry.get("BasicWriter")
writer.initialize(
output_dir="_output",
rgb=True,
bounding_box_2d_tight=True,
bounding_box_2d_loose=True,
semantic_segmentation=True,
instance_segmentation=True,
distance_to_camera=True,
distance_to_image_plane=True,
bounding_box_3d=True,
occlusion=True,
normals=True,
)
writer.attach([render_product])
rep.orchestrator.run()
As for the log I’m not sure how to export it. I’m still somewhat new to this.
You’ll need the latest version in order to use the sequence distribution. Though the replicator menu should be there. Can you check if replicator is enabled as an extension?
Go to the extensions tab, type “replicator” into the search and you should see “OMNI REPLICATOR” show up. Make sure thats active.
I have replicator enabled but it’s still not there. I see a red warning sign but I’m not sure what that’s for.
Hi @jonathan.meitzler . That little red icon means replicator isnt loading correctly. Can you upload your log? It can be found from Code in the console tab. There’s 4 little icons on the top left hand side, the two middle ones are show log and open log folder. (pencil and a folder icon).
kit_20221013_160627.log (788.5 KB)
Here’s an attachment of the log.
kit_20221020_151413.log (900.9 KB)
Here’s a more recent log.