Reset tree indices before recompiling.

Fixes #1822.

PiperOrigin-RevId: 654762203
Change-Id: I7f656f7dad376d4899229a8741315c8f821bfa56
This commit is contained in:
Alessio Quaglino
2024-07-22 08:29:31 -07:00
committed by Copybara-Service
parent f62792594f
commit e79efa60d6
2 changed files with 33 additions and 0 deletions
+1
View File
@@ -3206,6 +3206,7 @@ mjModel* mjCModel::Compile(const mjVFS* vfs, mjModel** m) {
bodies_[i]->subtreedofs = 0;
}
mjCBody* world = bodies_[0];
ResetTreeLists();
Clear();
bodies_.push_back(world);
}