From 85e4546ad4a892d2b853edb0ae3aa133c923d9ad Mon Sep 17 00:00:00 2001 From: Oleksandr Bezdieniezhnykh Date: Wed, 22 May 2024 13:53:02 +0000 Subject: [PATCH] Add install.sh for quick install and run necessary tools on new hardware --- .gitignore | 2 ++ install.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .gitignore create mode 100644 install.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a4f147 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +MAVSDK/ +ardupilot/ diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..e0a1c62 --- /dev/null +++ b/install.sh @@ -0,0 +1,27 @@ +# MAVSDK +sudo apt-get update -y +sudo apt-get install build-essential cmake git python3-pip -y +git clone https://github.com/mavlink/MAVSDK.git +cd MAVSDK +git checkout tags/v2.9.1 +git submodule update --init --recursive +cmake -Bbuild/default -DCMAKE_BUILD_TYPE=Release -H. +cmake --build build/default -j8 +sudo cmake --build build/default --target install +cd .. + +#Ardupilot +git clone --recursive https://github.com/ArduPilot/ardupilot.git +cd ardupilot +./Tools/environment_install/install-prereqs-ubuntu.sh -y +. ~/.profile +./waf configure --board=sitl +./waf build + +#Autopilot +cd src && qmake && make + +#Run +./ardupilot/Tools/autotest/sim_vehicle.py --map --console -v ArduCopter & +cd src +./autopilot mission.json