The model becomes instable after many steps, even with simplest control. Repro as follows. Could you investigate the cause? Or suggest workarounds to make the model more robust?
import os
os.environ["MUJOCO_GL"] = "egl"
import mujoco
assert mujoco.__version__ == '3.2.3'
model = mujoco.MjModel.from_xml_path("cube_3x3x3.xml")
data = mujoco.MjData(model)
data.ctrl[0] = 0.0195
renderer = mujoco.Renderer(model, height=240, width=320)
mujoco.mj_step(model, data, nstep=20845)
renderer.update_scene(data)
normal = renderer.render()
mujoco.mj_step(model, data, nstep=1)
renderer.update_scene(data)
abnormal = renderer.render()
from PIL import Image
Image.fromarray(normal).save("normal.png")
Image.fromarray(abnormal).save("abnormal.png")
The model becomes instable after many steps, even with simplest control. Repro as follows. Could you investigate the cause? Or suggest workarounds to make the model more robust?
Normal
Abnormal