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

  • @Alan,  I suspect your problem is the windows path causing libraries to be loaded from multiple directories.  I suggest that you use the stand-alone version of the HUD and not the MissionPlanner plugin. I no longer use or support the plugin version. The link is here: https://www.dropbox.com/s/ssfxi5kwh93c0iu/GStreamerHUD.msi?dl=0

    GStreamerHUD.msi
    Shared with Dropbox
  • G'day Patrick, have you any experience of this error?
    'The procedure entry point gst_gl_context_use_fbo could not be located in the dynamic link library C:\Program Files (x86)\Mission Planner\lib\gstreamer-1.0\libgstopengl.dll'

    As far as I can work out, libgstopengl.dll is part of the install package for Mission Planner Heads Up Display Plugin. Before installing the HUD plugin, I had a working GStreamer script displaying and saving video from my quadcopter. After installing MP HUD plugin, GStreamer throws this error message and video is not displayed.

    In Mission Planner With MP HUD Plugin installed, I enter a working pipeline and nothing happens - all video buttons (play, pause etc are inactive).

    If I uninstall the HUD plugin, GStreamer works without error - of course, I have no GStreamer HUD to play with in Mission Planner.

    I uninstalled an existing x64 version of GStreamer and replaced with version x86-1.8.1 prior to installing MP HUD plugin (saw your note that it only work with x86 GStreamer on Windows).
    Any help appreciated, it's got me stumped for the moment.

    Mission Planner 1.3.38 build 1.1.5983.12141
    GStreamer gstreamer-1.0-x86-1.8.1
    Windows 10 Pro x64

  • @Ronald,  I usually build GStreamer from source as to get the latest version, so I never relied on the Raspbian version.  I will be posting my own images soon, but glad to hear you got it to work.

  • All working fine now! Key was to check the version of gstreamer included with NOOBS. I also discovered some nice image files at: http://firmware.ardupilot.org/Companion/

    ArduPilot firmware : /Companion
  • Hi Patrick,

    I made several SD images of Raspbian using the current NOOBS and will pass them out to the kids in our Drone Coders Workshop tomorrow. If you get a chance to try on a clean install, please let me know what steps you use and how you overcome errors if any occur. My sense is that the version of gstreamer that now comes with Raspbian is out of sequence with some needed content.

  • If that does not work, try uploading to here: https://github.com/KashmirWorldFoundation/Public.git

  • Please try uploading to here: https://github.com/KashmirWorldFoundation/DaVinciChallenge.git

  • @Ronald, do you have an ftp site I can upload the images? My dropbox account is limited to 2gb.

  • That would be great. We are using 32GB micro SD cards, and my experience with images is that they are as big as the SD cards. 

  • @Ronald,  I can provide RPi raspbian images that have working versions of gstreamer installed if there is interest.  I just installed the latest kernel with the RPi3 and tested it recently.  I am building a quad with the RPi3 using gstreamer and have not had any issues.

This reply was deleted.