Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add measurement update with elevation laser ranging in the EKF #174

Merged
merged 6 commits into from
Dec 1, 2016
Merged

Add measurement update with elevation laser ranging in the EKF #174

merged 6 commits into from
Dec 1, 2016

Conversation

mgreiff
Copy link
Contributor

@mgreiff mgreiff commented Nov 28, 2016

Added support for laser ranging in the EKF such that measurements are taken every 10 [ms] and ququed in the EKF, where they enter the filter by means of a scalar update. The standard deviation of the measurements are set low, and should be made a function of the distance - but this version of the code is stable and has been used to fly with the LPS system.

Edited with a second commit so as not to make pushing into the Kalman filter the default setting.

@mgreiff mgreiff closed this Nov 28, 2016
@mgreiff mgreiff reopened this Nov 28, 2016
@@ -1116,7 +1134,3 @@ static const DeckDriver vl53l0x_deck = {

DECK_DRIVER(vl53l0x_deck);

LOG_GROUP_START(range)
LOG_ADD(LOG_UINT16, range, &range_last)
LOG_GROUP_STOP(range)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not remove this kind of log variables that could be used by other tools.

@ataffanel
Copy link
Member

Hi Marcus, thanks for the PR!
I tried to activate it by adding CFLAGS+=-DUPDATE_KALMAN_WITH_RANGING in my config.mk but I cannot really see that it is working: I tried to fly with TDoA and then put my hand close under the CF to make it rise (to verify that the range sensor was used) and nothing happened. How can I verify that the ranging sensor is used?

@mgreiff
Copy link
Contributor Author

mgreiff commented Nov 29, 2016

Hello Arnaud! I didn't quite know if this was the way to push into the master branch, so do let me know if there is something that I should do differently. I have now revised the code, which now works well and have included more rigorous outlier detection and the laser angle of aperture.

I tried to activate it by adding CFLAGS+=-DUPDATE_KALMAN_WITH_RANGING in my config.mk

This doesn't work for some reason, you have to manually uncomment the #define UPPDATE_KALMAN_WITH_RANGING on line 49 in vl53l0x.c, at which point measurements enter the filter correctly. My hope was to edit the Makefile with something like

KALMAN_RANGING_ENABLE ?= 1)
ifeq ($(KALMAN_RANGING_ENABLE), 1)
CFLAGS += -UPDATE_KALMAN_WITH_RANGING)
endif

Do you know why this doesn't work? Could it be a bug somewhere?

A measurement noise model has been added, allowing for smooth transition of
elevation measurements when moving from the feasible mesurement
region (<1.5 m) to the region where only MOCCAP/LPS is active.

The implementation has been tested with TDOA and the scalar update EKF
@ataffanel ataffanel merged commit ce8aee6 into bitcraze:master Dec 1, 2016
@ataffanel
Copy link
Member

Merged, thanks!

@mgreiff mgreiff deleted the EKF-ranging branch December 1, 2016 22:32
@krichardsson krichardsson added this to the Next version milestone Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants