Hi, I’m making a replicator pipeline for semantic segmentation.
I generate a bunch of distractors like this:
def create_random_assets():
count = 30
usd_files = [
"omniverse://localhost/NVIDIA/Assets/DigitalTwin/Assets/Warehouse/Storage/Bottles/Plastic/NaturalBostonRound_A/NaturalBostonRoundBottle_A01_PR_NVD_01.usd",
"omniverse://localhost/NVIDIA/Assets/DigitalTwin/Assets/Warehouse/Storage/Bottles/Plastic/WhitePacker_A/WhitePackerBottle_A02_PR_NVD_01.usd",
"omniverse://localhost/NVIDIA/Assets/DigitalTwin/Assets/Warehouse/Storage/Bins/Bin_A_Variants.usd",
"omniverse://localhost/NVIDIA/Assets/DigitalTwin/Assets/Warehouse/Safety/Barriers/BollardSleeve_A/BollardSleeve_A09_Yellow_01.usd",
"omniverse://localhost/NVIDIA/Assets/DigitalTwin/Assets/Warehouse/Safety/Barriers/HiVisOutdoorCrowdControl_A/HiVisOutdoorCrowdControl_A01_01.usd",
"omniverse://localhost/NVIDIA/Assets/DigitalTwin/Assets/Warehouse/Safety/Cones/Colored_Traffic/ColoredTrafficCone_A01_71cm_PR_V_NVD_01.usd",
"omniverse://localhost/NVIDIA/Assets/DigitalTwin/Assets/Warehouse/Safety/Cones/Heavy-Duty_Traffic/HeavyDutyTrafficCone_A04_46cm_PR_V_NVD_01.usd",
"omniverse://localhost/NVIDIA/Assets/DigitalTwin/Assets/Warehouse/Safety/Floor_Signs/WetFloor_A/WetFloorSign_A01_PR_NVD_01.usd",
"omniverse://localhost/NVIDIA/Assets/DigitalTwin/Assets/Warehouse/Safety/Floor_Signs/Movable_A/FloorSignMovable_PR_NVD_01.usd",
"omniverse://localhost/NVIDIA/Assets/DigitalTwin/Assets/Warehouse/Safety/Floor_Signs/MobileShutOffSystem_A/MobileShutOffSystem_A02_PR_NVD_01.usd",
"omniverse://localhost/NVIDIA/Assets/DigitalTwin/Assets/Warehouse/Storage/Boxes/Box_A_Variants.usd",
"omniverse://localhost/NVIDIA/Assets/DigitalTwin/Assets/Warehouse/Storage/Cases/Case_A/Case_A04_71x53x34cm_PR_V_NVD_01.usd",
]
assets = rep.randomizer.instantiate(
usd_files,
size=count
)
return assets
with rep.new_layer():
camera = rep.create.camera(position=(0, 0, 3), rotation=(0,-90,0))
render_product = rep.create.render_product(camera, (1024, 1024))
scale = 100
assets = create_random_assets()
rep.randomizer.register(random_shapes)
with rep.trigger.on_frame():
rep.randomizer.rect_lights(5)
with assets:
rep.modify.pose(
position=rep.distribution.uniform((-150, 0, -150), (150, 35, 150)),
rotation=rep.distribution.uniform((-180, -180, -180), (180, 180, 180)),
scale=rep.distribution.uniform((0.3, 0.3, 0.3), (1.0, 1.0, 1.0))
)
with camera:
rep.modify.pose(
position=rep.distribution.uniform((-1.5 * scale, 0.2 * scale, -1.5 * scale),
(1.5 * scale, 1.5 * scale, 1.5 * scale)),
look_at=rep.distribution.uniform((-1 * scale, 0, -1 * scale), (1 * scale, 0, 1 * scale)),
)
rep.modify.attribute("focalLength", rep.distribution.uniform(5, 50))
# Initialize and attach writer
writer = rep.WriterRegistry.get("BasicWriter")
writer.initialize( output_dir="_output", rgb=True, semantic_segmentation=True)
writer.attach([render_product])
The code works as expected, meaning random objects get created and their positions, rotations and scale is randomized every replicator step.
However, my console is filled with errors like this:
2025-06-25 11:38:57 [Error] [omni.hydra] Unsupported data type 0 on primvar 'doNotCastShadows' in geometry '/Replicator/SampledAssets/Population_f9bfe2f9/Ref_Xform_23/Ref.proto_SM_WetFloorSign_A01_Decals_01_id0'
This gets printed for 30+ different objects every replicator step.
Also, do i understand correctly that this code should generate the objects once and then just move them around every replicator step because i see the Stage hierarchy refreshing every step and it’s pretty slow (like it’s loading new objects every step).
My simulation also crashed a couple of times while generating frames but i don’t know if this is the cause.