I've been setting up the 3DR solo drone for the past 2 weeks. I must say, why is it so hard to acquire the camera. There is so many people trying and asking in the forums. Can't we just have 1 working exemple?? That VCL solution is just not what we need. Can't you split the video feed pipe in 2 ? One for the Android app and the other for whatever needed script\services we can use ?
(documentation forgot to say you need to use netcap first before opening VLC with a specific port: nc 10.1.1.1 5502)
Here is my setup journey for the solo drone. Below that is my problem capturing the /dev/video0.
- Updated to the latest version controller and drone with Android app (2.1.0).
- Installed all the tools on a win10 computer:
- python2.7 + pycrypto2.3-win32 + numpy + git :
pip install dronekit,
pip install dronekit-sitl -UI,
pip install cryptography,
pip install ecdsa,
pip install git+https://github.com/3drobotics/solo-cli
(In the documentation many things are missing like: pip install cryptography, pip install ecdsa and the so hard to find pycrypto for windows)
- Right after, the command "solo info" wasn't working, stalled at "connection...". I had to generate a :
ssh-copy-id -i .ssh/id_rsa.pub email@example.com
(Again, nothing in the documentation)
Here is what I did to setup the drone after using "solo wifi":
(BTW, the wifi security WPA2 doesn't work, but WPA works).
smart install python-opencv
pip install git
pip install requests
RIGHT ! I can start an exemple to test the Video Capture. Nope !!
I tried the examples with
solo script pack,
solo script run from the guides:
Everything pack, then run, then gives an error for a"mavlink" connection.
While packing, OpenCV requirement doesn't exist in the pip libs.... How did you script pack that exemple ??
You need to install the missing gst-plugins manually:
smart install gst-plugins-good-video4linux2
smart install gst-plugins-good-jpeg
smart install gst-plugins-base-tcp
But if you restart the drone, you will lose everything unless you change the file "/etc/rcS.d/s61CleanLibs" and comment this line:
#rm -rf $RWFS/$LIBDIR/gstreamer*
Still, nothing works. So I tried to execute the command manually in a ssh console:
gst-launch v4l2src device=/dev/video0 ! jpegenc ! tcpserversink port=5000 sync=false
urllib.urlopen from the exemple script on my computer
- gst-launch-1.0 tcpclientsrc host=10.1.1.10 port=5000 ! jpegdec ! filesink location=C:\capture1.jpeg
Nothing works. The drone seems to disconnect or kill the gst-lauch after sometimes. No data sent. I think the video feed is locked or something.
Capture 1 frame off the camera to a computer (Client\Server). Nothing more.
Can we have an exemple. 4 Lines, just something that works please ?!