Skip to content

Add Isaac Lab Arena interop for imitation learning scripts (#6650)#6690

Merged
kellyguo11 merged 2 commits into
isaac-sim:release/3.0.0-beta2from
peterd-NV:peterd/arena-il-interop-beta2
Jul 24, 2026
Merged

Add Isaac Lab Arena interop for imitation learning scripts (#6650)#6690
kellyguo11 merged 2 commits into
isaac-sim:release/3.0.0-beta2from
peterd-NV:peterd/arena-il-interop-beta2

Conversation

@peterd-NV

Copy link
Copy Markdown
Collaborator

Cherry-pick of f67ae28ad66f2401d5651637a5523308d1192c9f from Isaac Lab develop branch to release/3.0.0-beta2 to enable Isaac Lab Arena interop.

Description

Isaac Lab Arena currently keeps it's own copy of Isaac Lab imitation learning scripts (record_demos.py, generate_dataset.py, etc.). This PR updates the imitation learning scripts in Isaac Lab to enable direct interop with Arena environments, allowing Arena to remove it's own copy of the scripts and directly invoke the Isaac Lab ones.

Changes are:

  1. Add CLI arg to toggle sim buffer reset in recording script
  2. Add configurable recorder cfg to recording script
  3. Add configurable recorder cfg to data generation script

All additions are optional parameters and default to old behaviour so existing Isaac Lab workflows are not impacted.

Type of change

  • New feature (non-breaking change which adds functionality)

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

…#6650)

# Description

Isaac Lab Arena currently keeps it's own copy of Isaac Lab imitation
learning scripts (record_demos.py, generate_dataset.py, etc.). This PR
updates the imitation learning scripts in Isaac Lab to enable direct
interop with Arena environments, allowing Arena to remove it's own copy
of the scripts and directly invoke the Isaac Lab ones.

Changes are:

1. Add CLI arg to toggle sim buffer reset in recording script
2. Add configurable recorder cfg to recording script
3. Add configurable recorder cfg to data generation script

All additions are optional parameters and default to old behaviour so
existing Isaac Lab workflows are not impacted.

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- New feature (non-breaking change which adds functionality)

## Screenshots

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

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->

## 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
- [x] My changes generate no new warnings
- [ ] 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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

Signed-off-by: Peter Du <peterd@nvidia.com>
@peterd-NV
peterd-NV requested a review from a team July 23, 2026 15:31
@github-actions github-actions Bot added the isaac-mimic Related to Isaac Mimic team label Jul 23, 2026
@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds Arena interoperability hooks to Isaac Lab's imitation learning scripts, enabling Arena environments to drop their own copies of record_demos.py and generate_dataset.py in favour of the upstream versions. All new parameters are optional and default to existing behaviour, so no currently working Isaac Lab workflow is broken.

  • record_demos.py: adds --reset_sim_buffer_each_episode (default True) to optionally skip env.sim.reset() between episodes; adds gym-registry-driven recorder config lookup via demo_recorder_cfg_entry_point; guards manual resets from firing during in-progress success windows.
  • generation.py: extends setup_env_config to read env_cfg.mimic_recorder_config as a secondary fallback when no explicit recorder_cfg is provided, falling back further to ActionStateRecorderManagerCfg() when the attribute is None.

Confidence Score: 4/5

Safe to merge with minor hardening: all new behaviour is opt-in and defaults to the prior code paths.

The changes are additive and well-defaulted. The one concern is the bare env_cfg.mimic_recorder_config access in generation.py — if the env config doesn't carry that attribute, it throws AttributeError where the old code would have silently used the default recorder. In practice this path is only reached by mimic data generation, so the risk is low.

source/isaaclab_mimic/isaaclab_mimic/datagen/generation.py — the mimic_recorder_config attribute access

Important Files Changed

Filename Overview
scripts/tools/record_demos.py Adds optional --reset_sim_buffer_each_episode flag (default True, backward-compatible), a gym-registry-driven recorder cfg lookup, and a guard to block manual resets during in-progress success windows. All changes are well-guarded and default to prior behavior.
source/isaaclab_mimic/isaaclab_mimic/datagen/generation.py Extends setup_env_config to fall back to env_cfg.mimic_recorder_config when no explicit recorder_cfg is given; bare attribute access (no hasattr guard) could raise AttributeError for non-mimic configs.
source/isaaclab/changelog.d/peterd-arena-il-interop.rst Changelog entry for the demo_recorder_cfg_entry_point support added to record_demos.py.
source/isaaclab_mimic/changelog.d/peterd-arena-il-interop.rst Changelog entry for env-provided recorder config support in Mimic generation.

Reviews (1): Last reviewed commit: "Add Isaac Lab Arena interop for imitatio..." | Re-trigger Greptile

Comment thread source/isaaclab_mimic/isaaclab_mimic/datagen/generation.py
@kellyguo11
kellyguo11 merged commit 640cfe7 into isaac-sim:release/3.0.0-beta2 Jul 24, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-mimic Related to Isaac Mimic team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants