4 anchors for 2 crazyflie with LPS

All discussions related to the Loco Positioning system
Post Reply
malamaf
Beginner
Posts: 3
Joined: Tue Apr 07, 2020 9:18 pm

4 anchors for 2 crazyflie with LPS

Post by malamaf »

Hello,
I'm student trying to develop a demonstration of 2 autonmous drones with the LOCO positioning system. I am currently limited at 4 anchors. I have 2 questions/issues:

1) To be able to control 2 crazyflies, do I necessarly need to be in TdoA mode, and if yes, can I run TdoA mode with only 4 anchors?

2) I am currently testing TWR mode in the cfclient with 1 cf and the Z coordinates are very inaccurate (showing 0.6m to 0.9m when the crazyflie is on the ground which is my z origin). The y is very accurate and the x coordinates are at +/- 0.4m. I find it weird that the accurency is totally different for all axes. All anchors are at 15cm from a wall and are placed evenly in the room (one at every corner with 2 at z close to the ground and 2 at z closer to the ceiling)

Would you have an idea of the problem?

thanks a lot!

kristoffer
Bitcraze
Posts: 280
Joined: Tue Jun 30, 2015 7:47 am

Re: 4 anchors for 2 crazyflie with LPS

Post by kristoffer »

Hi!

Yes, you need TDoA and in theory 4 anchors should be enough, but I have never tried it.

We have observed that the Z accuracy is not as good as in X and Y. Most likely it is due to reflections in the floor. You could try to put the CF on a chair and see if it makes a difference.

malamaf
Beginner
Posts: 3
Joined: Tue Apr 07, 2020 9:18 pm

Re: 4 anchors for 2 crazyflie with LPS

Post by malamaf »

Thanks for your quick answer Kristoffer!

I have tried to put it on a chair. It seems like the CF sees about the right change of position, put the actual coordinate is still inaccurate. So at the floor it sees 0.4m and on the chair it sees 0.8m-1.0m (chair is at 0.5m from the floor). But depending on where the CF is in the room, the z coordinates changes a lot too (goes from 0.4m to 1.0m) without me changing its height.

It is probably linked, but I have also tried this example for a set point with the LPS in TWR mode: https://github.com/bitcraze/crazyflie-l ... osition.py
I tried to just make it go 0.5m up, but the CF systematically goes all over the place (it's not even drifting it goes fast right into the other corner of the room).
I tried to set its original position at its real coordinates, then I tried to set its original position at the coordinates the cf client is giving me, but in both cases it doesn't go up Z axe, but moves in all directions. Any clue what the problem with my LPS could be? Is the problem with the example related with the inaccuracy of the coordinates in the CF client?

Thank you!

kristoffer
Bitcraze
Posts: 280
Joined: Tue Jun 30, 2015 7:47 am

Re: 4 anchors for 2 crazyflie with LPS

Post by kristoffer »

I'm not sure what the problem could be with your system, but there is no point in trying to fly unless you manage to get a reliable position in the LPS tab in the client first. The first thing to check is that the configured anchor positions match the real physical positions of the anchors.
The LPS tab is usually a good help to see if anchor positions seems to be right, and how the estimated position moves when you move the Crazyflie around. (Remember to always start it facing the positive x direction)

I have not had access to our flight lab for a while, but today had, and I tested to run the system in TDoA3 with only 4 anchors and it seemed to work pretty well :-)

malamaf
Beginner
Posts: 3
Joined: Tue Apr 07, 2020 9:18 pm

Re: 4 anchors for 2 crazyflie with LPS

Post by malamaf »

kristoffer wrote:
Tue Apr 14, 2020 1:02 pm
I'm not sure what the problem could be with your system, but there is no point in trying to fly unless you manage to get a reliable position in the LPS tab in the client first. The first thing to check is that the configured anchor positions match the real physical positions of the anchors.
The LPS tab is usually a good help to see if anchor positions seems to be right, and how the estimated position moves when you move the Crazyflie around. (Remember to always start it facing the positive x direction)

I have not had access to our flight lab for a while, but today had, and I tested to run the system in TDoA3 with only 4 anchors and it seemed to work pretty well :-)
Thanks for that, I'm more optimistic I'll make it work with 4 anchors! :) Could you please share with me what your set up looks like with 4 anchors (what are their positions and what does the room looks like approximatly).

Also, did you try TWR and TdoA2 mode? If it works in one mode is it suppose to automatically work in the other mode? (In my case, I get OK coordinates in TWR mode and total nonsense coordinates in TdoA2..)

Thanks a lot!

kristoffer
Bitcraze
Posts: 280
Joined: Tue Jun 30, 2015 7:47 am

Re: 4 anchors for 2 crazyflie with LPS

Post by kristoffer »

Thanks for that, I'm more optimistic I'll make it work with 4 anchors!
Yes, now you know it is possible :-)

I did not try in TWR or TDoA2, only TDoA3. TWR is more robust (from geometrical properties) and if it works in TDoA it is very likely to work in TWR as well.
TDoA2 and TDOA3 are fairly similar in performance, I don't think there will be a big difference but it is probably a good idea to try TDoA3. The anchor pairs that are used to calculate the TDoA values, as well as the packet rate will be a bit different in the two modes, it might make a difference?

The set up I used was our standard installation in our flight arena (https://www.bitcraze.io/wp-content/uplo ... a_lps2.jpg). The walls and floor are concrete/brick and the room opens up on one side. The flight space is around 7x7x3 meters large and we have one anchor in each corner, close to the floor (about 20-30 cm from the floor and 15 cm from the walls) and up in the truss (all running on full TX power). In this case I only powered 4 of the anchors, 2 on the floor and 2 in the truss. The anchors were placed in opposing corners, with the ones on the floor on one diagonal and the truss ones on the other diagonal. If you look at the anchors from any side, they would form a rectangle.

Post Reply