Set tendon_invweight0=0 for models with no dofs.

PiperOrigin-RevId: 551851674
Change-Id: I9d2fd1728b4b654e5bb91ac8f0d203e275b7b93a
This commit is contained in:
Nimrod Gileadi
2023-07-28 07:53:17 -07:00
committed by Copybara-Service
parent 455a081ee7
commit dac34c91bb
+3
View File
@@ -161,6 +161,9 @@ static void set0(mjModel* m, mjData* d) {
m->actuator_acc0[i] = mju_norm(tmp, nv);
}
} else {
for (int i=0; i < m->ntendon; i++) {
m->tendon_invweight0[i] = 0;
}
for (int i=0; i < m->nu; i++) {
m->actuator_acc0[i] = 0;
}