Skip to content

Adds Initial Support for Multiple Simulation Backends - #4472

Merged
kellyguo11 merged 31 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/multi-backend
Feb 3, 2026
Merged

kellyguo11 merged 31 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/multi-backend

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Jan 27, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR introduces a multi-backend architecture for Isaac Lab asset classes, separating simulation backend-specific code from the core API. This enables future support for different physics backends while maintaining a consistent user-facing API.

Key Changes:

New isaaclab_physx Extension

A new extension containing PhysX-specific implementations of asset classes:

  • Articulation and ArticulationData
  • RigidObject and RigidObjectData
  • RigidObjectCollection and RigidObjectCollectionData
  • DeformableObject, DeformableObjectCfg, and DeformableObjectData (moved from isaaclab)
  • SurfaceGripper and SurfaceGripperCfg (moved from isaaclab)

Abstract Base Classes in isaaclab

  • Added backend-agnostic base classes that define the interface:
  • BaseArticulation and BaseArticulationData
  • BaseRigidObject and BaseRigidObjectData
  • BaseRigidObjectCollection and BaseRigidObjectCollectionData

Deprecations

  • root_physx_view → root_view on all asset classes (Articulation, RigidObject, RigidObjectCollection, DeformableObject)
  • object_* → body_* naming convention in RigidObjectCollection (e.g., write_object_state_to_sim() → write_body_state_to_sim())

Migration Guide

Added comprehensive migration guide at docs/source/migration/migrating_to_isaaclab_3-0.rst with:

  • Import changes for moved classes
  • Complete deprecation tables
  • Code examples

Type of change

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

Screenshots

Please attach before and after screenshots of the change if applicable.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-sim Related to Isaac Sim team isaac-lab Related to Isaac Lab team labels Jan 27, 2026
@AntoineRichard
AntoineRichard marked this pull request as ready for review January 28, 2026 09:20
@greptile-apps

greptile-apps Bot commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR introduces a multi-backend architecture to Isaac Lab 3.0, separating simulation backend-specific code (PhysX) from the core API. This is a foundational refactoring that enables future support for different physics backends.

Key Changes

  • Factory Pattern Implementation: New FactoryBase class in backend_utils.py dynamically loads backend implementations (currently hardcoded to PhysX)
  • Asset Class Refactoring: Split into base classes (BaseArticulation, BaseRigidObject, BaseRigidObjectCollection) and backend-specific implementations
  • New isaaclab_physx Extension: PhysX-specific implementations moved to separate extension (DeformableObject, SurfaceGripper, and PhysX versions of core assets)
  • API Deprecations:
    • root_physx_view → root_view (with deprecation warnings)
    • object_* → body_* naming in RigidObjectCollection (backward compatible)
  • Comprehensive Migration Guide: Detailed documentation covering all breaking changes

Architecture Quality

The refactoring follows solid software engineering principles with clear separation of concerns. The factory pattern implementation is clean, though the backend selection is currently hardcoded to "physx" (line 40 in backend_utils.py). The base classes provide well-defined interfaces for backend implementations.

Backward Compatibility

Good backward compatibility support through:

  • Deprecation warnings for old APIs
  • Factory pattern returns backend implementations transparently
  • Migration guide with clear examples

Testing & Documentation

  • Tests updated to import from isaaclab_physx where appropriate
  • Comprehensive migration guide added
  • All major code paths appear to be covered

Confidence Score: 4/5

  • This PR is safe to merge with minor considerations - the refactoring is well-structured with proper deprecation warnings and migration documentation
  • Score of 4 reflects a massive but well-executed refactoring with comprehensive migration support. The architecture is sound and backward compatibility is maintained. The only concern is the hardcoded backend selection which should be configurable before final release, and the PR is marked as DRAFT suggesting the author is aware of remaining work.
  • Pay attention to backend_utils.py (hardcoded backend selection) and verify that all deprecated API paths have proper warnings implemented

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/utils/backend_utils.py New factory pattern implementation for backend abstraction - hardcoded backend selection needs configuration mechanism
source/isaaclab/isaaclab/assets/articulation/base_articulation.py New base class for backend-agnostic articulation interface - clean abstraction layer
source/isaaclab/isaaclab/assets/articulation/articulation.py Refactored to thin factory wrapper delegating to backend implementations
source/isaaclab_physx/isaaclab_physx/assets/articulation/articulation.py PhysX-specific articulation moved from core - maintains existing functionality
source/isaaclab/isaaclab/envs/mdp/events.py Updated to use root_view instead of root_physx_view and added local caching of default values
docs/source/migration/migrating_to_isaaclab_3-0.rst Comprehensive migration guide documenting API changes and deprecations

