Skip to content

Commit f57be42

Browse files
authored
Merge pull request #79 from thowell/contact
check disableflags option for contact in make_constraint
2 parents a179363 + fd99c92 commit f57be42

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mujoco/mjx/_src/constraint.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,10 @@ def make_constraint(m: types.Model, d: types.Data):
228228
inputs=[m, d, refsafe],
229229
)
230230

231-
if m.opt.cone == types.ConeType.PYRAMIDAL.value:
231+
if (
232+
not (m.opt.disableflags & types.DisableBit.CONTACT.value)
233+
and m.opt.cone == types.ConeType.PYRAMIDAL.value
234+
):
232235
wp.launch(
233236
_efc_contact_pyramidal,
234237
dim=(d.nconmax, 4),

0 commit comments

Comments
 (0)