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

  • @Ben,  the 500mW dongle is on the quad. The 'bulky' setup is mounting a 2nd M5 on the quad.

    The main M5 is mounted on the antenna tracker.     When running with the quad, I connect to the M5 as an ordinary WiFi connection (not MIMO) using the dongle on the quad, You have to configure the M5 to be a normal WiFi access point in that case.   This is the 'non-bulky' setup.   

    If you are using a digital connection, you can simply connect the pixhawk serial port to the Raspberry PI serial port and run MavProxy or Ser2Net to control the quad from MIssionPlanner and it's all over the same wifi link.

  • @Patrick, So would you recommend running a Rocket M5 on the quad and a Nanostation on the ground w/ antenna tracker? Or two Rockets, one on the quad and one on the ground? I've looked over your antenna tracker tutorial and might give that a shot. I'm confused how you connect to the M5 with a dual band dongle and why it is so bulky, the Rocket is much smaller than the Nanostation. And I'm assuming you run the dual band 500mW dongle from the groundstation?

    I'm really liking the idea of using 5.8Ghz to transmit video, because it opens up the capability of running autopilot through Mission Planner on the same frequency in the future.

  • @Ben,  You can use an Android tablet or a Windows tablet/laptop to display the video, or any monitor of your choice that you can connect to the PC.   There is an android version of the HUD posted on the dropbox here:

    https://www.dropbox.com/s/g38tv79z3ey8yks/QtGStreamerHUD.apk?dl=0

    The Rocket M5 is for 5.8GHz, and the Rocket M is 2.4GHz.   The way I use it is different depending on the UAV platform.  For mult-rotor, I connect to the M5 via standard wifi with a dual-band 500mW dongle.  You have to configure the M5 to be a regular WiFi access point in that case (non MIMO).   For the long-range fixed-wing airplanes, like the GoDiscover, I use two Rocket M5 units, configured for MIMO (Ubiquity Airmax TDMA), and a special antenna setup that has two 'skew planar wheel' circular polarized antennas, with one being LHCP and the other RHCP.  This is more complex than the standard WiFI setup, and more bulky, so I don't use it on multi-rotors since the range is typically much less.  I can only fly a couple of miles with the battery on my quad so it's of no use to try the MIMO setup, considering the extra weight. The standard WiFi works just fine, but you will still need the antenna tracker with a high-gain antenna to get beyond about 500 meters. 

    You don't actually need to run MissionPlanner, but you can.  I have an 8-inch Dell tablet that I run with the video on Windows 8, and it works fine, but you can just run the HUD without any GCS software, you just can't control the UAV.

    QtGStreamerHUD.apk
    Shared with Dropbox
  • @Patrick Duffy

    Excellent information thank you. I've been looking into the Ubiquiti hardware you've mentioned, the Rocket/Nano M5. I would want that over the 5.8Ghz if it will be lower latency and better resolution. My last question (hopefully) is how to get that hardware to work with a live feed monitor like the Black Pearl 7" FPV RX, if not, then will a simple 7" android tablet running mission planner do? 

  • @Ben,  Using the analog video out on the PI could work but you will lose resolution.  This is one of the advantages of using GStreamer and a digital link, you can get full HD FPV with reasonable latency.  I have an old setup where I am using 5.8ghz analog video with telemetry over Zigbee 900mhz, and this works but it's inferior to the WiFi setup I am using with the Ubiquity hardware.  The old setup the MiniumOSD board you can buy from 3-d robotics or on Ebay.  The HUD in this blog is designed to use GStreamer with a digital link so I don't think it will be of much help.

  • @Ben 

    Oh you might be able too

    Hadn't thought of that

  • @The Sun

    I may be wrong but can't I use the RPI as a converter to analog out through the 3.5mm composite?

  • @Ben be that compressed by the PI or otherwise

  • @Ben

    You cannot (easily) stream webcam video over an analog 5.8ghz link. It is simply not pragmatically possible.

  • That is extremely impressive for WiFi! I will look into that. I am a bit confused by not needing an RPI however, as I wouldn't be running an OSD on the quad.

    The things I need to do are:

    1. Live feed stream with HUD containing battery voltage, heading, etc. to go from onboard camera to the ground.

    2. Ability start/stop recording and take pictures with the camera remotely via the controller

    3. Something for the webcam to save those files onto for access once it lands.

    I will be using Pixhawk as the flight controller, an AR8000 receiver (w/ PPM encoder), DX8 transmitter, and initially a 5.8Ghz video transmitter. I'd prefer trying to get it all to work with the 5.8Ghz video transmitter because I have both that and a live feed monitor already.

    My reasoning for the RPI is that it seems it has the ability to act as an OSD, record and take stills with the webcam, and save those video/picture files locally onto a USB drive. I don't have a need for running Mission Planner on anything, simply taking telemetry information and overlaying it over the video stream to a monitor on the ground.

    I hope that clears up some confusion. Thanks!

This reply was deleted.