Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions source/isaaclab/changelog.d/jichuanh-pink-ik-left-hand-nan.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Fixed
^^^^^

* Fixed ``calculate_rotation_error`` in
``source/isaaclab/test/controllers/test_pink_ik.py`` composing rotation matrices
with element-wise ``*`` instead of matrix multiplication ``@`` — a latent bug
from `isaac-sim/IsaacLab#3149
<https://github.com/isaac-sim/IsaacLab/pull/3149>`_ that surfaced as NaN after
`isaac-sim/IsaacLab#5609
<https://github.com/isaac-sim/IsaacLab/pull/5609>`_ added the unit-norm guard to
``quat_from_matrix``.
* Made ``test_pink_ik`` deterministic by seeding the env (``env_cfg.seed = 42``)
in ``create_test_env``.
* Loosened the G1 Pink IK rotation tolerance from ``0.030`` rad to ``0.100`` rad
in ``pink_ik_g1_test_configs.json`` to accommodate G1's intentionally smooth IK
tuning (slower-converging than GR1T2). GR1T2 tolerance unchanged at ``0.020`` rad.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"tolerances": {
"position": 0.025,
"pd_position": 0.002,
"rotation": 0.030,
"rotation": 0.100,
"check_errors": true
},
"allowed_steps_to_settle": 50,
Expand Down
4 changes: 3 additions & 1 deletion source/isaaclab/test/controllers/test_pink_ik.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def create_test_env(env_name, num_envs):

try:
env_cfg = parse_env_cfg(env_name, device=device, num_envs=num_envs)
# Deterministic seed so IK convergence residual is reproducible across runs / machines.
env_cfg.seed = 42
# Modify scene config to not spawn the packing table to avoid collision with the robot
del env_cfg.scene.packing_table
del env_cfg.terminations.object_dropping
Expand Down Expand Up @@ -306,7 +308,7 @@ def calculate_rotation_error(current_rot, target_rot):
target_rot_tensor = target_rot_tensor.unsqueeze(0).expand(current_rot.shape[0], -1)

return axis_angle_from_quat(
quat_from_matrix(matrix_from_quat(target_rot_tensor) * matrix_from_quat(quat_inv(current_rot)))
quat_from_matrix(matrix_from_quat(target_rot_tensor) @ matrix_from_quat(quat_inv(current_rot)))
)


Expand Down
Loading