From 267a7ff8edb047ba29dea1e45b6fd9df83e0e9cc Mon Sep 17 00:00:00 2001 From: mayor Date: Thu, 26 Mar 2026 21:10:59 +0100 Subject: [PATCH] fix(newton): use correct kernel launch dim in actuator effort copy The `update_array2D_with_array2D_masked` kernel in both `ImplicitActuator.compute()` and `IdealPDActuator.compute()` was launched with `dim=(num_envs, self.num_joints)` where `self.num_joints` is the number of joints in the actuator group, not the total joints in the articulation. Since `joint_mask` is indexed over all joints, the kernel never reached joints with indices >= group size. This caused explicit actuator groups (DelayedPD, IdealPD, DCMotor) to produce zero torque for most joints when multiple groups are used, making the robot collapse under gravity. Fix: use `self._num_joints` (= joint_mask.shape[0] = total joints) which is consistent with the other kernel launches in the same methods. --- .../isaaclab_newton/isaaclab_newton/actuators/actuator_pd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/isaaclab_newton/isaaclab_newton/actuators/actuator_pd.py b/source/isaaclab_newton/isaaclab_newton/actuators/actuator_pd.py index 3694d8ddab58..1b8bcde0d3ce 100644 --- a/source/isaaclab_newton/isaaclab_newton/actuators/actuator_pd.py +++ b/source/isaaclab_newton/isaaclab_newton/actuators/actuator_pd.py @@ -154,7 +154,7 @@ def compute(self): # update the joint effort wp.launch( update_array2D_with_array2D_masked, - dim=(self._num_envs, self.num_joints), + dim=(self._num_envs, self._num_joints), inputs=[ self.data._actuator_effort_target, self.data.joint_effort, @@ -228,7 +228,7 @@ def compute(self): # update the joint effort wp.launch( update_array2D_with_array2D_masked, - dim=(self._num_envs, self.num_joints), + dim=(self._num_envs, self._num_joints), inputs=[ self.data._applied_effort, self.data.joint_effort,