Unverified Commit e69b6d9b authored by Bikram Pandit's avatar Bikram Pandit Committed by GitHub

Resets recurrent state after episode termination in RSL-RL `play.py` (#3838)

# Description

This PR fixes an issue in recurrent policy evaluation where the
recurrent state was not being reset after an episode termination. The
missing reset caused residual memory to persist between episodes. The
fix ensures that `reset()` is now called during evaluation in `play.py`
for policy networks, including recurrent.

Fixes #3837  <!-- replace with actual issue number -->

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Screenshots

N/A

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation where
necessary
- [x] My changes generate no new warnings
- [x] I have added tests verifying that recurrent states are correctly
reset during evaluation
- [x] I have updated the changelog and 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 c8e1d4e9
......@@ -185,7 +185,9 @@ def main(env_cfg: ManagerBasedRLEnvCfg | DirectRLEnvCfg | DirectMARLEnvCfg, agen
# agent stepping
actions = policy(obs)
# env stepping
obs, _, _, _ = env.step(actions)
obs, _, dones, _ = env.step(actions)
# reset recurrent states for episodes that have terminated
policy_nn.reset(dones)
if args_cli.video:
timestep += 1
# Exit the play loop after recording one video
......
[package]
# Note: Semantic Versioning is used: https://semver.org/
version = "0.47.5"
version = "0.47.6"
# Description
title = "Isaac Lab framework for Robot Learning"
......
Changelog
---------
0.47.6 (2025-11-01)
~~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* Fixed an issue in recurrent policy evaluation in RSL-RL framework where the recurrent state was not reset after an episode termination.
0.47.5 (2025-10-30)
~~~~~~~~~~~~~~~~~~~
......
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