Setup companion computer
How to set up companion computer to communicate with GCS.uno
These guide describes how to setup any Linux-based computer as a companion one. It can either be your laptop or headless Raspberry Pi on the ground or micro-PC onboard.
How it works
Telemetry messages got from autopilot board over serial or USB port, by wires or radio link, then a small script transmits these messages to GCS.uno server. When you open GCS.uno dashboard 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 transforms to a MAVLink message and reaches onboard autopilot to be executed.
Assuming you have your computer running with internet connected and command shell available.
Install MAVProxy
MAVProxy is a fully-functioning command-line GCS for UAVs. It is used to proxy one telemetry source to many different locations. For example, one for GCS.uno script, one for ROS, and another one for QGroundControl in local network.
Follow official MAVProxy manual to install it on your system.
Telemetry source
If companion computer is placed onboard, it likely communicates with autopilot over serial (UART) port. Here is a good example of configuring Pixhawk with Raspberry Pi. Radio modems can be connected either over serial or USB port. Follow modem's manuals to connect it to your computer.
Serial port
Check it with MAVProxy:
This command makes MAVProxy listen serial port 0 for telemetry messages and show autopilot's status messages in console. The same source will be also for a radio modem, connected over serial port.
USB port
Check it with MAVProxy:
UDP port
MAVProxy can also listen to local UDP port:
If MAVProxy successfully connects with your autopilot continue with installing GCS.uno board scripts.
Install additional dependencies
NodeJS
PM2 process manager
Download and install board scripts
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:
Get your drone keys
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
):
Start board scripts
Open mavproxy.sh
file and put in MAVLink source in right way described above:
Then check how it works
If it looks good Ctrl+C
to exit and then run it in background with PM2 process manager:
Now run drone.js
to check connection with GCS.uno server:
If it reports that connection is established, Ctrl+C
to stop and run it again with PM2:
Enable scripts to start on system boot
Enable PM2 to start on boot:
This will prompt a sudo
command which must be copied and executed to enable autostart. Then save list of active processes:
And check it:
Now check your GCS.uno dashboard, you can see you drone's telemetry streaming.
Last updated