How to read Crazyflie Distance (With LPS)

All discussions related to the Loco Positioning system
Post Reply
stupid_moron
Beginner
Posts: 22
Joined: Tue Jan 21, 2020 7:05 am

How to read Crazyflie Distance (With LPS)

Post by stupid_moron » Mon Jan 27, 2020 12:03 pm

WIth 6 LPS Anchors configured in TWR, i am able to read the estimate position using the state.estimatex function and logging.

However, if lets say, Anchors still configured in TWR, how to i read the position of the crazyflie to the particular anchor?


Example: (in simplified 2D diagram)
Anchor 1--------------------Anchor 2
| |
| |
| CF |
| |
Anchor 3--------------------Anchor 4

How to I find the distance between Anchor 1 and the Crazyflie (CF)
For my project, I am assuming that the Anchors EEPROM data position are wrong, so i would need to obtaining the individual data distance individually.

I was hoping that this can be done without rewriting the Firmware. If any ideas of which configuration files i should be looking at would be of great help!
My knowledge of Python is at bottom Minimal. Learnt few weeks ago only. ):

Thanks for anyone's help in advance!



kimberly
Bitcraze
Posts: 360
Joined: Fri Jul 06, 2018 11:13 am

Re: How to read Crazyflie Distance (With LPS)

Post by kimberly » Mon Jan 27, 2020 12:32 pm

Hi!

Have you tried looking at the logging data yet? So in the python userguide you can see how you can plot thelogging: https://www.bitcraze.io/docs/crazyflie- ... de_client/

I believe that you need to look at ranging.distance0 .distance1 etc, which should be the distances between the LPSnodes to the crazyflie.

stupid_moron
Beginner
Posts: 22
Joined: Tue Jan 21, 2020 7:05 am

Re: How to read Crazyflie Distance (With LPS)

Post by stupid_moron » Tue Jan 28, 2020 2:02 am

Hi Kimberly!!

Thanks for your great suggestion! That was just what I was looking for! Seems like a stupid question now, as I'd admit that i did not thought of looking at the CF client log. I was scouring throughout the lib files. Feels pretty dumb now.

I have started to code it out and was able to obtain the position. Placing the CF and Anchor0 side by side, it displays a negative value of approx 0.3m constantly. From datasheet, the DWM1000 module presents an accuracy of 0.1m. I was wondering the too large of dfference between the noted values?

Even taking into account both the DWM1000 modules on the Anchor and CF, it should at best have accuracy of 0.2m? (I may be wrong on this)

Any idea?
Meanwhile I shall try to understand the thesis made by jdiep on gitlab on UWB localisation error

Post Reply