Skip to content

Fix OVD Recorder hanging silently on non-PhysX backends - #7507

Merged
kellyguo11 merged 6 commits into
isaac-sim:developfrom
matthewtrepte:mtrepte/fix-ovd-recorder-non-physx-backend
Sep 5, 2026
Merged

Fix OVD Recorder hanging silently on non-PhysX backends#7507
kellyguo11 merged 6 commits into
isaac-sim:developfrom
matthewtrepte:mtrepte/fix-ovd-recorder-non-physx-backend

Conversation

@matthewtrepte

@matthewtrepte matthewtrepte commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description

The OVD Recorder (AnimationRecorder) only works with the PhysX backend, but most tasks now default to Newton. As a result, --anim_recording_enabled silently did nothing: recording never started, --anim_recording_stop_time was never reached, and the process ran until manually killed with nothing saved.

This PR:

  • Raises a clear error at simulation startup when --anim_recording_enabled is set on a physics backend that doesn't support the OVD Recorder (via a new PhysicsManager.supports_anim_recording flag, set True only on PhysxManager), naming the active backend and pointing the user to physics=isaacsim_physx.
  • Adds an overrides parameter to parse_env_cfg() so standalone (non-Hydra) scripts can apply physics=/renderer=/presets= overrides, and updates the run_cartpole_rl_env.py tutorial to forward unrecognized CLI args this way.
  • Updates docs/source/how-to/record_animation.rst to note the PhysX requirement and fix the example command so it actually works as documented.

Type of change

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

Testing

  • Reran the exact documented repro command on the default (Newton) backend: now fails fast with a clear ValueError instead of hanging.
  • Reran with physics=isaacsim_physx: recording stops at --anim_recording_stop_time, saves baked_animation_recording.usda, process exits cleanly (exit code 0).
  • uv run isaaclab -f passes for all touched files.
  • Targeted tests (test_physics_manager_lifecycle.py, test_hydra.py): 94 passed.
  • Docs build (make -C docs current-docs, warnings-as-errors): succeeded with no warnings.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab -f
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • I have added my name to CONTRIBUTORS.md (already present)

Release backport

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

The AnimationRecorder (OVD Recorder) only works with the PhysX backend, but
most tasks now default to Newton, so `--anim_recording_enabled` silently
did nothing: recording never started, `--anim_recording_stop_time` was
never reached, and the process ran until manually killed with nothing
saved. Raise a clear error at simulation startup when animation recording
is requested on an unsupported backend, and let standalone scripts (like
the record_animation tutorial) forward Hydra-style `physics=` overrides so
the documented example command actually selects PhysX and works.
@matthewtrepte
matthewtrepte requested a review from a team September 2, 2026 23:54
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Sep 2, 2026
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR makes animation recording fail fast on unsupported physics backends and enables standalone task configuration overrides for the Cartpole tutorial.

  • Adds a backend capability flag, enabled only by PhysX, and validates animation-recording support during simulation startup.
  • Adds override forwarding through parse_env_cfg and the standalone Cartpole tutorial.
  • Updates animation-recording documentation and package changelogs.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking API validation issue for callers that provide one override as a bare string.

The backend guard and tutorial forwarding are coherent, but the new public overrides parameter permits a string value that downstream composition parses character by character.

Files Needing Attention: source/isaaclab_tasks/isaaclab_tasks/utils/parse_cfg.py

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/physics/physics_manager.py Adds a startup capability check that rejects OVD animation recording on unsupported physics backends.
source/isaaclab_physx/isaaclab_physx/physics/physx_manager.py Declares PhysX support for OVD animation recording.
source/isaaclab_tasks/isaaclab_tasks/utils/parse_cfg.py Adds standalone override composition, but a bare string is accepted by the declared type and then misinterpreted as individual overrides.
scripts/tutorials/03_envs/run_cartpole_rl_env.py Forwards unknown command-line tokens to task configuration composition so backend selectors work.
docs/source/how-to/record_animation.rst Documents the PhysX requirement and updates the recording commands accordingly.

Reviews (1): Last reviewed commit: "Fix OVD Recorder hanging silently on non..." | Re-trigger Greptile

"""
# Compose the registered task through the same boundary used by Hydra entry points.
cfg, _ = resolve_task_config(task_name, None, overrides=())
cfg, _ = resolve_task_config(task_name, None, overrides=overrides)

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.

P2 Bare strings split into characters

The new Sequence[str] API also accepts a bare string, so overrides="physics=isaacsim_physx" is forwarded and processed character by character, producing an unrelated configuration parsing error instead of selecting PhysX. Validate or normalize this input so one override cannot be mistaken for a sequence of overrides.

@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 capability-gated startup check directly addresses silent OVD recording failures on non-PhysX backends, while the new configuration override path makes the documented PhysX selection work from the cartpole tutorial. The TODO text accurately discloses the current standalone-script limitation and does not establish a material documentation defect requiring pre-merge action.

  • Design and architecture: The opt-in supports_anim_recording ClassVar centralizes backend capability detection in PhysicsManager.initialize(), with only PhysxManager enabling recording. This preserves safe defaults for other backends and fails before unsupported recording can hang.
  • API: parse_env_cfg() adds overrides as a trailing parameter with an empty default, preserving existing callers and prior configuration behavior. The override is passed through the existing resolve_task_config boundary, and the capability flag is additive. Documentation and package changelog coverage accompany the user-visible changes.
  • Implementation: The non-PhysX failure path, PhysX opt-in, override composition, and cartpole CLI forwarding are internally consistent. Using parse_known_args() means unknown or mistyped options now reach Hydra resolution rather than failing directly in argparse, but they should still surface as configuration errors; this is a non-blocking diagnostic tradeoff.

No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.

Automated review; human maintainers own approval decisions.

Only the run_cartpole_rl_env.py tutorial forwarded unrecognized CLI
arguments as physics=/renderer=/presets= overrides to parse_env_cfg().
Every other standalone script that calls parse_env_cfg() still used
strict parser.parse_args(), so those overrides had no way to reach it.

Switch the remaining scripts to parser.parse_known_args() and forward
the extras consistently. Also guard parse_env_cfg()'s overrides
parameter against a bare string, which is itself a Sequence[str] of
characters and would otherwise be split one character at a time
instead of treated as a single override.
@github-actions github-actions Bot added the isaac-mimic Related to Isaac Mimic team label Sep 3, 2026
@matthewtrepte

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 3, 2026
@matthewtrepte
matthewtrepte enabled auto-merge (squash) September 3, 2026 21:35
PhysicsManager.initialize() unconditionally called sim_context.get_setting(),
but existing tests (test_physics_manager_device.py) pass a minimal
SimpleNamespace that only implements the cfg/device attributes this
method also reads above. Look up get_setting via getattr and skip the
check when it's absent, matching the lightweight-double pattern the
rest of this method already tolerates.
…sx-backend' into mtrepte/fix-ovd-recorder-non-physx-backend
.. code-block:: bash

uv run python scripts/tutorials/03_envs/run_cartpole_rl_env.py --anim_recording_enabled --anim_recording_start_time 1 --anim_recording_stop_time 3
uv run python scripts/tutorials/03_envs/run_cartpole_rl_env.py --anim_recording_enabled --anim_recording_start_time 1 --anim_recording_stop_time 3 physics=isaacsim_physx

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.

do we also need --extra isaacsim in the command?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Checked — I don't think we need it here, and would rather stay consistent with the sibling tutorial docs (run_articulation.rst, launch_app.rst, record_video.rst, etc.), all of which also omit --extra isaacsim in their example commands. That extra is shown in the installation guide's first-run verification command (uv run --extra isaacsim isaaclab train ...), which is what actually syncs it into the environment; once that's done, plain uv run python ... reuses the already-resolved env without needing to repeat the extra. I've also run this exact command many times against this repo without --extra isaacsim and it works fine. Let me know if you'd rather I add it for explicitness anyway — happy to if that's the preference, just flagging the existing convention first.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correction to my earlier reply — I was wrong. isaacsim is genuinely an optional extra (pyproject.toml's [project.optional-dependencies], not a base dependency), so a fresh uv sync without it won't have Isaac Sim at all, and physics=isaacsim_physx needs it.

Your #7054 (merged yesterday) already established the right convention for exactly this in the new docs/source/concepts/visualization.rst:

"Most tasks default to a PhysX backend, which requires Isaac Sim. If it isn't installed yet, add --extra isaacsim to the uv run commands above; see installation-optional-extras for details."

I've added the same note here rather than baking --extra isaacsim into the example command itself, matching that doc's pattern.

The example command selects PhysX (physics=isaacsim_physx), which
needs Isaac Sim installed. isaacsim is an optional extra, not a base
dependency, so a fresh checkout without it would fail. Add the same
conditional note isaac-sim#7054 established in docs/source/concepts/visualization.rst
for the equivalent PhysX-backend caveat.
@kellyguo11

Copy link
Copy Markdown
Contributor

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 5, 2026
@kellyguo11
kellyguo11 disabled auto-merge September 5, 2026 05:00
@kellyguo11
kellyguo11 merged commit 69de9b2 into isaac-sim:develop Sep 5, 2026
51 of 53 checks passed
@isaaclab-bot

isaaclab-bot Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Backported to release/3.0.0 as b6afa8e.

isaaclab-bot Bot pushed a commit that referenced this pull request Sep 5, 2026
## Description

The OVD Recorder (`AnimationRecorder`) only works with the PhysX
backend, but most tasks now default to Newton. As a result,
`--anim_recording_enabled` silently did nothing: recording never
started, `--anim_recording_stop_time` was never reached, and the process
ran until manually killed with nothing saved.

This PR:
- Raises a clear error at simulation startup when
`--anim_recording_enabled` is set on a physics backend that doesn't
support the OVD Recorder (via a new
`PhysicsManager.supports_anim_recording` flag, set `True` only on
`PhysxManager`), naming the active backend and pointing the user to
`physics=isaacsim_physx`.
- Adds an `overrides` parameter to `parse_env_cfg()` so standalone
(non-Hydra) scripts can apply `physics=`/`renderer=`/`presets=`
overrides, and updates the `run_cartpole_rl_env.py` tutorial to forward
unrecognized CLI args this way.
- Updates `docs/source/how-to/record_animation.rst` to note the PhysX
requirement and fix the example command so it actually works as
documented.

## Type of change

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

## Testing

- Reran the exact documented repro command on the default (Newton)
backend: now fails fast with a clear `ValueError` instead of hanging.
- Reran with `physics=isaacsim_physx`: recording stops at
`--anim_recording_stop_time`, saves `baked_animation_recording.usda`,
process exits cleanly (exit code 0).
- `uv run isaaclab -f` passes for all touched files.
- Targeted tests (`test_physics_manager_lifecycle.py`, `test_hydra.py`):
94 passed.
- Docs build (`make -C docs current-docs`, warnings-as-errors):
succeeded with no warnings.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the `pre-commit` checks with `uv run isaaclab -f`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] I have added my name to `CONTRIBUTORS.md` (already present)

## Release backport

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

(cherry picked from commit 69de9b2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team isaac-mimic Related to Isaac Mimic team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants