Page 1 of 1

Add a logg script for a swarm to cflib

Posted: Thu Oct 21, 2021 10:41 am
by sAz
Hi everyone,

I have been working for a while with a swarm of quadcopters. The task was to test the trajectory flight of multiple Crazyflies conducting formation change while avoiding each other.

In order to evaluate the trajectories, I had to record (log) the position of each Crazyflie during the flight. Therefore, I created a script that logs the position of each Crazyflie, and saves it into a .csv or .npy (or both). On top of that, the user inserts a path to save the files in, if the path does not exist, the program creates the path. The script is not restricted only to logging position, but the user has to insert the log variables.

I could log the position of up to 16 Crazyflies (flying at the same time). I did not test it with more Crazyflies due to room constraints, but I think it is possible to work with more Crazyflies.

My question is: is this something that exists already (I couldn't find anything similar, but maybe I have missed something)? If not, maybe we can add it with a git pull request? I thought maybe other users are looking for a feature for logging variables from multiple Crazyflies too.

The following solutions are used in my script: first question and second question

Re: Add a logg script for a swarm to cflib

Posted: Mon Oct 25, 2021 12:37 pm
by kristoffer
Hi!

There is an example in this script https://github.com/bitcraze/crazyflie-l ... equence.py

It is only for one Crazyflie but is fairly simple to extend to a swarm using the Swarm class.

If you think your script would be useful to other users feel free to open a pull request. We'll check it out.