Page 1 of 1

Enabling more than two base stations

Posted: Mon Jun 07, 2021 7:16 am
by droneteamNOK
Hi!
I'm trying to get the crazyflie2 to use at least four basestations so that I can track its position in a bigger area compared to when using two basestations. I have gotten it to function as supposed to with two basestations, however I am stuck on how to proceed from here.

From what I've gathered on the forums, using more than two of them should be possible with some modification of some code, as said here: viewtopic.php?f=20&t=4835 . Also the system_overview.md -file says: The ```PULSE_PROCESSOR_N_BASE_STATIONS``` (in pulse_processor.h) determines the number of base stations that are handled by the system and can be increased by brave users.

I have located the #define PULSE_PROCESSOR_N_BASE_STATIONS -part of the code in pulse_processor.h and changed it from 2 to 4, but the cfclient still only displays two basestations. How should I proceed with this?
Thanks! :D

Re: Enabling more than two base stations

Posted: Mon Jun 07, 2021 2:09 pm
by kristoffer
Hi!

Some parts of the client should handle 4 base stations without problems while some parts don't, just use channels 1, 2, 3 and 4. I don't think it will crash but all information may not be displayed for all base stations. The 3D view should work but the base station status boxes only supports 2 base stations I believe.
The main obstacle for you will be that the base station geometry functionality only supports 2 base stations and that you will have to figure out a way to calculate the full pose of all base stations for the system to work.

Another issue is overlap of base stations in one point. Two base stations is fine but we have not really tested more than that and we are unsure about how the system degrades with increasing numbers.

Re: Enabling more than two base stations

Posted: Wed Jun 09, 2021 5:57 am
by droneteamNOK
Thanks for the reply!

First off I would like to clarify that I am planning to spread the base stations out so that (at least most of the time) the drone would only receive data from two base stations, like demonstrated in this video: https://www.youtube.com/watch?v=gQkrPM6UUbs

Secondly, I found this thread viewtopic.php?f=20&t=4668&start=10 on the forums where someone had managed to get the cfclient to display 8 base station status boxes, so it seems to be possible to do somehow. Would you have any idea on how to do that? I thought just changing the # of PULSE_PROCESSOR_N_BASE_STATIONS would do the trick, am I doing something wrong?

Cheers! :)

Re: Enabling more than two base stations

Posted: Wed Jun 09, 2021 6:13 am
by kristoffer
I assume cafeciaojoe updated the client, it only supports 2 base station status rows.

You can find the code here if you want to play with it https://github.com/bitcraze/crazyflie-c ... #L616-L651

Re: Enabling more than two base stations

Posted: Thu Jun 10, 2021 8:09 am
by droneteamNOK
Alright thanks, I'll look into it.

Also I have come across another problem that I can't seem to solve. How can I make the crazyflie 'forget' about the basestations? It currently detects basestations 1 and 2. I tried turning them off and turning 3 and 4 on, didn't help. I even flashed the drone with both Visual studio with the make commands and using the cfclient but it still insists on looking for bs1 and 2. Any hints on how to change this?

Re: Enabling more than two base stations

Posted: Thu Jun 10, 2021 9:11 am
by kristoffer
How can I make the crazyflie 'forget' about the basestations?
The base station information (calibration and geometry data) is stored in the persistent memory in the Crazyflie and unfortunately there is currently no easy way to erase this. The data should not do any harm, it is only used if the crazyflie receives light from those base stations. Any new data (for instance calibration data read in the light sweeps for a new base station) will overwrite the current data if different. I don't think there is any need to erase it, but maybe I'm wrong?