Skip to content

Conversation

kellyguo11
Copy link
Contributor

Description

In the Camera class, we assumed that the default device for the torch tensor is CPU when we allocate the rot buffer during init. This isn't always the case if the user overwrites the torch device beforehand. This fix explicitly sets the tensor device to CPU on allocation.

Fixes #1863

Type of change

  • Bug fix (non-breaking change which fixes an issue)

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

@kellyguo11 kellyguo11 requested a review from pascal-roth as a code owner March 4, 2025 02:13
Copy link
Collaborator

@pascal-roth pascal-roth left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@kellyguo11 kellyguo11 merged commit 5235c27 into isaac-sim:main Mar 5, 2025
4 of 5 checks passed
jtigue-bdai pushed a commit that referenced this pull request Apr 14, 2025
# Description

In the Camera class, we assumed that the default device for the torch
tensor is CPU when we allocate the `rot` buffer during init. This isn't
always the case if the user overwrites the torch device beforehand. This
fix explicitly sets the tensor device to CPU on allocation.

Fixes #1863 

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)


## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] 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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
ToxicNS pushed a commit to ToxicNS/IsaacLab that referenced this pull request Apr 24, 2025
# Description

In the Camera class, we assumed that the default device for the torch
tensor is CPU when we allocate the `rot` buffer during init. This isn't
always the case if the user overwrites the torch device beforehand. This
fix explicitly sets the tensor device to CPU on allocation.

Fixes isaac-sim#1863 

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)


## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] 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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
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.

Camera not working on GPU

2 participants