Hello,
I’m starting a study on the Replicator and I made this simple code to randomize the position and rotations of an object, at the moment I would like to export the images (this works) and also the rotation value applied during the function, how could I do this ?
Ideally this would be the image and a sequential list of each position and rotation, equivalent to the output images.
Code:
import omni.replicator.core as rep
with rep.new_layer():
#adiciona objeto que sofrera variacoes
cube = '/World/Cube'
#funcao de randomizacao
def get_shapes():
shapes = rep.get.prims(semantics=[('class', 'cube_teste')])
with shapes:
rep.modify.pose(
position=rep.distribution.uniform((0,0, 0), (0.4, -10, 0)),
rotation=rep.distribution.uniform((89, -0.2, 0), (89, 0.2, 0)),
)
return shapes.node
rep.randomizer.register(get_shapes)
# Setup randomization
with rep.trigger.on_frame(num_frames=10):
rep.randomizer.get_shapes()