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

  • @Tobias
    Actualy I want to use Headplay HD Goggles by Rangevideo. Its only has HDMI input for digital video.
    I think RPI2 and gpu acceleration supported video player (such as omxplayer,vlc etc)can handle it.

  • @Alp,  I have tried using the PI to decode the H264 stream, but my results were the same as you describe, but I have not tried using the PI2, which is much faster.  I have settled into using a moderately quick laptop as my GGS, which also is used to display the video/HUD. I then connect to the laptop with a pair Sony wireless HD video glasses for FPV, and that works really well, so I have not had the motivation to do any experiments with other setups. 

  • the wifibroadcast project is using the PI also as display device. I think the trick is to use the GPU for the decoding. befinitiv has made a modified hello_video that will decode the H264 stream on the GPU and output on HDMI. In principle it should be possible to do the same for this 'normal wifi hd streaming' project. With the view to use Patrick's Gstreamer HUD I bought a cheap £50 windows10 tablet as display device... I just saw that the beta version of Tower now also supports custom gstreamer input. https://github.com/DroidPlanner/Tower/wiki/Custom-video-stream

    DroidPlanner/Tower
    Ground Control Station for Android Devices. Contribute to DroidPlanner/Tower development by creating an account on GitHub.
  • @Patrick
    I saw ampedwireless.com's products. Cool enough.
    I hope, I will share some pictures and spec of my project with you on next week.

    By the way, did you try Raspi to Raspi  gstreaming before? I have tried but my result is too bad. very slow, bad video quality etc.

    http://ampedwireless.com/
  • @Alp, I have not used any WiFi boosters on a multi-rotor, just the fly wing. For the multi-rotor, I have enough range without it. I can get 2+ miles using the NanoBeam/Amped Wireless ACA1 combination without any boost, but you do need a tracker. For a 15 to 20 minute flight, this is generally enough for multi-rotors. The size/weight is ok for the planes, but not practical for copters. 

    For the stream-to-file, one thing you have to be careful about is the 'end-of-stream' indicator that needs to be written to the file. This is the EOS signal that marks the end of the video. When you are recording 'live' there is no end until you stop the stream manually. Without the EOS, the correct headers are not written to the file, and you can't play it back. If you are using the GStreamer HUD, you have to hit the 'stop' button on the dropdown to get the EOS signal and then the headers are correctly written to the file.  Let me know if this works for you.

  • Yes, I have found alot of wifi booster too. All of them huge size and not suitable for multicopter usage in my humble opinion. I have shrinked all items in the 90 x 60 x 30mm box and its aprox. 115gr  
    I mean RASPI2 + PiCam + 802.11a with dual 5 dBi antenna in the same box ;)

    By the way I dont save any stream to file yet. I think, Im using wrong path for files

  • @Alp.  I have uesd this adapter to boost the signal to the 33dbm range:

    http://www.amazon.com/Sunhans-SH58G2000-Repeater-Wireless-Amplifier...

    I mounted this on my fixed-wing (go-discover), and have tested to 5 miles line-of-sight.  You have to use an attenuator on your wifi output if you are using anything that outputs more than 100mW.  

  • @Patrick

    Im using ordinary hardware too. RaspberryPI2, Picam, Realtek8812AU chipset etc. I just working on analog RF signal boosting. My plan and target is real 32-33dBm output power for standart 802.11ac 

    All ordinary hardware is cool for my project but Picam is NOT :(

  • @Alp,  What kind of hardware are you working on using? Designing your own? I am using Ubiquity hardware and a couple of high-power WiFi adapters to implement the WiFi setup you are describing. With an antenna tracker and the Ubiquity Nano-beam, I can get several miles range with ordinary hardware you can buy online with no modifications. I would be interested to see something other than the high-dollar HD setups you can buy for FPV, but the solution I am using is much less expensive. 

  • Thank you very much Patrick, I'll try and inform you. 

    By the way, Im actualy a hardware designer and Im working on a 802.11ac based HD Link project. Can I call you again some software question and support :) Its just a non profit making, an open source project

This reply was deleted.