puku0x / cvdrone

CV Drone (= OpenCV + AR.Drone)
https://github.com/puku0x/cvdrone/wiki/How-to-build
Other
202 stars 94 forks source link

No keys Control #11

Closed tgupta3 closed 8 years ago

tgupta3 commented 10 years ago

i tried compiling the code on ubuntu 14.04, which gets compiled properly. i am also able to obtain a video feed, but it' doesn't accept any key. Nor i am able to takeoff nor i am able to exit. Any solution ?

puku0x commented 10 years ago

Hi,

Thank you for your report.

CV Drone uses OpenCV's key input function, cvWaitKey(), and this function accepts a key when the window which created by OpenCV is foreground.

Please try it with the "camera" window is top-most.

Regards, puku0x

tgupta3 commented 10 years ago

Thanks for the reply, i have made sure that the camera window is the selected one but it still doesn;t work. However when i load a different image from my own computer, and make this window as the active the key control works. Any idea why ?

puku0x commented 10 years ago

Unfortunately, I have no idea why the key input function behaved so strange.

Please check whether the battery is enough to fly (more than 30%) and display the value returned from cvWaitKey().

I will install ubuntu 14.04 and run a CV Drone's sample program later.

Thanks, puku0x

puku0x commented 10 years ago

Hi

It seems there is some error in the function parsing Navdata. The key function worked when I requested the AR.Drone to send the default Navdata.

Please comment out the line 51 in ".\src\navdata.cpp" and uncomment the line 50.

tgupta3 commented 10 years ago

That worked ! May I know what was the issue ?

On 4/22/14, puku0x notifications@github.com wrote:

Hi

It seems there is some error in the function parsing Navdata. The key function worked when I requested the AR.Drone to send the default Navdata.

Please comment out the line 51 in ".\src\navdata.cpp" and uncomment the line 50.


Reply to this email directly or view it on GitHub: https://github.com/puku0x/cvdrone/issues/11#issuecomment-41022555

puku0x commented 10 years ago

Current version of CV Drone seems to cause overflow on Ubuntu 14.04 LTS.

I saw the battery percentage showed in console was always 0% even I used a full-charged battery. Therefore, I think there was a bug in part of parsing Navdata.

Considering the fact that changing it to config:navdata_demo=TRUE solved the key input problem, I think some data in NAVDATA structure except navdata.demo, navdata.vision_detect, navdata.cks was not correct and it caused overflow. NOTE: CV Drone uses config:navdata_demo=FALSE and this means requesting all Navdata

I'm trying to solve it, please wait for the next update.

Thank you, puku0x

puku0x commented 10 years ago

Somehow it solved after I updated all libraries by apt-get update/upgrade.