-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Land detector: Remove LNDMC_TRIG_TIME parameter #25251
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
base: main
Are you sure you want to change the base?
Conversation
…factor() function
a4aeea7
to
bdec183
Compare
docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params
Outdated
Show resolved
Hide resolved
@@ -44,7 +44,7 @@ | |||
*State 2 (=maybe_landed): | |||
*maybe_landed can only occur if the internal ground_contact hysteresis state is true. maybe_landed criteria requires to have no motion in x and y, | |||
*no rotation and a thrust below 0.1 of the thrust_range (thrust_hover - thrust_min). In addition, the mc_pos_control turns off the thrust_sp in | |||
*body frame along x and y which helps to detect maybe_landed. The criteria for maybe_landed needs to be true for (LNDMC_TRIG_TIME / 3) seconds. | |||
*body frame along x and y which helps to detect maybe_landed. The criteria for maybe_landed needs to be true for 1/3 seconds. |
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.
*body frame along x and y which helps to detect maybe_landed. The criteria for maybe_landed needs to be true for 1/3 seconds. | |
*body frame along x and y which helps to detect maybe_landed. The criteria for maybe_landed needs to be true for 300ms. |
idk why but 1/3 of a second feels weird to me lol
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.
Plus it is actually 300_ms below.
hrt_abstime land_detection_time = 1_s; | ||
|
||
if (_dist_bottom_is_observable && !_vehicle_local_position.dist_bottom_valid) { | ||
land_detection_time = 3_s; |
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.
I wonder if this logic is really needed or even useful
I took a quick look at the full MulticopterLandDetector.cpp while reviewing this -- it could probably use a larger cleanup to improve and simplify the logic flow and use of member variables. If you're feeling frisky 🐱 |
Co-authored-by: Jacob Dahl <[email protected]>
No flaws found |
Solved Problem
When examining the land detector, I found that:
_set_hysteresis_factor()
and related logic, which were global but only relevant for multicopters. This was added in land_detector: robustify land detection by using distance to ground info #17403)Changelog Entry
Test coverage
No testing performed, this is a refactor aside from removing the parameter.