How to get updated camera sensor positions

Hello all,
I have a ‘wrist’ camera attached to the hand of a panda arm. The camera outputs clearly shows that it moves with the robot hand. But so does not its position.

Next are the following methods I tried to retrieve them. They all returns static values which do not change over time:

  • omni.usd.get_world_transform_matrix(prim_utils.get_prim_at_path(prim_path)).ExtractTranslation()
  • camera._sensor_xform.get_local_pose()
  • camera._sensor_xform.get_world_pose()
  • camera._compute_ros_pose()
  • camera._sensor_prim.GetLocalTransformation()

Same for the orientation of the camera.

Thanx.

@mike.niemaz i wonder if this post contain any useful information despite it being several months old:

also, is it safe to assume you are using 2023.1.1 version of Isaac Sim?

Thank you @Simplychenable for your answer.
It does not help but I guess it should work better using the latest isaac sim, which is not the case currently.

Hi @mike.niemaz, if you have a camera imported in the scene, you can inspect the camera poses on the fly using the Camera Inspector Extension:

https://docs.omniverse.nvidia.com/isaacsim/latest/gui_tutorials/tutorial_gui_camera_sensors.html?highlight=Camera%20Inspector#camera-inspector-extension

if camera in your code is an omni.isaac.sensor.Camera object, you can simply get the pose by calling camera.get_world_pose(). This value should match up with what the Camera Inspector Extension returns.

Make sure you are initializing the camera correctly. You can follow this tutorial to create a camera using Python:

https://docs.omniverse.nvidia.com/isaacsim/latest/features/sensors_simulation/isaac_sim_sensors_camera.html#python-example

Versions 2023.1.0 and newer are supported with the Camera Inspector Extension.

1 Like

good to know!👍

Hello @xuning.yang ,
My camera is added to the loaded scene (via python code) so I guess it falls into your second point.
I do have a camera object and I did try get_world_pose as you can see in my first post but in vain: it does not get updated when the robot arm is moving.

I’m using isaac 2022.2.1.
I’m currently trying with the latest version just in case.