install script updates 2

This commit is contained in:
2026-01-09 19:32:17 +00:00
parent f8c3bab861
commit 33d5731e7c
10 changed files with 31 additions and 42 deletions

View File

@@ -134,13 +134,8 @@ if [ -n "$VIRTUAL_ENV" ]; then
deactivate 2>/dev/null || true
fi
# Activate ArduPilot venv (has empy and other dependencies)
# This is preferred over project venv for ArduPilot compatibility
if [ -f "$HOME/venv-ardupilot/bin/activate" ]; then
source "$HOME/venv-ardupilot/bin/activate"
echo "[OK] ArduPilot venv"
# Fallback to project venv only if ArduPilot not installed
elif [ -f "$SCRIPT_DIR/venv/bin/activate" ]; then
# Activate project venv
if [ -f "$SCRIPT_DIR/venv/bin/activate" ]; then
source "$SCRIPT_DIR/venv/bin/activate"
echo "[OK] Python venv activated"
fi
@@ -193,12 +188,12 @@ 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 " source ~/.ardupilot_env"
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 " source activate.sh"
echo " python scripts/run_ardupilot.py --pattern square"
echo ""
echo "=============================================="

View File

@@ -67,13 +67,10 @@ cd "$ARDUPILOT_HOME"
Tools/environment_install/install-prereqs-ubuntu.sh -y
. ~/.profile || true
# Source ArduPilot environment (includes venv with empy)
# Source ArduPilot environment (created by install-prereqs-ubuntu.sh)
if [ -f "$HOME/.ardupilot_env" ]; then
source "$HOME/.ardupilot_env"
fi
if [ -f "$HOME/venv-ardupilot/bin/activate" ]; then
source "$HOME/venv-ardupilot/bin/activate"
fi
# Build ArduCopter SITL (without DDS to avoid complexity)
./waf configure --board sitl

View File

@@ -188,13 +188,8 @@ if [ -n "$VIRTUAL_ENV" ]; then
deactivate 2>/dev/null || true
fi
# Activate ArduPilot venv (has empy and other dependencies)
# This is preferred over project venv for ArduPilot compatibility
if [ -f "$HOME/venv-ardupilot/bin/activate" ]; then
source "$HOME/venv-ardupilot/bin/activate"
echo "[OK] ArduPilot venv"
# Fallback to project venv only if ArduPilot not installed
elif [ -f "$SCRIPT_DIR/venv/bin/activate" ]; then
# Activate project venv
if [ -f "$SCRIPT_DIR/venv/bin/activate" ]; then
source "$SCRIPT_DIR/venv/bin/activate"
echo "[OK] Python venv"
fi
@@ -241,10 +236,10 @@ if [ "$INSTALL_ARDUPILOT" = true ]; then
echo ""
echo "[INFO] Installing ArduPilot SITL..."
if [ -f "$SCRIPT_DIR/setup/install_ardupilot.sh" ]; then
bash "$SCRIPT_DIR/setup/install_ardupilot.sh"
if [ -f "$SCRIPT_DIR/install_ardupilot.sh" ]; then
bash "$SCRIPT_DIR/install_ardupilot.sh"
else
echo "[ERROR] install_ardupilot.sh not found!"
echo "[ERROR] install_ardupilot.sh not found at $SCRIPT_DIR/"
fi
fi
@@ -260,12 +255,12 @@ 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 " source ~/.ardupilot_env"
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 " source activate.sh"
echo " python scripts/run_ardupilot.py --pattern square"
echo ""
if [ "$INSTALL_ARDUPILOT" != true ]; then