This is a new Android App for running a Heads Up Display on a SmartPhone or table computer or Windows. It's available on the Google Play store at https://play.google.com/store/apps/details?id=org.qtproject.qtgstreamer
If you want to side-load, I have posted a free version on dropbox at https://www.dropbox.com/s/g38tv79z3ey8yks/QtGStreamerHUD.apk?dl=0
There is also a windows version available at https://www.dropbox.com/s/km52szl7ghdo15a/GStreamerHUDApp.msi?dl=0
This app will overlay the HUD on a video stream using GStreamer, or you can run the app without video with a normal HUD.
The App will automatically listen for a MAV-Link data stream on UDP port 14550, the default UDP port for MAV-Link. You can also configure the app to use TCP, and on windows you can connect directly to a serial port.
If you want to display data on a ground station PC and the App at the same time, you can use MavProxy to split the UDP stream, and then connect to your UAV using Mission Planner.
Here is a sample command that I use to split the data stream with MavProxy:
mavproxy --master=COM5,115200 --out=192.168.0.1:14550 --out=192.168.0.126:14550
The ground station PC is at 192.168.0.1, and the SmartPhone is at 192.168.0.126 (on my wifi network). You will have to configure the IP address according to your own WiFi network. My WiFi network in the field is a Ubiquity Rocket M5 configured as an access point, and a second M5 is on the UAV, so I can get live video from the UAV over the same network that connects the smartphone.
For the windows version, you can run the HUD on the same PC as MissionPlanner (or APM Planner), and use MavProxy with a different UDP port for the HUD.
If you want to use the video overlay, you will need to have a valid gstreamer data stream running, either over UDP or TCP. For my setup, I am using a Raspberry PI streaming H264 over UDP using this command on the PI:
raspivid -t 0 -w 1280 -h 720 -fps 40 -b 4000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse config-interval=1 ! rtph264pay ! udpsink host= $1 port=9000
The "$1" argument is the IP address of your GCS or SmartPhone/Tablet PC. This command is for 720p, but you should consider the resolution of the device and adjust accordingly. It makes no sense to send a 720p video to a phone with a 800x600 display.
In the HUD, configure the gstreamer pipeline with this string:
udpsrc port=9000 buffer-size=60000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! queue ! avdec_h264
Do not include a video sink element, as the App will add this dynamically. You can change the port to whatever you wish as long as your PCs do not have a firewall blocking the port.
Another thing to consider is the processing power of your device. If you see a lot of pixelation, your device is too slow, so you will need to change the resolution of the transmission and/or the bitrate. Some smartphones are just too slow to display the video at full resolution. I have tested 720p on my Google Nexus 6 and it works fine, but on a cheap tablet PC, I had to slow it down and switch to 800x600.
The App is easy to setup, however if you have any questions or issues, please send me feedback.
Happy Flying!
Comments
@RogerCon, I use a tee to record the video, so splitting the stream should work. Here is the pipeline I use:
udpsrc port=9000 buffer-size=60000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! tee name=record ! queue ! avdec_h264 record. ! queue ! mp4mux ! filesink location = /temp/fpv.mp4
To get it to record, you have to hit the 'Stop' button on the toolbar, otherwise, the stream never gets the EOS signal and the MP4 headers are not written to the file and you cannot open them. Give this a try and let me know if it works. It works for me.
I have posted the source for Android, and I will be posting the Windows version in a couple of days.
When you say make the screen smaller, do you mean the HUD elements?
Some messages should be displayed, like alarms, there is a level check before they get displayed, and I think the default is 3. I'll add an option for changing it.
As for the customization of the UI, that's the plan, but the current API does not capture all the Mavlink items into the data structure so more items need to be added in code. The classes were borrowed from QGroundControl, but eventually, I want to make a user-selectable way of adding items dynamically with a 'drag and drop' mechanism.
Works like a charm on my w7 machine. Well done!
We log every flight so we use tee and filesink while watching the stream, ive tried to add filesink but it didnt work
Would it be hard to add ?.
Are you going to release the source?
if not here is a wishlist.
-Be able to make the screen even smaller
-Include warnings/failsafe messages.
-Add more selectable mavlink data
@Bill, here's the link to the source: https://github.com/pnduffy/QtGStreamerHudAndroid
I don't have the build instructions yet, or a CMake configuration that sets up all the dependencies. The dependencies are: GStreamer for Android, (GLib), QtGStreamer (I had to build this custom for Android) , the Android NDK, Boost for Android, Qt for Android ARMv7. You can get the GStreamer and QtGStreamer libraries from gstreamer.freedesktop.org.
@Bill, I'll post it later today and send you a link.
@RogerCon, It's no problem to build an xp version. I just needed to download the platform toolkit for VS2012 to support xp. I'll post it later as soon as I can build/test.
Patrick: If it is not too much hustle it would be great!, otherways ill have a reson to upgrade:)
Superb!
@RogerCon, it would appear that it won't run on XP. I'll see what I can do to fix this. It's not the compiler but the platform toolset.
@RogerCon, I downloaded the windows version and it worked ok on my windows 8 machine. I would try downloading again and let me know if it still fails. Make sure you get the msi version and not the apk (android) installer.
-
3
-
4
-
5
-
6
-
7
of 7 Next