-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Severe Lag When Dragging Chrome/Warp-Terminal Windows with Mujoco Simulate Viewer Open, Possibly Related to Rendering or V-Sync #2132
Comments
You are using a very old version. Does this also happen with latest MuJoCo? |
Yeah, there is a plan to upgrade, but we are still working on migration. Currently, we want to first understand what is causing this phenomenon. |
I tried to upgrade, but the new code is very slow, elasped_time > 0.008 import mujoco
import mujoco.viewer
m = mujoco.MjModel.from_xml_path(xx)
d = mujoco.MjData(m)
viewer = viewer.launch_passive(m, d)
viewer.sync()
while viewer.is_running():
last_time = time.time()
# ...
mujoco.mj_step(m, d)
viewer.sync()
elasped_time = time.time() - last_time
if elasped_time < 0.001:
await asyncio.sleep(0.001 - elasped_time) |
And I have tried the latest MuJoCo, Severe Lag still exists when I draging Chrome/Warp-Terminal. |
Can you please post a video of what you're seeing? |
Screencast.from.2024.10.14.21.30.15.webm
|
@yuvaltassa And How about this? When I use the old version, it's no need to call view.sync(). Also, the C++ version didn't require it and ran smoothly. Does python sync API synchronize all the data for rendering? Are there any alternative optimization methods? |
And I use perf to analyze performance, sched_yield accounting for over 80% of the CPU time. |
@saran-t might be able to help |
What GPU are you using? |
CPU: 13th Gen Intel(R) Core(TM) i7-13700K And I think GPU is not releated to this problem, 'cause sched_yield too frequently and GPU usage is very slow |
Intro
Severe Lag and high CPU load
My setup
MuJoCo 2.3.3, Python
amd64, Linux/Ubuntu 22.04
What's happening? What did you expect?
Steps for reproduction
See
Minimal model for reproduction
Maybe unrelated to the model.
Code required for reproduction
Maybe unrelated.
Confirmations
The text was updated successfully, but these errors were encountered: