Initial version of ArduPilot compatible autopilot

- removed PX4 and MAVSDK git submodules
This commit is contained in:
Tuomas Järvinen
2024-05-12 22:19:10 +02:00
parent f7acface7f
commit f832b9fc92
20 changed files with 514 additions and 856 deletions
+13 -22
View File
@@ -1,13 +1,11 @@
# Azaion Autopilot
A preliminary example of autonomous drone flight. This example is based on the MAVSDK framework and PX4 flight controller software. Running the example requires compiling MAVSDK and PX4 on a Linux image system using cmake. Example has been tested in Ubuntu 20.04 environment.
A preliminary example of autonomous drone flight. This example is based on the MAVSDK framework and ArduPilot flight controller software. Running the example requires installing MAVSDK debian package and compiling ArduPilot. Example has been tested in Ubuntu 20.04 environment.
TODO!! Add support for Docker builds. PX4 installs many dependencies.
## Install necessary dependencies
sudo apt update
sudo apt install ccache git build-essential curl cmake
sudo apt install ccache git build-essential qt5-qmake qtbase5-dev
## Speed up the compilations
echo "export MAKEFLAGS=\"-j$(($(nproc)))\"" >> ~/.bashrc
@@ -15,33 +13,26 @@ echo "export MAKEFLAGS=\"-j$(($(nproc)))\"" >> ~/.bashrc
echo "export PATH=/usr/lib/ccache:\$PATH" >> ~/.bashrc
## Clone source codes. You must add your SSH key before the cloning!
git clone git@github.com:azaion/autopilot.git
git clone --recursive git@github.com:azaion/autopilot.git
git submodule update --init --recursive
## Build and install PX4
cd 3rd/px4 && bash ./Tools/setup/ubuntu.sh && make px4_sitl jmavsim
## Install MAVSDK for Ubuntu 20.04
wget https://github.com/mavlink/MAVSDK/releases/download/v2.4.1/libmavsdk-dev_2.4.1_ubuntu20.04_amd64.deb
wget https://github.com/mavlink/MAVSDK/releases/download/v2.9.1/libmavsdk-dev_2.9.1_ubuntu20.04_amd64.deb
sudo dpkg -i ibmavsdk-dev_2.4.1_ubuntu20.04_amd64.deb
sudo dpkg -i libmavsdk-dev_2.9.1_ubuntu20.04_amd64.deb
## Install MAVSDK for Ubuntu 22.04
wget https://github.com/mavlink/MAVSDK/releases/download/v2.4.1/libmavsdk-dev_2.4.1_ubuntu22.04_amd64.deb
wget https://github.com/mavlink/MAVSDK/releases/download/v2.9.1/libmavsdk-dev_2.9.1_ubuntu22.04_amd64.deb
sudo dpkg -i libmavsdk-dev_2.4.1_ubuntu22.04_amd64.deb
sudo dpkg -i libmavsdk-dev_2.9.1_ubuntu22.04_amd64.deb
## Build example application
cd src && cmake . && make
## Build autopilot application
cd src && qmake && make
## Launch similator
cd 3rd/px4
## Launch similator in the ArduPilot directory
./Tools/autotest/sim_vehicle.py --map --console -v ArduCopter
PX4_HOME_LAT=52.5314818 PX4_HOME_LON=13.3872884 ./build/px4_sitl_default/bin/px4
## Launch example application in the new terminal window
cd src
make && ./azaion mission.json
## Launch example application in the new terminal window after waiting simulator (around 1 min) to be ready
qmake && make && ./autopilot mission.json