Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix is correct. self._num_joints (= joint_mask.shape[0] = total joints in articulation) is the right dimension for update_array2D_with_array2D_masked because the kernel indexes into joint_mask using wp.tid(). With the old self.num_joints (= len(self._joint_names) = group size), joints at indices ≥ group size were never reached.

Consistent with compute_pd_actuator at line 138 and _clip_effort in the base class, which both use self._num_joints.

⚠️ The same bug exists in actuator_net.pyActuatorNetLSTM.compute() (line 98) and ActuatorNetMLP.compute() (line 195) both have dim=(self._num_envs, self.num_joints) on their update_array2D_with_array2D_masked calls. Please fix those too:

actuator_net.py line 98 (ActuatorNetLSTM):

Suggested change
dim=(self._num_envs, self._num_joints),
dim=(self._num_envs, self._num_joints),

actuator_net.py line 195 (ActuatorNetMLP):

Suggested change
dim=(self._num_envs, self._num_joints),
dim=(self._num_envs, self._num_joints),

inputs=[
self.data._actuator_effort_target,
self.data.joint_effort,
Expand Down Expand Up @@ -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,
Expand Down