Skip to content

Commit bbd62f0

Browse files
upgrade mujoco version
1 parent cf7c8ef commit bbd62f0

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

mujoco_controllers/osc.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff 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

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ py-modules=["mujoco_controllers"]
3030
[tool.poetry.dependencies]
3131
python = "3.10.6"
3232
numpy = "^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"
3535
pillow = "10.0.0"
3636
jax = "^0.4.14"
3737
matplotlib = "^3.7.2"

0 commit comments

Comments
 (0)