Hey Christof,
This is a great question! There are three different frames that the Isaac Sim/Omniverse supports wrt to the camera:
USDframe: Defined as +Y up, -Z forward.- this is the frame data being displayed in the
Propertytab of the scene. This is the convention used by the computer graphics community.
- this is the frame data being displayed in the
worldframe: Defined as +Z up, +X forward.- The
omni.isaac.sensor Cameraclass sets/gets the pose of the cameras in theworldframe viaset_world_pose()andget_world_pose()
- The
ROScamera frame: Defined as +Y up, +Z forward- This is the frame that ROS camera-related messages are published in via OmniGraph.
If you take the pose of the camera from the Property tab of the scene and put it into omni.isaac.sensor Camera object via get/set, then it would result in weird behaviors because the pose does not match.
To work around this, you can do one of two things:
-
If you know the pose of the camera that you like in the
worldframe, directly useomni.isaac.sensor.Camera. Example:from omni.isaac.sensor import Camera from omni.isaac.core.utils.rotations import euler_angles_to_quat pos_world = np.array([1, 1, 1]) quat_world =euler_angles_to_quat([0, -90, 0], degrees=True) camera = Camera(position=pos_world, orientation=quat_world) camera.get_world_pose() # should give the same as pos_world and quat_world above camera.set_world_pose(pos_world, quat_world) # same as initialization -
If you would like to set the pose of the camera using the
USDpose, directly use the XForm and set pose using the data fromPropertypanel.
We are actively looking to improve the camera interface for Isaac Sim and we have improvements coming in the next Isaac Sim release. The features that will help you with this issue are as follows:
- The
omni.isaac.sensorcamera will allow you to get/set of the camera pose in all of the different frames - We will introduce a new GUI extension, Camera Inspector, which will display the camera pose in all of these frames, so that you can take them from the scene and put it into code with ease. This extension will also include some other functionalities, e.g., viewports to allow you to adjust the camera on the fly.
- We will introduce a new set of camera tutorials to help you interact with the camera better via GUI and API.