Sequence Diagram

sequenceDiagram
    participant User
    participant Articulation as Articulation(Factory)
    participant FactoryBase
    participant Module as isaaclab_physx.assets.articulation
    participant PhysXArticulation as PhysXArticulation
    participant BaseArticulation

    User->>Articulation: Articulation(cfg)
    Articulation->>FactoryBase: __new__(cls, cfg)
    FactoryBase->>FactoryBase: backend = "physx" (hardcoded)
    
    alt Backend not in registry
        FactoryBase->>Module: importlib.import_module("isaaclab_physx.assets.articulation")
        Module->>FactoryBase: Return module
        FactoryBase->>Module: getattr(module, "Articulation")
        Module->>FactoryBase: Return PhysXArticulation class
        FactoryBase->>FactoryBase: register("physx", PhysXArticulation)
    end
    
    FactoryBase->>PhysXArticulation: __init__(cfg)
    PhysXArticulation->>BaseArticulation: super().__init__(cfg)
    BaseArticulation-->>PhysXArticulation: Initialized
    PhysXArticulation-->>User: PhysXArticulation instance
    
    Note over User,PhysXArticulation: User code sees Articulation but gets PhysXArticulation
    Note over FactoryBase: Backend selection currently hardcoded to "physx"
Loading

@greptile-apps greptile-apps 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.

6 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +39 to +40
# TODO: Make the backend configurable.
backend = "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.

Backend selection is hardcoded to "physx". Consider adding a configuration mechanism (e.g., environment variable, config file, or function parameter) to make the backend selectable before the 3.0 release.

Suggested change
# TODO: Make the backend configurable.
backend = "physx"
# TODO: Make the backend configurable via environment variable or config
backend = os.environ.get("ISAACLAB_BACKEND", "physx")

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!

@ooctipus ooctipus left a comment

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.

Changes looks reasonable, LGTM :) Thanks!

@kellyguo11 kellyguo11 changed the title Initial Support for Multiple Simulation Backends Adds Initial Support for Multiple Simulation Backends Jan 29, 2026
@kellyguo11

Copy link
Copy Markdown
Contributor

LGTM! maybe we can disable the tests that we know will fail so that we can catch real failures more easily. we can also skip the environment tests for ones that haven't been updated yet. seems like a few of the environment training tests failed, which might not be expected.

@AntoineRichard

AntoineRichard commented Jan 29, 2026 •

Copy link
Copy Markdown
Collaborator Author

The outdated sensors fails but I'm not sure why tbh... It passes just fine locally. I fixed the mimic, they are doing things they shouldn't IMO, so I added some FIXMEs. The Pink IK consistently fails for me. I don't know why. This PR should make no difference to Pink.


@property
def default_fixed_tendon_limit(self) -> torch.Tensor:
"""Deprecated property. Please use :attr:`default_fixed_tendon_pos_limits` instead."""

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.

could we use the python deprecationwarning module for deprecation warnings?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ah yes, that makes total sense. Didn't realize there was already a built-in decorator to do that

