Set up Navio 2 and Raspberry Pi
This guide describes how to set up Navio 2 autopilot and Raspberry Pi computer (or similar) to communicate with web-based ground control station GCS.uno over internet and 4G networks.
Last updated
This guide describes how to set up Navio 2 autopilot and Raspberry Pi computer (or similar) to communicate with web-based ground control station GCS.uno over internet and 4G networks.
Last updated
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.
Ardupilot is configured to stream its MAVLink telemetry messages to local (onboard) UDP port. A small script (written in JavaScript) listens to this UDP port and transmits messages to GCS.uno server. When you open GCS.uno in a web-browser, this telemetry is got from server and rendered to a screen almost in realtime. In opposite direction, you press an action button on a web-page, this magically tranforms to a MAVLink message and reaches onboard autopilot to be executed.
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 arducopter
, arduplane
or ardurover
. Not ardupilot
! Asuming you have arducopter, open config file:
Make sure these line are present or make copy-paste from here:
Save it with Ctrl+X
, y
and restart Ardupilot
Check status
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:
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.
If you have dependency warnings, try to solve them using following commands:
CD to your home dir and clone gst-rpicamsrc (this is a GStreamer wrapper around the raspivid/raspistill functionality of the RaspberryPi):
Compile it:
Test it with Raspicam connected:
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.
Inside drone_board
directory you can find two shell scripts mavproxy.sh
and 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:
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):
The same for Video key (replace abcd1234
):
Check MAVProxy script: