docs: Improve quick start, ArduPilot setup, and troubleshooting, and add GPS mode option.

This commit is contained in:
2026-01-07 21:27:34 +00:00
parent 202465af99
commit 3251fc7b27
6 changed files with 350 additions and 294 deletions

View File

@@ -2,8 +2,8 @@
# =============================================================================
# ArduPilot Gazebo Simulation Launcher
# =============================================================================
# Launches Gazebo with the ArduPilot iris drone model.
# Start this FIRST, then run SITL in another terminal.
# Launches Gazebo with the ArduPilot iris drone.
# START THIS FIRST, then run SITL in another terminal.
#
# Usage:
# ./scripts/run_ardupilot_sim.sh # Default runway
@@ -17,7 +17,6 @@ echo " Gazebo + ArduPilot Simulation"
echo "=============================================="
echo ""
# Get script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
@@ -53,14 +52,19 @@ export GZ_SIM_RESOURCE_PATH="${PROJECT_DIR}/gazebo/models:${GZ_SIM_RESOURCE_PATH
# CHECK INSTALLATION
# =============================================================================
if [ ! -d "${HOME}/ardupilot_gazebo" ]; then
echo "[ERROR] ardupilot_gazebo not found!"
echo "Run: ./setup/install_ardupilot.sh"
echo "[ERROR] ardupilot_gazebo directory not found!"
echo ""
echo "Install with: ./setup/install_ardupilot.sh"
exit 1
fi
if [ ! -f "${HOME}/ardupilot_gazebo/build/libArduPilotPlugin.so" ]; then
echo "[ERROR] ArduPilot plugin not built!"
echo "Run: cd ~/ardupilot_gazebo && mkdir -p build && cd build && cmake .. && make -j4"
echo "[ERROR] ArduPilot Gazebo plugin not built!"
echo ""
echo "Build it:"
echo " cd ~/ardupilot_gazebo"
echo " mkdir -p build && cd build"
echo " cmake .. && make -j4"
exit 1
fi
@@ -92,22 +96,22 @@ case "$WORLD_ARG" in
;;
esac
echo "[INFO] World: $(basename "$WORLD")"
echo "[OK] World: $(basename "$WORLD")"
echo ""
# =============================================================================
# INSTRUCTIONS
# =============================================================================
echo "=============================================="
echo " STEP 1: Gazebo Starting..."
echo " NEXT STEPS"
echo "=============================================="
echo ""
echo "After Gazebo loads, run SITL in another terminal:"
echo "After Gazebo loads, open a NEW terminal and run:"
echo ""
echo " source ~/venv-ardupilot/bin/activate"
echo " sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --console"
echo ""
echo "Then run the flight controller:"
echo "Then open ANOTHER terminal to run the controller:"
echo ""
echo " source ~/venv-ardupilot/bin/activate"
echo " cd ~/RDC_Simulation"
@@ -115,6 +119,7 @@ echo " python scripts/run_ardupilot.py --pattern square"
echo ""
echo "=============================================="
echo ""
echo "[INFO] Starting Gazebo..."
# =============================================================================
# RUN GAZEBO