Fahrsimulator_MSY2526_UX/docs/SETUP_AND_RUN.md

1.8 KiB

Setup and Run

Prerequisites

  • Java 17 (JDK)
  • Maven 3.9+
  • MQTT broker reachable at localhost:1883 (or custom broker in config)
  • Windows for bundled PowerShell/BAT process scripts

Optional:

  • Python (for automatic MQTT simulator startup)
  • Unreal + Pixel Streaming setup (for avatar integration)

Use this mode to run only the Java application and MQTT pipeline.

In src/main/resources/config/application.properties:

mqtt_sim.enabled=false
unreal.enabled=false

Mode B: Full integration run

Enable simulator and/or Unreal startup only after all referenced paths are valid on your machine. For Unreal Engine prototype setup details (MetaHuman, assets, plugins, and animation flow), see Unreal Avatar Prototype.

Build

mvn clean compile

Run from CLI

mvn org.codehaus.mojo:exec-maven-plugin:3.5.0:java -Dexec.mainClass=vassistent.App

Run from IDE

Start class:

  • vassistent.App

Send Test Messages

Publish payloads to configured topic (default: PREDICTION) in this format:

{
  "valid": true,
  "_id": 1,
  "prediction": 0
}

Validation rules:

  • valid must be true
  • _id must exist
  • prediction must be 0 or 1

Startup Validation Notes

The app validates configuration at startup (AppConfigValidator):

  • if simulator is enabled, Python executable/script and simulator settings are validated;
  • if Unreal integration is enabled, script/executable paths and related directories are validated;
  • invalid configuration throws an IllegalStateException before UI startup.

Shutdown Behavior

On shutdown, the app:

  1. disconnects MQTT,
  2. stops managed external processes,
  3. deletes data/health.db (current behavior),
  4. flushes and closes the logger.