[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] ardrone2 success

From: Ben Laurie
Subject: Re: [Paparazzi-devel] ardrone2 success
Date: Mon, 25 Nov 2013 09:45:22 +0000

On 18 November 2013 15:52, Christophe De Wagter <address@hidden> wrote:
Yes you can stream video from the ardrone while flying with paparazzi. For this you so you do not even need to compile anything and only need the subproject (which is included in ardrone2_vision)


1) install gstreamer with codecs on unbuntu: make install should achieve this (or sudo apt-get install gstreamer0.10-ffmpeg)

2) get all gstreamer files on the drone: make drone (or manually untar arm_light.tgz and mount and start dsp images: see script for details: reboot drone if starting dsp mp4 images fails)

3) start the grabbing + (computer vision plugin) + encoding + streaming on the drone using gstreamer: e.g. gst-launch v4l2src device=/dev/video1 ! videorate ! 'video/x-raw-yuv,framerate=15/1' ! videoscale ! video/x-raw-yuv, width=320, height=240 ! dspmp4venc ! rtpmp4vpay config-interval=2 ! udpsink host= (or your IP) port=5000
should now broadcast camera 1 with mpeg4 encoding to broadcast ip on port 5000

4) start a video client in ubuntu: 
e.g.: gst-launch-0.10 -vvv playbin uri=file:///home/YOURNAME_AND_SUBFOLDER/ardrone2_vision/ardrone2_gstreamer/sdp/x86_config-mp4.sdp

By the way, I found this setup was quite slow and lagged behind the feed. I did this instead, seemed to work better:

gst-launch-0.10 -vvv udpsrc port=5000 caps="application/x-rtp" ! rtpmp4vdepay ! ffdec_mpeg4 ! xvimagesink

Also, to show video _and_ capture it, I did this (needs work: the framerate of the captured video is wrong and also this is probably not the best way to do it, but I found trying to record the mp4 stream direct [i.e. with the tee before ffdec_mpeg4 and no ffenc_mpeg4] resulted in a truncated [possibly single frame?] video):

gst-launch-0.10 udpsrc caps="application/x-rtp,framerate=15/1" port=5000 ! rtpmp4vdepay ! ffdec_mpeg4 ! tee name=x ! xvimagesink x. ! queue ! ffenc_mpeg4 ! filesink location=/tmp/xx.mp4

Finally, a capture from a flight on YouTube: (not quite realtime because of framerate problem).


On Mon, Nov 18, 2013 at 4:17 PM, Ben Laurie <address@hidden> wrote:
Cool, thanks, will try later. Sorry to nag, but ... can I use this to stream video? If so, how?

On 18 November 2013 14:19, Christophe De Wagter <address@hidden> wrote:
sorry, some commits were unpushed


On Sun, Nov 17, 2013 at 7:22 PM, Ben Laurie <address@hidden> wrote:

On 6 November 2013 13:24, Freek van Tienen <address@hidden> wrote:
Yes we are looking into using the DSP. We are currently also busy working on an ardrone2 vision platform, where for example it is possible to make a module for landing on a mark.
We alrready had vide streaming and some basic vision algorithms working, but not in a very nice way. So we are refactoring it, and make it more easy to use.

So is it possible to use it now to do streaming? If so ... how?

Also, it doesn't even build right now, e.g.:

   CC         brightspotdetector_code.o
In file included from brightspotdetector_code.c:15:0:
../../gst_plugin_framework/paparazzi.h: In function 'paparazzi_message_server_start':
../../gst_plugin_framework/paparazzi.h:24:6: error: 'tcp_port' undeclared (first use in this function)
../../gst_plugin_framework/paparazzi.h:24:6: note: each undeclared identifier is reported only once for each function it appears in
../../gst_plugin_framework/paparazzi.h: In function 'TCP_thread':
../../gst_plugin_framework/paparazzi.h:40:48: error: 'tcp_port' undeclared (first use in this function)
../../gst_plugin_framework/paparazzi.h: In function 'paparazzi_message_send':
../../gst_plugin_framework/paparazzi.h:71:6: error: 'tcp_port' undeclared (first use in this function)
brightspotdetector_code.c: In function 'my_plugin_run':
brightspotdetector_code.c:44:20: error: 'counter' undeclared (first use in this function)
make[1]: *** [brightspotdetector_code.o] Error 1
make[1]: Leaving directory `/home/ben/git-work/paparazzi/sw/ext/ardrone2_vision/pprz_gst_plugins/BrightSpotDetector'
make: *** [all] Error 2

And the install appears to not have been coded (from

# Install the vision framework                                                  
def ardrone2_install_vision():
  print 'TODO'


It's still work in progress, and currently doesn't work out of the box but here is the github repository.

2013/11/5 Ben Laurie <address@hidden>
On 5 November 2013 14:32, Freek van Tienen <address@hidden> wrote:
> Nice! Good to hear!
> I'm currently working on the sonar for the ardrone2:
> I've tested it for heights under 4m, but couldn't test it outside yet
> because of the weather. But it should work, and estimates the height under
> 4m much better. Then we can even make it land on sonar height.

Cool. I'll give it a try when I next get a chance.

I think I read somewhere that the ardrone2 has a DSP - have you looked
into using that yet?

Because I've been flying mine from my fields, I've had to use a
platform to launch it from (the grass is too long to do it from the
ground). As it happens, the platform I'm using is a bright yellow
stool. I was wondering if it would be possible to use the camera to
land on it :-) (Just idle speculation really).

On a related note, is it possible to record the video during a
paparazzi flight? And/or view it live?

> 2013/11/5 Ben Laurie <address@hidden>
>> Finally got a chance to test the fixed GPS. Despite quite high winds
>> (forecast says 40 km/h) it all went well, and even landed correctly.
>> Interestingly, the USB stick u-blox GPS, which was horribly inaccurate
>> out-of-the-box, worked perfectly once ucenter was able to correctly
>> configure it.
>> _______________________________________________
>> Paparazzi-devel mailing list
>> address@hidden
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden

Paparazzi-devel mailing list

Paparazzi-devel mailing list

Paparazzi-devel mailing list

Paparazzi-devel mailing list

Paparazzi-devel mailing list

Paparazzi-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]