Previously, the Mujoco C++ simulation loop was simulating until a render is required, then rendering, then sleeping to match real time. In practice this causes issues where the simulation would happen much quicker than reality and therefore no data from intermediate simulation steps would be captured by sensors. Now, the simulation busy waits for the time step duration after each simulation so the sensor timer callbacks can activate and grab the correct data.
Now The rendering is also placed in its own thread to keep the simulation time as close to wall time as possible.
This needs to be updated on the Python side now too.
Previously, the Mujoco C++ simulation loop was simulating until a render is required, then rendering, then sleeping to match real time. In practice this causes issues where the simulation would happen much quicker than reality and therefore no data from intermediate simulation steps would be captured by sensors. Now, the simulation busy waits for the time step duration after each simulation so the sensor timer callbacks can activate and grab the correct data.
Now The rendering is also placed in its own thread to keep the simulation time as close to wall time as possible.
This needs to be updated on the Python side now too.