Reduce mjMAXCONPAIR to 50.

Use only the first `mjMAXCONPAIR` contacts in SDF-mesh collisions after sorting them using the penetration depth.

PiperOrigin-RevId: 558176217
Change-Id: Ia1ee12bd5ceb81e4c52f143831ad00426e8cf174
This commit is contained in:
Alessio Quaglino
2023-08-18 10:01:57 -07:00
committed by Copybara-Service
parent ba12a1354b
commit b5f9628dd7
5 changed files with 52 additions and 20 deletions
+2 -2
View File
@@ -740,9 +740,9 @@ mjtNum ray_sdf(const mjModel* m, const mjData* d, int g,
const int nslot = mjp_pluginCount();
const int slot = m->plugin[instance];
const mjpPlugin* sdf = mjp_getPluginAtSlotUnsafe(slot, nslot);
if (!sdf) mju_error("invalid plugin slot: %d", slot);
if (!sdf) mjERROR("invalid plugin slot: %d", slot);
if (!(sdf->capabilityflags & mjPLUGIN_SDF)) {
mju_error("Plugin is not a sign distance field at slot %d", slot);
mjERROR("Plugin is not a sign distance field at slot %d", slot);
}
// reset counter