diff --git a/environment.yml b/environment.yml index 15253bc0..39fc8dc0 100644 --- a/environment.yml +++ b/environment.yml @@ -1,4 +1,4 @@ -name: realsim_dev +name: realsim channels: - conda-forge - defaults diff --git a/tests/Python/SimpleEchoClient/run_simple_echo_client.bat b/tests/Python/SimpleEchoClient/run_simple_echo_client.bat index 04646161..1723dd96 100644 --- a/tests/Python/SimpleEchoClient/run_simple_echo_client.bat +++ b/tests/Python/SimpleEchoClient/run_simple_echo_client.bat @@ -30,11 +30,11 @@ timeout /t 3 /nobreak echo Starting Python Echo Client... REM Initialize conda if not already initialized if exist "%USERPROFILE%\miniconda3\Scripts\activate.bat" ( - call %USERPROFILE%\miniconda3\Scripts\activate.bat realsim_dev + call %USERPROFILE%\miniconda3\Scripts\activate.bat realsim ) else if exist "%USERPROFILE%\anaconda3\Scripts\activate.bat" ( - call %USERPROFILE%\anaconda3\Scripts\activate.bat realsim_dev + call %USERPROFILE%\anaconda3\Scripts\activate.bat realsim ) else ( - call conda activate realsim_dev + call conda activate realsim ) python %TestPath%\simple_echo_client.py diff --git a/tests/Python/SimpleTrafficLight/run_test.bat b/tests/Python/SimpleTrafficLight/run_test.bat index e8dec43b..2e5413eb 100644 --- a/tests/Python/SimpleTrafficLight/run_test.bat +++ b/tests/Python/SimpleTrafficLight/run_test.bat @@ -2,38 +2,55 @@ REM Simple Traffic Light Test - TrafficLayer with Python Echo Client REM Uses simple SUMO network with signalized intersections -set TrafficLayerPath=C:\src_git\RS_FIXS\#51\TrafficLayer\x64\Debug +set RealSimPath=..\..\.. +set TestPath=. set configFilename=config.yaml +REM Check if auto-launch is enabled in config +echo Checking config for auto-launch setting... +findstr /C:"EnableAutoLaunch: true" %configFilename% >nul +if %errorlevel%==0 ( + echo [CONFIG] Auto-launch ENABLED - TrafficLayer will start SUMO automatically + echo [CONFIG] Skipping manual SUMO launch + goto :skip_sumo +) + REM Start SUMO with the traffic light test scenario -echo Starting SUMO with traffic light test scenario... -start sumo-gui -c simple_traffic_light.sumocfg --remote-port 1337 --step-length 0.1 --start --num-clients 1 +echo [CONFIG] Auto-launch DISABLED - Starting SUMO manually... +start sumo-gui -c %TestPath%\simple_traffic_light.sumocfg --start --remote-port 1337 --step-length 0.1 --num-clients 1 echo Waiting for SUMO to initialize... timeout /t 2 /nobreak +:skip_sumo REM Start TrafficLayer.exe echo Starting TrafficLayer.exe... -start cmd /c "%TrafficLayerPath%\TrafficLayer.exe" -f %configFilename% +if exist "%RealSimPath%\TrafficLayer\x64\Release\TrafficLayer.exe" ( + start cmd /c "%RealSimPath%\TrafficLayer\x64\Release\TrafficLayer.exe" -f %configFilename% +) else if exist "%RealSimPath%\TrafficLayer\x64\Debug\TrafficLayer.exe" ( + start cmd /c "%RealSimPath%\TrafficLayer\x64\Debug\TrafficLayer.exe" -f %configFilename% +) else ( + echo [ERROR] Could not find TrafficLayer.exe in Release or Debug under %RealSimPath%\TrafficLayer\x64 + goto :end +) echo Waiting for TrafficLayer to initialize... timeout /t 3 /nobreak REM Start Python Echo Client echo Starting Python Echo Client... -REM Initialize conda +REM Initialize conda if not already initialized if exist "%USERPROFILE%\miniconda3\Scripts\activate.bat" ( - call %USERPROFILE%\miniconda3\Scripts\activate.bat - call conda activate realsim + call %USERPROFILE%\miniconda3\Scripts\activate.bat realsim ) else if exist "%USERPROFILE%\anaconda3\Scripts\activate.bat" ( - call %USERPROFILE%\anaconda3\Scripts\activate.bat - call conda activate realsim + call %USERPROFILE%\anaconda3\Scripts\activate.bat realsim ) else ( call conda activate realsim ) -python echo_client.py +python %TestPath%\echo_client.py call conda deactivate -pause \ No newline at end of file +:end +pause