Crazyflie Camera

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
Barry
Beginner
Posts: 28
Joined: Tue Apr 06, 2021 9:19 am

Crazyflie Camera

Post by Barry »

Dear all,

I want to mount a down-looking camera on the Crazyflie, which would not interupt the optical flow sensor.

I want the Crazyflie to track the line autonomously.

Is anyone have some good ideas on which camera I should use or any guideline on how to mount a camera on Crazyflie?

It's better to process the image onboard. Better not to use fpv wifi camera.

Cheers!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie Camera

Post by arnaud »

I am not going to have a straight answer but just a couple of ideas.

There is the ai-deck that we have in early access but it would be grossly overkill for this use-case and so quite expensive.

Otherwise we actually have an esp-eye lying around at the office and we just attached it to a Crazyflie. We will test it tomorrow but such a setup would fit your purpose, the esp32 is poweful enough to implement an on-board line follower. The biggest problem is that there was no IOs easily accessible so we had to patch the power and serial port to a Crazyflie battery holder deck using very thin wires (we patched the serial port from resistors on the ESP-eye and the power on the micro-USB connector...). So another esp32 camera board small enough to fit on the crazyflie but with actual testpoint/pins for connection would have been much better.

We have not tried flying with the esp-eye yet, we will likely try tomorrow, I can update this thread with out result (in theory it should fly without problem... :).
Barry
Beginner
Posts: 28
Joined: Tue Apr 06, 2021 9:19 am

Re: Crazyflie Camera

Post by Barry »

arnaud wrote: Thu Jul 29, 2021 12:53 pm I am not going to have a straight answer but just a couple of ideas.

There is the ai-deck that we have in early access but it would be grossly overkill for this use-case and so quite expensive.

Otherwise we actually have an esp-eye lying around at the office and we just attached it to a Crazyflie. We will test it tomorrow but such a setup would fit your purpose, the esp32 is poweful enough to implement an on-board line follower. The biggest problem is that there was no IOs easily accessible so we had to patch the power and serial port to a Crazyflie battery holder deck using very thin wires (we patched the serial port from resistors on the ESP-eye and the power on the micro-USB connector...). So another esp32 camera board small enough to fit on the crazyflie but with actual testpoint/pins for connection would have been much better.

We have not tried flying with the esp-eye yet, we will likely try tomorrow, I can update this thread with out result (in theory it should fly without problem... :).
So much thanks, arnaud. Please share the result with us if you have time!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie Camera

Post by arnaud »

Hi Barry,

Kimberly flew the Crazyflie with the esp eye on Friday and it does work! The only issue is that the board consumes a lot of energy and so it requires a good well charged battery to be useful at all (we are not sure where the big power draw come from, wifi or camera ...).

The final setup looks like that (in your case you could mount it on the bottom and let the camera face down):
signal-2021-07-30-202727.jpeg
As I noted in my first post though, it would be better to find a board with test-points or pin header since this one was quite challenging to connect to the Crazyflie.
Barry
Beginner
Posts: 28
Joined: Tue Apr 06, 2021 9:19 am

Re: Crazyflie Camera

Post by Barry »

arnaud wrote: Mon Aug 02, 2021 10:05 am Hi Barry,

Kimberly flew the Crazyflie with the esp eye on Friday and it does work! The only issue is that the board consumes a lot of energy and so it requires a good well charged battery to be useful at all (we are not sure where the big power draw come from, wifi or camera ...).

The final setup looks like that (in your case you could mount it on the bottom and let the camera face down):
signal-2021-07-30-202727.jpeg

As I noted in my first post though, it would be better to find a board with test-points or pin header since this one was quite challenging to connect to the Crazyflie.
Wow, thanks arnaud. That looks pretty cool. I have another question. I actually have an AI deck. I think I could let the AI deck camera look down.

So my question is: could you give me some instructions on how to run image processing on the firmware? I used OpenCV to do image processing before. I was new to crazyflie firmware, the overwhelming firmware code makes me confuse. I still have no direction on how to implement it. Maybe you could tell me which cpp file I should look at in detail. Thank you.

Cheers!
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Crazyflie Camera

Post by kimberly »

Hi!

So just to warn you a bit, the aideck is not an super easy product to start out with (it is still in early access as if you have noticed. If you want to run anything onboard, there is no opencv compatibility (there isn't any for the esp eye either).

However, we do have something to get you started on getting to know the AIdeck: namely the Aideck beginners workshop that the PULP platform gave a in April! So that is the obvious place to start.

Eventually you can also setup the wifi example, and do some opencv on the streamed images to get started out, but first of all I recommend you to follow the workshop!
Post Reply