Skip to content

Instantly share code, notes, and snippets.

@prolifel
Last active May 31, 2022 21:39
Show Gist options
  • Save prolifel/6df88190a51a48787efda767515b3267 to your computer and use it in GitHub Desktop.
Save prolifel/6df88190a51a48787efda767515b3267 to your computer and use it in GitHub Desktop.
olympe and sphinx installation rpi

Olympe

Persyaratan

  1. Repo sudah terinstall. Cek dengan repo version. Kalau error, bisa lihat tutorial di sini
  2. sudo apt-get update
  3. Git terinstall. Cek dengan git
  4. Ukuran swap sudah diperbesar (optional). Tutorial ada disini

Langkah

  1. Pastikan ada di home: cd ~
  2. Buat folder parrot-groundsdk
  3. Dalam folder parrot-groundsdk, jalankan repo init -u https://github.com/Parrot-Developers/groundsdk-manifest.git
  4. Kalau butuh git config email dan name, ikutin aja cara yang ada di layar. Biasanya git config --global user.name "namamu" atau git config --global user.email "emailmu". Lalu jalankan lagi repo init -u https://github.com/Parrot-Developers/groundsdk-manifest.git
  5. Setelah repo init beres, jalankan repo sync
  6. Install dependencies ./products/olympe/linux/env/postinst. PASTIKAN TAHAPAN INI TIDAK ADA ERROR, KALAU ADA ERROR, CEK TROUBLESHOOT DIBAWAH
  7. Edit file parrot-groundsdk/build/alchemy/toolchains/cpu.mk, paling atas tambahkan

a. Jika menggunakan Raspi 3 kebawah

ifeq ("$(TARGET_CPU)",“pi3”)
    TARGET_GLOBAL_CFLAGS += -march=armv7-a
    TARGET_FLOAT_ABI ?= hard
endif

b. Jika menggunakan Raspi 4

ifeq ("$(TARGET_CPU)",“pi3”)
    TARGET_GLOBAL_CFLAGS += -march=armv8-a+crc+simd
    TARGET_FLOAT_ABI ?= hard
endif
  1. Edit file parrot-groundsdk/products/olympe/linux/config/product.mk, paling atas tambahkan
TARGET_DEFAULT_ARM_MODE := arm
TARGET_GLOBAL_CFLAGS_arm := -mfloat-abi=hard
TARGET_CPU = pi3
  1. Build Olympe 🚀 ./build.sh -p olympe-linux -A all final -j.
  2. Accept semua Terms and Condition
  3. Kalau build ada error, cek troubleshoot dulu
  4. Build dibilang berhasil kalau sudah ikutin step semua diatas, dan udah seperti screenshot dibawah image
  5. Setting environment path buat Olympe. Tambahkan line export OLYMPE_ENV="./parrot-groundsdk/products/olympe/linux/env/shell " bagian PALING BAWAH pada file ~/.bashrc
  6. Jalankan source ~/.bashrc
  7. Pastikan ada di home, lalu jalankan source $OLYMPE_ENV untuk masuk ke Python environment punya Olympe
  8. Jalankan python -c 'import olympe; print("Installation OK")'. Kalau muncul "Installation OK", berarti anda berhasil 🚀💕💋. Kalau error, coba cek Google cara install nya. Umumnya error yang terjadi itu no module named xxx, jadi bisa cari di Google yaak

Troubleshoot

  1. Error install postinst Cython: ganti cython menjadi cython3 pada file ./products/olympe/linux/env/postinst, jalankan kembali postinst
  2. Error build libclang: https://forum.developer.parrot.com/t/olympe-1-01-on-raspberry-pi-zero-and-pi3-a/9487, jalankan lagi build
  3. Error build aneh setelah coba jalanin build berkali-kali → rebuild hehe 😊. Cek cara rebuild

Rebuild

  1. Pastikan dalam folder parrot-groundsdk, jalanin rm -rf out/
  2. Pastikan tahapan langkah nomor 6-8 amanos
  3. Gas build Olympe 🚀 ./build.sh -p olympe-linux -A all final -j

Kalau ada troubleshoot atau error lain, kabarin

Sphinx

Persyaratan

  1. Matiin Secure Boot. Tiap laptop beda, jadi Googling yaa buat cara matiin Secure Boot kalian
  2. Pastikan sudah install driver Nvidia. Cek disini

Install Nvidia

  1. Buka Software and Updates di menu Start
  2. Kalau butuh update, klik 'Install Now'
  3. Kalau beres, klik 'Settings'
  4. Pilih menu 'Additional Drivers', cek bagian 'NVIDIA Corporation'
  5. Pilih bagian Using Nvidia driver metapackage from nvidia-driver-xxx yang diakhirnya ada tulisan proprietary, tested
  6. Klik 'Apply Changes'
  7. Tunggu sampek beres
  8. Ikutin aja step yang ada dilayar (kalau ada). Umumnya disuruh buat password Secure Boot. Buat aja passwordnya, jangan sampek lupa
  9. Reboot Ubuntu
  10. Cek berhasil install drivernya dengan cara buka terminal, jalankan nvidia-smi. Kalau berhasil, hasilnya kayak dibawah

Screenshot-from-2022-06-01-04-29-04

  1. Kalau gagal dan ada tulisan NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running, coba matiin Secure Boot

Langkah

  1. Ikutin aja dibawah. Username sama password minta ke gua
echo "deb ftp://<myuser>:<mypassword>@ftp2.parrot.biz/deb/ $(lsb_release -cs)/" | sudo tee /etc/apt/sources.list.d/apt.parrot.biz.list
curl -fsSL ftp://<myuser>:<mypassword>@ftp2.parrot.biz/gpg | sudo apt-key add -
echo 'Dir::Bin::Methods::ftp "ftp";' | sudo tee /etc/apt/apt.conf.d/99sphinx-ftp
sudo apt update
sudo apt install parrot-sphinx
sudo apt update
sudo apt install parrot-ue4-empty
  1. Kalau install dah beres, lanjutt. Username dan password sama kek diatas
sudo systemctl start firmwared.service

Buka 2 terminal. Terminal A jalankan

sphinx "/opt/parrot-sphinx/usr/share/sphinx/drones/anafi_ai.drone"::firmware="ftp://<login>:<pass>@ftp2.parrot.biz/versions/anafi2/pc/%23latest/images/anafi2-pc.ext2.zip"

Terminal B jalankan

parrot-ue4-empty
  1. Kalau muncul kek dibawah artinya berhasil

Screenshot from 2022-06-01 04-02-20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment