Add Signed Distance Field to collision geometries.

PiperOrigin-RevId: 557507088
Change-Id: I358a642407aee1ba8dfc9d405eb9a4f609435fe9
This commit is contained in:
Alessio Quaglino
2023-08-16 09:14:29 -07:00
committed by Copybara-Service
parent 6245edae28
commit fdb041580c
57 changed files with 3229 additions and 81 deletions
+5 -1
View File
@@ -123,6 +123,10 @@ void mj_defaultOption(mjOption* opt) {
opt->mpr_iterations = 50;
opt->disableflags = 0;
opt->enableflags = 0;
// sdf collisions
opt->sdf_initpoints = 40;
opt->sdf_iterations = 10;
}
@@ -1716,7 +1720,7 @@ const char* mj_validateReferences(const mjModel* m) {
if (m->geom_dataid[i] >= m->nhfield || m->geom_dataid[i] < -1) {
return "Invalid model: geom_dataid out of bounds.";
}
} else if (m->geom_type[i] == mjGEOM_MESH) {
} else if ((m->geom_type[i]==mjGEOM_MESH) || (m->geom_type[i]==mjGEOM_SDF)) {
if (m->geom_dataid[i] >= m->nmesh || m->geom_dataid[i] < -1) {
return "Invalid model: geom_dataid out of bounds.";
}