Skip to content

Commit fae5c7a

Browse files
authored
Fixes JointAction not preserving order when using all joints (#1587)
# Description This PR fixes #1586. An additional condition is added to the `JointAction._joint_ids` logic where if user specifies to preserve the joint order, the `_joint_ids` field will not be cleared even if the speficied list contains all the joints. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] 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 - [ ] 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 Signed-off-by: -T.K.- <[email protected]>
1 parent dd044a4 commit fae5c7a

File tree

1 file changed

+1
-1
lines changed
  • source/extensions/omni.isaac.lab/omni/isaac/lab/envs/mdp/actions

1 file changed

+1
-1
lines changed

source/extensions/omni.isaac.lab/omni/isaac/lab/envs/mdp/actions/joint_actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(self, cfg: actions_cfg.JointActionCfg, env: ManagerBasedEnv) -> Non
6969
)
7070

7171
# Avoid indexing across all joints for efficiency
72-
if self._num_joints == self._asset.num_joints:
72+
if self._num_joints == self._asset.num_joints and not self.cfg.preserve_order:
7373
self._joint_ids = slice(None)
7474

7575
# create tensors for raw and processed actions

0 commit comments

Comments
 (0)