Rep.randomizer.instantiate making duplicate objects

I’m trying to generate a scene with bottles being randomly generated in an open space by taking them from a directory, however I’ve run into a problem. The items aren’t moving around but are still rotating, and they’re all the same item even though I set with_replacements to false. Why is this happening? Here’s the code and an example of what I’m getting.

import omni.replicator.core as rep

with rep.new_layer():
camera =, 0, 1300), focal_length = 18.14756)
render_product = rep.create.render_product(camera, (1920, 1200))

bottles = '/home/ubuntu/Documents/AIM/Bottles/USD/middle'
theCone = rep.create.cone(semantics=[('class', 'cone')], position=(0, 0, -201), rotation=(90,0,0), scale=(21.4, 29.9, 12), visible=False)

def dome_light():
    dome = rep.create.light(
    return dome.node

def distant_light():
    sun = rep.create.light(
        light_type = "Distant",
        position = rep.distribution.uniform((-3000, -3000, -3000), (3000, 3000, 3000)), 
        intensity = rep.distribution.uniform(3000, 7000), 
        look_at = (0, 0, 0)
    return sun.node

def move_shapes(size=7):
    instances = rep.randomizer.instantiate(
        rep.utils.get_usd_files(bottles), with_replacements = False, size=size, mode='point_instance')
    with instances:
        rep.modify.pose(rotation = rep.distribution.uniform((0, 0, 0), (360, 360, 360)))
        rep.randomizer.scatter_3d(volume_prims=theCone, check_for_collisions=True)
    return instances.node

with rep.trigger.on_time(interval=1, num=11):

writer = rep.WriterRegistry.get("BasicWriter")

Hello @jonathan.meitzler! I’ve shared your post with the dev team for further assistance.

Hi @jonathan.meitzler , may I know which version of replicator you are on? I just tested it on omni.replicator.core-1.6.4 seems this problem is solved.

Yeah I was using an older version, 2022.2.0 to be exact. The version after that ran really slow but the latest version, 2022.3.1 seems to be more optimized and I didn’t have any problems with generation.

Thanks! So this is no longer a problem right?

This specifically, no. Although I’ve found another problem where the bottles that show up don’t have any classes attached to them. I’m using pre existing usd’s with their own respective classes, but they don’t carry over into the generations. Is there a way to fix this? Do I have to put them all under one semantic?

hmm weird. instantiate should support semantic labels. We will inspect and get back to you.

@jonathan.meitzler I just tried on 2022.3.1 and I am able to get the semantic labels from the prim. It should be on the prim Cached0_Prim_pi. Can you double check on that?