I am creating synthetic data using PoseWriter in isaaasim 4.2.
[isaacsim.replicator.writers] Isaac Sim Replicator Writers — Isaac Sim
When rotating an asset, the scale value changes. Is this behavior correct?
I tried the two codes below. In code 1, the scale remains (1,1,1), which seems correct, but in code 2, the cubes rotated around the Z-axis no longer have a scale of (1,1,1).
code 1
from omni.replicator.isaac.scripts.writers import PoseWriter, YCBVideoWriter
import omni.replicator.core as rep
camera = rep.create.camera(
position = (5,5,5),
look_at = (0,0,0),
clipping_range=(0.001, 100000)
)
light = rep.create.light(light_type = "dome",intensity = 250)
render_product = rep.create.render_product(camera, resolution=(512, 512))
cube_1 = rep.create.cube(scale=(1, 1, 1),semantics = [('class', 'cube')],position=(0,0,0),rotation=(0,0,0))
cube_2 = rep.create.cube(scale=(1, 1, 1),semantics = [('class', 'cube')],position=(0,-2,0),rotation=(0,0,0))
cube_3 = rep.create.cube(scale=(1, 1, 1),semantics = [('class', 'cube')],position=(0,2,0),rotation=(0,0,0))
# Setup writer
writer = rep.WriterRegistry.get("PoseWriter")
writer.initialize(output_dir="pose_writer_cube_move_camera",write_debug_images = True, format="centerpose")
writer.attach([render_product])
with rep.trigger.on_frame(num_frames=10, rt_subframes=30):
with camera :
rep.modify.pose(
position=rep.distribution.uniform((-5, -5, 6), (5, 5, 10)),
look_at = (0,0,0)
)
pose_writer_cube_move_camera.zip (3.2 MB)
code 2
from omni.replicator.isaac.scripts.writers import PoseWriter, YCBVideoWriter
import omni.replicator.core as rep
camera = rep.create.camera(
position = (5,5,5),
look_at = (0,0,0),
clipping_range=(0.001, 100000)
)
light = rep.create.light(light_type = "dome",intensity = 250)
render_product = rep.create.render_product(camera, resolution=(512, 512))
cube_1 = rep.create.cube(scale=(1, 1, 1),semantics = [('class', 'cube')],position=(0,0,0),rotation=(0,0,0))
cube_2 = rep.create.cube(scale=(1, 1, 1),semantics = [('class', 'cube')],position=(0,-2,0),rotation=(0,0,45))
cube_3 = rep.create.cube(scale=(1, 1, 1),semantics = [('class', 'cube')],position=(0,2,0),rotation=(0,0,-45))
# Setup writer
writer = rep.WriterRegistry.get("PoseWriter")
writer.initialize(output_dir="pose_writer_cube_rotate_move_camera",write_debug_images = True, format="centerpose")
writer.attach([render_product])
with rep.trigger.on_frame(num_frames=10, rt_subframes=30):
with camera :
rep.modify.pose(
position=rep.distribution.uniform((-5, -5, 6), (5, 5, 10)),
look_at = (0,0,0)
)
pose_writer_cube_rotate_move_camera.zip (2.9 MB)
Isaac Sim Version
4.2.0
Operating System
Ubuntu 22.04