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!
Enabling more than two base stations
-
- Beginner
- Posts: 5
- Joined: Fri Oct 23, 2020 8:25 am
Enabling more than two base stations
Last edited by droneteamNOK on Tue Jun 08, 2021 6:01 am, edited 1 time in total.
-
- Bitcraze
- Posts: 630
- Joined: Tue Jun 30, 2015 7:47 am
Re: Enabling more than two base stations
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.
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.
-
- Beginner
- Posts: 5
- Joined: Fri Oct 23, 2020 8:25 am
Re: Enabling more than two base stations
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!
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!
-
- Bitcraze
- Posts: 630
- Joined: Tue Jun 30, 2015 7:47 am
Re: Enabling more than two base stations
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
You can find the code here if you want to play with it https://github.com/bitcraze/crazyflie-c ... #L616-L651
-
- Beginner
- Posts: 5
- Joined: Fri Oct 23, 2020 8:25 am
Re: Enabling more than two base stations
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?
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?
-
- Bitcraze
- Posts: 630
- Joined: Tue Jun 30, 2015 7:47 am
Re: Enabling more than two base stations
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?How can I make the crazyflie 'forget' about the basestations?