This is easier in Linux, where you can install GStreamer libraries and plugins, and compile OpenCV with withgstreamer option enabled to get your job done.But in windows, this becomes trickier as the withgstreamer option is permanently off in OpenCV CMakeFile.
Gstreamer On Windows Install GStreamer LibrariesWhen using my laptop outside, I use a 4G modem with a special APN that is specific to my mobile provider. This APN gives me a unique internet IP that is not shared with others. The webserver holds a queue of commands that the drone receives, like starting and stopping Arducopter, GStreamer, take a still photo etc. I found out that most Huawai modems have a web API that you can call to get a XML document with connection details. It is able to upload commands to the webserver and enables me to easily start and stop functions with a simple button. The program gets the Ground station IP from the webserver, and use that to send the correct command for starting GStreamer so that the drone streams directly to the PC. After about 10sec, they are connected and I start Arducopter with a click, then I can start the video with another click. Med lastVideoMode raspivid -n -t 0 -rot 180 -w 640 -h 480 -fps 30 -b 600000 -co 60 -sh 40 -sa 10 -o - gst-launch-1.0 -e -vvvv fdsrc h264parse rtph264pay pt96 config-interval5 udpsink host localAddress port5000. Low lastVideoMode raspivid -n -t 0 -rot 180 -w 320 -h 240 -fps 30 -b 250000 -co 60 -sh 50 -sa 10 -o - gst-launch-1.0 -e -vvvv fdsrc h264parse rtph264pay pt96 config-interval5 udpsink host localAddress port5000. Gstreamer On Windows How To Achieve ThisI would be very agradesido if I put a guide on how to achieve this. The result is a local wifi network (not connected to the internet) for my RPi Zero, RPi 3 and GCS.This is quite convenient to avoid using 4G for all flights and less complex to set-up but the range is quite poor. I would as well prepare to switch to 4G streaming and telemetry for long range flights. At least to an inexperienced Linux user like me) The added benefit of an onboard router is the option of connecting to the drone with WiFi on close range. In the video, Im not doing this, it is 4G). You also need to deal with reconnects etc in case you loose coverage for a few seconds. To test the connection Ive left the drone in a car while some friends drove around for a day. Ive also tested what happens if you break the connection, by just turning off network on the PC. Gstreamer On Windows Trial Was ReallyIs there something specific with the gpu memory allocation My last trial was really catastrophic in terms of responsiveness of my quad. At the moment it still seems to me kind of a big topic any documentation surely appreciated. Really exciting stuff you have created You have taken drone flight to the next level with Navio2 A really stunning video. With WiFI you should not have any issues with latency, but the range is limited of course, so stay close. These days Im waiting for some parts in the mail In 1-2 weeks Ill make a detailed post with everything. The script that runs on your RPi (included in the files), the server (source code not included here), but server is live.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |