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 |
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
💡 Commit messages could be improvedNot blocking, but these commit messages could use some cleanup.
See the commit message convention for details. This comment will be automatically removed once the issues are resolved. |
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: -32 byte (-0 %)]px4_fmu-v6x [Total VM Diff: -144 byte (-0.01 %)]Updated: 2026-05-07T12:24:00 |
|
No broken links found in changed files. |
sfuhrer
left a comment
There was a problem hiding this comment.
Agree with simplifying the setup.
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
…rams.yaml Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
* feat(failure_detector): unite motorfailure offsets * docs: update docs/en/config/safety.md * docs: Update src/modules/commander/HealthAndArmingChecks/esc_check_params.yaml --------- Co-authored-by: Hamish Willee <hamishwillee@gmail.com> Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
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 👐