Skip to content

Conversation

ooctipus
Copy link
Collaborator

@ooctipus ooctipus commented Oct 17, 2025

Description

This PR fixes the issue where get_done_term returned last episode value rather than current step value.

This PR realizes values used for get_term should be different from that used for logging, and mixed useage leads to non-intuitive behavior.

using per-step value for logging leads to overcounting and undercounting reported in #2977
using last-episode value for get_term leads to misalignment with expectation reported in #3720

Fixes #2977 #3720

Type of change

The logging behavior remains mostly the same as #3107, and and also got rid of the weird overwriting behavior(yay).
I get exactly the same termination curve as #3107 when run on Isaac-Velocity-Rough-Anymal-C-v0

Here is a benchmark summary with 1000 steps running Isaac-Velocity-Rough-Anymal-C-v0 with 4096 envs

Before #3107:

| termination.compute | 0.229 ms|
| termination.reset | 0.007 ms|

PR #3107:

| termination.compute | 0.274 ms|
| termination.reset | 0.004 ms|

This PR:

| termination.compute | 0.258 ms|
| termination.reset | 0.004 ms|

We actually see improvement, this is due to the fact that expensive maintenance of last_episode_value is only computed once per compute(#3107 computes last_episode_value for every term)

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

Screenshots

Please attach before and after screenshots of the change if applicable.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • 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

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-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] Termination Overcounting Caused by Missing Log Buffer Reset in manager_based_rl_env.py

1 participant