Page 1 of 1

LH Heartbeat inaccuracy

Posted: Sat Dec 05, 2020 2:43 pm
by BenevonQ
Hey bitcraze,
We have experenciened some periodically inaccuracies with the LH deck using two LH2 base stations.
While plotting the x,y and z values of the CF we got some strange deviations from 1-2 mm up to 1-2 cms as can be seen in the picture. The crazyflie was in LH method 1 (Sweep method) but we also encountered the issue in method 0.
Recently we had some crashes of our crazyflies and think it might be up to those "heartbeat"-inaccuracies.

Is there any way to solve the problem?

Re: LH Heartbeat inaccuracy

Posted: Mon Dec 07, 2020 7:58 am
by kristoffer
This is a known issue we are working on, let me explain why it happens.
The rotor in a lh2 base station spins at 50 revolutions/s but with a slight shift in frequency based on the channel it is configured for. The reason is that base stations interfere with each other when the light sweeps hit a sensor at the exact same time, and by using slightly different frequencies the interference will move around and not happen at the same point every time. The interference interval is around 5 seconds and this is what you see in your graph.
During the interference sweep angles for one of the base stations is lost temporarily for one or more sensors and in theory this should not move the estimated position around since it is only data that is missing, but there are 3 possible explanations that I know of at the moment:

1. The base station geometry is not completely correct. If the base station geometry is slightly wrong the kalman filter will use an "average" of the positions it calculates based on the two base stations. If one of the base stations is hidden, the estimated position will be based on only the other one and move to that location. When both base stations are available it will move back to the average.

2. The calibration compensation is not correct. This is a known problem and described here ... -progress/. If your geometry was measured without calibration data the geometry will also have some errors (see 1). Also since the sweep angles are not completely linear the error due to calibration will be larger in some parts of the space.

3. Bugs. We have a suspicion that we sometimes get sweep angles that are wrong when the sweeps interfere. This is under investigation.

If you make sure you have set the calibration data before you measure the base station geometry, your set up is probably as good as it gets at the moment.