The viewport uses /OmniverseKit_Persp prim. Please, try setting the pose of that prim. Adjusting the position and rotation of that prim should change the position of the camera that is used to render the viewport.
Note, it looks like you are modifying the viewport position, instead of working with Isaac Sim camera API. In Isaac Sim, a standard approach is to work with the cameras/sensors, instead of the viewport, which is designed for GUI. An introduction to that approach is available here: Camera — isaacsim 2022.2.1 documentation
Hi, I found the similar problem with you, and I wrote a pose of it, hope it can help you out.
Maybe you can check this out.
Solution
According to the discussion in the form, I think its a designed mechanism to automatically keep the same camera coordinate system(+Y up) across different USD files.
And if you want to cancel this “auto-rotation” effect, you can use camera_axes="usd" args in set_world_pose().
from omni.isaac.sensor import Camera
camera = Camera(
prim_path="/World/camera",
position=np.array([0, 0, 0]),
orientation=np.array([1, 0, 0, 0]),
)
camera.set_world_pose(np.array([0, 0, 0]), np.array([1, 0, 0, 0]), camera_axes="usd")
my_world.step(render=True)
This way, the default camera pose will aligned with the world frame.