Improved unpause behavior in simulate.
PiperOrigin-RevId: 570030315 Change-Id: I5822f8686ba2fd7c5c59a9fa73fc29000a8406ec
This commit is contained in:
committed by
Copybara-Service
parent
e1549376f6
commit
639e77876d
@@ -300,7 +300,7 @@ def _physics_loop(simulate: _Simulate, loader: Optional[_InternalLoaderType]):
|
|||||||
|
|
||||||
# Run mj_forward, to update rendering and joint sliders.
|
# Run mj_forward, to update rendering and joint sliders.
|
||||||
mujoco.mj_forward(m, d)
|
mujoco.mj_forward(m, d)
|
||||||
synccpu = time.time()
|
simulate.speed_changed = True
|
||||||
|
|
||||||
|
|
||||||
def _launch_internal(
|
def _launch_internal(
|
||||||
|
|||||||
+1
-1
@@ -400,7 +400,7 @@ void PhysicsLoop(mj::Simulate& sim) {
|
|||||||
else {
|
else {
|
||||||
// run mj_forward, to update rendering and joint sliders
|
// run mj_forward, to update rendering and joint sliders
|
||||||
mj_forward(m, d);
|
mj_forward(m, d);
|
||||||
syncCPU = mj::Simulate::Clock::now();
|
sim.speed_changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // release std::lock_guard<std::mutex>
|
} // release std::lock_guard<std::mutex>
|
||||||
|
|||||||
Reference in New Issue
Block a user