Fix missing timer end calls on early returns in collision and actuation
PiperOrigin-RevId: 953348565 Change-Id: I64b563e29b2d620df46d50d12dde9215885f41d6
This commit is contained in:
committed by
Copybara-Service
parent
91d78346e1
commit
dd4d0585ee
@@ -606,6 +606,7 @@ void mj_collision(const mjModel* m, mjData* d) {
|
|||||||
|
|
||||||
// return if disabled
|
// return if disabled
|
||||||
if (mjDISABLED(mjDSBL_CONSTRAINT) || mjDISABLED(mjDSBL_CONTACT) || nbodyflex < 2) {
|
if (mjDISABLED(mjDSBL_CONSTRAINT) || mjDISABLED(mjDSBL_CONTACT) || nbodyflex < 2) {
|
||||||
|
TM_END1(mjTIMER_POS_COLLISION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -333,6 +333,7 @@ void mj_fwdActuation(const mjModel* m, mjData* d) {
|
|||||||
// disabled or no actuation: return
|
// disabled or no actuation: return
|
||||||
if (nactuator == 0 || mjDISABLED(mjDSBL_ACTUATION)) {
|
if (nactuator == 0 || mjDISABLED(mjDSBL_ACTUATION)) {
|
||||||
mju_zero(d->qfrc_actuator, nv);
|
mju_zero(d->qfrc_actuator, nv);
|
||||||
|
TM_END(mjTIMER_ACTUATION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user