Commit f30d819b authored by peterd-NV's avatar peterd-NV Committed by Kelly Guo

Fixes env error in record_demos script (#220)

# Description

Fixes the "'OrderEnforcing' object has no attribute 'device'" error by
using env.unwrapped.

## 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
-->
parent 52442bf8
...@@ -178,7 +178,9 @@ def main(): ...@@ -178,7 +178,9 @@ def main():
# get keyboard command # get keyboard command
delta_pose, gripper_command = teleop_interface.advance() delta_pose, gripper_command = teleop_interface.advance()
# convert to torch # convert to torch
delta_pose = torch.tensor(delta_pose, dtype=torch.float, device=env.device).repeat(env.num_envs, 1) delta_pose = torch.tensor(delta_pose, dtype=torch.float, device=env.unwrapped.device).repeat(
env.unwrapped.num_envs, 1
)
# compute actions based on environment # compute actions based on environment
actions = pre_process_actions(delta_pose, gripper_command) actions = pre_process_actions(delta_pose, gripper_command)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment