Fix missing timer end calls on early returns in collision and actuation

PiperOrigin-RevId: 953348565
Change-Id: I64b563e29b2d620df46d50d12dde9215885f41d6
This commit is contained in:
Sam Haves
2026-07-24 07:04:58 -07:00
committed by Copybara-Service
parent 91d78346e1
commit dd4d0585ee
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -606,6 +606,7 @@ void mj_collision(const mjModel* m, mjData* d) {
// return if disabled
if (mjDISABLED(mjDSBL_CONSTRAINT) || mjDISABLED(mjDSBL_CONTACT) || nbodyflex < 2) {
TM_END1(mjTIMER_POS_COLLISION);
return;
}
+1
View File
@@ -333,6 +333,7 @@ void mj_fwdActuation(const mjModel* m, mjData* d) {
// disabled or no actuation: return
if (nactuator == 0 || mjDISABLED(mjDSBL_ACTUATION)) {
mju_zero(d->qfrc_actuator, nv);
TM_END(mjTIMER_ACTUATION);
return;
}