@property
def default_mass(self) -> torch.Tensor:
"""Removed: Default mass is no longer stored."""
raise RuntimeError(

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.

any reason why these are removed directly instead of deprecated and aliasing the getter APIs?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, defaults are just removed. They don't make sense IMO. They lead to excessive memory allocations I can deprecate them though, but I think this should a be a short cycle.

# Minimum dependencies required prior to installation
INSTALL_REQUIRES = [
# generic
"numpy<2",

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.

maybe we can keep these in the base isaaclab extension unless they are specific for physx. might be difficult to track multiple versions of this in physx and newton directories.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

True.


# Load Isaac Lab extensions last
"isaaclab" = {order = 1000}
"isaaclab_physx" = {order = 1000}

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.

this would probably also be needed for all the other app files?

@AntoineRichard AntoineRichard Jan 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't think we'll keep compatibility with IS4.5 will we? If not, I think all the changes are here for the apps.

Comment thread source/isaaclab/docs/CHANGELOG.rst Outdated
Changelog
---------

0.54.3 (2026-01-29)

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.

this probably entitles a major version bump :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Hahaha yes

0.0.3 (2026-01-29)
~~~~~~~~~~~~~~~~~~

Updated

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.

Suggested change
Updated
Changed

Changelog
---------

0.0.3 (2026-01-29)

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.

this could probably also be a major version bump

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.

make sure to also update the version in extension.toml to align with this

@AntoineRichard

AntoineRichard commented Jan 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Pink IK failure + Anymal C reward is a bit low, but it's not that much lower than the threshold or the quaternion PR. IMO it looks good. @kellyguo11do you think we could lower the Anymal C threshold and merge that in?

@kellyguo11

Copy link
Copy Markdown
Contributor

yes let's update the thresholds. I tried to do a merge from develop after all the quaternion changes to resolve the merge conflicts - AntoineRichard#7. also updated the test thresholds there. unfortunately doesn't look like I can push to your fork directly

Updates to latest develop and update test thresholds
@AntoineRichard

Copy link
Copy Markdown
Collaborator Author

yes let's update the thresholds. I tried to do a merge from develop after all the quaternion changes to resolve the merge conflicts - AntoineRichard#7. also updated the test thresholds there. unfortunately doesn't look like I can push to your fork directly

Thanks @kellyguo11

@kellyguo11
kellyguo11 merged commit 308400f into isaac-sim:develop Feb 3, 2026
AntoineRichard pushed a commit that referenced this pull request Oct 9, 2026
…ow Hand restitution (#8320)

# Description

Training the Shadow Hand reorientation tasks with `presets=randomized`
hit non-finite observations on every Kit PhysX
and OvPhysX seed (5/5 each), and on the camera variant on Newton. This
fixes the tendon randomization that caused it and
the preset's restitution.

1. **Tendon randomization compounded.**
`randomize_fixed_tendon_parameters` read the live tendon buffers its
previous call
had written, so with `operation="scale"` per-env stiffness and damping
random-walked (8192-env probes: stiffness up to
1.4e12 on Kit PhysX, damping up to 1.4e6 on Newton); on Kit PhysX the
fingers of drifted envs then tangle and the
articulation goes non-finite. #4472 moved the term off the
`default_fixed_tendon_*` properties, which are now deprecated
with "The default value will need to be managed manually.", without
managing the default in the term. The term now
caches the tendon properties when it is created, as the joint
randomization terms do, and randomizes from that copy.
Limit stiffness, rest length and offset are read only when randomized:
Newton raises `NotImplementedError` for them.
2. **Restitution was fixed at 1.0.** `randomize_rigid_body_material`
requires a restitution range and samples absolute
values, so the preset's `(1.0, 1.0)` made every hand and cube shape
perfectly elastic. It now uses `(0.0, 0.0)`, the
value without randomization. This does not cause the non-finite
observations but slows learning on PhysX (table); a
   `(0.0, 0.2)` range left one of three Kit PhysX seeds unable to learn.
3. **Also affects**
`IsaacContrib-Reorient-Cube-Shadow-OpenAI-{FF,LSTM}-Direct`, which
always apply this randomization.
4. **Evidence** (`Isaac-Reorient-Cube-Shadow presets=randomized`,
rsl_rl, task defaults, 3000 iterations; L40 GPUs, Kit
   PhysX in the Isaac Lab develop container):

   | Backend | develop | tendon fix only | this PR |
   |---|---|---|---|
| Kit PhysX | NaN on 5/5 seeds (iteration 1165-1358) | no NaN on 3/3, SR
0.76 / 0.81 / 0.83 | no NaN on 5/5, SR 0.86-0.89 |
| OvPhysX | NaN on 5/5 seeds (iteration 1016-1401) | no NaN on 3/3, SR
0.01 / 0.76 / 0.77 | no NaN on 5/5, SR 0.84-0.89 |
| Newton MJWarp | no NaN on 7/7 seeds; NaN at step 1444 of a stress
probe | — | stress probe clean for 4000 steps; no NaN on 5/5, SR
0.88-0.92 |

The stress probe applies every reset term on every reset with action
noise std 6 on 8192 envs.
`Isaac-Reorient-Cube-Shadow-Camera` (1225 envs, 5000 iterations) shares
the preset. On develop, Newton (Warp renderer)
goes non-finite for seeds 42 / 43 / 44 at iteration 955 / 1204 / 709 and
Kit PhysX (RTX) for seeds 42 / 43 at
   3112 / 761; with this change, all five reach 5000 iterations without.

Training ran on develop 174812c with an equivalent version of this
change (see Validation).

## Validation

- `uv run --frozen python -m pytest
source/isaaclab/test/envs/test_event_requirements.py`: 19 passed.
- `source/isaaclab_physx/test/envs/test_events.py -k fixed_tendon` in
the Isaac Lab develop container: 3 passed.
`test_fixed_tendon_parameters_do_not_compound` (`add` and `scale`) fails
on develop.
- Kit PhysX seed-43 replay of the training tree with this branch's
`events.py`: success rate and mean reward match the
trained run at iterations 1, 10, 50, 100, 200 and 300, and every logged
metric at iteration 300 is identical.

## Type of change

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

## Release backport

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

## Screenshots

Not applicable.

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/develop/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`uv run isaaclab --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have validated the changed behavior with focused coverage and
applied the [test-audit
criteria](https://github.com/isaac-sim/IsaacLab/blob/develop/skills/developer/test-audit/SKILL.md)
to any test changes
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] My name already exists in `CONTRIBUTORS.md`
isaaclab-bot Bot pushed a commit that referenced this pull request Oct 9, 2026
…ow Hand restitution (#8320)

# Description

Training the Shadow Hand reorientation tasks with `presets=randomized`
hit non-finite observations on every Kit PhysX
and OvPhysX seed (5/5 each), and on the camera variant on Newton. This
fixes the tendon randomization that caused it and
the preset's restitution.

1. **Tendon randomization compounded.**
`randomize_fixed_tendon_parameters` read the live tendon buffers its
previous call
had written, so with `operation="scale"` per-env stiffness and damping
random-walked (8192-env probes: stiffness up to
1.4e12 on Kit PhysX, damping up to 1.4e6 on Newton); on Kit PhysX the
fingers of drifted envs then tangle and the
articulation goes non-finite. #4472 moved the term off the
`default_fixed_tendon_*` properties, which are now deprecated
with "The default value will need to be managed manually.", without
managing the default in the term. The term now
caches the tendon properties when it is created, as the joint
randomization terms do, and randomizes from that copy.
Limit stiffness, rest length and offset are read only when randomized:
Newton raises `NotImplementedError` for them.
2. **Restitution was fixed at 1.0.** `randomize_rigid_body_material`
requires a restitution range and samples absolute
values, so the preset's `(1.0, 1.0)` made every hand and cube shape
perfectly elastic. It now uses `(0.0, 0.0)`, the
value without randomization. This does not cause the non-finite
observations but slows learning on PhysX (table); a
   `(0.0, 0.2)` range left one of three Kit PhysX seeds unable to learn.
3. **Also affects**
`IsaacContrib-Reorient-Cube-Shadow-OpenAI-{FF,LSTM}-Direct`, which
always apply this randomization.
4. **Evidence** (`Isaac-Reorient-Cube-Shadow presets=randomized`,
rsl_rl, task defaults, 3000 iterations; L40 GPUs, Kit
   PhysX in the Isaac Lab develop container):

   | Backend | develop | tendon fix only | this PR |
   |---|---|---|---|
| Kit PhysX | NaN on 5/5 seeds (iteration 1165-1358) | no NaN on 3/3, SR
0.76 / 0.81 / 0.83 | no NaN on 5/5, SR 0.86-0.89 |
| OvPhysX | NaN on 5/5 seeds (iteration 1016-1401) | no NaN on 3/3, SR
0.01 / 0.76 / 0.77 | no NaN on 5/5, SR 0.84-0.89 |
| Newton MJWarp | no NaN on 7/7 seeds; NaN at step 1444 of a stress
probe | — | stress probe clean for 4000 steps; no NaN on 5/5, SR
0.88-0.92 |

The stress probe applies every reset term on every reset with action
noise std 6 on 8192 envs.
`Isaac-Reorient-Cube-Shadow-Camera` (1225 envs, 5000 iterations) shares
the preset. On develop, Newton (Warp renderer)
goes non-finite for seeds 42 / 43 / 44 at iteration 955 / 1204 / 709 and
Kit PhysX (RTX) for seeds 42 / 43 at
   3112 / 761; with this change, all five reach 5000 iterations without.

Training ran on develop 174812c with an equivalent version of this
change (see Validation).

## Validation

- `uv run --frozen python -m pytest
source/isaaclab/test/envs/test_event_requirements.py`: 19 passed.
- `source/isaaclab_physx/test/envs/test_events.py -k fixed_tendon` in
the Isaac Lab develop container: 3 passed.
`test_fixed_tendon_parameters_do_not_compound` (`add` and `scale`) fails
on develop.
- Kit PhysX seed-43 replay of the training tree with this branch's
`events.py`: success rate and mean reward match the
trained run at iterations 1, 10, 50, 100, 200 and 300, and every logged
metric at iteration 300 is identical.

## Type of change

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

## Release backport

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

## Screenshots

Not applicable.

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/develop/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`uv run isaaclab --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have validated the changed behavior with focused coverage and
applied the [test-audit
criteria](https://github.com/isaac-sim/IsaacLab/blob/develop/skills/developer/test-audit/SKILL.md)
to any test changes
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] My name already exists in `CONTRIBUTORS.md`

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

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team isaac-sim Related to Isaac Sim team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants