Skip to content

Fix teleop recording success term - #7579

Merged
kellyguo11 merged 2 commits into
isaac-sim:developfrom
kellyguo11:codex/fix-teleop-success-develop
Sep 4, 2026
Merged

Fix teleop recording success term#7579
kellyguo11 merged 2 commits into
isaac-sim:developfrom
kellyguo11:codex/fix-teleop-success-develop

Conversation

@kellyguo11

@kellyguo11 kellyguo11 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description

Ports #7571 to develop.

record_demos.py removed the success termination before environment initialization. The Franka Reach reward configuration references that term through is_terminated_term, so reward-manager initialization could not resolve the success key.

This change:

  • keeps an inert success termination registered while demonstration recording evaluates the original condition manually;
  • preserves reward-manager references without restoring automatic success resets;
  • adds a Franka Reach DiffIK startup regression test;
  • adds the isaaclab_teleop changelog fragment.

Release-branch counterpart: #7571.

The independent develop pre-commit baseline failure is split into #7582. This PR's repository-wide pre-commit job depends on that fix landing first.

Type of change

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

Release backport

  • Backport this pull request to the active release branch after it merges into develop

An explicit release PR already exists as #7571, so no additional automated backport is requested.

Screenshots

Not applicable.

Testing

  • Focused pre-commit checks passed for all three changed files.
  • uv run --no-project python tools/changelog/cli.py check --include-worktree passed.
  • git diff --check upstream/develop...HEAD passed.
  • The simulator smoke test cannot run locally because the project lockfile does not support the current Apple Silicon macOS host; it is included for Linux CI.
  • The repository-wide pre-commit baseline is repaired separately by Fix OVRTX clone-plan test import #7582.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the full repository-wide pre-commit checks (blocked on Fix OVRTX clone-plan test import #7582)
  • Documentation changes are not required because no public API changed
  • My changes generate no new warnings
  • I have added a test that proves the teleop fix is effective
  • I have added the isaaclab_teleop changelog fragment
  • Maximilian Krause already appears in CONTRIBUTORS.md

@kellyguo11

Copy link
Copy Markdown
Contributor Author

run-ci

@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Sep 4, 2026
@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 4, 2026
@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR preserves the success termination key during teleoperation setup while replacing its automatic termination behavior with an inert callback, allowing dependent reward terms to initialize while success remains manually evaluated.

  • Adds the inert success-term replacement to demonstration recording configuration.
  • Adds a Franka Reach DiffIK startup regression test covering reward-manager resolution.
  • Adds an isaaclab_teleop changelog fragment.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness, security, or quality issues identified.

The original success condition remains available for manual recording evaluation, while the inert registered replacement preserves manager references and prevents automatic success termination as intended.

Important Files Changed

Filename Overview
scripts/tools/record_demos.py Retains the configured success term name with an all-false callback while preserving the original configuration for manual success evaluation.
source/isaaclab_teleop/test/test_teleop_scripts_smoke.py Adds a startup regression test that reaches environment readiness after the reward manager resolves the success termination reference.
source/isaaclab_teleop/changelog.d/maximiliank-teleop-success-placeholder.rst Accurately documents the demonstration-recording initialization fix.

Reviews (1): Last reviewed commit: "Fix teleop recording success term" | Re-trigger Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isaac Lab Review Bot

The inert success termination preserves reward-manager references without restoring automatic success resets, but replace(func=_never_terminate, params={}) does not clear existing term parameters. Parameterized success terms can therefore pass unexpected keyword arguments to _never_terminate during stepping.

  • Design and architecture: Keeping an always-false success term registered is appropriate because it preserves manager cross-references while retaining the original term for manual success evaluation. The replacement must fully remove or tolerate the original term parameters to make that design operational.
  • API: No public API or return-contract changes are introduced. The private _never_terminate helper has the expected boolean result shape and device placement, but its signature is incompatible with parameters retained from the original success configuration.
  • Implementation: The copied termination term retains existing dictionary entries because replacing a dict-valued field with an empty mapping does not clear it. Explicitly clear params on the copied term or allow _never_terminate to accept ignored keyword arguments. The startup test reaches manager initialization but does not step the environment, so it does not cover this failure path.

Minor fixes needed. Posted 1 actionable finding inline.

Automated review; human maintainers own approval decisions.

# terms that reference "success" can still resolve it during initialization.
success_term = getattr(env_cfg.terminations, "success", None)
if success_term is not None:
env_cfg.terminations.success = success_term.replace(func=_never_terminate, params={})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Implementation — replace(params={}) does not clear success term params

configclass.replace applies kwargs through update_class_from_dict, which recurses into dict-valued fields; an empty mapping updates nothing, so the inert term keeps the original params. Term preparation skips the signature check for single-argument callables, so this only surfaces at the first TerminationManager.compute() as _never_terminate() got an unexpected keyword argument ... for any task whose success term declares parameters. Assign params = {} on the copied term explicitly, or give _never_terminate a **kwargs tail.

@kellyguo11

Copy link
Copy Markdown
Contributor Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 4, 2026
@kellyguo11
kellyguo11 force-pushed the codex/fix-teleop-success-develop branch 2 times, most recently from 4dfed88 to 154f937 Compare September 4, 2026 18:08
@kellyguo11 kellyguo11 mentioned this pull request Sep 4, 2026
8 tasks
kellyguo11 added a commit that referenced this pull request Sep 4, 2026
# Description

Restores the missing `torch` import in `test_ovrtx_clone_plan.py`.

#7462 converted the existing clone-plan test inputs from Torch tensors
to NumPy arrays and removed the then-unused import. #6308 subsequently
added a new object-scale test using `torch.ones` and `torch.arange`
without restoring the import, causing the repository-wide Ruff
pre-commit check to fail with `F821 Undefined name torch`.

This PR contains only the import repair and an `isaaclab_ov` `.skip`
changelog fragment. It unblocks #7579 and other changes based on the
current `develop` branch.

## Type of change

- Bug fix (non-breaking test fix)

## Release backport

- [ ] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

No release backport is required: `release/3.0.0` already imports `torch`
in this test.

## Screenshots

Not applicable.

## Testing

- `uv run --no-project --with pre-commit python -m pre_commit run
--all-files`
- `uv run --no-project python tools/changelog/cli.py check
--include-worktree`
- `git diff --check upstream/develop...HEAD`

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the full pre-commit checks
- [x] Documentation changes are not required because no public API
changed
- [x] My changes generate no new warnings
- [x] The fix directly covers the Ruff `F821` failure
- [x] I have added an `isaaclab_ov` changelog fragment
- [x] My name already exists in `CONTRIBUTORS.md`
@kellyguo11

Copy link
Copy Markdown
Contributor Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 4, 2026
@kellyguo11
kellyguo11 merged commit c43c8bf into isaac-sim:develop Sep 4, 2026
53 checks passed
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.

2 participants