Skip to content

Commit 2e11afa

Browse files
saran-tcopybara-github
authored andcommitted
Fix a bug in the handling of efc_J in put_data.
PiperOrigin-RevId: 738877177 Change-Id: Ie469af0e1c31843e8c59cd2cf6fc0befb1ed4956
1 parent 467a63d commit 2e11afa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mjx/mujoco/mjx/_src/io.py

+2
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,8 @@ def put_data(
665665
if num_rows > 1 and m.opt.cone == mujoco.mjtCone.mjCONE_PYRAMIDAL:
666666
num_rows = (num_rows - 1) * 2
667667
efc_i, efc_o = d.contact.efc_address[id_from], efc_address[id_to]
668+
if efc_i == -1:
669+
continue
668670
value[efc_o : efc_o + num_rows] = fields[fname][efc_i : efc_i + num_rows]
669671

670672
fields[fname] = value

0 commit comments

Comments
 (0)