Skip to content

Commit 76b235c

Browse files
huy-hacopybara-github
authored andcommitted
Copybara import of the project:
-- 6da20df by huy-ha <[email protected]>: generalize mocap body initialization to multiple mocap bodies COPYBARA_INTEGRATE_REVIEW=#33 from huy-ha:main 6da20df PiperOrigin-RevId: 718955482 Change-Id: I923a27b2f7af679e0d0feae4b518751effdc678f
1 parent ee06d3f commit 76b235c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mujoco_playground/_src/mjx_env.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ def init(
148148
if act is not None:
149149
data = data.replace(act=act)
150150
if mocap_pos is not None:
151-
data = data.replace(mocap_pos=mocap_pos.reshape(1, -1))
151+
data = data.replace(mocap_pos=mocap_pos.reshape(len(data.mocap_pos), -1))
152152
if mocap_quat is not None:
153-
data = data.replace(mocap_quat=mocap_quat.reshape(1, -1))
153+
data = data.replace(mocap_quat=mocap_quat.reshape(len(data.mocap_quat), -1))
154154
data = mjx.forward(model, data)
155155
return data
156156

0 commit comments

Comments
 (0)