Camera orientation issues in replicator.create (original) (raw)

April 10, 2025, 12:07pm 1

Hello,

I was using Replicator for synthetic data generation. I found an issue with camera created through replicator object. Below is the code snippet:

rep.create.camera(name="static_camera", position=(16, -27.5, 6.2), rotation=(60, 0, 90))

When camera is created via code, then the position and rotation are applied on the camera_Xform which is expected.

image

image

In addition to this, the camera object also has a rotation of 90, 0, 90.

image

I am not sure from where this orientation is added.

While searching for a solution, I came across another thread that has replicator code that creates a camera. I tried that code snippet and found that the issue exists there.

This appears to be a bug in Issac v4.2.

Right now, I am manually clearing the rotation of the camera before generating synthetic data.

How can I resolve this issue?

Any help will be appreciated.

Hello @abhilashcashok, thank you for reaching out!

Cameras in USD are always oriented “Y-up”, regardless of the stage up axis. These rotations (XYZ: (90, 0, 90)) applied to the camera ensure that the camera is rotated to the expected rotation when created in Z-up stages, and keeps it consistent with cameras created through Create->Camera.

You can find more information on USD cameras here: Universal Scene Description: UsdGeomCamera Class Reference

Okay.

In that’s the default behavior, what is the recommended approach? Should I rotate the camera object in the Stage to the required axis via code after rep.create.camera(...).?