Page 1 of 1

How to read position data in real time

Posted: Wed Jan 15, 2020 6:03 pm
by stanbaek
I am trying to read the position of a crazyflie from LPS and/or estimated position data from Kalman Filter. Can anyone tell me how to read the position data using crazyflie-lib-python or whoenig's ROS package? Thank you

Re: How to read position data in real time

Posted: Thu Jan 23, 2020 10:17 am
by kimberly
Hi!

In the crazyflie python library https://github.com/bitcraze/crazyflie-lib-python, in examples/basiclog(sync).py, you can see how you can read the log data in your script.

So the log data you want, and should change to in the python script, is described as: kalman.stateX, kalman.stateY and kalman.stateZ (which is setup here in the firmware: https://github.com/bitcraze/crazyflie-f ... #L713-L715)

Hope this helps!

Re: How to read position data in real time

Posted: Fri Jan 24, 2020 7:40 am
by kimberly
oh yeah, forgot to mention is that you can also ofcourse use the cfclient's plotter by adding the kalman logging variables to your setting/logging configuration. Might be sufficient for what you want to do