LH tracking gradually stops working

Topics related to the Lighthouse positioning system, configuration and use
Post Reply
cgpenguin
Beginner
Posts: 16
Joined: Wed Aug 05, 2020 3:49 pm

LH tracking gradually stops working

Post by cgpenguin »

When I calibrate the LH base stations, it works consistently. Also, I can have the drone on and connected to the CFC and it'll read correct position. However, after I fly in the assisted flight mode for a little moment, it's positioning starts breaking, the drone starts quickly drifting upwards. I have LH quality LED mode on and it switches to red at one point. The numbers get completely out of hand and end up going out of bounds afterwards. To fix that I have to reset the drone. Any ideas what could be causing this?
kristoffer
Bitcraze
Posts: 322
Joined: Tue Jun 30, 2015 7:47 am

Re: LH tracking gradually stops working

Post by kristoffer »

Does it lose tracking at some specific point in space or can it happen where tracking was good earlier?
cgpenguin
Beginner
Posts: 16
Joined: Wed Aug 05, 2020 3:49 pm

Re: LH tracking gradually stops working

Post by cgpenguin »

It happens where tracking was good earlier. In every case where it happened the drone was still within clear line of sight to both base stations and if I grabbed the drone in my hands and put it in those places manually it showed proper coordinates in my tests earlier (I can retest tho just in case).
kristoffer
Bitcraze
Posts: 322
Joined: Tue Jun 30, 2015 7:47 am

Re: LH tracking gradually stops working

Post by kristoffer »

Not sure what this might be. The only thing I can think of is that we merged a pull request with functionality for handling reflections that possibly could cause problems like this if it is not working correctly. I have not used the LH a lot since it was merged, so I wouldn't have seen the issue if there is one.

You can try to compile the version of the firmware that is just before that pull request.
1. Make sure you don't have any files modified in your source tree
2. Checkout the older version of the source code

Code: Select all

git checkout b19255d8dcf8133a45d4d864749a5228c34545d8
3. Clean

Code: Select all

make clean
4. Compile

Code: Select all

make
5. Flash

Code: Select all

make cload
When your done and want go back to the latest version in git, use

Code: Select all

git checkout master
Let us know if you see any difference using this version
cgpenguin
Beginner
Posts: 16
Joined: Wed Aug 05, 2020 3:49 pm

Re: LH tracking gradually stops working

Post by cgpenguin »

I did testing in this branch and the behavior is very similar (perhaps worse?). What I've noticed upon further inspection is that it doesn't require me to use the position hold. As soon as I start flying the drone (apply thrust) the tracking values explode and become useless. They work fine if I move the drone around manually (no thrust or anything applied, just drag it with my hands), but as soon as I start controlling it's motors - it's gone, no more tracking.
cgpenguin
Beginner
Posts: 16
Joined: Wed Aug 05, 2020 3:49 pm

Re: LH tracking gradually stops working

Post by cgpenguin »

P.S. Just checked the latest version and the behavior is very similar. It also appears to be about the same issue as viewtopic.php?f=20&t=4442.
kristoffer
Bitcraze
Posts: 322
Joined: Tue Jun 30, 2015 7:47 am

Re: LH tracking gradually stops working

Post by kristoffer »

Do you use lighthouse 1 or 2?
cgpenguin
Beginner
Posts: 16
Joined: Wed Aug 05, 2020 3:49 pm

Re: LH tracking gradually stops working

Post by cgpenguin »

Lighthouse V1 with 2 base stations.
kristoffer
Bitcraze
Posts: 322
Joined: Tue Jun 30, 2015 7:47 am

Re: LH tracking gradually stops working

Post by kristoffer »

Please check how the angle data from the lighthouse looks and see if they stop updating when you see the problems.

For a description of how to log see https://www.bitcraze.io/documentation/r ... t/#logging
The log variables for the sensors are
lighthouse.angle0x
lighthouse.angle0y
lighthouse.angle0x_1
lighthouse.angle0y_1
lighthouse.angle0x_2
lighthouse.angle0y_2
lighthouse.angle0x_3
lighthouse.angle0y_3

Note that only 6 of the variables will fit in a log block.
Post Reply