Skip to content

Commit 18a208e

Browse files
authored
Fixes Jacobian joint indices for floating base articulations (isaac-sim#1033)
# Description Adds `6` to the joint indices when indexing the Jacobian tensor in floating base systems. This is required because, in floating base articulations, the first 6 elements of the last dimensions are w.r.t to the root pose, not the joints. Fixes isaac-sim#1032 ## 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] 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 - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
1 parent fcdcc73 commit 18a208e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ def __init__(self, cfg: actions_cfg.DifferentialInverseKinematicsActionCfg, env:
6464
# this means that number of bodies is one less than the articulation's number of bodies
6565
if self._asset.is_fixed_base:
6666
self._jacobi_body_idx = self._body_idx - 1
67+
self._jacobi_joint_ids = self._joint_ids
6768
else:
6869
self._jacobi_body_idx = self._body_idx
70+
self._jacobi_joint_ids = [i + 6 for i in self._joint_ids]
6971

7072
# log info for debugging
7173
carb.log_info(
@@ -176,7 +178,7 @@ def _compute_frame_jacobian(self):
176178
the right Jacobian from the parent body Jacobian.
177179
"""
178180
# read the parent jacobian
179-
jacobian = self._asset.root_physx_view.get_jacobians()[:, self._jacobi_body_idx, :, self._joint_ids]
181+
jacobian = self._asset.root_physx_view.get_jacobians()[:, self._jacobi_body_idx, :, self._jacobi_joint_ids]
180182
# account for the offset
181183
if self.cfg.body_offset is not None:
182184
# Modify the jacobian to account for the offset

0 commit comments

Comments
 (0)