3689624585?profile=original

This blog is a continuation of my previous post.

How to build a High-Definition FPV UAV using a Rasperry PI with HD camera, using a high speed WiFi link

This post will discuss how to use GStreamer and Mission Planner together to display the HD video with a HUD (Head-Up-Display).

Note: I have only tested this feature on Windows so the instructions given here are for Windows only. 

To give proper credit, the HUD created here was borrowed from APM Planner, a Qt-Based app similar to Mission Planner. The HUD part was created from the Qt codebase QML HUD created by Bill Bonney who is on the APM Planner development team. To make the HUD work with the background video, I used a GStreamer library called "QtGStreamer" which integrates GStreamer plugins with painting on a Qt widget.  This library is available on the GStreamer website.

The end-result is dynamically added to Mission Planner using the plug-in architecture. 

In the previous posts I discussed used a Raspberry PI and a High-speed WiFi link using GStreamer on the PI and the ground station PC.  To get the HUD to work, you need to already have a successful link with the video on your ground station. 

Here are the steps to follow to install the plugin:

1) Install Mission Planner.

2) Download and install GStreamer from this link.  Use the x86 version, the x86_64 version will NOT work. (Use the default path 'C:\GStreamer' when installing). When installing GStreamer, select 'Custom' install and select ALL plugins to be installed.

3) Follow the steps in the previous blog noted above to get your video stream working.

4) Download and the MSI installer from this link. and run the installer.

If all went well, you should have the plugin installed.

Open Mission Planner and navigate to the "Flight Data" page and right-click on the map. You should see a menu item called "GStreamer HUD" as shown below:

3689624376?profile=original

Select this menu item and the following screen should appear:

3689624624?profile=original

In the upper-left corner is a context menu. Here is where you enter your GStreamer Pipeline string. If you had the video displaying without the HUD using a valid pipeline, enter it here.

Note: The GStreamer Pipeline string should be exactly the same as the string you used before, but WITHOUT the final video sink element. The video sink is the QtGStreamer element which will be added automatically by the plugin. The GStreamer pipe should therefore be the same, except remove the last element for the video sink.

Here is an example string I used on my setup:

udpsrc port=9000  buffer-size=60000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! queue ! avdec_h264

If all is well, you can connect to your UAV and see the HUD elements moving.  To change the HUD, right click on the display and select which elements you want to display. The default is to display everything shown here. 

If anybody has problems, please post back and I'll update the blog in case I missed something, and you cannot get it to work.

Happy Flying!

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Dude, you rock!!! Can't wait to try this out. What are you using to decode the MAV? Any chance of putting this on Github so I can do some interface mods?

  • FYI,  I have posted a new version of the HUD which is a stand-alone app (100% Qt). You no longer need Mission Planner to use the HUD.  Here's the link to download: https://www.dropbox.com/sh/5ys4jbvdgxg09cb/AABCm-OIjh5NI4WTDnr6KNw4...

    I currently have Windows and Android working (yes you can run the HUD on your smartphone!).  I have tried it on my Nexus 6 Android phone and the performance is not too bad, about 300ms latency, but for a phone, that's pretty good.  Eventually, I'll have a build for Mac and Linux.  The current post is for Windows.

    You can still use the old one, but they can't exist on the same system.  This is a beta release so I would appreciate any feedback and bug reports.  

    To use the HUD, you will need to supply the correct GStreamer pipeline string, (same as old HUD), but you need to also supply the connection to the UAV, serial, UDP or TCP.   

    By default, the HUD will listen on UDP port 14550 (the default MavLink port), so if you configure MavProxy to send packets to your machine on that port, it should just work.

    Have fun!

    GStreamerHUDApp
    Shared with Dropbox
  • @Tommy, I am trying to test my setup with LTE and was wondering which LTE dongle you used. I have ordered Huawei E373 which supports band 4 and 13 but it seems that AT&T does not have band 4 coverage around me. It is on band 17

    Thanks

  • @Tommy, thank you so much~~~~ It works ^^. Thanks again~~

  • Ahhh you need to instal DNS tools.

    sudo apt-get install dnsutils

  • @Tommy, sorry again ^^; Error again as followed

    ./ddns.sh: line 3: dig: command not found

    WARNING: erroneous pipeline: no element "9000"

  • You should of course remove the brackets around your hostname.

    ip=`dig +short krobotics.kicks-ass.org`

  • @Tommy, so sorry but the following error occured. please help me ^^;

    pi@raspberrypi ~ $ ./ddns.sh
    ./ddns.sh: command substitution: line 3: syntax error near unexpected token `newline'
    ./ddns.sh: command substitution: line 3: `dig +short <krobotics.kicks-ass.org>'

    WARNING: erroneous pipeline: no element "9000"

    My script

    #!/bin/bash

    ip=`dig +short <krobotics.kicks-ass.org>`
    echo $ip

    raspivid -t 0 -w 1280 -h 720 -fps 30 -b 1700000 -o - | gst-launch -v fdsrc ! h264parse config-interval=1 ! rtph264pay ! udpsink host= $ip port= 9000

    ddns.sh - a really cool domain parked on Park.io
    The domain name ddns.sh is being parked on Park.io. Contact the domain owner to make an offer right now...
  • #!/bin/bash

    ip=`dig +short <GCS-host-name>`
    echo $ip

    raspivid -t 0 -w 1280 -h 720 -fps 30 -b 1700000 -o - | gst-launch -v fdsrc ! h264parse config-interval=1 ! rtph264pay ! udpsink host = $ip port= 9000

  • Correction ^^

    #!/bin/bash

    ip=`dig +short <GCS-host-name>`
    echo $ip

    raspivid -t 0 -w 1280 -h 720 -fps 30 -b 1700000 -o - | gst-launch -v fdsrc ! h264parse config-interval=1 ! rtph264pay ! udpsink host = ip port= 9000

This reply was deleted.