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:
Select this menu item and the following screen should appear:
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!
Comments
Maybe I could be more descriptive.
I start the G-streamer on the Raspberry & Navio 2
I start the ArduRover with your commands - udp:GCS IP:14550 -C udp:GCS IP:14551 (I put in my IP's)
I start the HUD application
The HUD will start working with a Telemetry feed (so in the image above it was working before I hit connect on mission planner).
Then I start mission planner and hit "connect" and the HUD telemetry will will freeze. The video stream continues to work fine.
It took me awhile to get it set up again. I configured static IPs since I am just working on my home LAN. I believe that I am getting very close at least.
these two windows show telemetry is working. Does it crash/freeze after it is working? Did you click on the Connect to Mavlink icon?
Guys I think I got all of the configurations correct, but when I connect Mission planner the telemetry stops feeding to the HUD.
Yes, T
the "sudo" command is executed on the Raspberry PI to start ardupilot
@Steve, there is a text box at the bottom of the UI where you can specify the port. Enter the text "UDP:14551" and it should work.
Patrick & Robert - Thank you for the quick replies. I am going to try Robert's approach first, although I see some great opportunity with the MavProxy approach & video streaming to a larger audience. Quick question how do I change the port to 14551 in the HUD Mavlink?
The "sudo" command is executed on the Raspberry PI which has the Navio & ArduRover in my case correct?
I use 14551 as the port in the HUD MAV-Link connect field.
I don't use MavProxy,
Also you need to ensure that the D3D video window is closed before you open the HUD app video window. Also, I have had to open Mission Planner last, after opening the HUD app.
@Steve, here is how I do this
sudo ArduCopter-quad -A udp:GCS IP:14550 -C udp:GCS IP:14551
@Steve, yes, you can split the UDP stream. One way is using MavProxy. I do this on my own setup. You need to configure MavProxy as the main listener to your stream, and then add the '--out' parameter to your command line with the target you want to use. I use a second UDP port for Mission Planner (14551). Check out the MavProxy documentation.
Another way is to use GStreamer to split the UDP stream, but this is more complex. You need to create a pipeline that splits the source into multiple UDP outputs.
Hi Patrick
I have been able to get The standalone Gstreamer HUD working, and it is great.
However, I still need the functionality of Mission planner for the GPS map overlay and servo controls. They both listen at the same port: 14550 can that be split? Can I run both applications on my Windows laptop?
Thanks