Rename "Stats" window to "Info" and remove "Stats" dock.

PiperOrigin-RevId: 936026479
Change-Id: I72e4f2cba6df255d5446faedc81727b39ef735bc
This commit is contained in:
Yuval Tassa
2026-06-22 06:37:14 -07:00
committed by Copybara-Service
parent 4b1320a5f9
commit e2528cbd93
6 changed files with 22 additions and 29 deletions
@@ -118,7 +118,7 @@ class StudioApp:
self.step_control = sim.StepControl()
self.ux_state = ux.UxState()
self.theme = ux.GuiTheme.LIGHT
self.show_stats = False
self.show_info = False
self.show_solver = False
self.should_quit = False
self.status = 'Ready'
@@ -368,12 +368,12 @@ class StudioApp:
if imgui.BeginMenu('Charts'):
if imgui.MenuItem('Solver', '', self.show_solver):
self.show_solver = not self.show_solver
if imgui.MenuItem('Stats', '', self.show_stats):
self.show_stats = not self.show_stats
if imgui.MenuItem('Info', '', self.show_info):
self.show_info = not self.show_info
imgui.EndMenu()
if imgui.BeginMenu('Help'):
if imgui.MenuItem('Stats', '', self.show_stats):
self.show_stats = not self.show_stats
if imgui.MenuItem('Info', '', self.show_info):
self.show_info = not self.show_info
imgui.Separator()
version = f'Version {mujoco.mj_versionString()}'
imgui.MenuItem(version)
@@ -462,10 +462,10 @@ class StudioApp:
ux.convergence_gui(self.model, self.data)
imgui.End()
if self.show_stats:
_, self.show_stats = imgui.Begin('Stats', self.show_stats)
if self.show_info:
_, self.show_info = imgui.Begin('Info', self.show_info)
paused = self.step_control.get_pause_state() != sim.PauseState.UNPAUSED
ux.stats_gui(self.model, self.data, paused, 0.0)
ux.info_gui(self.model, self.data, paused, 0.0)
imgui.End()
# -- Status bar -----------------------------------------------------------
+3 -3
View File
@@ -324,14 +324,14 @@ PYBIND11_MODULE(ux, m) {
py::arg("model"), py::arg("data"), "Render the solver counts chart.");
m.def(
"stats_gui",
"info_gui",
[](const mujoco::python::MjModelWrapper& model,
mujoco::python::MjDataWrapper& data, bool paused, float fps) {
py::gil_scoped_release no_gil;
mujoco::platform::StatsGui(model.get(), data.get(), paused, fps);
mujoco::platform::InfoGui(model.get(), data.get(), paused, fps);
},
py::arg("model"), py::arg("data"), py::arg("paused"), py::arg("fps"),
"Render the simulation statistics UI.");
"Render the simulation info UI.");
m.attr("FREE_CAMERA_IDX") = mujoco::platform::kFreeCameraIdx;
m.attr("TUMBLE_CAMERA_IDX") = mujoco::platform::kTumbleCameraIdx;