Break out struct initialization functions into engine_init.c.

PiperOrigin-RevId: 811598048
Change-Id: Ia832a8268e2209a5a264bbf79aa00dda487206bc
This commit is contained in:
Yuval Tassa
2025-09-25 19:21:44 -07:00
committed by Copybara-Service
parent fe8384b6c5
commit e51459f949
5 changed files with 289 additions and 217 deletions
-14
View File
@@ -943,18 +943,4 @@ void mj_local2Global(mjData* d, mjtNum xpos[3], mjtNum xmat[9],
}
// set default solver parameters
void mj_defaultSolRefImp(mjtNum* solref, mjtNum* solimp) {
if (solref) {
solref[0] = 0.02; // timeconst
solref[1] = 1; // dampratio
}
if (solimp) {
solimp[0] = 0.9; // dmin
solimp[1] = 0.95; // dmax
solimp[2] = 0.001; // width
solimp[3] = 0.5; // midpoint
solimp[4] = 2; // power
}
}