LoginSignup
3
1

More than 5 years have passed since last update.

RaspberryPi3+Navio2でArdupilotのexampleを動かす

Last updated at Posted at 2018-06-02

はじめに

RaspberryPi3+Navio2でArducopterのexampleをubuntuでクロスコンパイルする方法の自分用メモ。半年くらい前もやったけど一瞬で忘れるので。PCの環境はubuntu16.04LTSです。

環境構築

まず、Ardupilotをクローンして環境変数を設定する。

git clone https://github.com/ArduPilot/ardupilot.git
cd ardupilot
git submodule update --init --recursive
export PATH=/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin:$PATH

次にwafを使いやすいようにコマンドにして、ボードをNavio2に設定する。

alias waf="$PWD/modules/waf/waf-light"
waf configure --board=navio2

更に、適当な/librares内にあるexampleを指定してコンパイルする。

waf build --target examples/INS_generic

/build/navio2/example内に実行ファイルができるのでこれをsshでraspberrypiに転送。

rsync -avz $ARDUPILOT/build/navio2/examples/INS_generic pi@192.168.13.6:/home/pi/

最後にraspberrypiにssh接続で入って実行する。

参考

https://docs.emlid.com/navio2/common/ardupilot/building-from-sources/
http://ardupilot.org/dev/docs/learning-ardupilot-the-example-sketches.html

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1