LoginSignup
4
1

More than 5 years have passed since last update.

SMART-NAVRTKをRaspberryPiで使う

Last updated at Posted at 2018-07-14

RTKLIB

RTKLIBにはWindowsのほかにLinuxなどのUNIX系向けのソースコードも用意されているため、CUIで使うことは可能なんだけど、やっぱGUIあったほうがいいよね!って場合も多いので探してみたところ、ドローン用?のオープンソースGUIがあったのでご紹介します。

SMART-NAVRTK

インストール

可搬性を考えて、RaspberryPi3にインストールしてみました。
(PizeroWなどにも入れてみましたが、立ち上がりに少々時間かかりました。)

Raspbianの設定は省略

よそにたくさんあるので、Node.jsとnpmを入れるところから書きます。
SMART-NAVRTKに必要なパッケージをインストールしていきます。

参考元:Raspberry PiにNode.jsとnpmの最新版をインストールする

$ sudo apt-get update
$ sudo apt-get -y upgrade
$ sudo apt install -y nodejs npm 
$ sudo npm cache clean
$ sudo npm install npm n -g
$ sudo n stable

permission denyエラーが出たのでぐぐってみた。

npmでpermission deniedになった時の対処法[mac]

$ mkdir ~/.npm-global
$ npm config set prefix '~/.npm-global'
$ vi ~/.profile
export PATH=~/.npm-global/bin:$PATH
$ source ~/.profile

あとは公式のReadmeに従いインストール


$ cd ~/
$ git clone --depth 1 https://github.com/drorgl/SMARTNAV-RTK.git
$ git clone --depth 1 https://github.com/bnoordhuis/gyp.git
$ export GYP_PATH=~/gyp/gyp
$ cd ~/SMARTNAV-RTK/Software/rtklib-smartnav/
$ chmod +x build_linux.sh
$ ./build_linux.sh
$ cp ./build.linux/out/Debug/rtkrcv ./build.linux/out/Debug/str2str ../binary/
$ cd ~/
$ npm install pm2 -g
$ cd ~/SMARTNAV-RTK/Software/webconsole
$ cd RTKLIB-Server
$ npm install
$ cd ..
$ ls
(RTKLIB-Serverだけではなく、RTKLIB-WebConsole,RTKLIB-RTKRCV,RTKLIB-STR2STRもそれぞれcdでディレクトりに入り、npm installする)

$ cd ~/SMART-NAVRTK/Software/webconsole/
$ pm2 start pm2production.yaml

404エラーが出た場合

node-pre-gyp ERR! Tried to download(404):
$ sudo npm cache clean -f
$ sudo npm install -g n
$ npm update -g npm
$ npm update -g

ブラウザで開く

スクリーンショット 2018-07-14 19.23.21_01.png

自動起動

ラズパイ起動と共にpm2でスクリプト起動

4
1
1

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
4
1