Unverified Commit 7e4d69b8 authored by Wei Yang's avatar Wei Yang Committed by GitHub

Fixes pytorch broadcasting issue in `EMAJointPositionToLimitsAction` (#1207)

# Fix the pytorch broadcasting error when joint_ids are not None

This PR fixes the broadcasting error in `EMAJointPositionToLimitsAction`
when `joint_ids` are not None.

Fixes #1082

## Type of change

- 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
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent be526037
......@@ -70,6 +70,7 @@ Guidelines for modifications:
* Zhengyu Zhang
* Ziqi Fan
* Qian Wan
* Wei Yang
## Acknowledgements
......
......@@ -185,7 +185,7 @@ class EMAJointPositionToLimitsAction(JointPositionToLimitsAction):
env_ids = slice(None)
super().reset(env_ids)
# reset history to current joint positions
self._prev_applied_actions[env_ids, :] = self._asset.data.joint_pos[env_ids, self._joint_ids]
self._prev_applied_actions[env_ids, :] = self._asset.data.joint_pos[env_ids[:, None], self._joint_ids]
def process_actions(self, actions: torch.Tensor):
# apply affine transformations
......
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