Remember compiler options during attach.

Note:
- Move compiler options into `mjsCompiler` struct.
- The compiler options from the attached model are not written by mj_SaveXML.
PiperOrigin-RevId: 689391440
Change-Id: I1d63c146a32f87c737b7a55b64a54b0ffe3aecc9
This commit is contained in:
Alessio Quaglino
2024-10-24 08:29:03 -07:00
committed by Copybara-Service
parent 1043633cc3
commit 159f23e6b4
24 changed files with 302 additions and 204 deletions
+11 -11
View File
@@ -33,17 +33,17 @@ void mjs_defaultSpec(mjSpec* spec) {
spec->stat.center[0] = mjNAN;
// compiler settings
spec->autolimits = 1;
spec->settotalmass = -1;
spec->degree = 1;
spec->eulerseq[0] = 'x';
spec->eulerseq[1] = 'y';
spec->eulerseq[2] = 'z';
spec->convexhull = 1;
spec->usethread = 1;
spec->inertiafromgeom = mjINERTIAFROMGEOM_AUTO;
spec->inertiagrouprange[1] = mjNGROUP-1;
mj_defaultLROpt(&spec->LRopt);
spec->compiler.autolimits = 1;
spec->compiler.settotalmass = -1;
spec->compiler.degree = 1;
spec->compiler.eulerseq[0] = 'x';
spec->compiler.eulerseq[1] = 'y';
spec->compiler.eulerseq[2] = 'z';
spec->compiler.convexhull = 1;
spec->compiler.usethread = 1;
spec->compiler.inertiafromgeom = mjINERTIAFROMGEOM_AUTO;
spec->compiler.inertiagrouprange[1] = mjNGROUP-1;
mj_defaultLROpt(&spec->compiler.LRopt);
// engine data
mj_defaultOption(&spec->option);