google-deepmind / google-deepmind/mujoco

Programmatically change GUI size in mujoco_viewer / mujoco_viewer_passive

Open
#2,338 6 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
15.2k
Forks
1.8k
Avg merge
10d 16h
Merged PRs (30d)
25

Description

### 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

1) resizing the window manually (works but tedious)
2) Tried adding glfw.create_window in viewer.py (does not work)

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.