You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes ObservationManager history buffer corrupted by external calls to ObservationManager.compute (#2885)
# Description
When observation group has history length greater than zero, calling
`ObservationManager.compute` modifies history state by appending current
observation to history. This creates history corruption when
non-`ManagerBasedEnv` classes invoke `ObservationManager.compute`. This
PR introduces `update_history` flag (default to `False`) and only
`ManagerBasedEnv` has the privilege to run `ObservationManager.compute`
with `update_history=True`. If `update_history=False` and the history
buffer is `None`, a copy of history is returned instead of the original.
I have added test cases to verify this fix is effective.
Fixes#2884
## 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
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] 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
---------
Signed-off-by: ooctipus <zhengyuz@nvidia.com>
Signed-off-by: Kelly Guo <kellyg@nvidia.com>
Co-authored-by: ooctipus <zhengyuz@nvidia.com>
Co-authored-by: Kelly Guo <kellyg@nvidia.com>
0 commit comments