produces unexpected orientations


I have problems with setting orientation of camera using function
For instance, when I want to set quaternion: [0, -1, 0, 0] I get a completely different orientation. The GUI in this case shows:

I am running Isaac 2022.2. Thank you for any suggestions.

Maybe this issue could be related?

hello,I also found the same issue,but how to solve this problem with code when create a camera?

In the end I had to write this function, using USD APIs:

def set_pose(prim_path, position=None, angle=None, rotation_axis=(0, 0, 1)):
    """Initiate the pose of a prim
        position (tuple): position
        angle (float): angle in degrees
        rotation_axis (tuple): axis to rotate around,
                               defaults to rotation around z axis (0, 0, 1)
    prim = omni.usd.get_context().get_stage().GetPrimAtPath(str(prim_path))
    xform = UsdGeom.Xformable(prim)
    transform = xform.AddTransformOp()
    mat = Gf.Matrix4d()
    if position is not None:
    if angle is not None:
        mat.SetRotateOnly(Gf.Rotation(Gf.Vec3d(*rotation_axis), angle))

It is able to set orientation by rotating around some axis. (You just need to use the path of the camera prim)

thank you!

This forum question might help. Issac Sim | Python API - Camera orientation ignored

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.