Skip to content

Tools: add wxPython based GUI launcher for SITL#32893

Open
mahadsultanchaudhary wants to merge 1 commit intoArduPilot:masterfrom
mahadsultanchaudhary:SITL-GUI-Launcher
Open

Tools: add wxPython based GUI launcher for SITL#32893
mahadsultanchaudhary wants to merge 1 commit intoArduPilot:masterfrom
mahadsultanchaudhary:SITL-GUI-Launcher

Conversation

@mahadsultanchaudhary
Copy link
Copy Markdown

@mahadsultanchaudhary mahadsultanchaudhary commented Apr 23, 2026

Summary

This PR adds an optional GUI wrapper for sim_vehicle.py to simplify SITL setup while preserving existing CLI behavior. The implementation keeps the GUI logic modular, adds a few usability improvements, and aims to reduce common configuration errors for new users.

Relates to: #32802


Classification & Testing

  • Checked by a human programmer
  • Infrastructure change (helper script)
  • Non-functional change
  • No-binary change
  • Tested manually (SITL)

Description

  • Adds an optional --gui mode for launching SITL through a simple wxPython interface
  • Keeps GUI code isolated in sim_gui_helper.py to avoid bloating sim_vehicle.py
  • Parses Tools/autotest/locations.txt for searchable start locations
  • Persists last-used settings (vehicle, location, aircraft, checkboxes) via wx.Config
  • Adds basic UI validation (e.g. disables Map/Console/OSD when --no-mavproxy is selected)
  • Implements directory-aware locking:
    • when launched from a vehicle-specific directory (e.g. ArduCopter/), the GUI locks the vehicle type to match context
    • prevents build-path mismatches and binary-not-found errors from conflicting selections
  • Preserves normal CLI behavior inside vehicle directories unless --gui is explicitly passed
  • Auto-launches GUI outside vehicle directories when no vehicle is specified
  • CLI arguments passed with --gui (e.g. -L, -A) pre-fill and sync with GUI state
  • Gracefully exits with install guidance if wxPython is unavailable

Testing Performed

Tested locally via SITL.

  • GUI opens automatically outside vehicle directories
  • Inside vehicle directories, --gui is required
  • CLI arguments passed with --gui correctly sync with UI state
  • Generated arguments successfully launch the expected simulation
  • Directory-aware locking prevents invalid vehicle/context mismatches

AI-Assistance Disclosure

This contribution was AI-assisted. The implementation and GUI structure were developed with AI assistance. I have reviewed, tested, and verified the changes and take full responsibility for this PR.

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Apr 23, 2026
@mahadsultanchaudhary mahadsultanchaudhary marked this pull request as ready for review April 29, 2026 16:21
@mahadsultanchaudhary mahadsultanchaudhary marked this pull request as draft April 29, 2026 16:35
@mahadsultanchaudhary mahadsultanchaudhary marked this pull request as ready for review April 29, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Python WikiNeeded needs wiki update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants