diff --git a/setup/install_arch.sh b/setup/install_arch.sh index c397fc1..139ed50 100755 --- a/setup/install_arch.sh +++ b/setup/install_arch.sh @@ -159,8 +159,7 @@ if [ -d "$HOME/ardupilot_gazebo/build" ]; then fi echo "" -echo "Environment ready! Run:" -echo " python standalone_simulation.py" +echo "Environment ready! See README.md for usage instructions." echo "" EOF @@ -187,18 +186,26 @@ echo "==============================================" echo " Installation Complete!" echo "==============================================" echo "" -echo "Quick start:" -echo " source activate.sh" -echo " python standalone_simulation.py" +echo "Quick start (3 terminals):" echo "" -echo "With moving rover:" -echo " python standalone_simulation.py --pattern circular --speed 0.3" +echo "Terminal 1 - Start Gazebo:" +echo " cd ~/RDC_Simulation" +echo " ./scripts/run_ardupilot_sim.sh runway" +echo "" +echo "Terminal 2 - Start ArduCopter SITL:" +echo " source ~/venv-ardupilot/bin/activate" +echo " sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --console" +echo "" +echo "Terminal 3 - Run Controller:" +echo " source ~/venv-ardupilot/bin/activate" +echo " cd ~/RDC_Simulation" +echo " python scripts/run_ardupilot.py --pattern square" echo "" echo "==============================================" echo " Optional: Install ROS 2 + Gazebo from AUR" echo "==============================================" echo "" -echo "If you need ROS 2 for the full simulation mode:" +echo "If you need ROS 2 for additional features:" echo "" echo " # Install ROS 2 Humble" echo " yay -S ros-humble-desktop" @@ -206,12 +213,9 @@ echo "" echo " # Install Gazebo bridge" echo " yay -S ros-humble-ros-gz" echo "" -echo " # Install Gazebo Fortress (provides 'ign' command)" -echo " yay -S ignition-fortress" +echo " # Install Gazebo Harmonic" +echo " yay -S gz-harmonic" echo "" -echo "After installing, use:" -echo " ign gazebo gazebo/worlds/drone_landing.sdf # Terminal 1" -echo " python run_gazebo.py --pattern circular # Terminal 2" echo "" echo "==============================================" echo " Optional: Install ArduPilot SITL" @@ -227,14 +231,13 @@ echo "" echo " # Clone and build ArduPilot Gazebo plugin" echo " git clone https://github.com/ArduPilot/ardupilot_gazebo.git ~/ardupilot_gazebo" echo " cd ~/ardupilot_gazebo && mkdir build && cd build" -echo " cmake .. && make -j$(nproc)" +echo " cmake .. && make -j\$(nproc)" echo "" echo " # Add to environment" echo " export ARDUPILOT_HOME=~/ardupilot" echo " export PATH=\$PATH:\$ARDUPILOT_HOME/Tools/autotest" echo " export GZ_SIM_SYSTEM_PLUGIN_PATH=~/ardupilot_gazebo/build:\$GZ_SIM_SYSTEM_PLUGIN_PATH" echo "" -echo "Then run:" -echo " python run_ardupilot.py --pattern circular" +echo "Then run the 3-terminal setup as described above." echo "" diff --git a/setup/install_macos.sh b/setup/install_macos.sh index 1457376..e584109 100755 --- a/setup/install_macos.sh +++ b/setup/install_macos.sh @@ -100,10 +100,9 @@ fi echo "" echo "Environment ready!" echo "" -echo "Run: python standalone_simulation.py" -echo "" -echo "Note: ROS 2 and Gazebo are not supported on macOS." -echo " Use standalone_simulation.py for the complete experience." +echo "Note: ArduPilot SITL and Gazebo require Linux." +echo " Use a Linux VM (UTM) or Docker for the full simulation." +echo " See docs/installation.md for details." echo "" EOF @@ -129,21 +128,19 @@ echo "==============================================" echo " Installation Complete!" echo "==============================================" echo "" -echo "Quick start:" -echo " source activate.sh" -echo " python standalone_simulation.py" +echo "Note: ArduPilot SITL and Gazebo require Linux." echo "" -echo "With moving rover:" -echo " python standalone_simulation.py --pattern circular --speed 0.3" -echo "" -echo "==============================================" -echo " Want ROS 2 + Gazebo?" -echo "==============================================" -echo "" -echo "ROS 2 and Gazebo are not supported on macOS." -echo "For the full experience, use a Linux VM or Docker:" +echo "For the full simulation, use a Linux VM or Docker:" echo " - UTM (Apple Silicon): https://mac.getutm.app" echo " - Docker Desktop: docker run -it ubuntu:22.04" -echo " - Then run: ./setup/install_ubuntu.sh" +echo " - Then run: ./setup/install_ubuntu.sh --with-ardupilot" +echo "" +echo "Once in Linux, run (3 terminals):" +echo "" +echo " Terminal 1: ./scripts/run_ardupilot_sim.sh runway" +echo " Terminal 2: sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --console" +echo " Terminal 3: python scripts/run_ardupilot.py --pattern square" +echo "" +echo "See docs/installation.md for detailed instructions." echo "" diff --git a/setup/install_ubuntu.sh b/setup/install_ubuntu.sh index c6bb84f..bfde962 100755 --- a/setup/install_ubuntu.sh +++ b/setup/install_ubuntu.sh @@ -213,7 +213,7 @@ if [ -d "$HOME/ardupilot_gazebo/build" ]; then fi echo "" -echo "Ready! Run: python standalone_simulation.py" +echo "Ready! See README.md for usage instructions." EOF chmod +x "$PROJECT_ROOT/activate.sh" @@ -241,8 +241,8 @@ if [ "$INSTALL_ARDUPILOT" = true ]; then echo "" echo "[INFO] Installing ArduPilot SITL..." - if [ -f "$SCRIPT_DIR/install_ardupilot.sh" ]; then - bash "$SCRIPT_DIR/install_ardupilot.sh" + if [ -f "$SCRIPT_DIR/setup/install_ardupilot.sh" ]; then + bash "$SCRIPT_DIR/setup/install_ardupilot.sh" else echo "[ERROR] install_ardupilot.sh not found!" fi @@ -253,16 +253,23 @@ echo "==============================================" echo " Installation Complete!" echo "==============================================" echo "" -echo "Quick start:" -echo " source activate.sh" -echo " python standalone_simulation.py" +echo "Quick start (3 terminals):" echo "" -echo "With Gazebo (2 terminals):" -echo " Terminal 1: ros2 launch gazebo/launch/drone_landing.launch.py" -echo " Terminal 2: python run_gazebo.py --pattern circular" +echo "Terminal 1 - Start Gazebo:" +echo " cd ~/RDC_Simulation" +echo " ./scripts/run_ardupilot_sim.sh runway" +echo "" +echo "Terminal 2 - Start ArduCopter SITL:" +echo " source ~/venv-ardupilot/bin/activate" +echo " sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --console" +echo "" +echo "Terminal 3 - Run Controller:" +echo " source ~/venv-ardupilot/bin/activate" +echo " cd ~/RDC_Simulation" +echo " python scripts/run_ardupilot.py --pattern square" echo "" if [ "$INSTALL_ARDUPILOT" != true ]; then - echo "For ArduPilot SITL:" + echo "For ArduPilot SITL (required for flight):" echo " ./setup/install_ardupilot.sh" echo "" fi diff --git a/setup/install_windows.ps1 b/setup/install_windows.ps1 index e5f42f9..849fbaa 100644 --- a/setup/install_windows.ps1 +++ b/setup/install_windows.ps1 @@ -149,13 +149,14 @@ $activateBat = Join-Path $ProjectRoot "activate.bat" @" @echo off REM Drone Simulation - Environment Activation (Windows CMD) +REM Note: Full ArduPilot simulation requires WSL2 (Linux) call "%~dp0venv\Scripts\activate.bat" echo. -echo [OK] Environment ready! +echo [OK] Python environment ready! echo. -echo Run: python standalone_simulation.py +echo Note: ArduPilot SITL requires WSL2. See docs/installation.md echo. "@ | Out-File -FilePath $activateBat -Encoding ASCII @@ -163,6 +164,7 @@ echo. $activatePs1 = Join-Path $ProjectRoot "activate.ps1" @" # Drone Simulation - Environment Activation (Windows PowerShell) +# Note: Full ArduPilot simulation requires WSL2 (Linux) # Usage: . .\activate.ps1 `$ScriptDir = Split-Path -Parent `$MyInvocation.MyCommand.Path @@ -171,9 +173,9 @@ $activatePs1 = Join-Path $ProjectRoot "activate.ps1" & "`$ScriptDir\venv\Scripts\Activate.ps1" Write-Host "" -Write-Host "[OK] Environment ready!" -ForegroundColor Green +Write-Host "[OK] Python environment ready!" -ForegroundColor Green Write-Host "" -Write-Host "Run: python standalone_simulation.py" -ForegroundColor White +Write-Host "Note: ArduPilot SITL requires WSL2. See docs/installation.md" -ForegroundColor Yellow Write-Host "" "@ | Out-File -FilePath $activatePs1 -Encoding UTF8 @@ -214,18 +216,13 @@ Write-Host "==============================================" -ForegroundColor Cy Write-Host " Installation Complete!" -ForegroundColor Cyan Write-Host "==============================================" -ForegroundColor Cyan Write-Host "" -Write-Host "Quick start:" -ForegroundColor Yellow -Write-Host " . .\activate.ps1" -ForegroundColor White -Write-Host " python standalone_simulation.py" -ForegroundColor White -Write-Host "" -Write-Host "With moving rover:" -ForegroundColor Yellow -Write-Host " python standalone_simulation.py --pattern circular --speed 0.3" -ForegroundColor White +Write-Host "Note: ArduPilot SITL simulation requires WSL2 (Linux)." -ForegroundColor Yellow Write-Host "" Write-Host "======================================================" -ForegroundColor Cyan -Write-Host " Want ROS 2 + Gazebo + ArduPilot? Use WSL2" -ForegroundColor Cyan +Write-Host " Full Simulation: Use WSL2 (Linux)" -ForegroundColor Cyan Write-Host "======================================================" -ForegroundColor Cyan Write-Host "" -Write-Host "For the full simulation with Gazebo and ArduPilot:" -ForegroundColor Gray +Write-Host "ArduPilot + Gazebo simulation requires Linux:" -ForegroundColor Gray Write-Host "" Write-Host "Step 1: Install WSL2" -ForegroundColor Yellow Write-Host " wsl --install -d Ubuntu-24.04" -ForegroundColor White @@ -236,9 +233,10 @@ Write-Host " cd /mnt/c/path/to/RDC_Simulation" -ForegroundColor White Write-Host " ./setup/install_ubuntu.sh --with-ardupilot" -ForegroundColor White Write-Host " source ~/.bashrc" -ForegroundColor White Write-Host "" -Write-Host "Step 3: Run simulation (2 terminals)" -ForegroundColor Yellow +Write-Host "Step 3: Run simulation (3 terminals)" -ForegroundColor Yellow Write-Host " Terminal 1: ./scripts/run_ardupilot_sim.sh runway" -ForegroundColor White -Write-Host " Terminal 2: ./scripts/run_ardupilot_controller.sh" -ForegroundColor White +Write-Host " Terminal 2: sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --console" -ForegroundColor White +Write-Host " Terminal 3: python scripts/run_ardupilot.py --pattern square" -ForegroundColor White Write-Host "" Write-Host "GPU Acceleration in WSL:" -ForegroundColor Yellow Write-Host " - Windows 11: WSLg auto-enabled (no setup needed)" -ForegroundColor DarkGray