Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds camera pose getter and local pose setter #1174

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

lhy0807
Copy link

@lhy0807 lhy0807 commented Oct 7, 2024

Description

This change adds local pose getter and setter APIs for the Camera class.

Fixes #1034 (issue)

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Screenshots

N/A. Only code interface changes.

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@@ -360,6 +360,31 @@ def test_camera_set_world_poses_from_view(self):
torch.testing.assert_close(camera.data.pos_w, eyes)
torch.testing.assert_close(camera.data.quat_w_ros, quat_ros_gt)

def test_camera_get_world_poses(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please also add a unit test for the local pose APIs?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the suggestion. I'll add it soon

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added.

@kellyguo11 kellyguo11 changed the title add camera pose getter and local pose setter Adds camera pose getter and local pose setter Dec 15, 2024
if env_ids is None:
env_ids = self._ALL_INDICES
# set camera poses using the view
orientations = quat_from_matrix(create_rotation_matrix_from_view(eyes, targets, device=self._device))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this API also work for local coordinates?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it works for local coordinates

@kellyguo11
Copy link
Contributor

kellyguo11 commented Dec 18, 2024

Thanks for the update! Can you please run the formatter ./isaaclab.sh --format? Please also add a changelog and update the extension.toml version for the extension.

@lhy0807
Copy link
Author

lhy0807 commented Dec 18, 2024

Thanks for the update! Can you please run the formatter ./isaaclab.sh --format? Please also add a changelog and update the extension.toml version for the extension.

Thanks for reminder! I just update the CHANGELOG.rst, extention.toml,and format the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Proposal] Add camera local frame setter and both local and global frame getter
2 participants