You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 36d0df9
Browse filesBrowse the repository at this point in the historyBrowse files
Flexes with `dof="trilinear"` or `dof="quadratic"` could not set
`selfcollide`. The vertices of interpolated flexes have no body, so the
shared-body filter that skips adjacent elements of other flexes does not apply,
and every pair of adjacent elements would collide at rest.
- Remove the compiler error for interpolated flexes with self-collision.
- Skip element pairs with vertices in the same or neighboring cells of the
interpolation grid (`mjc_ElemSharedNode`) in all self-collision midphase
paths (direct, SAP, BVH). Such elements share grid nodes and can only
intersect if the grid inverts locally, so their contacts would only fight
the elasticity. A vertex on an internal cell plane counts for the cells on
both sides, so the rule is symmetric and robust to rounding. Self-collision
thus requires at least 3 cells along an axis, and flexes with at most 2
cells along every axis skip it altogether.
- BVH self- and flex-flex leaves are box-filtered before pairs are pushed, and
marked active only when a pair is pushed.
- `cellcount` now also sizes the pinned-node array of flexcomp types grid, box,
cylinder and ellipsoid, which could crash.
- MJWarp raises `NotImplementedError` for interpolated flexes with
self-collision; the `ipc` mode does not handle interpolated flexes.
Self-collision is opt-in for existing models (interpolated flexes could only
compile with `selfcollide="none"`), but `auto` is the default for new ones. On
a 560-triangle box surface with `cellcount="2 2 3"`, it adds about 0.5 ms per
step at rest (SAP; 0.8 ms with BVH), and pressed flat by a plate collision takes
5.9 ms per step instead of 0.8 ms, mostly in the narrowphase.
PiperOrigin-RevId: 1003063514
Change-Id: I25d9f408639ae8c22576f2cee01020963038523a
0 commit comments