afq984 / pyardrone

Parrot AR.Drone client library for Python 3
http://afq984.github.io/pyardrone/
MIT License
32 stars 5 forks source link

video does not work #19

Open WayneHong0603 opened 6 years ago

WayneHong0603 commented 6 years ago

Hi , I did try this project and it's very good I can control my drone and flying normally but I can't get video from drone may I ask the simple function of code to calling the video from drone?

here is how I'd try: from pyardrone import ARDrone import cv2 drone = ARDrone() cam = cv2.VideoCapture('192.168.1.1:55555') while(True): _,frame = cam.read() cv2.imshow("TEST" ,frame) cv2.waitKey(30)

thank you so much

tretron commented 6 years ago

I came across this issue sometime ago. The camara of the drone only works when the drone has gotten a takeoff signal and is airborn.

nabeelsherazi commented 4 years ago

Thank you for your comment, @tretron! I was going crazy trying to figure out this same issue.

On the same note, it might be possible to rework the code so that video transfer starts as soon as ready, rather than waiting for takeoff. The Parrot FreeFlight app is able to show a video feed before takeoff, so I think it wouldn't be anything in the firmware side. Maybe just moving the start call around. I will take a look at it!