I am currently coding the Crazyflie to be continuously controlled, but I found that there is a delay between the time the command is sent and when it is actually being executed by the quad itself (I am sending commands to the crazyflie around 20 times per second). I presume this is due to the cache of the crazyflie filling up and not being read at the same rate (possibly due to the 500ms execution time?), and was wondering if there was any way to clear the cache of the crazyflie in Python or somehow reduce that latency? Also, when running the program (on different computers with different dongles/crazyflies), I found that there were cache-related errors such as "WARNING:root:[2]: Was expecting 22 but got 17" and "WARNING:cflib.crazyflie.toccache: Could not save cache, no writable directory" that occurred in groups of 5-10 (in a row) occasional throughout each iteration of the program that might be possibly related.
This is most likely dues to a caching in the python lib. There is a queue in radiofriver.py:122 https://github.com/bitcraze/crazyflie-c ... er.py#L122, if packets accumulates in this queue it could generate the latency you are observing.
As for the warnings it look like you are not running the latest firmware. Try updating the Crazyflie firmware and it should be solved.
Thank you for you answer,as you said ,if we can not use this function ????how can we kown the sensor is flat or may be no ? and i can't find any code about the associated with data fusion ,like complementary or KF .As you kown ,i am a noob.so Thanks for you again