Fix support for deep penetration in plane-convex.

PiperOrigin-RevId: 625088511
Change-Id: I30bd4d475f4bfde98b5ae6254dd67bbe0fc09c08
This commit is contained in:
Baruch Tabanpour
2024-04-15 14:41:40 -07:00
committed by Copybara-Service
parent 7b3f1a0261
commit 38fa5083eb
+1 -1
View File
@@ -186,7 +186,7 @@ def plane_convex(plane: GeomInfo, convex: GeomInfo) -> Contact:
plane_pos = convex.mat.T @ (plane.pos - convex.pos)
n = convex.mat.T @ plane.mat[:, 2]
support = (plane_pos - vert) @ n
idx = _manifold_points(vert, support > 0, n)
idx = _manifold_points(vert, support > jp.maximum(0, support.max() - 1e-4), n)
pos = vert[idx]
# convert to world frame