hi all,
I have created a scene in Replicator to generate synthetic data for training a object detection model. I have used 2 USDs, i opened the 2 USDs in the begining and then executed some randomizations.
I would like to know how can i create a group of USDs dynamically from a json file? So i can run the same scene with any colletion of objects, reading a json or a text file containing the path to usd and its label to put in the semantics parameter.
thanks in advance
The code is below.
import omni.replicator.core as rep
with rep.new_layer():
lights = rep.create.light(
light_type="Dome",
)
t51 = rep.create.from_usd("C:\1\repOmniverse\51\Versao_01.usd",semantics=[('class', '51')] )
t52 = rep.create.from_usd("C:\1\repOmniverse\52\Versao_01.usd",semantics=[('class', '52')] )
with rep.trigger.on_frame(num_frames=10):
with rep.create.group([t51,t52]):
rep.modify.pose(
position=rep.distribution.uniform((-100, -100, -100), (-100, -100, 0)),
)
rep.orchestrator.run()