Skip to content

Commit c6562f3

Browse files
authored
upgrade mujoco to dev899043541 (#1284)
1 parent 36fc8be commit c6562f3

3 files changed

Lines changed: 29 additions & 19 deletions

File tree

mujoco_warp/_src/constraint_test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,11 @@ def test_constraints(self, xml, cone, jacobian):
172172
self.skipTest("flex/floppy.xml with dense jacobian not supported")
173173
for key in range(3):
174174
mjm, mjd, m, d = test_data.fixture(xml, keyframe=key, overrides={"opt.cone": cone, "opt.jacobian": jacobian})
175-
175+
# scale down velocities to minimize Jdotv effect (not in mujoco warp)
176+
# TODO(team): remove when Jdotv correction is implemented
177+
mjd.qvel[:] *= 1e-2
178+
mujoco.mj_forward(mjm, mjd)
179+
wp.copy(d.qvel, wp.array(mjd.qvel, dtype=float))
176180
for arr in (d.ne, d.nefc, d.nf, d.nl, d.efc.type):
177181
arr.fill_(-1)
178182
for arr in (d.efc.J, d.efc.D, d.efc.vel, d.efc.aref, d.efc.pos, d.efc.margin):

mujoco_warp/_src/forward_test.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ def test_implicit(self, jacobian, actuation, spring, damper):
203203
"opt.jacobian": jacobian,
204204
"opt.disableflags": DisableBit.CONTACT | actuation | spring | damper,
205205
"opt.integrator": IntegratorType.IMPLICITFAST,
206+
# TODO(team): remove override when mujoco warp feature matches mujoco
207+
"opt.enableflags": EnableBit.INVDISCRETE,
206208
},
207209
)
208210

@@ -491,7 +493,11 @@ def _getattr(arr):
491493
integrator=(IntegratorType.EULER, IntegratorType.IMPLICITFAST, IntegratorType.RK4),
492494
)
493495
def test_step2(self, xml, integrator):
494-
mjm, mjd, m, _ = test_data.fixture(xml, qvel_noise=0.01, ctrl_noise=0.1, overrides={"opt.integrator": integrator})
496+
# TODO(team): remove enableflags override when mujoco warp feature matches mujoco
497+
enableflags = EnableBit.INVDISCRETE if integrator == IntegratorType.IMPLICITFAST else 0
498+
mjm, mjd, m, _ = test_data.fixture(
499+
xml, qvel_noise=0.01, ctrl_noise=0.1, overrides={"opt.integrator": integrator, "opt.enableflags": enableflags}
500+
)
495501

496502
# some of the fields updated by step2
497503
step2_field = [

uv.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)