feat(failure_detector): unite motorfailure offsets#26990
feat(failure_detector): unite motorfailure offsets#26990
Conversation
|
Fun fact: The image shown above—originally used to advocate for separate low and high limits—actually supports using a symmetric limit. The key issue is that the yellow and red “lines” should be parallel to the purple line, not the measured blue “ideal” line. This follows from the assumption of 0 current at 0 command, which defines the reference slope. As a result:
In this specific example, both deviations appear to be very similar in magnitude, based on the image provided by @MaEtUgR. 😀 |
|
No broken links found in changed files. |
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: -192 byte (-0.01 %)]px4_fmu-v6x [Total VM Diff: -248 byte (-0.01 %)]Updated: 2026-04-07T14:23:20 |
|
|
||
| ### Motor Failure Trigger | ||
|
|
||
| The failure detector can be configured to detect a motor failure while armed (and trigger an associated action) if the ESC current falls outside expected bounds for more than [MOTFAIL_TIME](#MOTFAIL_TIME) seconds. |
There was a problem hiding this comment.
Thanks for keeping the docs updated. Perhaps, given we specify a single value? UP to you.
| The failure detector can be configured to detect a motor failure while armed (and trigger an associated action) if the ESC current falls outside expected threshold for more than [MOTFAIL_TIME](#MOTFAIL_TIME) seconds. |
EDIT NOTE, I changed "outside expected bounds" to "outside expected threshold" in this suggestion. It isn't rendering properly for me, so if you agree you might need to apply separately.
Solved Problem
This PR simplifies the motor over/under-current detection introduced in #26262.
Currently, overcurrent and undercurrent thresholds must be configured separately. In practice, estimating even one of these reliably is already difficult, making the feature unnecessarily complex to use.
Solution
Instead of defining separate offsets for overcurrent and undercurrent, this PR introduces a single symmetric offset.
The new parameter
MOTFAIL_OFFis applied symmetrically around the expected current-to-throttle relationship (MOTFAIL_C2T). This simplifies configuration while preserving the ability to detect motor failures.Using the original image from @MaEtUgR:
MOTFAIL_C2T)MOTFAIL_OFF)Changelog Entry
For release notes:
Issue
Both the current and proposed implementations assume:
However, as shown in the original analysis by @MaEtUgR, this assumption does not hold in practice. There is typically a dead zone, where motor command increases before significant current is drawn.
This behavior cannot be represented in the current model—neither before nor after this change. Despite this limitation, the simplification introduced by this PR is considered a worthwhile trade-off.
Alternatives
To address the limitation mentioned above, the following options come to my mind:
Open to hear your thoughts 👐