python-ardrone icon indicating copy to clipboard operation
python-ardrone copied to clipboard

video does not work

Open ij0n opened this issue 11 years ago • 5 comments

I have a Ubuntu 12.04 LTS OS with Python 2.7.3 I can fly the drone and this works great.

Sadly psycon is no longer maintained and a dead project. And psycon does not work with Python 2.7, only with Python 2.6

Is there any possibility that this might be fixed in the future? Is there any workaround/fix/solution to this?

ij0n avatar Apr 19 '13 19:04 ij0n

Same here with Archlinux and Debian. Someone has to replace the psyco code with something that is maintained and that works with current versions of Python (2.7, 3.3).

Maybe gstreamer?

XenGi avatar Apr 19 '13 19:04 XenGi

Pypy should be the proper replacement for psyco, but I haven't tested yet if it works with all libraries required for python-ardrone. Running a Python application with pypy is simply a matter of starting it with pypy instead of python:

pypy myapp.py

But I fear pygame is not compatible, so one would have to find an alternative to display the video output.

venthur avatar Apr 19 '13 19:04 venthur

I am using opencv to grab the video and it seems to work just fine. Take a look at my project (https://github.com/Sanderi44/AR-Drone-Fire-Detection) to see how I am doing it. I haven't changed anything in this library, but I would suggest using this simple method for image processing with the AR Drone 2

Sanderi44 avatar Jul 11 '13 18:07 Sanderi44

Also broken for me, but I got it working with opencv:

import cv2
cam = cv2.VideoCapture('tcp://192.168.1.1:5555')
running = True
while running:
    # get current frame of video
    running, frame = cam.read()
    if running:
        cv2.imshow('frame', frame)
        if cv2.waitKey(1) & 0xFF == 27: 
            # escape key pressed
            running = False
    else:
        # error reading frame
        print 'error reading video feed'
cam.release()
cv2.destroyAllWindows()

richardbaronpenman avatar Jun 01 '15 15:06 richardbaronpenman

This still works. One has to have openCv installed/built with ffmpeg (e.g. brew install opencv --with-ffmpeg)

fdelia avatar Jul 09 '16 20:07 fdelia