Add body/simple attribute to control simple body optimization.
PiperOrigin-RevId: 942164766 Change-Id: I1e83bb99b6a1955917eb9b2e9bed0dc7b8e6a161
This commit is contained in:
committed by
Copybara-Service
parent
4ecfe5c1f3
commit
5618666a7d
@@ -1324,6 +1324,14 @@ void mj_setConst(mjModel* m, mjData* d) {
|
||||
// recompute sameframe flags from current model geometry
|
||||
setSameframe(m);
|
||||
|
||||
// error if simple body lost sameframe (user must set simple="false")
|
||||
for (int i = 1; i < m->nbody; i++) {
|
||||
if (m->body_simple[i] > 0 && m->body_sameframe[i] != mjSAMEFRAME_BODY) {
|
||||
mjERROR("body %d is compiled as simple but sameframe no longer holds, "
|
||||
"use body/simple='false'", i);
|
||||
}
|
||||
}
|
||||
|
||||
// set fixed quantities
|
||||
setFixed(m, d);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user