Skip to content

Fix demo recording with variations and placement - #1435

Merged
zhx06 merged 7 commits into
mainfrom
zxiao/fix/il-interop-recorders
Oct 16, 2026
Merged

zhx06 merged 7 commits into
mainfrom
zxiao/fix/il-interop-recorders

Conversation

@zhx06

@zhx06 zhx06 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Fix variation overrides and recorder binding when using Isaac Lab’s record_demos.py with Arena environments.

Why this change?

Arena variation overrides were not forwarded to the builder. Isaac Lab also constructed the environment without Arena’s recorder kwargs, causing reset-time recording to fail. Relation placement introduced in #1427 encounters the same binding failure.

Recreating an environment from the same registration also retained stale recording samples and replay assignments.

What changes?

  • Extract variation-override routing into split_variation_overrides, preserving Isaac Lab’s remaining arguments.
  • Forward the original recorder and replay scheduler through the registered constructor.
  • Bind the recorder to the environment through a weak reference.
  • Clear runtime samples and restart replay assignments for each new environment, preserving build-time samples.
  • Verify recorded placement poses against actual simulator poses immediately after reset.

recorded_variation_samples_path Hydra support through IL interop remains deferred, with a TODO as agreed. Isaac Lab’s separate annotate_demos.py routing issue is outside this recording fix. No Isaac Lab changes are included.

Validation

  • 51 focused tests passed, covering routing, recorder lifetime, environment recreation, replay and partial resets.
  • Both environment-recreation regressions failed before the fix and passed afterward.
  • Two native recording tests passed, including relation placement, enabled mass variation and HDF5 export.
  • Applicable pre-commit hooks, strict Sphinx build and git diff --check passed.

@zhx06
zhx06 marked this pull request as ready for review October 13, 2026 14:30
@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR fixes Isaac Lab's record_demos.py with Arena environments. The registration callback now passes variation overrides to ArenaEnvBuilder and returns only the remaining arguments to Lab. The registered Gym entry point also supplies the recorder and replay scheduler even when Lab calls gym.make(task, cfg=...) without them. The fix is small and targeted, and the regression tests cover both the routing and the recorder lifetime. My comments are all cleanup.

Findings

🔵 Improvement: isaaclab_arena/environments/arena_env_builder.py:595: The NOTE above create_env still says not to put env_kwargs in the Gym registry, but the closure now does exactly that. With the weak reference in bind_env, the leak it describes looks fixed, so the NOTE and its TODO should be updated or removed. Passing **env_kwargs to gym.make in make_registered_and_return_cfg may now be redundant.
🔵 Improvement: isaaclab_arena/environments/isaaclab_interop.py:143: Move the inline override splitting into a named helper in variations_hydra.py, for example split_variation_overrides.
🔵 Improvement: isaaclab_arena/tests/test_record_demos.py:173: The new test device and environment-binding setup largely duplicate the GR1 microwave callback. A shared helper would remove the copy.

Verdict

Minor fixes needed

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium impact] Fixes demo recording to handle variations and placement correctly.

Fix the shared recording and replay state before merging; a second environment from the same registration cannot reset.

Findings

  1. P1 Second environment cannot reset ▶
  2. P2 Wrong placement goes unnoticed ▶

Summary

The PR connects Arena variations to Isaac Lab demo recording:

  • Recording commands now send Arena variation settings to the right builder.
  • Gym callers keep Arena's recording hooks when they build registered environments.

Repeated construction from one registration still shares episode state. The placement test also needs to check the live pose.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Isaac Lab recording arguments] --> B[Arena registration callback]
  B --> C[Variation overrides]
  B --> D[Remaining Isaac Lab arguments]
  C --> E[Arena environment builder]
  E --> F[Gym registration with constructor closure]
  D --> G[Isaac Lab recording script]
  G --> H[gym.make with cfg]
  F --> H
  H --> I[Arena environment]
  F --> J[Shared recorder and replay scheduler]
  J --> I
  J -. Weak environment reference .-> I
Loading

Reviews (1) · Last reviewed commit: "fix test cases" · Reviewed by Greptile

@zhx06
zhx06 force-pushed the zxiao/fix/il-interop-recorders branch from d86f443 to af63e22 Compare October 13, 2026 15:58

@cvolkcvolk cvolkcvolk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! Lgtm. Please have a look at the bot‘s comments as well

zhx06 added 6 commits October 16, 2026 08:17
Signed-off-by: zhx06 <[email protected]>
Signed-off-by: zhx06 <[email protected]>
Signed-off-by: zhx06 <[email protected]>
Signed-off-by: zhx06 <[email protected]>
@zhx06
zhx06 force-pushed the zxiao/fix/il-interop-recorders branch from 30fa99a to 7ef4360 Compare October 16, 2026 15:20
@zhx06
zhx06 merged commit 9afdcd0 into main Oct 16, 2026
12 checks passed
cvolkcvolk added a commit that referenced this pull request Oct 19, 2026
Brings in:
- Fix demo recording with variations and placement (#1435)
- Relax Anchor Constraint for ClutterOn (#1389)

Signed-off-by: Clemens Volk <[email protected]>
cvolkcvolk added a commit that referenced this pull request Oct 19, 2026
test_recorder_rebinding_starts_fresh_runtime_records came in with
#1435 and still called configure_at_build_time() without arguments,
which this branch made required. Pass seed 0 and the
asset.recorder_test key the test already reads back, as the other
recorder tests do.

Signed-off-by: Clemens Volk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants