Autonomous room cartography - Flow Deck V2

Discussions about autonomous flight in general, regardless of positioning method
Post Reply
gwt_esteban
Beginner
Posts: 2
Joined: Wed Jun 05, 2019 1:08 pm

Autonomous room cartography - Flow Deck V2

Post by gwt_esteban » Wed Jun 05, 2019 1:19 pm

Hi everyone,

in my internship, i'm working with the Crazyflie2.0 and in particular with the FlowDeckV2. My objective is to create an algorithm in order to generate the 2D-map of a room/building with autonomous movement.
During my first step, I noticed that the hovering of the drone wasn't that stable and I'm having trouble finding how ti fix that. I was wondering if it was possible for the drone to rotate without moving a lot (in order to be precise for the map) such has the hover mod of the client does.
I'm actually using the Crazyflie Python lib to code.

Could you guide me a little, I lost myself in the several topic here.
Thanks a lot !
Esteban

kimberly
Beginner
Posts: 13
Joined: Fri Jul 06, 2018 11:13 am

Re: Autonomous room cartography - Flow Deck V2

Post by kimberly » Fri Jun 07, 2019 7:36 am

Hi Esteban,

Really cool project!

First thing you need to know about the Flowdeck and the optical flow sensor it uses, it is indeed not as perfect as it would be using a MoCap or the lighthouse positioning system. The PMW optical sensor is optical based and therefore has its limitations, so it would be good to read the datasheet (https://wiki.bitcraze.io/projects:crazy ... ds:flow-v2). From my experience, the Flowdeck does not like:
  • Very reflective floors
  • Black or very dark floors
  • Floors without any texture
Although from experience, the latter is usually not a problem as any floor has some imperfections which is usually enough for stable flight. During my experiments with the flowdeck, I was still able to fly over all of the above mentioned conditions with a good performance, the only thing is that the drift indeed was a bit more than usually, but flying closer to the ground seems to solve it.

About rotating on the spot, that's indeed tricky since the optical flow sensor does not detect rotational flow and will therefore react on the residual transitional flow as a result of that. Hovering without changing the heading should be stable but not if you rotate it on the spot. I've tried something like this myself, and I experienced that flying a tiny circle (rotating with a bit of forward motion) instead of rotating is much more stable.

Let me know if any of this helps!

Kimberly

gwt_esteban
Beginner
Posts: 2
Joined: Wed Jun 05, 2019 1:08 pm

Re: Autonomous room cartography - Flow Deck V2

Post by gwt_esteban » Fri Jun 07, 2019 9:14 am

Hi Kimberley,

Okay I managed to run some test (both personal and given ones) and I found that sometimes the drone went crazy and crashed. I couldn't figured why, it may be a reflective or floor color issue. For the cartography I wanted to fly between 1m and 1.5m height in order to avoid furniture detection but I'm afraid that a huge height variation (for example the hover over a table) would crash the drone. Is there a way to keep a height only using the gyroscope and the accelerometer?

Your solution seems more stable but it could be a problem if I want, for example, to get parallel to a wall (thanks to the ToF on the Multiranger deck). I'll let you know how my work progress (it's a short time internship so I will tell it very soon).

Last questions : I don't know where i can modify the PID or get the battery level through the Python API. Is it possible or am I missing something?

Thank you for your fast answer!

Esteban

kimberly
Beginner
Posts: 13
Joined: Fri Jul 06, 2018 11:13 am

Re: Autonomous room cartography - Flow Deck V2

Post by kimberly » Fri Jun 07, 2019 11:44 am

Hi Esteban,

It is a bit trail-and-error, but I haven't found many surfaces it could absolutely not handle. To really do a proper test, you could have the flowdeck with a mocap system, make it fly over different surfaces and see what the readings are compared to the actual (Mocap-based) motion. But that will take a bit of time ;).

Ah like that. Depended on how far of the wall you want to be at, it should not be that much of a problem. Just a 90 degree turn on the spot should be stable enough and should not create more drift than 10 cms I've seen from experience (and that was on a dark floor even), but if you are seeing stability problems, maybe try to reduce the turn rate?

What you can also do, since you are using the multiranger, is to put some kind of "forcefield" around the crazyflie. So if the multiranger detect anything closer than 15 min, the crazyflie will be pushed to the other side, as an extra failsafe :)

About the height, the crazyflie has a barometer! But it's not the best for keeping height, even with the accelerometers fused with it. You can look at this forum topic: viewtopic.php?f=6&t=3444&p=16492&hilit= ... nger#p1649, where somebody tried to use the ToF sensor on top of the multiranger for height control with the ceiling, for exactly the same reason as you mentioned.

About modifying the PID, do you mean modifying the gains? You can set them as parameters: position control is called 'posCtlPid'. You can double check in the cf-client how they are called. You can see here the different functionalities of the python API: https://wiki.bitcraze.io/doc:crazyflie:api:python:index . Also the crazyflie-lib-python github repository should have several examples how to call and set parameters, and how to read variables (see log TOC in cfclient, battery should be pm/batterylevel or something like that).

Hope it helps! We do have quite some information as well on the wiki github and the forum to help you out as well, but yes it might be a bit too much information sometimes (I always use the search function ;) )

Kimberly

Post Reply