Open
Description
Describe the bug
The function reset_mocap_welds
in mujoco_utils.py doesn't work properly.
def reset_mocap_welds(model, data):
"""Resets the mocap welds that we use for actuation."""
if model.nmocap > 0 and model.eq_data is not None:
for i in range(model.eq_data.shape[0]):
if model.eq_type[i] == mujoco.mjtEq.mjEQ_WELD:
model.eq_data[i, :7] = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0])
mujoco.mj_forward(model, data)
The issue appears to be related to Line 79:
model.eq_data[i, :7] = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0]) # (x, y, z, qx, qy, qz, qw)
It should be corrected to:
model.eq_data[i, 3:10] = np.array([0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0]) # (x, y, z, qw, qx, qy, qz)
System Info
- OS: ubuntu 20.04
- Packages
gymnasium 0.29.1 (pip)
gymnasium-robotics 1.2.4 (pip)
mujoco 2.3.7 (pip)
- Python version: 3.8
Metadata
Metadata
Assignees
Labels
No labels