-
Notifications
You must be signed in to change notification settings - Fork 142
Add flex self-collisions #1262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add flex self-collisions #1262
Changes from all commits
3e41157
c683459
bb2bb72
405a3d3
94319e3
0a2605f
a421dc3
6a3bbc1
ba07307
a4ea2b8
2f10c13
3193228
10ad4a2
585b4d8
8e12988
6bb9667
888f74e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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"/> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"/> | ||
|
|
@@ -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> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -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"): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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": """ | ||
|
|
||
There was a problem hiding this comment.
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?