Skip to content
Open
11 changes: 6 additions & 5 deletions benchmarks/cloth/scene.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<mujoco model="Poncho">
<include file="mannequin.xml"/>
<option solver="CG" tolerance="1e-6" jacobian="sparse"/>
<option integrator="Euler" solver="CG" viscosity="0.05" tolerance="1e-6"/>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to include 'integrator="Euler"' since this is the default integrator option?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we expect the viscosity option to be changed/removed in the future? if so, maybe we add a todo to update this parameter


<visual>
<map force="0.1" zfar="30"/>
Expand All @@ -31,10 +31,11 @@
<worldbody>
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1"/>

<flexcomp name="towel" type="grid" count="30 30 1" spacing="0.05 0.05 0.05"
radius="0.02" dim="2" rgba="1 0.5 0.5 1" pos="0 0 2" mass=".1">
<edge equality="true"/>
<elasticity young="3e3" poisson="0" thickness="1e-2" damping="1e-3" elastic2d="bend"/>
<flexcomp name="towel" type="grid" count="30 30 1" spacing="0.06 0.06 0.06"
radius="0.01" dim="2" rgba="1 0.5 0.5 1" pos="0 0 2" mass="1">
<edge equality="true" damping="0.1"/>
<elasticity young="3e5" poisson="0" thickness="8e-3" elastic2d="bend"/>
<contact selfcollide="narrow"/>
</flexcomp>

</worldbody>
Expand Down
6 changes: 5 additions & 1 deletion mujoco_warp/_src/collision_driver_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from mujoco_warp._src.collision_driver import MJ_COLLISION_TABLE
from mujoco_warp._src.collision_primitive import plane_convex
from mujoco_warp._src.math import upper_trid_index
from mujoco_warp._src.util_pkg import check_version
from mujoco_warp.test_data.collision_sdf.utils import register_sdf_plugins

_TOLERANCE = 5e-5
Expand Down Expand Up @@ -572,7 +573,10 @@ def test_collision(self, fixture):
break
np.testing.assert_equal(result, True, f"Contact {i} not found in Gjk results")

self.assertEqual(d.nacon.numpy()[0], mjd.ncon)
if check_version("mujoco>=3.5.1.dev888028695"):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think these changes are also available in #1263

self.assertGreaterEqual(d.nacon.numpy()[0], mjd.ncon)
else:
self.assertEqual(d.nacon.numpy()[0], mjd.ncon)

_HFIELD_FIXTURES = {
"hfield_box": """
Expand Down
Loading
Loading