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

Firmware/software/electronics/mechanics
Post Reply
LeeNg
Beginner
Posts: 1
Joined: Mon Feb 03, 2020 9:57 am

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

Post by LeeNg » Mon Feb 03, 2020 10:04 am

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? :?:



kristoffer
Bitcraze
Posts: 278
Joined: Tue Jun 30, 2015 7:47 am

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

Post by kristoffer » Mon Feb 03, 2020 10:46 am

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.

Post Reply