Add a logg script for a swarm to cflib

Firmware/software/electronics
Post Reply
sAz
Beginner
Posts: 27
Joined: Wed Jun 10, 2020 5:35 pm

Add a logg script for a swarm to cflib

Post 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
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Add a logg script for a swarm to cflib

Post 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.
Post Reply