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

  • @Alp,  the HUD will try to fill the space of your monitor if you select full-screen mode, but if it does not match the input stream resolution, it will scale/stretch the image, which could cause your distorted issue. For 720p, I just set the monitor to 1280x720, and then full-screen and this seems to work ok on my setup.  I usually do not try full 1080p because the extra latency, and my FPV goggles are fixed at 720p. 

  • @Patrick
    Ok, I will try full-screen mode of HUD with 1920x1080 stream. Already my native monitor resolution is 1920x1080

    so, How can I set HUD windows size exactly1280x720 when Im using 1280x720 stream resolution on 1920x1080 monitor? I think HUD windows not resize automatic.

  • @Alp,  The HUD will resize to fit the window you are displaying video, but it should match your input resolution if you go full-screen and the monitor is set to 1920x1080.   Did you try full-screen mode?  

  • @Patrick
    Im using your stand-alone version of the HUD. I have some problem with video proportion and aspect ratio

    1920x1080 stream not showing correct proportion I mean circles looks like ellips. 

    Any idea about that?

  • @jon c,  I would try uninstalling the HUD, and download the latest version from dropbox and re-install. Also I would recommend you use the stand-alone version of the HUD instead of the Mission Planner plug-in. Either one should work, but the stand-alone version has no dependency on Mission Planner.

  • @Kevin,  You can replace the stock dipoles with CP antennas, but the standard dipoles will also work. If you use a CP antenna on the ground you will end up with a 3db loss, but from my experiments, the range is only slightly affected. I would try the stock antennas first if you don't want to spend the money. The ones I use are made by Circular Wirless and are $40 each.   

    There is a blog that Circular Wireless posted on their website where a glider pilot was getting 70km range with an FPV setup using spirals, even without a dish. This was with standard video, not digital HD, but that is an amazing feat, but it shows what you can do with the right antennas.

  • Yeah, I didn't fully grasp how what they were doing is much different than using UDP?

    I'm about to try a setup with a base station using helical antenna and Engenius 5.8.  On the hex will be a plain ole 5.8 Alfa usb dongle on the RPI.  I am still learning about antennas so not sure if I can replace the dual band stock antennas with some CP versions but I was gonna just test it and see.   I have a ubiquity wispstation 5 on my hex now but the power requirements for it made for a complicated setup and was never happy with the mounting options. It works great though!   I'll probably move that to a GoDiscover this summer.

  • @Kevin, very interesting post.  A couple of the assumptions they make are not quite correct. Like this one:

    "Therefore, you would need equally strong transmitters and antennas both on the aircraft and on the ground station"

    You don't need equally strong transmitters. The GCS needs a high-gain antenna and a tracker, and you can have a much weaker transmitter on the UAV and it works.  On my system, I have reached 2 full miles with an ordinary WiFi dongle purchased at frys electronics. I replaced the antennas with circularly polarized versions but made no other mods.  On the ground, I have two high-gain spirals, mounted on a tracker.  

    However, the idea is good, and I may experiment with it. The only drawback is that you cannot use other equipment, such as the Ubiquity Rocket series and take advantage of MIMO / Airmax protocols. 

  • Posting this here as there are attempts at finding alternative ways to send video streams via WiFI hardware.  This might be interesting to some of those in this thread.  https://befinitiv.wordpress.com/wifibroadcast-analog-like-transmiss...

    Wifibroadcast – Analog-like transmission of live video data
    Wifibroadcast is a project aimed at the live transmission of HD video (and other) data using wifi radios. One prominent use case is to transmit camer…
  • @Kyomo Jung,  Yes I have tried the RPi 2.  I have one in my hexicopter and it works great.  Unfortunately, you can't just plug in a PI 1 image, but you have to upgrade.  There is a way to change the boot loader to make it work, but I opted to just download the latest from the repository. The PI2 is much faster, and it boots in about 1/4th the time. I am using it to for FPV with a Logitec C920, and to control a GoPro camera at the same time. You need 3 usb ports to do this, so the PI2 works great. I highly recommend it.

This reply was deleted.