Page 1 of 2

Camera controlled crazyflie

Posted: Sun Apr 12, 2015 8:29 am
by peterh
Hi all,

Just wanna share with you guys, I have done a project using iMac's camera with OpenCV to control crazyflie's hovering(Thrust/Pitch/Roll). There are only three degree of freedom being controlled at the moment but the result is satisfying. check this out.https://www.youtube.com/watch?v=gfc48-1UA7w

Re: Camera controlled crazyflie

Posted: Sun Apr 12, 2015 12:59 pm
by niklas
Looks great !!!

Do you want to share the source code? would love to test it.
Do you try to control the z-depth from the camera somehow? Kinect 2 gives would give a good reading on the depth?

Re: Camera controlled crazyflie

Posted: Mon Apr 13, 2015 10:57 am
by peterh
The code is not ready to be public yet, as I am still working on a better algorithm to track the file other than color detection. But I will definitely share my code once it is ready. Yes, I only use One camera to track it including depth calculation. I think kinecct will definitely give you better depth detection than I did. I think it is actually using two cameras.

Re: Camera controlled crazyflie

Posted: Tue Apr 14, 2015 6:45 am
by arnaud
This is so great!

I have been meaning to try that for a while but never got the time. I can't wait for the code and to play with it.

I like the idea of the two camera: it would be cheaper and easier than a kinect (well easier for the hardware part, for the software you will need to calibrate a bit the setup I guess).

What is the framerate of the webcam, 30fps?

Re: Camera controlled crazyflie

Posted: Wed Apr 15, 2015 11:17 pm
by peterh
yes, fps is 29.97, I think higher frame rate is really significant to the performance of stabilization as the higher sampling rate gives better tracking result and responsive command sending to the flie

Re: Camera controlled crazyflie

Posted: Sun May 10, 2015 10:27 am
by peterh
Here you go, for those whoever interested in this project I am sharing my code: https://bitbucket.org/flightdynamics/detection.git
and the latest video on youtube https://www.youtube.com/watch?v=gsH1JjfWzX0

Re: Camera controlled crazyflie

Posted: Tue May 19, 2015 6:58 pm
by deathbrad
Hi,

I am trying to build project but I encounter some problems
Could you say what are your Xcode and Osx version ?

Thanks

Re: Camera controlled crazyflie

Posted: Thu May 21, 2015 6:55 am
by peterh
Hi, I run it on Mac10.10 and Xcode 6.

Re: Camera controlled crazyflie

Posted: Thu May 21, 2015 7:46 am
by deathbrad
Hi

I get this error :

CFRadioController.h :
Lexical or Processor issue
"thread not found"
In the file include from /Users/.../flightdynamics/CameraDetection/CFRadioController.cpp:10:

I am running on OSX 10.10 and xcode 6.3.2

Re: Camera controlled crazyflie

Posted: Thu May 21, 2015 11:11 pm
by peterh
I think its to do with your firmware, This radio C+= library looks like it is not being actively maintained, if you are using crazyflie1.0 maybe fall back to old version firmware, I use late 2014 or early 2015 without problem.