Files
PX4-Autopilot/msg
Beniamino PozzanandHamish Willee 05d2b24c94 feat(commander): add rpm-based motor stuck detection for MC (#29436)
* feat(commander): disarm if a motor is not spinning right after arming

During the spool-up window, while landed and before takeoff is detected,
a motor that is commanded to run but never reports RPM, or reports the
motor-stuck fault, raises a new failsafe flag. The failsafe then disarms,
like the existing ESC arming and battery spool-up failures. Motors with
a NaN command are ignored.

The check runs only for rotary-wing vehicles, since it assumes the
minimum output spins the motors. It is enabled by COM_ARM_CHK_ESCS and
needs per-motor RPM telemetry. It adds no parameters; timing is a
fraction of COM_SPOOLUP_TIME: nothing is evaluated up to 50%, and the
decision is made at 80%.

Assisted-by: Claude:claude-sonnet-5-5

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>

* feat(sih): add motor stuck failure injection

`failure motor stuck -i N` models a stuck rotor with a healthy ESC: the
motor is still commanded but produces no thrust, and the ESC stays
online reporting zero RPM. The failure detector and control allocator
are not informed, unlike `motor off` and `motor wrong`.

The failure injection catalogue now accepts STUCK for the motor unit,
and SIH zeroes the thrust of the addressed motors, which also zeroes
their reported RPM. Other environments accept the command but do not
apply it, as documented in the failure injection table.

Assisted-by: Claude:claude-sonnet-5-5
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>

* feat(sih): publish esc status for standard VTOL pusher

add case in motor_inded_from_actuator for StandardVTOL

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>

* chore(params): increase COM_SPOOLUP_TIME default value to 2 seconds

This is to ensure that the motor has enough time to try to start
and the stuck-detection logic does not return false negative
when an attemp of spin is marked as healty motor

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>

---------

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-11-02 09:30:56 +00:00
..
2025-11-04 17:22:10 +01:00
2024-06-26 11:05:38 +02:00
2024-06-26 11:05:38 +02:00
2025-07-25 09:42:12 -08:00
2026-10-23 22:48:49 +02:00