Skip to content

Commit ebf1409

Browse files
Bugfix damping index in add_damping_sum_qfrc_kernel_sparse (#76)
* [fixed] damping in add_damping_sum_qfrc_kernel_sparse * Improved fix
1 parent 3136791 commit ebf1409

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mujoco/mjx/_src/forward.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def add_damping_sum_qfrc_kernel_sparse(m: Model, d: Data):
173173
worldId, tid = wp.tid()
174174

175175
dof_Madr = m.dof_Madr[tid]
176-
d.qM_integration[worldId, 0, dof_Madr] += m.opt.timestep * m.dof_damping[dof_Madr]
176+
d.qM_integration[worldId, 0, dof_Madr] += m.opt.timestep * m.dof_damping[tid]
177177

178178
d.qfrc_integration[worldId, tid] = (
179179
d.qfrc_smooth[worldId, tid] + d.qfrc_constraint[worldId, tid]

0 commit comments

Comments
 (0)