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

added ground effect reporting to land detector #11424

Closed
wants to merge 1 commit into from

Conversation

RomanBapst
Copy link
Contributor

@RomanBapst RomanBapst commented Feb 10, 2019

Signed-off-by: Roman [email protected]

Describe problem solved by the proposed pull request
This pull request enhances the multicopter land detector to report the possibility of the vehicle being in ground effect close to the ground. This data can be used by the estimator to trigger ground effect compensation (dead-band on baro innovations). This is useful for vehicles that are heavily affected by ground effect and reveal the "ballooning on landing" effect.

Describe possible alternatives
If the vehicle does not have any means to measure the distance to the ground then judgment whether it is close to the ground is quite hard. The in_ground_effect logic in the land detector could be further improved by taking into account specific landing profiles for the user (e.g. when close to the ground the user would reduce sink rate prior to touching down).
However, my preferred solution would be to use a range finder and rely on the terrain estimate from the estimator.

What is missing here
I commented the line which enables the ground effect compensation in the ekf.
I think we need a parameter to deactivate it by default as not all vehicles have problems with the baro near the ground.

@RomanBapst
Copy link
Contributor Author

RomanBapst commented Feb 10, 2019

Next steps

  • add parameter to activate ground effect triggering in the ekf?
  • if valid use distance to the ground estimate in the land detector to decide when to trigger in_ground_effect

@JohannesBrand
Copy link
Contributor

@RomanBapst a very practical question: does this influence any of the other flags in the land detector: landed, ground_contact or maybe_landed ?

@RomanBapst
Copy link
Contributor Author

@JohannesBrand No it does not affect any other flag directly.

@RomanBapst RomanBapst requested a review from dagar February 15, 2019 16:22
@xdwgood
Copy link
Contributor

xdwgood commented Feb 21, 2019

The effect of the near-surface effect on the barometer is compensated in ekf.
Landing detection is concerned with the speed in the z direction, not the other factors that affect speed.
My personal understanding of landing detection does not depend on it.

@RomanBapst
Copy link
Contributor Author

@xdwgood I'm not sure what exactly you meant with your comment.

The effect of the near-surface effect on the barometer is compensated in ekf.

This is technically true but the compensation is never activated. The ekf offers an API to activate the ground effect compensation but it's not used anywhere.

@RomanBapst
Copy link
Contributor Author

@dagar @MaEtUgR Anybody care for a review?

@RomanBapst
Copy link
Contributor Author

@EliaTarasov Are you still interested in this? I know you were trying to do something similar in #10950

@EliaTarasov
Copy link
Contributor

@RomanBapst yes im still interested in this pr and will have a look again. My last question was not answered so i have failed to achieve any substantional result.

@RomanBapst
Copy link
Contributor Author

@EliaTarasov In position / altitude mode there is no way you can say for sure if the user intends to land or not. I added some logic into the land detector which basically makes sure that the vehicle is not moving horizontally and the descend speed is above a threshold. We could slightly improve the logic by requiring the descend rate to be in a certain range (if descending too fast assume that we are not near ground). You can actually trigger the condition even if you are not close to the ground. However, based on my experience you don't see a noticeable degradation of the height state.

@RomanBapst
Copy link
Contributor Author

@EliaTarasov I think this PR together with the parameter you added to enable ground effect compensation would be a good start. We can then add more logic:

  • in auto mode only compensate if in landing or takeoff mode
  • apply always if vehicle is on the ground and armed
  • use terrain estimate if available

@EliaTarasov
Copy link
Contributor

@RomanBapst ok so i will add parameter to modules/ekf2_main.cpp and modules/ekf2_params.c to handle logic from your PR and we can proceed then.

@RomanBapst
Copy link
Contributor Author

@EliaTarasov Sounds good!

@EliaTarasov
Copy link
Contributor

EliaTarasov commented Mar 5, 2019

@RomanBapst i've added the draft. Is it what we are looking for? Also, if there is a way to continue in your original pr and to avoid duplicating please let me know.

@RomanBapst
Copy link
Contributor Author

@EliaTarasov See my comment in your draft

@xdwgood
Copy link
Contributor

xdwgood commented Mar 7, 2019

@RomanBapst I mean, landing detection shouldn't monitor too much state, and the near-ground impact is ultimately vz or a high estimate. Landing detection requires vz or vertical height.
To give an extreme example: if a future sensor receives effects from light intensity and temperature, it affects speed or position estimation. From a modular point of view, we should not monitor temperature/light intensity in landing detection. These effects should be handled in sensor drive or EKF.

----From a student 😃

@RomanBapst
Copy link
Contributor Author

Closing in favor of #11592

@RomanBapst RomanBapst closed this Mar 8, 2019
@MaEtUgR MaEtUgR deleted the pr-ground_effect branch September 24, 2019 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants