Include gap in body_margin, fixing mid-phase pruning of in-gap contacts.
The mid-phase BVH descent filter prunes body pairs using body_margin, which was compiled as the max over geom margins, excluding gap. Broadphase and the leaf-level test both use margin+gap, so any multi-geom body relying on gap could silently lose its in-gap contacts when raw AABBs don't overlap. Single-geom bodies take the leaf-leaf path and were unaffected. PiperOrigin-RevId: 946967548 Change-Id: I6d92baa296f1a83be68b4dbfd64a96d1c7efd3c4
This commit is contained in:
committed by
Copybara-Service
parent
f5f9d9efb7
commit
dddb2767c6
@@ -2780,7 +2780,7 @@ void mjCBody::Compile(void) {
|
||||
for (int i=0; i < geoms.size(); i++) {
|
||||
contype |= geoms[i]->contype;
|
||||
conaffinity |= geoms[i]->conaffinity;
|
||||
margin = std::max(margin, geoms[i]->margin);
|
||||
margin = std::max(margin, geoms[i]->margin + geoms[i]->gap);
|
||||
}
|
||||
|
||||
// check conditions for free-joint alignment
|
||||
|
||||
Reference in New Issue
Block a user