Add flex elasticity stiffness matrix to mjModel.

PiperOrigin-RevId: 675101645
Change-Id: Ic169c108b9eece3657ea4ec211df357abe615b7e
This commit is contained in:
Alessio Quaglino
2024-09-16 04:59:55 -07:00
committed by Copybara-Service
parent c77babe046
commit 2da15cf137
12 changed files with 71 additions and 29 deletions
+4
View File
@@ -2525,6 +2525,10 @@ void mjCModel::CopyObjects(mjModel* m) {
m->flex_gap[i] = (mjtNum)pfl->gap;
mjuu_copyvec(m->flex_rgba + 4 * i, pfl->rgba, 4);
// elasticity
// TODO: these are now written by plugins, they will be moved to mjCFlex
mjuu_zerovec(m->flex_stiffness + 21 * elem_adr, 21 * pfl->nelem);
// set fields: mesh-like
m->flex_dim[i] = pfl->dim;
m->flex_vertadr[i] = vert_adr;