Skip to content

Commit afbefc3

Browse files
okmatijacopybara-github
authored andcommitted
Ensure noise is injected when the simulation is paused and a single step is manually requested
PiperOrigin-RevId: 807688008 Change-Id: I8de9706c633565d6d6944b58d34de9da1037a837
1 parent eacad44 commit afbefc3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

simulate/main.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@ void PhysicsLoop(mj::Simulate& sim) {
380380
syncSim = d->time;
381381
sim.speed_changed = false;
382382

383+
// inject noise
384+
sim.InjectNoise();
385+
383386
// run single step, let next iteration deal with timing
384387
mj_step(m, d);
385388
const char* message = Diverged(m->opt.disableflags, d);

0 commit comments

Comments
 (0)