Skip to content

Commit

Permalink
Copybara import of the project:
Browse files Browse the repository at this point in the history
--
6da20df by huy-ha <hqh2101@columbia.edu>:

generalize mocap body initialization to multiple mocap bodies

COPYBARA_INTEGRATE_REVIEW=#33 from huy-ha:main 6da20df
PiperOrigin-RevId: 718955482
Change-Id: I923a27b2f7af679e0d0feae4b518751effdc678f
  • Loading branch information
huy-ha authored and copybara-github committed Jan 23, 2025
1 parent ee06d3f commit 76b235c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mujoco_playground/_src/mjx_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ def init(
if act is not None:
data = data.replace(act=act)
if mocap_pos is not None:
data = data.replace(mocap_pos=mocap_pos.reshape(1, -1))
data = data.replace(mocap_pos=mocap_pos.reshape(len(data.mocap_pos), -1))
if mocap_quat is not None:
data = data.replace(mocap_quat=mocap_quat.reshape(1, -1))
data = data.replace(mocap_quat=mocap_quat.reshape(len(data.mocap_quat), -1))
data = mjx.forward(model, data)
return data

Expand Down

0 comments on commit 76b235c

Please sign in to comment.