Open tqolf opened 1 week ago
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.
You are using a very old version. Does this also happen with latest MuJoCo?
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)
You are using a very old version. Does this also happen with latest MuJoCo?
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
Can you please post a video of what you're seeing?
You are using a very old version. Does this also happen with latest MuJoCo?
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)
@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?
Screencast.from.2024.10.14.21.30.15.webm
Can you please post a video of what you're seeing?
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?
What GPU are you using?
CPU: 13th Gen Intel(R) Core(TM) i7-13700K GPU: NVIDIA GeForce RTX 4060
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