Crazyflie does not fly properly

Post here to get support
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Crazyflie does not fly properly

Post by santiagorg2401 »

Hi,
I am currently working on a LPS system (that is already calibrated) but when trying to fly a Crazyflie 2.1 with the example script "niceHover.py" which all it does is taking off and landing, the CF flies away with an aggressive path (totally random) and crashes, I changed the propellers with new ones, I do not know what could be happening, any help will be highly appreciated.
Thank you in advance,
S. Restrepo.
Last edited by santiagorg2401 on Wed Jan 20, 2021 12:00 am, edited 1 time in total.
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

Here a photo of the crash victim:
Image
Video:
https://drive.google.com/file/d/1sQ2f4C ... sp=sharing
Screenshot of terminals:
Image
Attachments
Screenshot from 2021-01-19 15-01-53.png
CF21
CF21
Last edited by santiagorg2401 on Tue Jan 19, 2021 8:24 pm, edited 1 time in total.
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

Also, I tried this code with the Cflib https://gist.github.com/knmcguire/1976e ... 9f83bea86c changing:

Code: Select all

    commander.takeoff(0.3, 0.1)
    time.sleep(6)

    commander.land(0.0, 0.1)
    time.sleep(2)

and it again, fly away very fast and crashes, the LPS is working fine, I checked with cfclient and everything seems working fine, the problem is when flying the CF with ROS or cflib.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Crazyflie does not fly properly

Post by kimberly »

Hi! It seems like it lost tracking once it is in the air. Have you tried just holding it in your hand and move it around and look at the state estimate's position in the cfclient's plotter?

How many LPSnodes are you using, and are you using any other decks than the LPS deck? Do you also know on which controller you are flying as well?
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

Hi,
Which graph is that? LoPoTab2?
I am using 8 LPS nodes, as described here: https://www.bitcraze.io/documentation/t ... ng-system/
At the 1st attempt I used it with flow deck, but after that the LPS deck only.
And I do not know which controller.
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

This is how I set the LPS, it is a cubic 2m x 2m x 2m with 1/2" PVC pipes structure, something I don't understand is that the CF in the screenshot below is on the floor, but the estimator shows that the Z distance is 0.26 meters, is there a way to fix that?
Attachments
Screenshot from 2021-01-20 09-37-37.png
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

Update:
With TWR mode the CF doesn't fly away, it respect the ordered positions whether or not it has Flow deck with LPS, however, It has slightly Z measuring errors, I'll need to fly a 8 CFs swarm, Is it strictly necessary to use TDoA 2?
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Crazyflie does not fly properly

Post by kimberly »

Which version of the crazyflie firmware are you using?

Please check out the CFclient userguide to know how to use the plotter. The log variable you need to look at is: stateEstimate.x/y/z.

The flowdeck performs horribly on black surfaces, whitch goes both the flowsensor and the distance sensor. Make sure that you are using a texture rich surface without any big black patches. I would say that this allone could have caused the fly away

For the height difference, please check out this discussion on github.

Yes, TDOA must be used. TWR will not work with multiple crazyflies
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

Hi,
I am using the 2020.09 for both CF and LPS Nodes.
The CF in the video that I uploaded was in TDoA 2 instead of TWR that was a mistake I made, also it didn't have the flow deck, when I set it in TWR mode, it did the job well.

For multiple CFs I use TDoA 2 as required, but I do not know why it becomes unstable, having more than +-10 cm error, again, I tested it with a code to take off with height 1/2 meter, go up 1 meter (absolute coordinates, hlcommander), then down 1/2 meter and finally landing, and the results were recorded on this video:
https://www.instagram.com/p/CKSU2sSnQ4G ... p4x2ml174c

I'll upload the graph and check the discussion on GitHub when being at the lab in a few hours and I'll submit the news.

PS: I am using the ROS workspace for flying and I didn't use the flow deck anymore.

Thank you for responding this thread.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Crazyflie does not fly properly

Post by kimberly »

Hi,

10 cm error is something that is expected with LPS positioning system. I must say that the space in the flight area that you having is a bit tight for for LPS... but still the crazyflies should be able to fly. It might be that they are flying too close together.

I don't know about the ROS environment myself, but could you find out in which controller you are flying with? Mellinger or PID?

Please give us an update once you have done more investigations
Post Reply