venthur / python-ardrone

Python library for the AR.Drone
236 stars 166 forks source link

video does not work #1

Open ij0n opened 11 years ago

ij0n commented 11 years ago

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?

XenGi commented 11 years ago

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?

venthur commented 11 years ago

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.

Sanderi44 commented 11 years ago

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

richardbaronpenman commented 9 years ago

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()
fdelia commented 8 years ago

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