ViDRA-V1 is a research-grade scaffold for vision-only human driving data collection and analysis in Euro Truck Simulator 2 (ETS2). The project is split into a low-latency live capture path and an offline analysis path so gameplay capture stays lightweight while alignment, segmentation, feature extraction, and artifact generation happen after the session ends.
- Live capture: Windows only
- Offline alignment / segmentation / features / analysis: cross-platform Python
- Tested Python: 3.10+
Live capture uses Win32 APIs for process monitoring, window discovery, keyboard polling, and Windows Startup integration. If you import or run live-capture commands on a non-Windows system, ViDRA-V1 now fails with a clear runtime error instead of crashing at import time.
python -m venv .venv
.venv\Scripts\activate
python -m pip install --upgrade pip
python -m pip install -e .[research]
python -m unittest discover -s tests
vidra --helpIf you prefer not to install the package, the repository also works directly from the checkout because sitecustomize.py adds src/ to sys.path automatically for local runs.
The checkout also includes a top-level vidra_v1/ shim so python -m vidra_v1 ... works from a clean clone without setting PYTHONPATH.
<PROJECT_ROOT>/
+-- configs/
+-- datasets/
+-- paper_artifacts/
+-- runtime/
+-- sessions/
+-- src/vidra_v1/
+-- tests/
`-- vidra_v1/
Live during gameplay:
- Session metadata
- Window/frame capture
- Keyboard polling and HCEL encoding
- Timestamped capture record writing
- Service/session live logging
Offline after gameplay:
- Alignment
- Event segmentation
- Feature extraction
- Behavioral analysis
- Dataset export and paper artifacts
Recommended:
python -m pip install -e .[research]
vidra --helpDirect-from-repo fallback:
python -m vidra_v1 --helpSet the ETS2 executable path in:
configs/game_config.json
Example placeholder:
{
"game_executable_path": "<ETS2_EXE_PATH>",
"process_name": "eurotrucks2.exe",
"poll_interval_s": 1.0
}Capture parameters live in:
configs/capture.jsonconfigs/auto_capture.jsonconfigs/overlay_config.json
Initialize a manual session:
vidra init-session --session-id ets2_2026_03_21_001 --driver-id driver_a --controller-type keyboard --experiment-tag v1_baselineRun the always-on capture service:
vidra auto-service --driver-id driver_a --controller-type keyboard --experiment-tag v1_autoInstall Windows autostart for the capture service:
vidra install-autostart --driver-id driver_a --controller-type keyboard --experiment-tag v1_auto --start-nowCheck the current runtime state:
vidra statusRun a session integrity check:
vidra validate-session --session-id <SESSION_ID>Write a dataset manifest for a session:
vidra write-manifest --session-id <SESSION_ID>Run the offline pipeline for a session:
vidra run-post --session-id <SESSION_ID>During live capture, ViDRA-V1 writes:
- frame images under
sessions/<SESSION_ID>/raw/frames/ - atomic capture records under
sessions/<SESSION_ID>/raw/records/capture_records.jsonl - raw key transitions under
sessions/<SESSION_ID>/raw/controls/key_events.jsonl - per-session live state under
sessions/<SESSION_ID>/live_status.json - per-session runtime events under
sessions/<SESSION_ID>/runtime_events.jsonl - global service events under
runtime/service_events.jsonl - global session history under
runtime/session_history.jsonl - dataset manifests under
sessions/<SESSION_ID>/dataset_manifest.jsonandruntime/dataset_manifests.jsonl - experiment records under
sessions/<SESSION_ID>/experiments/andruntime/experiments.jsonl - validation reports under
sessions/<SESSION_ID>/validation_report.json
The repository test suite should run from a clean clone with:
python -m unittest discover -s testsFor editable-install validation:
python -m pip install -e .
python -m unittest discover -s tests- Live capture currently stores sampled frames plus control logs; it does not write an
.mp4video. - Live overlays work best in borderless/windowed ETS2. Exclusive fullscreen can hide Windows topmost overlays behind the game.