Skip to content

Commit c372ae9

Browse files
ooctipusMayankm96
andauthored
Exposes physxscene:solveArticulationContactLast flag through PhysxCfg (isaac-sim#3502)
# Description This PR adds api to set physxscene:solveArticulationContactLast through PhysxCfg, this is only available in sim 5.1 Fixes # (issue) ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - New feature (non-breaking change which adds functionality) ## Screenshots Please attach before and after screenshots of the change if applicable. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [] I have added tests that prove my fix is effective or that my feature works - [x] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task --> --------- Signed-off-by: ooctipus <zhengyuz@nvidia.com> Co-authored-by: Mayank Mittal <12863862+Mayankm96@users.noreply.github.com>
1 parent 2d80bd8 commit c372ae9

4 files changed

Lines changed: 36 additions & 2 deletions

File tree

source/isaaclab/config/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
# Note: Semantic Versioning is used: https://semver.org/
4-
version = "0.46.4"
4+
version = "0.46.5"
55

66
# Description
77
title = "Isaac Lab framework for Robot Learning"

source/isaaclab/docs/CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Changelog
22
---------
33

4+
0.46.5 (2025-10-14)
5+
~~~~~~~~~~~~~~~~~~~
6+
7+
* Exposed parameter :attr:`~isaaclab.sim.spawners.PhysxCfg.solve_articulation_contact_last`
8+
to configure USD attribute ``physxscene:solveArticulationContactLast``. This parameter may
9+
help improve solver stability with grippers, which previously required reducing simulation time-steps.
10+
:class:`~isaaclab.sim.spawners.PhysxCfg`
11+
12+
413
0.46.4 (2025-10-06)
514
~~~~~~~~~~~~~~~~~~~
615

source/isaaclab/isaaclab/sim/simulation_cfg.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,26 @@ class PhysxCfg:
160160
gpu_max_particle_contacts: int = 2**20
161161
"""Size of particle contacts stream buffer allocated in pinned host memory. Default is 2 ** 20."""
162162

163+
solve_articulation_contact_last: bool = False
164+
"""Changes the ordering inside the articulation solver. Default is False.
165+
166+
PhysX employs a strict ordering for handling constraints in an articulation. The outcome of
167+
each constraint resolution modifies the joint and associated link speeds. However, the default
168+
ordering may not be ideal for gripping scenarios because the solver favours the constraint
169+
types that are resolved last. This is particularly true of stiff constraint systems that are hard
170+
to resolve without resorting to vanishingly small simulation timesteps.
171+
172+
With dynamic contact resolution being such an important part of gripping, it may make
173+
more sense to solve dynamic contact towards the end of the solver rather than at the
174+
beginning. This parameter modifies the default ordering to enable this change.
175+
176+
For more information, please check `here <https://docs.omniverse.nvidia.com/kit/docs/omni_physics/107.3/dev_guide/guides/articulation_stability_guide.html#articulation-solver-order>`__.
177+
178+
.. versionadded:: v2.3
179+
This parameter is only available with Isaac Sim 5.1.
180+
181+
"""
182+
163183

164184
@configclass
165185
class RenderCfg:

source/isaaclab/isaaclab/sim/simulation_context.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from isaacsim.core.utils.carb import get_carb_setting, set_carb_setting
3131
from isaacsim.core.utils.viewports import set_camera_view
3232
from isaacsim.core.version import get_version
33-
from pxr import Gf, PhysxSchema, Usd, UsdPhysics
33+
from pxr import Gf, PhysxSchema, Sdf, Usd, UsdPhysics
3434

3535
from isaaclab.sim.utils import create_new_stage_in_memory, use_stage
3636

@@ -786,6 +786,11 @@ def _set_additional_physx_params(self):
786786
physx_scene_api.CreateGpuCollisionStackSizeAttr(self.cfg.physx.gpu_collision_stack_size)
787787
# -- Improved determinism by PhysX
788788
physx_scene_api.CreateEnableEnhancedDeterminismAttr(self.cfg.physx.enable_enhanced_determinism)
789+
# -- Set solve_articulation_contact_last by add attribute to the PhysxScene prim, and add attribute there.
790+
physx_prim = physx_scene_api.GetPrim()
791+
physx_prim.CreateAttribute("physxScene:solveArticulationContactLast", Sdf.ValueTypeNames.Bool).Set(
792+
self.cfg.physx.solve_articulation_contact_last
793+
)
789794

790795
# -- Gravity
791796
# note: Isaac sim only takes the "up-axis" as the gravity direction. But physics allows any direction so we

0 commit comments

Comments
 (0)