-
Notifications
You must be signed in to change notification settings - Fork 0
Build MAVSDK
As of May 2020 there is no pip install for MAVSDK on ARM devices so it must be built from source. There may be support in the future however this process must be followed until there is a pre combined binary (MAVSDK-Python is currently 0.7.0 - May 2020)
The following is a summary from the development guide of MAVSDK. Please refer to it for further documentation and/or updates in the future. Run the following commands one at a time and read the outputs and act accordingly.
$ sudo apt-get update -y
$ sudo apt-get install cmake build-essential colordiff git doxygen -y
$ cd
$ git clone https://github.com/mavlink/MAVSDK.git
$ cd MAVSDK
$ git checkout master
$ git submodule update --init --recursive
$ cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -Bbuild/default -H.
$ cmake --build build/default
$ sudo cmake --build build/default --target install
It is possible that the second cmake found below can replace the first one however it has not yet been tested.
$ sudo ldconfig
$ cd MAVSDK
$ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_BACKEND=ON -Bbuild/default -H.
$ cmake --build build/default
$ sudo cmake --build build/default --target install
$ sudo ldconfig
$ sudo reboot -h now
$ cd
$ git clone https://github.com/mavlink/MAVSDK-Python --recursive
$ cd MAVSDK-Python
$ cd proto/pb_plugins
$ pip3 install -r requirements.txt
$ sudo pip3 install -e .
The following takes forever, just be patient:
$ cd ../..
$ pip3 install -r requirements.txt -r requirements-dev.txt
$ ./other/tools/run_protoc.sh
$ cp /home/odroid/MAVSDK/build/default/src/backend/src/mavsdk_server /home/odroid/MAVSDK-Python/mavsdk/bin
The following command does not appear to work but run it anyways:
$ python3 setup.py build
This command does work and installed it system the library system wide:
$ pip3 install -e .
We should also add this to our virtual environment as so:
$ workon cv
$ cd /home/odroid/MAVSDK-Python
$ pip install -e .
The following link was also used during the install process as a reference.