Programmatically change GUI size in mujoco_viewer / mujoco_viewer_passive
Author: pab47Created Jan 8, 2025Updated Sep 19, 2026
Labelsenhancement
The feature, motivation and pitch
The GUI that opens up when launching the viewer is set at about 960 x 540 (approx). I can manually resize it once it opens up. But this is getting tedious as I have to keep doing it every single time.
Is it possible to set this up programmatically?
In the past, I could do with something like this: window = glfw.create_window(800, 600, "Demo", None, None), but it does not look like glfw's handle is exposed in the viewer.py which makes it impossible to use the functions, set_window_size and get_window_size.
Alternatives
- resizing the window manually (works but tedious)
- Tried adding glfw.create_window in viewer.py (does not work)
Additional context
No response
Source: google-deepmind/mujoco