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

  • One other tip (from the gstreamer wiki's) I find useful. When you run raspi-vid (gstreamer) on the Pi, the command window verbose display output includes the string of the caps attributes like this example:

    caps="application/x-rtp\,\ media\=\(string\)video\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H264\,\ sprop-parameter-sets\=\(string\)\"J2QAKKwrQFAe0A8SJqA\\\=\\\,KO4CXLA\\\=\"\,\ payload\=\(int\)96\,\ ssrc\=\(uint\)2527206470\,\ timestamp-offset\=\(uint\)1798340232\,\ seqnum-offset\=\(uint\)15"

    This is the precise string that the Ground Station client PC is looking for. Per the gstreamer instructions, if you copy and paste this caps string into the correct location in the pipeline that you input and run with gst-launch on the client side, your gstreamer session will never fail. Every time you run a new gstreamer session at the Pi, the caps attributes generates a new unique number for the seqnum-offset\=\(uint\)15 (which is 15 in this example). It identifies the stream.

  • Yes I have the Gstreamer at 9000

  • Great! The ports are

    14551 is used by the HUD telemetry

    14550 is used by Mission Planner telemetry

    9000 (or 5000 in my case) is used by the HUD for Gstreamer video 

  • @Robert,

    Yes! Success, I had to hit the wireless and let it load for a few. I will be moving forward with my project now and posting some updates. I so appreciate the input for you and Patrick.

  • My guess is that Mission planner and HUD are both trying to use 14550 so one of them has to fail. If you hit the HUD wireless button it places the HUD on 14551. Try that and then open Mission Planner and connect. It may lake a little more time to load parameters, so give it a few minutes ....

  • Yes Mission Planner is set for 14550 in the connect window.

    Because the HUD worked on start-up and during the mission planner boot up, I did not hit the HUD wireless button, but I can try that later tonight. The telemetry definitely cuts off when I hit "connect" in Mission Planner.  

  • you click on the HUD wireless icon button to connect to Mavlink for telemetry, correct?

    and Mission Planner is using 14550 in the MP upper right hand connect menu? I can't tell in your picture with MP above (it is cut off)

  • Yes id did have the -A (it was clipped).

    I think I configured the HUD to use 14551 that is what is in the Mavlink connect field

    3702330596?profile=original

  • and make sure Mission Planner is using 14550

    HUD is using 14551

  • ArduRover -A udp:GCS IP:14550 -C udp:GCS IP:14551

    don't forget the -A

This reply was deleted.