Page 1 of 3
Crazyflie does not fly properly
Posted: Tue Jan 19, 2021 4:58 pm
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.
Re: Crazyflie does not fly properly
Posted: Tue Jan 19, 2021 5:02 pm
by santiagorg2401
Here a photo of the crash victim:
![Image]()
Video:
https://drive.google.com/file/d/1sQ2f4C ... sp=sharing
Screenshot of terminals:
![Image]()
Re: Crazyflie does not fly properly
Posted: Tue Jan 19, 2021 6:52 pm
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.
Re: Crazyflie does not fly properly
Posted: Wed Jan 20, 2021 7:51 am
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?
Re: Crazyflie does not fly properly
Posted: Wed Jan 20, 2021 2:26 pm
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.
Re: Crazyflie does not fly properly
Posted: Wed Jan 20, 2021 2:42 pm
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?
Re: Crazyflie does not fly properly
Posted: Wed Jan 20, 2021 3:58 pm
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?
Re: Crazyflie does not fly properly
Posted: Thu Jan 21, 2021 6:58 am
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
Re: Crazyflie does not fly properly
Posted: Thu Jan 21, 2021 11:57 am
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.
Re: Crazyflie does not fly properly
Posted: Fri Jan 22, 2021 7:40 am
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