Ensure noise is injected when the simulation is paused and a single step is manually requested

PiperOrigin-RevId: 807688008
Change-Id: I8de9706c633565d6d6944b58d34de9da1037a837
This commit is contained in:
Matija Kecman
2025-09-16 07:34:36 -07:00
committed by Copybara-Service
parent eacad44a1a
commit afbefc38a6
+3
View File
@@ -380,6 +380,9 @@ void PhysicsLoop(mj::Simulate& sim) {
syncSim = d->time;
sim.speed_changed = false;
// inject noise
sim.InjectNoise();
// run single step, let next iteration deal with timing
mj_step(m, d);
const char* message = Diverged(m->opt.disableflags, d);