Repository navigation
Accept done-only final observations with learned dynamics - #308
Merged
ClemensSchwarke merged 1 commit intoNov 25, 2026
Conversation
Learned dynamics required every environment to capture physical successors before interval events on every step, which needs a dedicated environment feature. Interval edits such as pushes are rare, about one transition in 600 in G1 motion tracking, while resets are covered by the final observations that SAC already relies on. On G1 motion tracking, 3 seeds of 60 minutes per recipe trained as well without every-step capture as with it. Successors now follow the SAC contract: done environments use extras["final_obs"] and the others the returned observations. Environments that set extras["final_obs_every_step"] still provide pre-event successors and cut model-fitting windows after interval edits. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ClemensSchwarke
approved these changes
Nov 25, 2026
lgulich
added a commit
to isaac-sim/IsaacLab
that referenced
this pull request
Nov 25, 2026
## Motivation #9193 added a public option, `final_obs_every_step`, to the configs of the manager-based, direct and multi-agent environments. Only SuperMimic uses it: its learned dynamics needed every environment to capture the physical successor on every step, before resets and interval events. That is a public API change to every environment type for a single learner, and it hasn't shipped yet. This PR reverts it before 3.1 is released. ## Change The revert is possible because of `rsl-rl-lib-extras` 6.0.0.2 (leggedrobotics/rsl_rl#308). Learned dynamics there follows the same contract as SAC: the successors of finished episodes come from the regular `extras["final_obs"]`, and the others from the returned observations. The environments go back to their state before #9193, the SuperMimic runner config enables `compute_final_obs` instead of the removed option, and the dependency moves to 6.0.0.2. ## Effect on training Training is unaffected. Resets are handled as before, and replay windows still stop at dones. Command updates only change goal observations, not the `state` and `labels` groups the world model learns from. So the only difference is that physical interval edits such as pushes now enter the world model's targets, about one transition in 600 in G1 motion tracking. On `Isaac-Motion-Tracking-G1` (Newton, default environment count, one L40S per run, 3 seeds × 60 minutes per recipe), training with and without every-step capture gave the same results: episode reward 12.1 ± 0.4 without vs 11.7 ± 0.3 with it for the SuperMimic recipe, and 13.8 ± 0.2 vs 13.5 ± 0.7 for the BlinkMimic recipe, with the same world-model error. ## Viewer-reset fix Since SuperMimic now relies on `final_obs`, this also fixes a gap that affected SAC: a reset requested from the viewer on a step without an automatic reset ended episodes without capturing their final observations. The three environment types now capture them in that case too. ## Testing To train: ``` uv run isaaclab train --rl_library rsl_rl --task Isaac-Motion-Tracking-G1 \ --agent rsl_rl_supermimic_cfg_entry_point presets=state_obs ``` On one RTX 6000 Ada with 1024 environments, the reward rose from 0.17 to 7.4 in under 8 minutes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SHAC with learned dynamics requires every environment to report
extras["final_obs_every_step"] = True, i.e. to capture the physical successor of every environment on every step, before resets and before interval events such as pushes. In Isaac Lab this needs a dedicated mode in every environment base class (manager-based, direct, multi-agent and the Warp environments) plus the wrappers, which is most of the core-environment change in isaac-sim/IsaacLab#8867.Resets don't need it. The successor of a finished episode is already available from the regular
extras["final_obs"], the same contract SAC uses, and replay windows still end at dones, so no world-model window ever spans two episodes. The flag only adds something for interval edits in the middle of an episode, which are rare: in G1 motion tracking, pushes touch about 0.16% of transitions (the loggedwindow_break_fraction). The original SuperMimic implementation on mjlab sidesteps them the same way, by disabling pushes and not using pre-reset successors at all.Learned dynamics now follows the SAC contract: done environments take their successor from
final_obs, the others the returned observations, and a step with a done but withoutfinal_obsraises. Environments that setfinal_obs_every_stepkeep the current behavior, including cutting model-fitting windows after interval edits throughwindow_break; without it, pushes are learned as part of the dynamics. SHAC with a differentiable task is unchanged.On G1 motion tracking (Isaac Lab, 3 seeds of 60 minutes each on one L40S, before the SHAC refactor but with the same change), training without every-step capture matched training with it:
To run the tests:
🤖 Generated with Claude Code