Skip to content

fix: sensor wiring with auto-naming, START state, and process metrics#5

Draft
im-hashim wants to merge 7 commits into
carla-simulator:masterfrom
im-hashim:fix/optimizations_and_re-link_wiring
Draft

fix: sensor wiring with auto-naming, START state, and process metrics#5
im-hashim wants to merge 7 commits into
carla-simulator:masterfrom
im-hashim:fix/optimizations_and_re-link_wiring

Conversation

@im-hashim

@im-hashim im-hashim commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Hardening pass on the main Studio branch covering build correctness, CLI ergonomics, sensor/process metrics, and remote simulation control.

Build

  • Tightened compiler flags to -Werror with -Wconversion, -Wshadow, -Wsign-conversion, -Wdouble-promotion; all callsites brought into compliance
  • Wired standalone CARLA client cmake integration via CARLA_INSTALL_DIR passthrough in Makefile
  • Fixed all implicit qsizetypeint and qint64double conversions across carla_studio.cpp, start_cli.cpp, actuate_cli.cpp, and mesh_aabb.cpp
  • Resolved -Wshadow on network stats variables and added [[maybe_unused]] for conditionally-compiled members
  • macOS: added explicit static_cast<double>() for float-to-qreal promotions flagged by Apple Clang; added missing Qt headers

Sensor interface

  • Fixed sensor name reads at 6 callsites — check->text() always returned empty; name is stored in a Qt widget property
  • Auto-naming: ensure_default_name writes sensor_<name>_<n> to QSettings on enable/add, skipped when the user already set a custom name

Simulation control

  • START state: removed discoverCarlaSimPids() from the poll tick — it matched orphan pids at startup and set "Initializing" with nothing launching; now called only on explicit START/refresh
  • Remote SSH dispatch: carla-studio start and stop can target a remote host via --host/--port over SSH
  • Removed two unused toolbar buttons; their logic is retained as standalone functions

Process and system metrics

  • CPU: replaced ps pcpu (lifetime-averaged) with per-pid delta from /proc/<pid>/stat jiffies, sampled every 2 s
  • GPU: SM% and VRAM MiB are now tracked and displayed independently
  • Network stats and process monitor panel added to the main window

CLI additions

  • actuate: extended with --backend and --vehicle-blueprint options
  • sensor, healthcheck, preview: minor flag and output fixes
  • --preview-live: flag for live sensor preview sessions during development

Config

  • Removed host/target overrides from env.ini that were local-only and never intended for the shared branch

im-hashim added 3 commits May 14, 2026 01:23
Sensor name reads (6 sites): check->text() always returned "" — name
is in a Qt property. Fixed all callsites to use property("sensor_name").

Auto sensor naming: ensure_default_name writes sensor_<name>_<n> to
QSettings on enable/add, skipped if user already set a custom name.

START auto-trigger: discoverCarlaSimPids() inside refreshProcessList()
matched orphan pids at startup and set "Initializing" with nothing launching.
Removed from the poll tick; now only called explicitly by START/refresh.

CPU metric: ps pcpu is lifetime-averaged. Replaced with delta from
/proc/<pid>/stat jiffies sampled every 2s via proc_cpu_jiffies().

GPU metric: SM% bar was falling back to VRAM% (different metrics).
Bar now shows SM% only; VRAM MiB stays as the label.
…ncludes

- Add explicit static_cast<double>() for float-to-qreal/double conversions
  throughout codebase to fix Apple Clang -Wdouble-promotion strict warnings
- Add missing Qt headers: QStyleHints, QPointer, QGuiApplication
- Add [[maybe_unused]] attributes for platform-specific joystick code that's
  only used inside Linux ifdef guards
- Remove unused lambda captures (scenarioLogLine, unused in some contexts)
- Suppress -Wc++20-extensions flag (structured bindings only needed for storage,
  not capture, and are caught by C++17 guard in code)

These fixes fixes compilation on macOS while maintaining code quality standards.
Platform-specific guards remain for Linux-only features (backtrace, joystick).. have to figure out how to add joystcks for macos via their embedded APIs as it helps mapping better than the /dev/joy. readouts.

Fixes compilation errors on macOS without changing build behavior on Linux.
@im-hashim im-hashim changed the title fix: sensor wiring, auto-naming, START state, and process metrics fix: sensor wiring with auto-naming, START state, and process metrics May 16, 2026
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