From afbefc38a6929c541d421332694557140cb9371f Mon Sep 17 00:00:00 2001 From: Matija Kecman Date: Tue, 16 Sep 2025 07:34:36 -0700 Subject: [PATCH] Ensure noise is injected when the simulation is paused and a single step is manually requested PiperOrigin-RevId: 807688008 Change-Id: I8de9706c633565d6d6944b58d34de9da1037a837 --- simulate/main.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/simulate/main.cc b/simulate/main.cc index d52e4c9d..209be7e8 100644 --- a/simulate/main.cc +++ b/simulate/main.cc @@ -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);