CoACD icon indicating copy to clipboard operation
CoACD copied to clipboard

Feature request: internal overlap

Open yuvaltassa opened this issue 1 year ago • 2 comments

Hi CoACD,

I'd like to describe two common issues that we encounter with collisions between adjacent sub-meshes, and propose two related feature that will address one or both of them. I don't think either of the issues is in any way MuJoCo-specific.

Issues:

  1. Penetration of thin objects between two adjacent sub-meshes: When a thin object penetrates between two adjacent meshes, the contact forces push sideways rather than out, leading to jamming of the thin object between the sub-meshes.
  2. Catching on corners: When a pointy (not necessarily thin) object slides along the side of a decomposed mesh, the corner can catch on the corner of one of the decomposed meshes.

Proposed solutions:

  1. "Inflate" all sub-meshes in the direction normal to internal mesh-adjacent surfaces by an overlap parameter $d$, with units of length.
  2. Make the added (inflated) part smooth, by adding several faces that attempt to approximate a smooth bevel at the corners. This requires specifying the smoothing radius $r$ and possibly also the number of added vertices/faces that participate in the smooth corner.

I'm attaching an image below with a sketch of what we are imagining. Note that for us issue 1 is much more significant than issue 2, and the proposed solution 3 is both easier to implement and does not introduce new faces/vertices. However note that solution 4 is more general, since it solves both issues 1 and 2 (but cannot be said to be strictly better, due to the increase in the number of faces).

We'd love to hear your opinion on these proposed features.

IMG_5527

cc @quagla, @btaba, @erez-tom.

yuvaltassa avatar May 05 '24 16:05 yuvaltassa

Hi the overlap extrude is added. You can enable it by adding -ex flag, and designate the margin by -em. Now I haven't added the smoothing radius. Hope the current solution works.

SarahWeiii avatar Jul 20 '24 09:07 SarahWeiii

AMAZING!

We will test and give feedback ASAP

yuvaltassa avatar Jul 20 '24 09:07 yuvaltassa