@echo off :: =============================================================== :: FOX CARLA ADAS SIMULATION — ONE-CLICK RUNNER :: =============================================================== :: Usage: :: run.bat braking :: run.bat cutin :: run.bat obstacle --frames 120 :: run.bat --list-scenarios :: =============================================================== :: Activate the CARLA conda environment call C:\ProgramData\miniconda3\Scripts\activate.bat carla312 if "%~1"=="" ( echo [ERROR] No argument specified. echo. echo Usage example: run.bat braking pause exit /b 1 ) :: Force unbuffered stdout/stderr so the Dashboard GUI receives output immediately set PYTHONUNBUFFERED=1 :: Logic: :: 1. If user passes --list-scenarios or -l, call directly. :: 2. If user already specifies --scenario or -s, pass all args directly. :: 3. Otherwise, prepend --scenario to the first argument. set FIRST_ARG=%~1 if "%FIRST_ARG%"=="--list-scenarios" ( python src/main.py --list-scenarios ) else if "%FIRST_ARG%"=="-l" ( python src/main.py --list-scenarios ) else if "%FIRST_ARG%"=="-s" ( python src/main.py %* ) else if "%FIRST_ARG%"=="--scenario" ( python src/main.py %* ) else ( python src/main.py --scenario %* )