Skip to content

[Bug Report] Not able to set the camera pose correctly #8

Closed

Description

@Mayankm96

Describe the bug

When trying to set the camera pose using the Camera.set_world_pose_ros(), the obtained pose in the data is different from the one being set. On digging deeper, the main issue seems to be with using the Replicator API to create the camera in the Camera.spawn() method.

When replicator creates a camera using the rep.create.camera(), it creates an Xform prim and a Camera prim under it. The camera prim is rotated by (90, 0, -90) relative to the parent, to have the up-axis of the camera Z instead of Y. Now, when the camera pose is computed, the transformation of the Camera prim is used. However, when setting the pose, the pose is set to the Xform prim (also called the camera rig). So in a way, the camera prim pose ends up at the input pose with an orientation offset of (90, 0, -90).

Steps to reproduce

Modify the play_camera.py script with the following addition from L-140 onwards:

# set pose
# camera.set_world_pose_from_view(eye=[5.0, 5.0, 5.0], target=[0.0, 0.0, 0.0])
position = [5.0, 5.0, 5.0]
orientation = [-0.1759199, 0.33985114, 0.82047324, -0.4247082]
camera.set_world_pose_ros(position, orientation)

This gives the output:

Camera @ '/World/CameraSensor/Camera_Xform/Camera': 
	data types   : ['rgb', 'distance_to_image_plane', 'normals', 'motion_vectors', 'trigger_outputs'] 
	tick rate (s): 0
	timestamp (s): 0.0
	frame        : 33
	shape        : (480, 640)
	position     : [5. 5. 5.] 
	orientation  : [-0.27984815  0.88047624 -0.11591691  0.36470519] 

Expected output orientation to match the input orientation.

System Info

Describe the characteristic of your environment:

  • Commit: 88d4a34
  • Isaac Sim Version: 2022.2.0
  • OS: Ubuntu 20.04
  • GPU: RTX 2080
  • CUDA: 11.6
  • GPU Driver: 510.108.03

Additional context

The camera methods currently print the warnings that they may not work.

2023-01-26 15:55:07 [14,045ms] [Warning] [omni.isaac.orbit.sensors.camera.camera] The function `set_world_pose_ros` is currently not implemented correctly.

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have checked that the issue is not in running Isaac Sim itself and is related to the repo

Activity

  1. self-assigned this
    on Jan 26, 2023
  2. added
    bug
    on Jan 26, 2023
  3. added a commit that references this issue on Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions