Fix OVD Recorder hanging silently on non-PhysX backends - #7507
Conversation
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.
Greptile SummaryThe PR makes animation recording fail fast on unsupported physics backends and enables standalone task configuration overrides for the Cartpole tutorial.
Confidence Score: 4/5The 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
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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_recordingClassVar centralizes backend capability detection inPhysicsManager.initialize(), with onlyPhysxManagerenabling recording. This preserves safe defaults for other backends and fails before unsupported recording can hang. - API:
parse_env_cfg()addsoverridesas a trailing parameter with an empty default, preserving existing callers and prior configuration behavior. The override is passed through the existingresolve_task_configboundary, 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.
|
run-ci |
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 |
There was a problem hiding this comment.
do we also need --extra isaacsim in the command?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 isaacsimto theuv runcommands above; seeinstallation-optional-extrasfor 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.
|
run-ci |
|
Backported to |
## 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)
Description
The OVD Recorder (
AnimationRecorder) only works with the PhysX backend, but most tasks now default to Newton. As a result,--anim_recording_enabledsilently did nothing: recording never started,--anim_recording_stop_timewas never reached, and the process ran until manually killed with nothing saved.This PR:
--anim_recording_enabledis set on a physics backend that doesn't support the OVD Recorder (via a newPhysicsManager.supports_anim_recordingflag, setTrueonly onPhysxManager), naming the active backend and pointing the user tophysics=isaacsim_physx.overridesparameter toparse_env_cfg()so standalone (non-Hydra) scripts can applyphysics=/renderer=/presets=overrides, and updates therun_cartpole_rl_env.pytutorial to forward unrecognized CLI args this way.docs/source/how-to/record_animation.rstto note the PhysX requirement and fix the example command so it actually works as documented.Type of change
Testing
ValueErrorinstead of hanging.physics=isaacsim_physx: recording stops at--anim_recording_stop_time, savesbaked_animation_recording.usda, process exits cleanly (exit code 0).uv run isaaclab -fpasses for all touched files.test_physics_manager_lifecycle.py,test_hydra.py): 94 passed.make -C docs current-docs, warnings-as-errors): succeeded with no warnings.Checklist
pre-commitchecks withuv run isaaclab -fsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.md(already present)Release backport
develop