Do not create contact if there are no DOFs.
PiperOrigin-RevId: 601146599 Change-Id: I68b1975a3217b266bbbfb0a15c85a65cfa46facb
This commit is contained in:
committed by
Copybara-Service
parent
aede8cf5cf
commit
c8e839a666
@@ -908,7 +908,7 @@ void mj_instantiateContact(const mjModel* m, mjData* d) {
|
||||
mjContact* con;
|
||||
mjtNum cpos[6], cmargin[6], *jac, *jacdif, *jacdifp, *jacdifr, *jac1p, *jac2p, *jac1r, *jac2r;
|
||||
|
||||
if (mjDISABLED(mjDSBL_CONTACT) || ncon == 0) {
|
||||
if (mjDISABLED(mjDSBL_CONTACT) || ncon == 0 || nv == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user