-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
MulticopterLandDetector: Make land detection time configurable #17440
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool stuff, I agree that we need the land duration setting exposed, as this can be an easy to use setting to reduce the amount of false positives for land detection on low throttle systems.
0f477a1
to
d9aed0c
Compare
…d contact state Signed-off-by: RomanBapst <bapstroman@gmail.com>
d9aed0c
to
90139c6
Compare
Thanks for all the good reviews! I tested the configurable time and in decend changes also on a real vehicle and followed up on the review comments. Because #17403 was quickly merged in between I had to slightly change the distance sensor logic to apply the parameter changes in a consistant way: It would really be better to keep these things separate since they are in principle used by the multicopter land detector only. Ready for final review? |
The tree stages used arbitrary 350, 250 300ms totally 900ms So this changes it to each stage to a third of the parameter. Default it is 1 second -> 333ms per stage.
For any normal use case where a downwards velocity setpoint is set this works exactly the same as before. E.g. autonomous landing, landing in Altitude or Position mode The advantage is that the very common case where a vehicle tries to hold a constant altitude but fails to do so e.g. during a hard brake with too much lift the resulting downwards velocity was interpreted as descend intent and since the vehicle already struggled to hold altitude with low thrust and was not moving fast anymore because it was braking this lead to a lot more false positives on certain vehicle types. The disadvantage is that not setting a downwards velocity setpoint but just moving the position setpoint into the ground does not result in land detection anymore. We do not use this method of landing anymore for quite a while. It's not recommended and I wonder if there's some rare use case like offboard where this is done. We could add an additional case for the specific case to land with a position setpoint only.
90139c6
to
5e9b873
Compare
How was I able to commit with a style check failing missing newline 🙈 |
Merging since it was reviewed before adding the empty line for style. |
Describe problem solved by this pull request
The tree stages used arbitrary 350, 250 300ms totally 900ms
Describe your solution
By default 1 second -> 333ms per stage.
Test data / coverage