logging during flight with controller

Discussions and questions about the Crazyradio
Post Reply
GriffinBonner
Beginner
Posts: 19
Joined: Thu Oct 08, 2020 2:45 pm

logging during flight with controller

Post 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
jonasdn
Member
Posts: 51
Joined: Mon Mar 01, 2021 3:13 pm

Re: logging during flight with controller

Post 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!
GriffinBonner
Beginner
Posts: 19
Joined: Thu Oct 08, 2020 2:45 pm

Re: logging during flight with controller

Post 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
wydmynd
Member
Posts: 81
Joined: Thu Dec 06, 2018 9:25 am

Re: logging during flight with controller

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