How to read position data in real time

All discussions related to the Loco Positioning system
Post Reply
stanbaek
Beginner
Posts: 3
Joined: Mon Jan 13, 2020 4:52 pm

How to read position data in real time

Post by stanbaek » Wed Jan 15, 2020 6:03 pm

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



kimberly
Expert
Posts: 167
Joined: Fri Jul 06, 2018 11:13 am

Re: How to read position data in real time

Post by kimberly » Thu Jan 23, 2020 10:17 am

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!

kimberly
Expert
Posts: 167
Joined: Fri Jul 06, 2018 11:13 am

Re: How to read position data in real time

Post by kimberly » Fri Jan 24, 2020 7:40 am

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

Post Reply