Skip to content

Add fused OVPhysX joint-state writer - #6513

Merged
AntoineRichard merged 1 commit into
isaac-sim:developfrom
AntoineRichard:antoiner/ovphysx-fused-joint-state-writer
Jul 15, 2026
Merged

AntoineRichard merged 1 commit into
isaac-sim:developfrom
AntoineRichard:antoiner/ovphysx-fused-joint-state-writer

Conversation

@AntoineRichard

Copy link
Copy Markdown
Collaborator

Description

Adds Articulation.write_joint_state_to_sim_index to the OVPhysX backend.

The existing reset path updates the same state through separate position and velocity writers. That requires four Warp cache-update kernels: one for position, then three for velocity, the finite-difference baseline, and acceleration zeroing. The new writer performs those cache updates in one kernel while preserving the two OVPhysX tensor-binding writes required to update DOF position and velocity.

The method preserves the existing semantics:

  • resolves partial environment and joint indices through the standard OVPhysX helpers
  • updates joint position and velocity caches
  • synchronizes the previous-velocity baseline and zeros selected joint accelerations
  • stamps the joint-acceleration cache
  • invalidates pose and velocity dependents once unless skip_forward is requested
  • leaves unselected environments and joints unchanged

This is a focused OVPhysX backend PR. It has no dependency on #6512, although the compatibility path there can use this method automatically when both changes are present.

Type of change

  • New feature (non-breaking change which adds functionality)

Validation

  • Focused CPU OVPhysX tests: 3 passed, 207 deselected
  • The modified integration test fails on origin/develop with the expected missing-method AttributeError
  • Changelog gate: ./isaaclab.sh -p tools/changelog/cli.py check develop
  • Full pre-commit: ./isaaclab.sh -f
  • Full documentation build was attempted but remained silent for several minutes and was terminated; the public API docstring and RST cross-reference checks pass

Screenshots

Not applicable.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh -f
  • I have documented the public API and added a changelog fragment
  • My changes generate no new warnings
  • I have added tests that prove the feature works
  • I have added a changelog fragment under source/isaaclab_ovphysx/changelog.d/
  • My name already exists in CONTRIBUTORS.md

Reduce reset-time device launches by updating joint position, joint velocity, the finite-difference baseline, and the acceleration cache in one Warp kernel. Preserve the two required OVPhysX tensor binding writes.
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Jul 14, 2026
@AntoineRichard
AntoineRichard marked this pull request as ready for review July 14, 2026 09:38
@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a fused OVPhysX joint-state writer. The main changes are:

  • New write_joint_state_to_sim_index method for indexed joint position and velocity writes.
  • New Warp kernel that updates position, velocity, previous velocity, and acceleration buffers together.
  • Updated OVPhysX articulation tests for partial indexed writes and state consistency.
  • Changelog entry for the new public API.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The fused writer follows the existing OVPhysX indexed write pattern.
  • The added tests cover partial joint selection, binding readback, and cache timestamp behavior.

Important Files Changed

Filename Overview
source/isaaclab_ovphysx/isaaclab_ovphysx/assets/articulation/articulation.py Adds the fused indexed joint-state writer with cache updates, timestamp handling, invalidation, and OVPhysX tensor-binding writes.
source/isaaclab_ovphysx/isaaclab_ovphysx/assets/kernels.py Adds the Warp kernel that writes selected joint state and resets the selected acceleration baseline.
source/isaaclab_ovphysx/test/assets/test_articulation.py Adds partial-write coverage and updates the joint-state consistency test to use the fused writer.
source/isaaclab_ovphysx/changelog.d/ovphysx-fused-joint-state-writer.minor.rst Documents the new OVPhysX fused joint-state writer.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[write_joint_state_to_sim_index] --> B[Resolve env_ids and joint_ids]
    B --> C[Validate position and velocity shapes]
    C --> D[Launch fused Warp kernel]
    D --> E[Update joint position and velocity buffers]
    D --> F[Sync previous velocity and zero acceleration]
    F --> G[Stamp acceleration cache]
    G --> H{skip_forward?}
    H -- false --> I[Invalidate pose and velocity caches]
    H -- true --> J[Keep dependent caches unchanged]
    I --> K[Write DOF_POSITION binding]
    J --> K
    K --> L[Write DOF_VELOCITY binding]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[write_joint_state_to_sim_index] --> B[Resolve env_ids and joint_ids]
    B --> C[Validate position and velocity shapes]
    C --> D[Launch fused Warp kernel]
    D --> E[Update joint position and velocity buffers]
    D --> F[Sync previous velocity and zero acceleration]
    F --> G[Stamp acceleration cache]
    G --> H{skip_forward?}
    H -- false --> I[Invalidate pose and velocity caches]
    H -- true --> J[Keep dependent caches unchanged]
    I --> K[Write DOF_POSITION binding]
    J --> K
    K --> L[Write DOF_VELOCITY binding]
Loading

Reviews (1): Last reviewed commit: "Add fused OVPhysX joint-state writer" | Re-trigger Greptile

@AntoineRichard
AntoineRichard merged commit 3948054 into isaac-sim:develop Jul 15, 2026
42 checks passed
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
# Description

Adds Articulation.write_joint_state_to_sim_index to the OVPhysX backend.

The existing reset path updates the same state through separate position
and velocity writers. That requires four Warp cache-update kernels: one
for position, then three for velocity, the finite-difference baseline,
and acceleration zeroing. The new writer performs those cache updates in
one kernel while preserving the two OVPhysX tensor-binding writes
required to update DOF position and velocity.

The method preserves the existing semantics:

- resolves partial environment and joint indices through the standard
OVPhysX helpers
- updates joint position and velocity caches
- synchronizes the previous-velocity baseline and zeros selected joint
accelerations
- stamps the joint-acceleration cache
- invalidates pose and velocity dependents once unless skip_forward is
requested
- leaves unselected environments and joints unchanged

This is a focused OVPhysX backend PR. It has no dependency on isaac-sim#6512,
although the compatibility path there can use this method automatically
when both changes are present.

## Type of change

- New feature (non-breaking change which adds functionality)

## Validation

- Focused CPU OVPhysX tests: 3 passed, 207 deselected
- The modified integration test fails on origin/develop with the
expected missing-method AttributeError
- Changelog gate: ./isaaclab.sh -p tools/changelog/cli.py check develop
- Full pre-commit: ./isaaclab.sh -f
- Full documentation build was attempted but remained silent for several
minutes and was terminated; the public API docstring and RST
cross-reference checks pass

## Screenshots

Not applicable.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks with ./isaaclab.sh -f
- [x] I have documented the public API and added a changelog fragment
- [x] My changes generate no new warnings
- [x] I have added tests that prove the feature works
- [x] I have added a changelog fragment under
source/isaaclab_ovphysx/changelog.d/
- [x] My name already exists in CONTRIBUTORS.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants