LH Deck not booting properly

Topics related to the Lighthouse positioning system, configuration and use
Post Reply
BenevonQ
Beginner
Posts: 4
Joined: Sun Aug 02, 2020 10:54 am

LH Deck not booting properly

Post by BenevonQ »

Hello bitcraze,
my lighthouse deck does not dectect the LH2 basestations anymore. I think it is because the deck is not able to boot anymore in a correct way. Altough the LEDs are blinking correctly while starting the crazyflie and turn blue constantly when booted, the console log does not say "Locked to LH 2" anymore. The only message which comes from the LH deck is "LHFL: Firmware version 5 verified, booting deck!". I already flashed the CF with the original firmware from GitHub. Is my LH deck probably broken or is there any other way to fix it?

Console log:
---
SYS: Crazyflie 2.1 is up and running!
SYS: Build 1:12cf59a535a8 (2020.09-rc2 +1) CLEAN
SYS: I am 0x20383347344D50080023001F and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_CORE: 1 deck(s) found
DECK_CORE: Calling INIT on driver bcLighthouse4 for deck 0
IMU: BMI088 Gyro I2C connection [OK].
IMU: BMI088 Accel I2C connection [OK]
IMU: BMP388 I2C connection [OK]
ESTIMATOR: Using Kalman (2) estimator
CONTROLLER: Using PID (1) controller
MTR-DRV: Using brushed motor driver
EEPROM: I2C connection [OK].
IMU: BMI088 gyro self-test [OK]
STAB: Wait for sensor calibration...
SYS: Free LHFL: Lighthouse bootloader version: 2
heap: 11904 bytes
LHFL: Firmware version 5 verified, booting deck!
STAB: Ready to fly.
Thank you for your help in advance.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: LH Deck not booting properly

Post by arnaud »

Hi,

The lighthouse 2 synchronization can be a bit sensitive at time, have you tried to move your Crazyflie closer and/or farther away from the base station to check if it helps.

There is a check in the lighthouse code, so if one of the sensor starts not working, it will print Warning: not getting data from all sensors in the console.

To check manually if the deck is still working fine, you can also log the variables lighthouse.width[0-3], this is the raw pulse width received from the lighthouse deck. If all works well, the width should be non-0 and changing for all sensors (0 to 3). For lighthouse 2 the width should be fairly constant and be related to the distance between the deck and the base-stations. I attach a picture of what that looks like on my side:
lh_width.png
BenevonQ
Beginner
Posts: 4
Joined: Sun Aug 02, 2020 10:54 am

Re: LH Deck not booting properly

Post by BenevonQ »

Thank you for your tips.
While moving the Crazyflie back and forth or even holding it directly in front of the Lighthouse 2 sensors, the graphs dont show any momvent at all. Instead they stay at the position 0. I checked that the Base stations are on.

I also dont see a hint in the console log what could cause the problems.
Screenshot 2020-09-22 130122.png
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: LH Deck not booting properly

Post by arnaud »

If you get 0 for all the lighthouse.width[0-3] log variable, it would indicate that none of the deck sensors are working. This is not something I have seen before, did anything happen to the deck or did it stop seemingly randomly?

In any case, if you drop us a mail at contact _at_ bitcraze.io with your order number and we can ship you a replacement.
BenevonQ
Beginner
Posts: 4
Joined: Sun Aug 02, 2020 10:54 am

Re: LH Deck not booting properly

Post by BenevonQ »

Yes it kind of stopped working without a real incident. Although it had one or two crashes before the deck worked afterwards still fine and the bs_get_geometry.py returned fairly reasonable values. Thats why I dont really believe the crash(es) caused a major damage to the deck. But who knows...
We have already ordered two new decks since we wanted to create a small drone swarm with them and cant wait for them being delivered.
I sent you an email with the invoice as a replacement request.
Thank you so much for your great support!
Timo K
Beginner
Posts: 14
Joined: Thu Jul 30, 2020 9:46 am
Location: Germany
Contact:

Re: LH Deck not booting properly

Post by Timo K »

Thank you for the replacement!
We could make some progress with the new decks, but we still couldn't fly a crazyflie stably with the lighthouse system. We often have problems with two basestations. Probably because they are too far away. So our current setup is only one basestation approximatly 2 meters apart the drone, 1.5m off the ground and directed to the deck, but we dont get very promissing data.
The graph with the lighthouse.width values is not nearly that constant as yours.
Screenshot (12).png
We didn't make a lot of flight tests because we don't want the drone to crash and get damaged.
Is there a way to get more stable data? Or could it be something else like a damaged lighthouse basestation or an error in the firmware because we're using LH2?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: LH Deck not booting properly

Post by arnaud »

Hi,
These data do not necessarily look bad to me: with LH2 the pulse width mainly depend of the distance to the lighthouse, the laser modulation is used to identify and decode the pulse timing. This data is mainly useful to see if the deck is working, in your case it confirms that your deck is working and is receiving data from two LH2 basestations.

The next step is then to check the angle measurements, they should be very stable if the measurement works well. They are in the "lighthouse.angleN.." log variables.

Once you have verified that the angle measurements are clean, you can set the geometry and check the estimator output to see if the position estimation makes sense.
Timo K
Beginner
Posts: 14
Joined: Thu Jul 30, 2020 9:46 am
Location: Germany
Contact:

Re: LH Deck not booting properly

Post by Timo K »

Hi arnaud,
I checked the angle values and these are very stable, but the drone still crashed when taking off.
I plotted the stateEstimate.x ... values and they are okay, when standing still but the values seem to change no matter in which direction I'm moving the drone. Especially the z direction. For example the z value changes if I'm moving the drone on the ground. I also plotted some other values like the kalman.varPX ... variables, because I wasn't sure which one are the best to check the position. I'm not sure if this is normal or a wrong position estimate so I made some screenshots.
In this one the crazyflie is just standing still on the ground without being moved:
Screenshot Kalman_standing.png
Here I moved the cf up and down to compare the results:
Screenshot Kalman_Moving.png
Sometimes the kalman values just kept changing after I moved the cf until I moved it again, but maybe this was just because the drone was tilted to much.
Another small problem was that that the drone restarted because of an error:

Code: Select all

SYS: Assert failed at .//src/modules/src/kalman_core.c:253
It seems that it only happens when it was started without a bs near its location. It wasn't a problem for me, but I just wanted to mention it because it is probably interesting for you to know.
Maybe the takeoff problems are because the BS is too far away or because the get_bs_geometry output was not precise enough (when running the skript multiple times the third digit behind the comma changes slightly).

Thank you for all your help so far and the help with the broken LH deck.
Timo
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: LH Deck not booting properly

Post by kimberly »

Hi!

To improve readability, it would be better to start a different thread since this does not correspond with the topic in the original forum message. In the new thread, please show the actual position estimate. Variance is very difficult to interpreted and is more of an indication of the difference between the estimate and the measurement.

Thanks for notifying about the assert by the way. We created an issue for that on github: https://github.com/bitcraze/crazyflie-f ... issues/635
Post Reply