File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,16 @@ def compute_control_output(self):
222222 tau += self .physics .data .qfrc_bias [self .arm_joint_ids ]
223223
224224 # compute effective torque
225- actuator_moment_inv = np .linalg .pinv (self .physics .data .actuator_moment )
225+ actuator_moment_mat = np .zeros ((self .physics .model .nu , self .physics .model .nv ))
226+ mujoco .mju_sparse2dense (
227+ actuator_moment_mat ,
228+ self .physics .data .actuator_moment ,
229+ self .physics .data .moment_rownnz ,
230+ self .physics .data .moment_rowadr ,
231+ self .physics .data .moment_colind ,
232+ )
233+
234+ actuator_moment_inv = np .linalg .pinv (actuator_moment_mat )
226235 actuator_moment_inv = actuator_moment_inv [self .arm_joint_ids , :][:, self .arm_joint_ids ]
227236 tau = tau @ actuator_moment_inv
228237
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ py-modules=["mujoco_controllers"]
3030[tool .poetry .dependencies ]
3131python = " 3.10.6"
3232numpy = " ^1.16.0"
33- mujoco = " 3.1.1 "
34- dm-control = " 1.0.16 "
33+ mujoco = " 3.2.6 "
34+ dm-control = " 1.0.26 "
3535pillow = " 10.0.0"
3636jax = " ^0.4.14"
3737matplotlib = " ^3.7.2"
You can’t perform that action at this time.
0 commit comments