Fix mj_sensorAcc returning zero after mj_step1 by clearing flg_rnepost in mj_step2.

Fixes #3133.
This commit is contained in:
Kevin Zakka
2026-02-25 13:59:33 -08:00
parent 42d843a0fd
commit 43cde9716c
2 changed files with 36 additions and 0 deletions
+1
View File
@@ -1530,6 +1530,7 @@ void mj_step2(const mjModel* m, mjData* d) {
mj_fwdActuation(m, d);
mj_fwdAcceleration(m, d);
mj_fwdConstraint(m, d);
d->flg_rnepost = 0; // clear flag for lazy evaluation
mj_sensorAcc(m, d);
mj_checkAcc(m, d);