Executing pylib script on python client(cfclient)

Discussions about all things Bitcraze
Post Reply
Sexydove
Beginner
Posts: 8
Joined: Wed Apr 25, 2018 10:36 pm

Executing pylib script on python client(cfclient)

Post by Sexydove »

...
Last edited by Sexydove on Sun Aug 11, 2019 1:08 pm, edited 1 time in total.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Executing pylib script on python client(cfclient)

Post by arnaud »

You can write your own tab for the Crazyflie client, there is and example tab in the code: https://github.com/bitcraze/crazyflie-c ... mpleTab.py

There is an old video tutorial that shows how to add a tab in the client, it is outdated for the details (ie. files have moved), but it should give you an idea of the procedure: https://www.youtube.com/watch?v=cutgIMfHwyQ.

For the packet transmision from python, you can look in the source code of the lib, it is pretty easy to find places that send packets. For example the localization module is pretty simple and implements both receiving and sending packets: https://github.com/bitcraze/crazyflie-l ... #L107-L111

I do not understand the question about the logging of the position. Are you referring to update rate or to latency? The rate can be setup up to 100Hz by setting up a new log block. If you want faster than 100Hz you need to write custom code but note that the radio link is limited to about ~800 packet per second each way and that the kalman filter in the Crazyflie is running at 100Hz.
Post Reply