Skip to content

Commit 2e6946a

Browse files
Fixes moving to cpu if needed in camera.py (#2176)
# Description <!-- Thank you for your interest in sending a pull request. Please make sure to check the contribution guidelines. Link: https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html --> I just add moving to cpu before casting to numpy. If it's already on cpu then the change is armless. Fixes #2175 <!-- As a practice, it is recommended to open an issue to have discussions on the proposed pull request. This makes it easier for the community to keep track of what is being developed or added, and if a given feature is demanded by more than one party. --> ## 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) --------- Signed-off-by: renaudponcelet <renaud.poncelet@gmail.com> Signed-off-by: Kelly Guo <kellyg@nvidia.com> Co-authored-by: Kelly Guo <kellyg@nvidia.com>
1 parent f3c5404 commit 2e6946a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CONTRIBUTORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Guidelines for modifications:
9292
* Qian Wan
9393
* Qinxi Yu
9494
* Rafael Wiltz
95+
* Renaud Poncelet
9596
* René Zurbrügg
9697
* Ritvik Singh
9798
* Rosario Scalise

source/isaaclab/isaaclab/sensors/camera/camera.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def __init__(self, cfg: CameraCfg):
124124
rot_offset = convert_camera_frame_orientation_convention(
125125
rot, origin=self.cfg.offset.convention, target="opengl"
126126
)
127-
rot_offset = rot_offset.squeeze(0).numpy()
127+
rot_offset = rot_offset.squeeze(0).cpu().numpy()
128128
# ensure vertical aperture is set, otherwise replace with default for squared pixels
129129
if self.cfg.spawn.vertical_aperture is None:
130130
self.cfg.spawn.vertical_aperture = self.cfg.spawn.horizontal_aperture * self.cfg.height / self.cfg.width

0 commit comments

Comments
 (0)