mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-23 07:00:49 +08:00
* 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>
67 lines
3.7 KiB
Plaintext
67 lines
3.7 KiB
Plaintext
# Input flags for the failsafe state machine set by the arming & health checks.
|
|
#
|
|
# Flags must be named such that false == no failure (e.g. _invalid, _unhealthy, _lost)
|
|
# The flag comments are used as label for the failsafe state machine simulation
|
|
|
|
uint64 timestamp # time since system start (microseconds)
|
|
|
|
# Per-mode requirements
|
|
uint32 mode_req_angular_velocity
|
|
uint32 mode_req_attitude
|
|
uint32 mode_req_local_alt
|
|
uint32 mode_req_local_position
|
|
uint32 mode_req_local_position_relaxed
|
|
uint32 mode_req_global_position
|
|
uint32 mode_req_global_position_relaxed
|
|
uint32 mode_req_mission
|
|
uint32 mode_req_offboard_signal
|
|
uint32 mode_req_home_position
|
|
uint32 mode_req_wind_and_flight_time_compliance # if set, mode cannot be entered if wind or flight time limit exceeded
|
|
uint32 mode_req_prevent_arming # if set, cannot arm while in this mode
|
|
uint32 mode_req_manual_control
|
|
uint32 mode_req_other # other requirements, not covered above (for external modes)
|
|
uint32 mode_not_supported # if set, mode is not supported by the current vehicle architecture
|
|
|
|
# Mode requirements
|
|
bool angular_velocity_invalid # Angular velocity invalid
|
|
bool attitude_invalid # Attitude invalid
|
|
bool local_altitude_invalid # Local altitude invalid
|
|
bool local_position_invalid # Local position estimate invalid
|
|
bool local_position_invalid_relaxed # Local position with reduced accuracy requirements invalid (e.g. flying with optical flow)
|
|
bool local_velocity_invalid # Local velocity estimate invalid
|
|
bool global_position_invalid # Global position estimate invalid
|
|
bool global_position_invalid_relaxed # Global position estimate invalid with relaxed accuracy requirements
|
|
bool auto_mission_missing # No mission available
|
|
bool offboard_control_signal_lost # Offboard signal lost
|
|
bool home_position_invalid # No home position available
|
|
|
|
# Control links
|
|
bool manual_control_signal_lost # Manual control (RC) signal lost
|
|
bool gcs_connection_lost # GCS connection lost
|
|
|
|
# Battery
|
|
uint8 battery_warning # Battery warning level (see BatteryStatus.msg)
|
|
bool battery_low_remaining_time # Low battery based on remaining flight time
|
|
bool battery_unhealthy # Battery unhealthy
|
|
|
|
# Failure detector
|
|
bool fd_critical_failure # Critical failure (attitude limit exceeded, or external ATS)
|
|
bool fd_esc_arming_failure # ESC failed to arm
|
|
bool fd_imbalanced_prop # Imbalanced propeller detected
|
|
bool fd_motor_failure # Motor failure
|
|
bool fd_motor_stuck_failure # Motor-stuck failure during spool-up
|
|
bool fd_alt_loss # Uncommanded altitude loss (rotary-wing, altitude-controlled flight)
|
|
|
|
# Other
|
|
bool geofence_breached # Geofence breached (one or multiple)
|
|
bool mission_failure # Mission failure
|
|
bool vtol_fixed_wing_system_failure # vehicle in fixed-wing system failure failsafe mode (after quad-chute)
|
|
bool wind_limit_exceeded # Wind limit exceeded
|
|
bool flight_time_limit_exceeded # Maximum flight time exceeded
|
|
bool position_accuracy_low # Position estimate has dropped below threshold, but is currently still declared valid
|
|
bool navigator_failure # Navigator failed to execute a mode
|
|
bool parachute_unhealthy # Parachute system missing or unhealthy
|
|
bool traffic_avoidance_unhealthy # Traffic avoidance (ADS-B/FLARM) system missing or unhealthy
|
|
bool remote_id_unhealthy # Remote ID (Open Drone ID) system missing or unhealthy
|
|
bool gnss_lost # Fewer GNSS receivers are healthy than required, or two receivers report inconsistent positions
|