Skip to content

[PhysX] Write transforms to Fabric for on-demand video captures - #8339

Merged
AntoineRichard merged 2 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/fix-physx-fabric-video-capture
Oct 7, 2026
Merged

AntoineRichard merged 2 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/fix-physx-fabric-video-capture

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Since #7642, headless video capture turns off continuous PhysX Fabric transform updates (/physics/fabricUpdateTransformations) and refreshes Fabric with force_update() before each captured frame. That setting also gates the explicit refresh, so it wrote nothing: Kit rendered every PhysX body at its USD default pose for the whole clip while the simulation, and any camera tracking it, kept moving.

Migration: none. Dependencies: none.

Type of change

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

Validation

  • source/isaaclab_physx/test/sim/test_physx_scene_data_backend.py (inside a headless Kit app): 6 passed. The extended test fails before the fix, where the refresh runs with transform writes off.
  • Single-env Isaac-Velocity-Flat-H1 physics=physx --video kit: before the fix, the pelvis omni:fabric:worldMatrix stayed at its spawn pose (0, 0, 2.15) while PhysX moved the root from (0.50, -0.38) to (0.81, -0.44); after, Fabric matches the PhysX root every frame and the clip shows the robot walking. Reproduced on develop before the fix.
  • Recorded all ten Isaac-Velocity-{Flat,Rough}-* tasks and Isaac-Open-Drawer-Franka{,-Direct} with PhysX through Kit: robots and the cabinet animate correctly.

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 (no documented behavior changes)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a changelog fragment for every touched source package
  • My name already exists in CONTRIBUTORS.md

🤖 Generated with Claude Code

Release backport

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

Headless video capture turns off continuous Fabric transform updates and
refreshes Fabric before each frame instead. That refresh is gated by the
same setting, so it wrote nothing: Kit rendered every PhysX body at its
USD default pose while the camera followed the simulated robot. Enable
transform writes for the duration of the on-demand refresh.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Oct 6, 2026
@AntoineRichard
AntoineRichard marked this pull request as ready for review October 6, 2026 17:31
@AntoineRichard
AntoineRichard requested a review from a team October 6, 2026 17:31
@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Adjusts physics simulation settings during video capture.

The PR should not merge until a failed Fabric refresh cannot leave continuous transform writes enabled.

Findings

  1. P1 Failed refresh leaves writes enabled ▶

Summary

The PR temporarily enables Fabric transform writes during on-demand refreshes so headless Kit recordings show moving PhysX bodies, and adds a toggle-ordering test and changelog fragment.

Reviews (1) · Last reviewed commit: "Write PhysX transforms to Fabric for on-..."

Comment on lines 300 to +302
PhysxManager._fabric.force_update(0.0, 0.0)
if not continuous:
sim.set_setting("/physics/fabricUpdateTransformations", False)

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.

P1 Failed refresh leaves writes enabled

During headless video capture, if force_update() raises, the setting is never restored. The video pump catches rendering errors and can continue, so continuous Fabric transform writes remain enabled for the rest of the run, bringing back the training-throughput cost this setting is meant to avoid. Restore the setting in a finally block.

Suggested change
PhysxManager._fabric.force_update(0.0, 0.0)
if not continuous:
sim.set_setting("/physics/fabricUpdateTransformations", False)
try:
PhysxManager._fabric.force_update(0.0, 0.0)
finally:
if not continuous:
sim.set_setting("/physics/fabricUpdateTransformations", False)

@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

Needs attention: Style consistency (1). Other reviewed categories look good.

  • PR description: Name PhysxSceneDataBackend._update_fabric as the fix owner and remove the prohibited AI attribution; the remaining scope, behavior, and validation match the diff.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: Implementation looks good.
  • Style consistency: The new nested Mock assignment exceeds the configured line length; split it and declare refreshes before the closing lambda.
  • Test quality: Test quality looks good.

Minor fixes needed. Posted 1 inline finding.

Automated review; human maintainers own approval decisions.

fabric = Mock()
# On-demand capture keeps continuous Fabric writes off; each refresh must enable them while it runs.
settings = {"/physics/fabricUpdateTransformations": False}
fabric = Mock(force_update=Mock(side_effect=lambda *_: refreshes.append(settings["/physics/fabricUpdateTransformations"])))

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 · Style Consistency — Line exceeds formatter limit

This assignment is about 127 columns, past the repository's 120-column limit, so uv run isaaclab -f will rewrite it. Split the nested Mock construction and declare refreshes before the lambda that closes over it.

if self._fabric_timestamp != timestamp:
# On-demand capture disables continuous Fabric transform writes, which also gates this refresh.
sim = PhysicsManager._sim
continuous = bool(sim.get_setting("/physics/fabricUpdateTransformations"))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: perhaps we can save this string to a var, since we use it 3 times here: "/physics/fabricUpdateTransformations"

sim = PhysicsManager._sim
continuous = bool(sim.get_setting("/physics/fabricUpdateTransformations"))
if not continuous:
sim.set_setting("/physics/fabricUpdateTransformations", True)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nice this looks like a safe way to ungate the fabric transforms while not incidentally introducing double updates

@AntoineRichard

Copy link
Copy Markdown
Collaborator 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 Oct 7, 2026
@AntoineRichard
AntoineRichard merged commit 9a62fa3 into isaac-sim:develop Oct 7, 2026
59 checks passed
@isaaclab-bot

isaaclab-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Backported to release/3.0.0 as 8b7b55d.

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

Since #7642, headless video capture turns off continuous PhysX Fabric
transform updates (`/physics/fabricUpdateTransformations`) and refreshes
Fabric with `force_update()` before each captured frame. That setting
also gates the explicit refresh, so it wrote nothing: Kit rendered every
PhysX body at its USD default pose for the whole clip while the
simulation, and any camera tracking it, kept moving.

- `PhysxManager` enables Fabric transform writes for the duration of the
on-demand refresh and restores the previous value, keeping #7642's
training throughput between captures.

Migration: none. Dependencies: none.

## Type of change

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

## Validation

- `source/isaaclab_physx/test/sim/test_physx_scene_data_backend.py`
(inside a headless Kit app): 6 passed. The extended test fails before
the fix, where the refresh runs with transform writes off.
- Single-env `Isaac-Velocity-Flat-H1 physics=physx --video kit`: before
the fix, the pelvis `omni:fabric:worldMatrix` stayed at its spawn pose
`(0, 0, 2.15)` while PhysX moved the root from `(0.50, -0.38)` to
`(0.81, -0.44)`; after, Fabric matches the PhysX root every frame and
the clip shows the robot walking. Reproduced on `develop` before the
fix.
- Recorded all ten `Isaac-Velocity-{Flat,Rough}-*` tasks and
`Isaac-Open-Drawer-Franka{,-Direct}` with PhysX through Kit: robots and
the cabinet animate correctly.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks with `uv run isaaclab -f`
- [ ] I have made corresponding changes to the documentation (no
documented behavior changes)
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment for every touched source package
- [x] My name already exists in `CONTRIBUTORS.md`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Release backport

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>

(cherry picked from commit 9a62fa3)
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.

3 participants