Page 1 of 1

logging during flight with controller

Posted: Wed Jul 07, 2021 1:49 pm
by GriffinBonner
Hello,

I am trying to run a python script that connects to the crazyflie and logs the TOC parameters during flight. I am operating the crazyflie with a controller through the crazyflie client. Is it possible to do both of these things at the same time? Currently I am only able to fly the crazyflie or control it in the client.

Thank you,
Griffin

Re: logging during flight with controller

Posted: Thu Jul 08, 2021 3:56 am
by jonasdn
Hi GriffinBonner!

No, it is not possible to run a logging Python script at the same time aas you are connected with the cfclient. What you can do is use the logging functionality inside the cfclient.

You can setup logging in the client as described in the userguide (scroll to the Logging header): https://www.bitcraze.io/documentation/r ... de_client/


And use the Log Blocks tab to start logging and store to file, as in this userguide:
https://www.bitcraze.io/documentation/r ... locks_tab/

(On my Linux machine the configuration folder is at ~/.config/cfclient/

Hope that helps!

Re: logging during flight with controller

Posted: Mon Jul 12, 2021 12:48 am
by GriffinBonner
So I have one more question, which I was not able to solve on my own about the built in logging framework of the crazyflie client. Currently, I have created a log block of my desired TOC parameters, and I can log them with the client to a .csv file with their corresponding timestamps. The problem is that it seems as if there is no way to enable logging from the time that the client connects to the crazyflie, I need to manually check to "enable" and "write to file" boxes in the logging tab. Is there any way to enable these parameters to be logged from initial connection similar to the battery and other default log parameters used by the client?

Thanks,
Griffin

Re: logging during flight with controller

Posted: Mon Jul 12, 2021 8:44 am
by wydmynd
if you know some python, look at the file headless_client.py
it has the functionality of flying the CF , and you can add your own stuff like logging on top of it
I used it to do all sorts of automations and it was pretty straightforward.