Repository navigation
Add opt-in live OVD recording to OVPhysX - #9194
pdherasciec wants to merge 10 commits into
Conversation
Signed-off-by: Pablo de Heras Ciechomski <115007036+pdherasciec@users.noreply.github.com>
|
run-ci |
Signed-off-by: Pablo de Heras Ciechomski <115007036+pdherasciec@users.noreply.github.com>
|
run-ci |
|
run-ci |
Signed-off-by: Pablo de Heras Ciechomski <115007036+pdherasciec@users.noreply.github.com>
Signed-off-by: Pablo de Heras Ciechomski <115007036+pdherasciec@users.noreply.github.com>
|
run-ci |
[Medium impact] The changes affect OVPhysX jobs that create native simulation instances. The PR appears safe to merge, with a non-blocking gap in checks of recorded contents. Findings
SummaryAdds opt-in live OVD recording through the existing native handle.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["First hard reset"] --> B["Read requested recording capability"]
B --> C{"Native setting matches?"}
C -- No --> D["Try to set native capability"]
D -- Frozen --> E["Raise configuration conflict"]
D -- Accepted --> F["Construct PhysX"]
C -- Yes --> F
F --> G{"Readback matches?"}
G -- No --> H["Destroy candidate and raise"]
G -- Yes --> I["Attach scene and finish reset"]
I --> J["Step without recording"]
J --> K["Start capture through native handle"]
K --> L["Step while recording"]
L --> M["Stop capture"]
M --> J
Reviews (1) · Last reviewed commit: "Preserve positional OVPhysX configuratio..." · Reviewed by Greptile |
| sim.step(render=False) | ||
| assert manager.get_simulation_time() > t | ||
| physx.stop_recording() | ||
| assert not physx.is_recording() and first.stat().st_size > 0 |
There was a problem hiding this comment.
The new test checks is_recording(), elapsed simulation time, and nonempty files, but never checks the recorded actors or frames. A file containing only setup data would pass even if late recording missed existing actors or their motion. Add an automated check that decodes a delayed capture and verifies existing actors and advancing frame data.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Addressed in 23ac136. The regression identifies the pre-existing cube and compares its recorded positions from completed frames with live reads. I verified that setup-only and frozen-pose captures fail. The current isaaclab_ov job passed the regression on the pinned OVPhysX wheel. CI job
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Compatibility and deprecation (1), Style consistency (2), Test quality (3). Other reviewed categories look good.
- PR description: The title matches; clarify regression counts and collapse validation chronology, retaining sections and hardware results but adding reproducible baseline/candidate revisions, commands, backend, environment count, warmup, and metrics for the performance table.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: Breaking changes: omitted capability now overwrites inherited True or rejects a live capable runtime; preserve the old behavior through a targeted warning, migration documentation, removal guidance, and transition coverage.
- Implementation: Implementation looks good.
- Style consistency: New test functions omit required return annotations; add -> None to all five.
- Test quality: The recording lifecycle test asserts clock advancement rather than native motion, allowing stalled physics during capture to pass; assert changing cube poses across recorded steps.
Significant concerns. Posted 6 inline findings.
Automated review; human maintainers own approval decisions.
| return self._transforms.data | ||
|
|
||
|
|
||
| def _read_ovd_recording_capability() -> bool: |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Move private helpers after classes
The two private functions interrupt public class declarations, contrary to the prescribed module order. Move them below the public classes.
There was a problem hiding this comment.
I kept the two helpers beside OvPhysxBackend, their only caller. The module already has top-level private helpers before its classes, and the contribution guide's ordering rule is for class members.
| ovphysx.bootstrap() | ||
| configured = _read_ovd_recording_capability() | ||
| # The setting survives shutdown, but the setter is frozen while the native runtime is live. | ||
| if configured != requested: |
There was a problem hiding this comment.
🟡 Warning · Compatibility — Preserve inherited recording capability
An omitted option now disables SDK-configured recording or rejects a live capable runtime. Preserve inheritance through a warned, documented deprecation transition; validate both omitted and explicit settings.
There was a problem hiding this comment.
Explicit startup opt-in is the product contract for this PR. An omitted option requests False. That restores an unfrozen SDK setting to False, and a live owner with a conflicting value causes an explicit startup error. The regression suite covers both the default and the live conflict. CI job
| @pytest.mark.kitless | ||
| @pytest.mark.integration | ||
| @pytest.mark.skipif(not _CPU_DEVICES, reason="Requires a selected CPU test device") | ||
| def test_default_ovd_capability_overrides_unfrozen_native_opt_in(tmp_path): |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Annotate new test functions
The new test functions omit -> None, despite the contribution guide requiring it for functions without a return value. Add return annotations to all five.
There was a problem hiding this comment.
The delayed-capture regression now has a -> None annotation. The four other test functions still lack explicit return annotations.
| first = start(physx, "first") | ||
| t = manager.get_simulation_time() | ||
| sim.step(render=False) | ||
| assert manager.get_simulation_time() > t |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Verify motion during recording
The clock advances even if native motion stops during capture; file size does not prove frames advanced. Assert changing cube poses across recorded steps instead of only simulation time.
There was a problem hiding this comment.
The regression now checks that the cube falls across completed recording frames and compares all three recorded heights with live reads from the same steps. It passed in the current OVPhysX job. CI job
| ) | ||
|
|
||
|
|
||
| @pytest.mark.parametrize(("query_fails", "cleanup_fails"), [(False, False), (True, False), (False, True)]) |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Mark new kitless unit tests
The candidate-cleanup, positional-construction, and bool-validation tests need no Kit but lack kitless marks, so kitless selection omits them. Mark each test explicitly.
There was a problem hiding this comment.
The three unit tests still lack explicit kitless markers. All three ran and passed in the isaaclab_ov package job. The Multi-GPU kit-less lane selects a separate test file. The delayed-capture integration test has the kitless marker. CI job
| native.get_global_config = native_call | ||
| native.set_global_config = native_call | ||
| monkeypatch.setattr(manager_module, "ovphysx", native) | ||
| for value in (0, 1, "false", None, np.bool_(True)): |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Remove duplicate invalid integer
Zero and one exercise the same non-bool rejection with no distinct boundary. Keep one integer alongside the string, None, and NumPy boolean cases.
There was a problem hiding this comment.
I kept 0 and 1 to cover both falsy and truthy integer inputs. The test verifies that neither reaches native startup through implicit Boolean coercion.
Signed-off-by: Pablo de Heras Ciechomski <115007036+pdherasciec@users.noreply.github.com>
There was a problem hiding this comment.
let's also update this Docs page, which has a OVD recording section
https://isaac-sim.github.io/IsaacLab/main/source/how-to/record_animation.html
There was a problem hiding this comment.
Updated the animation guide. Both Isaac Sim Cartpole examples now include --viz kit. The kit-less section links to the runnable start/stop example and shows how to inspect a raw capture with ovd-inspect summary. Updated guide · Answers on capture scheduling and inspection · Cartpole launch check
|
is the usage the same as before? namely, do these CLI args still work the same? |
|
based on your diagram above, it looks like this supports multiple (non overlapping) captures. |
|
hm currently, do we explain in our docs how to load & use a OVD recording in IsaacLab? if not, might be helpful to add a quick tutorial section or video clip. |
Signed-off-by: Pablo de Heras Ciechomski <115007036+pdherasciec@users.noreply.github.com>
|
run-ci |
|
@matthewtrepte I updated the animation guide in
The local checks did not run the native Isaac Sim USD export or Kit visual import. |
Signed-off-by: Pablo de Heras Ciechomski <115007036+pdherasciec@users.noreply.github.com>
|
Follow-up on the Cartpole command. I checked the full pre-launch configuration. Without a visualizer, the command defaults to headless and the Isaac Sim recorder rejects it. Add With that flag, I verified that the launcher selects windowed Kit and the same 1–3 s interval. Local validation stopped before native Isaac Sim launch and USD export. Both command examples are updated. Corrected guide |
Signed-off-by: Pablo de Heras Ciechomski <115007036+pdherasciec@users.noreply.github.com>
|
run-ci |
|
Do we also show OVD recordings in the kitless path? |
|
@matthewtrepte Yes. The kit-less guide has a runnable headless example that starts recording after the simulation is already stepping, writes If you mean seeing the motion play back, capture and command-line inspection both work without Kit. For visual playback, the guide points to the OmniPVD importer in a compatible Kit app, where users can open the same |
|
yea, i mean speciifcally, is there an example in the guide for visual playback of the OVD recording in a kitless path? it'd also be great if you could include a quick video of the full process of the playback, perhaps with timeline controls, like pausing. hm timeline scrubbing in the kitless visualizer. would be great too, but this might be a followup feature |
|
@matthewtrepte Yes. The standalone OVD Viewer opens the I tested this on Windows with an Isaac Lab Franka Panda recorded using the kit-less OVPhysX backend. The 13-second clip shows the shoulder and gripper moving, a pause mid-reach, and a scrub back through the same recording. franka-ovd-playback.mp4 |
Signed-off-by: Pablo de Heras Ciechomski <115007036+pdherasciec@users.noreply.github.com>
Signed-off-by: Pablo de Heras Ciechomski <115007036+pdherasciec@users.noreply.github.com>
Description
Kit-less OVPhysX jobs can opt in to OVD recording at startup, then use the native handle to start, stop, and restart an explicit capture while the same simulation keeps stepping. The default is off. The startup flag is keyword-only and preserves existing positional configuration arguments. A headless guide example shows a delayed FILE capture.
The runtime's capability is process-wide and must be set before the first native PhysX instance. Isaac Lab applies the requested value before construction and reports a conflict when a live runtime has frozen a different value. Isaac Lab supplies the supported OVPhysX version through its existing project pin in
pyproject.toml.Recording lifecycle
Validation
Current upstream pin
On PR head
5bfd0a9withmainat6b20eac9(merge5048a373), I ran all seven OVD cases on Ubuntu 22.04.5 x86_64 under WSL2 with CUDA hidden. All passed with the installedovphysx==0.8.1.45833638316. I also exercised the missing getter, non-boolean getter response and missing setter. Each error now points to the pin inpyproject.toml.The upstream Linux x86_64 CPU job installed
ovphysx==0.8.1.45833638316on merge99a2c905(PR headfc076cdwithmainat6b20eac9). All seven OVD cases passed. The delayed-capture case decoded the existing cube’s poses from completed frames and compared them with native pose reads as it fell. OVD capture on CUDA, Windows, over TCP, and with an active renderer remains unverified on this pin.All 31 required checks passed on that revision. The separate ARM CI run had 76 passes, one skip and one failure. Isaac Sim’s native tensor plugin reported CUDA out of memory while reading Franka joint velocities during reset. The two later Cartpole workflow steps were skipped. The same test and error occurred on another PR, and the same test passed on the target commit.
Earlier capture and performance measurements
The following measurements and recordings used the public
ovphysx==0.8.0.43443703471build.e6fc4fdintegration, seven OVD-specific Windows cases and the strict docs build passed. The guide's Kit launch options resolved to the requested 1–3 second windowed interval. Native Kit recording, USD export, visual import, and a fresh inspector installation remain untested.For the benchmark, I alternated which capability setting ran first and kept recording inactive throughout timing. Every pair ended with identical sampled poses. All 32 measured processes confirmed the capability setting with a recording attempt after timing.
These timings describe one Windows 11 machine with a Core Ultra 9 285K and RTX A6000. The pair ranges cross zero, and per-process VRAM was unavailable under WDDM.
Standalone playback
The 13-second Franka Panda video shows standalone OVD Viewer v0.2.21 on Windows playing, pausing and scrubbing a kit-less CUDA recording produced with
ovphysx==0.8.0.43443703471. I also used the release’s Linux launcher to open the guide’s cube capture from that same SDK build, pause it at frame 22, and drag forward to 36 and back to 8. The Linux GUI run used Ubuntu 22.04.5 under WSL2, an isolated Xvfb display, and Mesa software OpenGL.Review focus
Type of change