Original docs for configuring Navio 2 autopilot board:
To configure your autopilot you need your board computer to be connected to a wifi network with internet available.
After you set up your drone and can connect with it using regular ground control software (such as QGroundControl or MissionPlanner), there are few steps left to control a drone remotely over 4G networks.
SSH to your board Raspberry and follow next steps.
Depending on what frame you have configured using emlid-tool, the configuration file will be accordingly
ardupilot! Asuming you have arducopter, open config file:
sudo nano /etc/default/arducopter
Make sure these line are present or make copy-paste from here:
Save it with
y and restart Ardupilot
sudo systemctl daemon-reloadsudo systemctl restart arducopter
sudo systemctl status arducopter
It should be active and running:
MAVProxy is used to be able to connect to autopilot using desktop GCS (over onboard or local WiFi) and our web-based GCS simultaneously. It is already installed in Emlid Raspbian image, just check it:
mavproxy.py --master=udp:127.0.0.1:14550 --out=tcpin:0.0.0.0:5762
It should looks like this:
Ctrl+C to exit.
GCS.uno has a video server which can be used to stream realtime RTSP video to your web-based dashboard. Next steps describe how to configure onboard Raspicam camera module.
sudo apt-get updatesudo apt-get install autoconf automake libtool pkg-config libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libraspberrypi-dev gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-bad
If you have dependency warnings, try to solve them using following commands:
sudo apt-get install --fix-broken --assume-yessudo apt-get autoremovesudo apt-get install -f && sudo dpkg --configure -a
CD to your home dir and clone gst-rpicamsrc (this is a GStreamer wrapper around the raspivid/raspistill functionality of the RaspberryPi):
cdgit clone https://github.com/GCS-uno/gst-rpicamsrc.git
cd rpicamsrcchmod +x autogen.sh./autogen.sh --prefix=/usr --libdir=/usr/lib/arm-linux-gnueabihf/makesudo make install
Test it with Raspicam connected:
gst-launch-1.0 rpicamsrc bitrate=1000000 ! filesink location=test.h264
Ctrl+C after 10 seconds and check if file
test.h264 exists and readable. Configuration of video streaming to GCS.uno servers is described in the next steps.
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -sudo apt-get install -y nodejs build-essential
sudo npm install pm2 -g
cdgit clone https://github.com/GCS-uno/drone_board.gitcd drone_boardnpm install
drone_board directory you can find two shell scripts
video.sh which help running MAVProxy and video streaming. If you are sure not to use them, just skip to next step, otherwise make them executable:
chmod +x mavproxy.shchmod +x video.sh
Sign in to your GCS.uno dashboard, add new drone and get its MAVLink and Video keys.
Then put them in following commands to be readable by scripts. For MAVLink key (replace
abcd1234 with one copied from dashboard):
DRONE_MAVLINK_KEY=abcd1234; echo "export DRONE_MAVLINK_KEY=$DRONE_MAVLINK_KEY" >>~/.bash_profile && source ~/.bash_profile
The same for Video key (replace
DRONE_VIDEO_KEY=abcd1234; echo "export DRONE_VIDEO_KEY=$DRONE_VIDEO_KEY" >>~/.bash_profile && source ~/.bash_profile
Check MAVProxy script: