Page 1 of 1

Can someone tell me the role of rw_cache and ro_cache in crazyflie?

Posted: Mon Feb 03, 2020 10:04 am
by LeeNg
I'm a beginner of crazyflie. When I was looking at the example code of crazyflie(https://github.com/bitcraze/crazyflie-lib-python), I'm confused about

Code: Select all

self._cf = Crazyflie(rw_cache='./cache')
What does rw_cache and ro_cache mean? :?:

Re: Can someone tell me the role of rw_cache and ro_cache in crazyflie?

Posted: Mon Feb 03, 2020 10:46 am
by kristoffer
Hi!

The cache is used to store the TOC (Table of Contents) of log variables and parameters.
The TOC is downloaded as a part of the connection sequence and this takes a couple of seconds. If you specify a path when creating the Crazyflie object

Code: Select all

Crazyflie(rw_cache='./path/to/my/cache')
the TOC will be saved to file. The next time you connect, the TOC will be loaded from file instead and reducing connection time.