Skip to content

feat: allow sensors' GUI preview subwindow to start minimized#107

Merged
jlblancoc merged 1 commit into
developfrom
feature/sensor-preview-win-visible
Jul 11, 2026
Merged

feat: allow sensors' GUI preview subwindow to start minimized#107
jlblancoc merged 1 commit into
developfrom
feature/sensor-preview-win-visible

Conversation

@jlblancoc

@jlblancoc jlblancoc commented Jul 11, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a new common sensor XML tag <preview_win_visible> (default true) controlling whether a camera/RGBD-camera GUI preview subwindow starts opened or minimized, without affecting the simulated sensor data itself.
  • Default is true, so existing world.xml files without the tag behave exactly as before.
  • Updated definitions/camera.sensor.xml and definitions/rgbd_camera.sensor.xml to expose ${preview_win_visible|true}.
  • Updated mvsim_tutorial/demo_camera.world.xml as a usage example (left explicitly true/visible).
  • Documented the new tag in agents.md.

Test plan

  • make -j$(nproc) mvsim-simulator builds cleanly
  • Headless run (mvsim launch mvsim_tutorial/demo_camera.world.xml --headless) with preview_win_visible="true" and "false" both parse and run without exceptions
  • Manual GUI check that the subwindow actually starts minimized when false (not verifiable in this headless dev environment)

Summary by CodeRabbit

  • New Features

    • Camera and RGB-D camera previews can now start opened or minimized.
    • Added the preview_win_visible setting, which defaults to opened (true).
    • Preview visibility can be configured independently for each sensor.
  • Documentation

    • Documented the new preview visibility option and its effect on GUI windows.

Add a new common sensor XML tag <preview_win_visible> (default true)
so that camera/RGBD camera preview subwindows can start minimized
instead of opened, without affecting the simulated sensor data.
Default preserves prior behavior for existing world.xml files.
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 769fac7b-b945-4021-8bf0-2c6c6682dfe5

📥 Commits

Reviewing files that changed from the base of the PR and between 1635a00 and ec4df39.

📒 Files selected for processing (8)
  • agents.md
  • definitions/camera.sensor.xml
  • definitions/rgbd_camera.sensor.xml
  • modules/simulator/include/mvsim/Sensors/SensorBase.h
  • modules/simulator/include/mvsim/World.h
  • modules/simulator/src/Sensors/SensorBase.cpp
  • modules/simulator/src/World_gui.cpp
  • mvsim_tutorial/demo_camera.world.xml

📝 Walkthrough

Walkthrough

Camera and RGBD camera sensors now accept preview_win_visible, store it in SensorBase, and apply it when creating GUI preview subwindows. The setting defaults to true; configured windows can start minimized without changing sensor data.

Changes

Sensor Preview Visibility

Layer / File(s) Summary
Preview visibility configuration
definitions/*.sensor.xml, agents.md, mvsim_tutorial/demo_camera.world.xml
Camera sensor definitions and documentation describe the new preview_win_visible setting, which is also added to the tutorial camera configuration.
Sensor visibility state
modules/simulator/include/mvsim/Sensors/SensorBase.h, modules/simulator/src/Sensors/SensorBase.cpp, modules/simulator/include/mvsim/World.h
SensorBase parses and exposes the preview visibility flag, while the world GUI declarations accept and resolve the initial visibility state.
GUI preview initialization
modules/simulator/src/World_gui.cpp
Image and depth observation paths pass the sensor visibility setting to preview creation, minimizing newly created windows when configured as hidden.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SensorXML
  participant SensorBase
  participant WorldGUI
  SensorXML->>SensorBase: Parse preview_win_visible
  WorldGUI->>SensorBase: Query previewWinVisible()
  WorldGUI->>WorldGUI: Create preview subwindow
  WorldGUI->>WorldGUI: Minimize when visibility is false
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: sensors' GUI preview subwindows can now start minimized via a new config option.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/sensor-preview-win-visible

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jlblancoc jlblancoc enabled auto-merge July 11, 2026 07:55
@jlblancoc jlblancoc merged commit ff7d617 into develop Jul 11, 2026
12 checks passed
@jlblancoc jlblancoc deleted the feature/sensor-preview-win-visible branch July 11, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant