Skip to content

Commit b3b4548

Browse files
authored
Caches PhysX view's joint paths when processing fixed articulation tendons (#1347)
# Description Cache PhysX view's DOF paths before looping when processing fixed articulation tendons to improve loading time. For the Shadow Hand task, calling `self.root_physx_view.dof_paths` when iterating over all joints to find tendons attached (in `Articulation._process_fixed_tendons` method) is an "expensive" operation. Timing can be reduced from 2.2 seconds to 300 milliseconds (13th Gen Intel® Core™ i9-13950HX × 32, RTX 5000) by calling `self.root_physx_view.dof_paths` once ## Screenshots Without any change ![Screenshot from 2024-10-28 13-30-07](https://github.com/user-attachments/assets/0bd61f3d-3013-49fb-8540-c08236b974cf) After cache PhysX view's DOF paths before looping (`self.root_physx_view.dof_paths` called only once) ![Screenshot from 2024-10-28 13-26-02](https://github.com/user-attachments/assets/6c2af86e-bd21-4b65-9c13-9610e6648e8d) ## Checklist - [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
1 parent 05f5d1e commit b3b4548

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

source/extensions/omni.isaac.lab/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.27.9"
4+
version = "0.27.10"
55

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

source/extensions/omni.isaac.lab/docs/CHANGELOG.rst

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

4+
0.27.10 (2024-11-01)
5+
~~~~~~~~~~~~~~~~~~~~
6+
7+
Changed
8+
^^^^^^^
9+
10+
* Cached the PhysX view's joint paths before looping over them when processing fixed joint tendons
11+
inside the :class:`Articulation` class. This helps improve the processing time for the tendons.
12+
13+
414
0.27.9 (2024-11-01)
515
~~~~~~~~~~~~~~~~~~~
616

source/extensions/omni.isaac.lab/omni/isaac/lab/assets/articulation/articulation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,10 +1190,11 @@ def _process_fixed_tendons(self):
11901190
# parse fixed tendons properties if they exist
11911191
if self.num_fixed_tendons > 0:
11921192
stage = stage_utils.get_current_stage()
1193+
joint_paths = self.root_physx_view.dof_paths[0]
11931194

11941195
# iterate over all joints to find tendons attached to them
11951196
for j in range(self.num_joints):
1196-
usd_joint_path = self.root_physx_view.dof_paths[0][j]
1197+
usd_joint_path = joint_paths[j]
11971198
# check whether joint has tendons - tendon name follows the joint name it is attached to
11981199
joint = UsdPhysics.Joint.Get(stage, usd_joint_path)
11991200
if joint.GetPrim().HasAPI(PhysxSchema.PhysxTendonAxisRootAPI):

0 commit comments

Comments
 (0)