mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 22:26:35 +00:00
add instructions on building and running on jetson/any embedded
This commit is contained in:
@@ -27,12 +27,44 @@ wget https://github.com/mavlink/MAVSDK/releases/download/v2.9.1/libmavsdk-dev_2.
|
|||||||
|
|
||||||
sudo dpkg -i libmavsdk-dev_2.9.1_ubuntu22.04_amd64.deb
|
sudo dpkg -i libmavsdk-dev_2.9.1_ubuntu22.04_amd64.deb
|
||||||
|
|
||||||
|
## Install MAVSDK for embedded platforms
|
||||||
|
|
||||||
|
### Update cmake (need to build mavsdk)
|
||||||
|
wget https://github.com/Kitware/CMake/releases/download/v3.29.3/cmake-3.29.3-linux-aarch64.sh
|
||||||
|
sudo cp cmake-3.29.3-linux-aarch64.sh /opt
|
||||||
|
sudo chmod +x /opt/cmake-3.29.3-linux-aarch64.sh
|
||||||
|
cd /opt
|
||||||
|
sudo bash cmake-3.29.3-linux-aarch64.sh
|
||||||
|
sudo rm cmake ccmake cpack ctest cmake-gui
|
||||||
|
sudo ln -s /opt/cmake-3.29.3-linux-aarch64/bin/* /usr/bin
|
||||||
|
|
||||||
|
### Make sure gcc9 installed and is default (Need to build mavsdk. gcc -v to check)
|
||||||
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install gcc-9 g++-9
|
||||||
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
|
||||||
|
|
||||||
|
### Build & Install from sources
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install build-essential cmake git
|
||||||
|
git clone https://github.com/mavlink/MAVSDK.git
|
||||||
|
cd MAVSDK
|
||||||
|
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
|
||||||
|
|
||||||
|
### Resolving python problems
|
||||||
|
In case of an error "The python version is too old, expecting 3, 6, 9" during Ardupilot run,
|
||||||
|
install 3.6 python (most probably under alias python3) and
|
||||||
|
just change 1 line in ardupilot/modules/waf/waf-light from ... python -> python3
|
||||||
|
|
||||||
## Build autopilot application
|
## Build autopilot application
|
||||||
cd src && qmake && make
|
cd src && cmake . && make
|
||||||
|
|
||||||
## Launch similator in the ArduPilot directory
|
## Launch similator in the ArduPilot directory
|
||||||
./Tools/autotest/sim_vehicle.py --map --console -v ArduCopter
|
./Tools/autotest/sim_vehicle.py --map --console -v ArduCopter
|
||||||
|
|
||||||
## Launch example application in the new terminal window after waiting simulator (around 1 min) to be ready
|
## Launch example application in the new terminal window after waiting simulator (around 1 min) to be ready
|
||||||
qmake && make && ./autopilot mission.json
|
cmake . && make && ./autopilot mission.json
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user