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

[Question] Device error when using Physics Based IMU Sensor in Isaac Lab #682

Closed
shaoxiang opened this issue Jul 15, 2024 · 3 comments
Closed
Labels
bug Something isn't working isaac-sim This issue is related to Isaac Sim

Comments

@shaoxiang
Copy link

Question

It is inevitable to use the rich resources of Isaac Sim in Isaac Lab, but when I was using IMU sensors, an error occurred.
Whether I use Python from IMU API omni.isaac.sensor to import IMUSensor get_current_frame or use OmniGarph IMU read node, The following errors always occur:

[Error] [omni.physx.tensors.plugin] Incompatible device of velocity tensor in function omni::physx::tensors::GpuRigidBodyView::getVelocities: expected device 0, received device -1

I have carefully read the tutorial on using IMU sensors:
https://docs.omniverse.nvidia.com/isaacsim/latest/advanced_tutorials/tutorial_advanced_isaac_imu_sensor.html
The sensor data read is also in CUDA Tensor, this error is really strange.And the IMU data I can read is as follows.
Note that the ang_vel data is all 0.0:

imu_data: {‘time’: 6.690000057220459, ‘physics_step’: 670.0, ‘lin_acc’: tensor([6.0603, 4.2792, 6.4186], device=‘cuda:0’), ‘ang_vel’: tensor([0., 0., 0.], device=‘cuda:0’), ‘orientation’: tensor([-0.5061, 0.1487, 0.3882, 0.7556], device=‘cuda:0’)}

The data is in pytorch tensor format and is in cuda: 0 device.

@shaoxiang
Copy link
Author

I have found through multiple experiments that as long as an IMU sensor is added to USD and this resource is opened in Isaac Lab, this error will continue to occur.
image

@Mayankm96
Copy link
Contributor

The IMU Sensor in Isaac Sim supports only CPU simulation (for some reason) and not other backends (besides numpy). It is expected that those features may not work with Isaac Lab that mainly supports torch backend for GPU-based parallelization.

We have an MR for IMU sensor integration into Isaac Lab. Hope that helps solve the issue for you.

@Mayankm96 Mayankm96 added bug Something isn't working isaac-sim This issue is related to Isaac Sim labels Jul 29, 2024
@shaoxiang
Copy link
Author

Thank you for your explanation. I am looking forward to it. In fact, I have been following this IMU development work for a long time and hope it will be released as soon as possible. #619

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working isaac-sim This issue is related to Isaac Sim
Projects
None yet
Development

No branches or pull requests

3 participants