Commit Graph
98 Commits
Author SHA1 Message Date
Jonas PeroliniandMatthias Grob ef0990ae36 fix(vtol_att_control)!: don't treat a commanded quadchute as a failure (#29626)
* fix(vtol_att_control): do not treat a commanded quad-chute as a fixed-wing failure

An operator can command a quad-chute (MAV_CMD_DO_VTOL_TRANSITION with
param2 = 1) when nothing has failed, e.g. to stop fixed-wing flight for
detect and avoid. It set fixed_wing_system_failure like a detected
failure, so COM_QC_ACT ran (Return by default) and arming was blocked
until reboot.

A commanded quad-chute now only forces the immediate switch to
multicopter, through a one-shot latch. The multicopter transition
command keeps the vehicle there until the next front transition.

The destructor now also deletes the VTOL type, which leaked.

Assisted-by: Claude:claude-opus-5-5

* refactor(vtol_att_control): track quad-chute by reason

Only a detected quad-chute is published as fixed_wing_system_failure.

* fix(vtol_att_control): no pusher assist after a commanded quad-chute

A further quad-chute is ignored while one is active.

* fix(vtol_att_control): reset commanded quadchute on disarm

* feat(vtol_att_control): keep pusher assist after a commanded quadchute

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-11-12 12:31:23 +01:00
Jonas Perolini c1d5757020 feat(navigator): skip automatic front transitions after a quadchute (#29625) 2026-11-10 18:45:59 +01:00
Jonas Perolini caf75ad3c1 fix(mavlink): report missing Return time estimates as unknown (#29685)
Assisted-by: Claude:claude-opus-5-5
2026-11-08 16:18:35 +01:00
Andrea Bernasconi 08f5938916 fix(failure_detector): check altitude loss without a height setpoint (#29000)
* fix(failure_detector): check altitude loss without a height setpoint

The altitude loss check only ran when an altitude setpoint was present.
While the pilot moves the throttle stick in Altitude/Position mode the
setpoint is NaN, so a failure during a manual climb or manual descent
was never detected.

When there is no height setpoint but a vertical velocity setpoint is
available, keep a reference that remembers the highest altitude reached
and only moves down at the commanded descent rate. Climb or hold
commands therefore protect the best height, and a commanded descent is
compared against the expected one with FD_ALT_LOSS as margin.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>

* fix(failure_detector): ignore stale descent setpoint in altitude loss check

Without a height setpoint the reference is lowered by the commanded
descent rate. If position control stopped publishing while a descent
was commanded, the last vz was integrated indefinitely, lowering the
reference and masking the altitude loss the detector should catch.

Only integrate the commanded descent while the setpoint is fresh
(within 500 ms of the position estimate); otherwise the reference is
held at the best altitude reached.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>

* docs(safety): describe altitude loss reference for manual commands

The altitude loss trigger is no longer measured only against an
altitude setpoint. Explain that manual climbs and descents are covered
and how a commanded descent lowers the reference.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>

* fix(commander): Add a margin to avoid small error accumulation

* fix(failure_detector): keep the altitude loss reference when the setpoint follows the vehicle

In auto modes emergency braking keeps the altitude setpoint on the vehicle
while it falls. The setpoint dragged the reference down with it, and every
time it ended up just below the vehicle the reference was reset, so a free
fall during a mission was not detected.

The reference now only moves down at the commanded descent rate, and it is
kept while the vehicle falls faster than allowed even if it is above the
setpoint.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>

* style(failure_detector): shorten altitude loss reference comment

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>

* style(failure_detector): name altitude loss constants as constants

Also document the 2 m/s descent rate margin.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>

* fix(failure_detector): apply the descent rate margin once

The commanded descent rate already includes the margin, adding it again
meant a fall up to 2 m/s faster than the reference moves down, with the
setpoint kept on the vehicle, reset the reference instead of being
detected.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>

---------

Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
2026-11-04 17:59:05 +01:00
Andrea Bernasconi 3877a9e370 refactor(commander): Swap order of Critical and Distance-Aware Return 2026-11-04 08:44:58 -08:00
Hamish Willee 368f3e3161 docs: clarify distance-aware return failsafe docs
Review fixes for the battery failsafe docs. The DroneCAN case was
wrong: batteries sending only BatteryInfo give no remaining flight time,
so distance-aware return never triggers for them. Also fixes the
COM_ARM_BAT_MIN default (-1 uses BAT_CRIT_THR) and a duplicate anchor,
plus wording and capitalisation.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
2026-11-04 08:44:58 -08:00
Andrea Bernasconi 7a784b3afe refactor(commander): rename Smart Return to distance-aware return
"Distance-aware return" says what sets it apart from the battery level
failsafe: the return starts earlier the further away the vehicle is.
The COM_LOW_BAT_ACT option labels now name the trigger first, then the
action ("Critical level return, Emergency level land"), and the long
description explains how each level is determined.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
2026-11-04 08:44:58 -08:00
Andrea Bernasconi b0c86e781b feat(commander): rename bingo fuel to Smart Return and make it opt-in
"Bingo fuel" is military aviation jargon most PX4 users do not know, and
"fuel" is misleading for batteries. Smart Return describes what it does
and follows the "Return" terminology used for the mode since #28543.

Returning on low remaining flight time is now opt-in via the new
COM_LOW_BAT_ACT options 5 and 6, so options 0 to 4 keep their existing
behaviour and only warn, as COM_FLTT_LOW_ACT did by default. This keeps
the value 4 (terminate at emergency level) added on main unchanged.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
2026-11-04 08:44:58 -08:00
Hamish Willee c8b928b712 Bingo clarification 2026-11-04 08:44:58 -08:00
Hamish Willee 7cc668629e Add battery capacity to the list 2026-11-04 08:44:58 -08:00
Matthias Grob c38c070c0c fix(commander): combine all battery failsafe configuration into COM_LOW_BAT_ACT to make the options very clear for the user 2026-11-04 08:44:58 -08:00
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
zdeno-sekerakandHamish Willee c0d2c54308 docs(joystick): rewrite joystick setup page (#29240)
* docs(joystick): rewrite joystick setup page

* Style changes in joystick.md compared to the last version

* docs(joystick): address reviewer feedback, rewrote pages based on it, update images, and remove unused assets

* docs: restore accidentally deleted micronav image

* docs(docs): Keep the better aspects

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-10-29 14:10:32 +11:00
zdeno-sekerakandHamish Willee d92b05ec73 docs(config): add Integrated GCS page (#29253)
* docs: add Integrated GCS page

* docs(config): fix review findings on Integrated GCS page

Integrated GCS units send manual control to PX4 either as MAVLink over
telemetry or as an RC signal (e.g. Herelink's S.Bus air unit output), so
the tip now covers both paths rather than pointing only to Joystick Setup.

Also lead the intro with the main benefit (manual and GCS control in one
unit), apply style-guide fixes, link the page from Manual Control, rename
the WebP images that had a .png extension, and compress the SRoC image.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

* Deleted unnescessary Aeronav Image: docs/assets/peripherals/integrated_gcs/uxv_technologies_aeronav.webp

* Delete unnescessary Micronav image: docs/assets/peripherals/integrated_gcs/uxv_technologies_micronav.webp

* docs(config): add PX4 configuration section to Integrated GCS page

The page listed devices but never said how to set PX4 up for one.
Configuration depends on whether the unit sends manual control as MAVLink
or as an RC signal, and with MAVLink control a single link loss triggers
both the manual control and data link loss failsafes, so the new section
covers manual control, telemetry, failsafes, arming and video for both.

Also crop the G2Nav image, drop the Alpha G-Case Duo at the author's
suggestion, and link the page from the config index, Joystick Setup,
Basic Concepts and the RC receiver list.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

---------

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-10-29 14:06:40 +11:00
Hamish Willee 49ae460b11 docs(links): fix broken links and add missing uORB pages to TOC (#29461)
QGroundControl removed its PX4 Safety setup page, so the mission-mode
auto-disarm tips and the safety page's further-information link pointed
at a 404; they now point to its Return & Land and Failsafes pages. The
Seriously Pro shop is offline, so the SPRacingH7EXTREME intro and
manufacturer links use the product site instead. Three permanently
redirected links (RealSense D435/D415, Roboto) now use their targets.

Four generated uORB message pages were missing from SUMMARY.md, and the
LIDAR-Lite page restructure left four images that no page in any
language references. The alternative sidebars are regenerated from
SUMMARY.md.

Assisted-by: Claude:claude-opus-5-5

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
2026-10-28 11:35:45 +11:00
PX4BuildBot 299d761770 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-10-26 15:58:10 +00:00
af006cf1c3 feat(motor_failure_detector): add current-residual detection (#27711)
* feat(motor_failure_detector): add current-residual detection library

Per-motor model-based motor-failure detector for multirotors. Predicts the
expected ESC current from the commanded actuator signal
(I_exp = current_slope_a*u + current_idle_a) and trips on a low-pass-filtered
residual held past a trip band for a persistence time. The command (not measured
rpm) is the fault-independent reference: a dead motor that draws no current while
still commanded produces a large residual, whereas a current-vs-rpm model would
mask a clean stop.

Band and persistence are configurable per residual direction. Undercurrent is the
fault-consistent side -- an open circuit, a shed propeller or a desync makes a
motor draw less than commanded -- while overcurrent covers a winding short,
mechanical jam or demagnetization. They are separate because the benign residual
is far from symmetric: a fast throttle increase draws acceleration current the
static model cannot predict, so overcurrent excursions are large and unbounded,
whereas an undercurrent residual is floored at -I_exp. A single band sized to
reject the overcurrent transients can therefore end up wider than the largest
undercurrent fault a motor can physically produce, which makes a full current
collapse undetectable rather than merely slow. Set undercurrent_threshold_a <= 0
to keep one symmetric band on the residual magnitude.

Built on PX4 primitives rather than hand-rolled equivalents: update() takes a
timestamp (esc_status.timestamp in flight, the log timestamp in replay) and
derives dt internally; the residual filter is a mathlib AlphaFilter; the
persistence debounce is a systemlib::Hysteresis per direction (with a sticky latch
on top, and reset across data gaps so a dropout can't complete a pending trip).

The data-gap threshold (kMaxGap = 0.3 s) is sized above the ~10 Hz arming-check
feed interval and below the 400 ms ESC-offline timeout: a live feed is never
mistaken for a gap (a smaller value equal to the feed interval reset the filter
and debounce on the majority of jittered ticks, so a sustained fault never
survived the persistence window -- offline replay: 0/100 sampling phases latched
vs 100/100 gap-free), while a genuine outage still resets and is handled by the
separate ESC liveness guard.

Includes an 18-case gtest spanning the failure-mode spectrum and edge cases:
healthy-never-trips (incl. high throttle), open-circuit and overcurrent trips,
severe prop-loss undercurrent, the missed ~50% partial loss (documents the
detection floor), the per-direction bands (a tighter undercurrent band catching a
collapse one symmetric band misses, band independence, per-side persistence),
persistence (short spike crosses-threshold-but-recovers), gap reset, the 10 Hz
feed vs. real-gap boundary, dropout-holds, multi-motor, the exclusion gate,
monitor-only, and reset/latch.

* refactor(motor_failure_detector): resolve the undercurrent band at configure time

An unset undercurrent threshold now mirrors the overcurrent band in
configure(), so update() runs the same two bands in every configuration and
no longer carries a second threshold test that reads like a repeat of the
disable gate. A symmetric band is the two-band case with equal bands.

Also name esc_status CONNECTED_ESC_MAX at kMaxMotors so the constant is
findable, use the PX4 time literals for the persistence conversions, and
drop the excluded temporary.

* feat(commander): use current-residual detector for the ESC motor-failure check

Replace the flat, instantaneous current check in EscChecks::checkMotorStatus with
the MotorFailureDetector library (added in the parent PR). Per motor it predicts
the expected ESC current from the commanded thrust
(I_exp = MOTFAIL_C2T*u + MOTFAIL_IDLE) and trips on the low-pass-filtered
residual, with an independent band and hold time per direction: MOTFAIL_UNDER held
for MOTFAIL_UND_TIME below the expectation, MOTFAIL_OVER held for MOTFAIL_OVR_TIME
above it.

Because the two directions need separate bands, the single band and hold time are
renamed to name the direction they act on: MOTFAIL_OFF -> MOTFAIL_OVER and
MOTFAIL_TIME -> MOTFAIL_OVR_TIME, migrated in param_translation.cpp. The old band
applied to both directions, so it carries over to the overcurrent side, and
MOTFAIL_UNDER defaults to 0, which keeps a single symmetric band -- an existing
vehicle behaves as before. MOTFAIL_IDLE also defaults to 0, and the whole check
stays gated by FD_ACT_EN (off by default).

The detector is driven off esc_status.timestamp, so a telemetry stall freezes the
filter instead of integrating stale current; the separate 400 ms ESC telemetry
timeout stays in checkEscOnline(). It is reconfigured from parameters while
disarmed, so a parameter change never resets a latched failure mid-flight. The
motor_failure_mask still feeds failure_detector_status via
FailureDetector::publishStatus, leaving the ControlAllocator reaction path
untouched.

The mask reports the detector's sticky latch alone, not whether the motor is
currently evaluable. That preserves the invariant the previous check spelled out
-- "Only set, never clear mid-air: stopping the motor in response could make it
appear healthy again" -- because handling a failure makes exactly that motor
unevaluable: the control allocator drops it, which publishes a NAN command,
which excludes it from the detector. Re-deriving the mask from the exclusion
state clears it, the allocator restores all motors, and the next check re-trips.
Measured in SIH on a hexarotor with a missing propeller: 83 mask transitions in
nine seconds, with a reversed recovery motor swinging between idle and near-full
reverse at the 10 Hz check rate. An ESC going offline after a real failure
retracts the report the same way. The latch is only ever set on a tick where the
motor was evaluable, so reporting it alone cannot report a motor that was never
judged.

* feat(motor_failure_detector): add offline ulog replay tool

Add a host tool that replays a recorded .ulg through the real MotorFailureDetector
and prints the per-motor trip verdict, for validating and tuning the detector
offline (EKF2-replay style: the real library drives recorded data, not a
re-implementation).

Built on ulog_cpp (PX4's C++ ULog library, added as a git submodule and built for
the posix host target only), so it reads ESC current, motor command and arming
state by field name from the log's own format -- one binary replays logs of any
PX4 message version with no rebuild. The feed mirrors the runtime in escCheck:
evaluated only while armed, at the runtime's 10 Hz cadence, with the per-ESC
current-report startup latch and reset-on-disarm. Config comes from the log's
MOTFAIL_* parameters with a built-in calibration fallback, and --set
MOTFAIL_NAME=value overrides any knob for what-if retuning. Because the runtime's
exact 10 Hz sample phase cannot be reconstructed offline, a single pass over the log
drives several detector instances on staggered grid offsets and reports a per-motor
peak band and trip fraction rather than a single phase's verdict, flagging when the
result is phase-dependent.

batch_replay.sh runs the tool over a folder of logs and summarizes each verdict
(OK / FAIL / SKIP) from its exit code.

Off by default so it never enters the firmware build or CI: it is a posix-only,
EXCLUDE_FROM_ALL host executable gated behind the MFD_REPLAY_TOOL cache option.
Build it with:

    cmake -DMFD_REPLAY_TOOL=ON build/px4_sitl_default
    ninja -C build/px4_sitl_default mfd_replay

* docs(motor_failure_detector): document the current-residual motor-failure check

Add a configuration page for motor failure detection, next to the other
actuator topics, and a developer page for the offline replay tool:

- what the check compares and why the under/overcurrent bands are separate
- the new MOTFAIL_* parameters, including the rename migration
- how to fit the current model and pick the bands from the vehicle's own
  logs with mfd_replay / batch_replay.sh

The "Motor Failure Trigger" section in the failsafe page described the
pre-rename parameters, the unfiltered symmetric comparison and claimed the
failure was non-latching, so it is reduced to a summary of the trigger and
its action, pointing at the new page for the thresholds.

* docs(docs): Subedit for simpler introductions and terminology

* docs(docs): Improve upgrading from v1.18 section

* feat(motor_failure_detector): add current-model fitting tool

mfd_fit derives MOTFAIL_C2T and MOTFAIL_IDLE from recorded logs, so the model
and the thresholds are taken from the same data.

Like mfd_replay it reads ESC current, motor command and arming state through
ulog_cpp by field name, so one binary handles any log version. Each log is a
single streaming pass that accumulates only the sums a least-squares line needs,
so memory does not grow with the log or with the number of logs, and a whole
corpus can be fitted in one invocation.

Alongside the parameters it reports the residual spread the trip bands have to
clear, and each motor's bias against the shared model.

* docs(docs): document motor failure detection tuning and the fitting tool

Follow-up to review of the detection and replay pages:

- fix the link left behind by the Failure Response -> Failure Action rename
- drop the Multicopter badge: the check has no vehicle-type gate, so a VTOL's
  multirotor motors and its forward-flight motor are both checked
- describe the model-fitting step without the statistics jargon
- state that only healthy logs may be used, for the fit and the thresholds
- document mfd_fit, and reduce the release note to a pointer

* feat(motor_failure_detector): report residual extremes and add a band sweep

The replay tool printed the largest residual magnitude, which hid whether an
excursion was above or below the model. Since the two trip bands are chosen per
direction, that left the reader running one band at a time to find out. It now
prints the signed minimum and maximum instead, so each band's headroom is
readable straight from the table.

Add sweep_matrix.sh alongside batch_replay.sh: it sweeps one band against its
hold time over a set of logs and prints how many logs false-trip at each pair,
so the lowest usable band per hold time is the first zero in a row.

Both tools now number motors from 1, matching the "Motor N ..." the vehicle
reports, rather than from 0.

* docs(docs): rework the motor failure calibration walkthrough

Follow a real calibration through both pages and fix what it ran into:

- the replay page's worked example is one vehicle end to end, with every
  number and pasted output taken from that corpus
- the fitting tool, the single-log run and the band sweeps are ordered the way
  the work is actually done, with replaying a whole fleet last
- the sweeps are shown as a matrix of false trips per (hold time, band), and
  the grids are derived from the residual extremes rather than guessed
- commands match the output they produce, and say what they need: mfd_replay
  without --set uses a fallback calibration that belongs to another vehicle
- vehicle_status is optional, not required, for the replay
- drop the repetition: batch_replay.sh, the hover-current ceiling and the
  phase-sensitivity note were each explained two or three times

* fix(motor_failure_detector): separate configure and reset with the appropriate triggers

* refactor(motor_failure_detector): clarify leading edge hysteresis as trigger time compared to "persistence"

* fix(escCheck): encapsulate _motor_failure_direction handling into MotorFailureDetector

* fix(astyle): exclude ulog_cpp submodule form check

* fix(motor_failure_detector_tools): fail log replay when no log is present

* refactor(motor_failure_detector): Improve documentation

* fix(escCheck): check load per ESC not per motor function

This was already done in my original implementation. It supports checking multiple ESCs mapped to the same motor function individually. It's also consistent with other ESC checks that run for every ESC that reports telemetry.

* fix(motor_failure_detector): run update() per motor and consider individual telemetry timestamps

* fix(motor_failure_detector): simplify output interface to getters of actually used results

* fix(motor_failure_detector): inline what doesn't need to be separate

* fix(motor_failure_detector): make the bands independent and drop special cases

- Each trip band is now independent: a threshold <= 0 disables only that band. The undercurrent band no longer copies the overcurrent one.
- Drop the MOTFAIL_OFF/MOTFAIL_TIME parameter migration. The new parameters start at their defaults.
- Treat a non-finite current like a non-finite command (not evaluated, filter and debounce reset). No driver reports NaN current, so the path only existed for its test.
- Compute the residual as max(current, 0) - I_expected. Same as before, but written such that it's obvious: regeneration counts as 0A.
- Drop unnecessary trigger time parameter clamp to >= 0 before converting to unsigned microseconds, metadate already decalres that as out of range.
- Count each ESC sample once by its own timestamp in mfd_fit, like the motor_failure_detector.

* fix(motor_failure_detector): check all still considered online ESC telemetry

* fix(motor_failure_detector): declare all link dependencies

* fix(motor_failure_detector_tools): reuse log reading logic to reduce duplication

* fix(motor_failure_detector): replace reversible flag getting passed into the detector for separate handling

Having a NAN command already handles that.

* test(escChecks): add unit tests for load based failure detection

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
Co-authored-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
2026-10-26 16:45:00 +01:00
Saibernard Yogendran 68a2124f5c fix(commander): hold on Offboard loss without manual control for NAV_RCL_ACT 7
An Offboard vehicle without manual control, the companion computer
setup that NAV_RCL_ACT 7 "Hold mode (no failsafe)" was added for,
stayed in Offboard when its companion stopped. #26289 made the
Offboard loss fallback into Position mode use the NAV_RCL_ACT action
instead when manual control is lost, since Position mode needs it.
Value 7 maps that action to None, because Commander switches to Hold
on its own, but that switch only fires while a manual mode is flown.
So the vehicle kept flying its last setpoint, with a velocity
setpoint that means flying off, and nothing was reported.

The replacement now maps None to Hold, which is what value 7 promises,
and the action cascade escalates to Return and Land from there when
Hold cannot run. The manual control loss trigger itself is untouched
and still takes no failsafe action for value 7.

In SITL with the sih quadcopter, no manual control and a velocity
setpoint stream that stops, main kept flying at 0.9 m/s for the whole
12 s watched. With this change the vehicle is in Hold 1.4 s after the
stream stopped. Both changes are in v1.18.0-rc1.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
2026-10-16 13:43:55 +02:00
PX4BuildBot 8f6b41fbad docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-10-14 11:50:28 +00:00
b457d486fb feat(commander): relax GNSS redundancy check (#29188)
* feat(commander): let COM_GNSSLOSS_ACT decide whether GNSS loss blocks arming

The GNSS redundancy check blocked arming whenever fewer receivers than
SYS_HAS_NUM_GNSS were healthy, regardless of COM_GNSSLOSS_ACT. Setups that
want a warning only had no way to arm. Arming is now blocked only when
COM_GNSSLOSS_ACT is above Warning, and the new value 4 (Block arming +
In-flight warning) keeps the previous on-ground behavior without an in-flight
failsafe action.

Receivers can report an optimistic eph, which made the divergence gate fire
on receivers that agree within their real accuracy. The reported eph is now
floored with EKF2_GPS_P_NOISE, looked up at runtime so commander does not
depend on EKF2 being part of the build.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>

* fix(commander): Avoid param_get() log spam when EKF2 parameter is unavailable

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix(commander): Fix formatting issue

* fix(gnssRedundancyCheck): shorten parameter option string for blocked arming

* fix(gnssRedundancyCheck): simplify logic to decide when to block arming

---------

Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-10-14 13:34:40 +02:00
Mahima YogaandHamish Willee 2a0c1142a0 docs(airspeed): update docs to include multi-airspeed set-up (#29092)
* docs(airspeed): update docs to include multi-airspeed set-up

covers: #28832 and #28822

* docs(docs): minor subedit

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-10-13 13:55:23 +02:00
Andrea Bernasconi 0185d7969c feat(commander): warn on low remaining flight time by default (#28952)
COM_FLTT_LOW_ACT defaulted to None, so a vehicle with a configured
battery capacity flew on silently even when the remaining flight time
was only just enough for a Return. Default to Warning so operators are
told without changing vehicle behaviour.

Assisted-by: Claude:claude-opus-5-5

Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
2026-10-01 18:41:09 +02:00
Jacob Dahl e40501eba0 refactor(msg): rename GPS to GNSS in messages, topics and sensor parameters (#24399)
* refactor(msg): rename SensorGps to SensorGnss and add VehicleGnss

GPS is one constellation; the receivers and the rest of PX4 handle GNSS. Field names lose their units (latitude, speed_accuracy, course, ...), which move into the metadata comments. The sensors module's output becomes VehicleGnss on vehicle_gnss: the selected receiver's sample next to what the sensors module adds to it (corrected sample time, antenna position, selected instance), so a consumer can tell the two apart and later selection and check results have a place to go.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/gps): publish sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/septentrio): publish sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/pps_capture): read sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(lib/gnss): select receivers on sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(sensors): publish VehicleGnss on vehicle_gnss and rename SENS_GPS* to SENS_GNSS*

The sensors module's output nests the selected receiver's sample, with the corrected sample time, antenna position and selected instance next to it. SENS_GPS_MASK/TAU/PRIME and SENS_GPSn_ID/OFFX/OFFY/OFFZ/DELAY take the SENS_GNSS name the heading parameters already use; saved parameters migrate on import, and the EKF2_GPS_POS/EKF2_GPS_DELAY translations now land on the new names directly.

Assisted-by: Claude:claude-opus-5-5

* refactor(logger): log sensor_gnss and vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(ekf2): fuse vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(replay): replay vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(local_position_estimator): read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(attitude_estimator_q): read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(lib/terrain_estimation): take sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(lib/wind_estimator): read vehicle_gnss in the replay script

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(vision_target_estimator): read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(navigator): read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(commander): read sensor_gnss and vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(mavlink): stream sensor_gnss and vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(uxrce_dds_client): bridge vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(zenoh): bridge vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(failure_injection): inject GNSS failures on sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/ins): publish sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/uavcan): publish sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/uavcannode): read sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/cyphal): bridge sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/telemetry): read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/rc): read vehicle_gnss for telemetry

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/osd): read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(drivers/transponder): read sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(boards/modalai): publish sensor_gnss from the voxl2 drivers

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(examples): publish sensor_gnss and read vehicle_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(simulation): publish sensor_gnss

Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.

Assisted-by: Claude:claude-opus-5-5

* refactor(gnss): name GNSS variables gnss in the sensors module and receiver drivers

GPS is one constellation. Identifiers that hold or handle GNSS samples, or bind to the renamed parameters, follow the message and parameter rename; classes, files, modules and names tied to parameters that keep GPS stay.

Assisted-by: Claude:claude-opus-5-5

* refactor(gnss): name GNSS variables gnss in the estimators and navigator

GPS is one constellation. Identifiers that hold or handle GNSS samples, or bind to the renamed parameters, follow the message and parameter rename; classes, files, modules and names tied to parameters that keep GPS stay.

Assisted-by: Claude:claude-opus-5-5

* refactor(gnss): name GNSS variables gnss in commander, mavlink and failure injection

GPS is one constellation. Identifiers that hold or handle GNSS samples, or bind to the renamed parameters, follow the message and parameter rename; classes, files, modules and names tied to parameters that keep GPS stay.

Assisted-by: Claude:claude-opus-5-5

* refactor(gnss): name GNSS variables gnss in the remaining drivers and simulation

GPS is one constellation. Identifiers that hold or handle GNSS samples, or bind to the renamed parameters, follow the message and parameter rename; classes, files, modules and names tied to parameters that keep GPS stay.

Assisted-by: Claude:claude-opus-5-5

* docs(gnss): reference sensor_gnss, vehicle_gnss and SENS_GNSS* parameters

The upgrade guide covers the topic, field, ROS 2, parameter and Cyphal register renames.

Assisted-by: Claude:claude-opus-5-5

* fix(boards): name EKF2::UpdateGnssSample in the fmu-v6xrt ITCM lists

The rename left the old UpdateGpsSample symbol in the lists, so the ITCM check fails and the function drops out of ITCM on the boards it doesn't check.

Assisted-by: Claude:claude-opus-5-5

* chore(drivers/gps): bump PX4-GPSDrivers to the merged sensor_gnss rename

The submodule pointed at the PX4-GPSDrivers#243 branch commit; #243 is merged.

Assisted-by: Claude:claude-opus-5-5

* docs(msg): restore WGS84 in SensorGnss and point VehicleGlobalPosition at vehicle_gnss

The rename dropped the only mention of the WGS84 datum and ellipsoid, and left VehicleGlobalPosition referring to the removed vehicle_gps_position topic.

Assisted-by: Claude:claude-opus-5-5

* refactor(msg): drop selected_instance from VehicleGnss

receiver.device_id already names the selected receiver, and 0 while blended. The sensor_gnss instance depends on the order drivers advertise at boot, so it doesn't identify a receiver across boots or logs, and nothing reads it. It would also be meaningless on the per-receiver VehicleGnss instances proposed in #28894.

Assisted-by: Claude:claude-opus-5-5

* refactor(gnss): fuse vehicle_gnss.timestamp_sample directly and document the receiver's corrected time

vehicle_gnss.timestamp is now the sensors module's publish time, so EKF2's check of timestamp_sample against it was always true; the sensors module always fills timestamp_sample. The message docs described receiver.timestamp_sample as the driver's uncorrected value, but the sensors module writes the corrected time into it as well.

Assisted-by: Claude:claude-opus-5-5

* docs(msg): point VehicleGnss users at the top-level timestamp_sample

uXRCE-DDS shifts only top-level timestamp and timestamp_sample into agent time, so receiver.timestamp_sample reaches ROS 2 on the PX4 boot clock even though it holds the same value on uORB.

Assisted-by: Claude:claude-opus-5-5

* docs(releases): tell ROS 2 users which VehicleGnss timestamps to read

Only top-level timestamps are converted to ROS time, so a port that reads receiver.timestamp gets the PX4 boot clock, and vehicle_gnss.timestamp is now the sensors module's publish time rather than the receiver's.

Assisted-by: Claude:claude-opus-5-5
2026-09-29 10:36:49 -06:00
PX4BuildBot 5fb15552bb docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-09-26 02:47:37 +00:00
Andrea Bernasconi b38dcb1f6c fix(navigator): use "Return" instead of "RTL" in user-facing text (#28543) 2026-09-26 12:40:56 +10:00
PX4BuildBot d9cb02f810 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-08-25 18:14:04 +00:00
Mathéo TaillandierandMatheo Taillandier 4d162feb57 fix(commander): gnss redudancy checks: block arming independent of ACT setting (#28356)
* fix(commander): fix gnss redudancy checks

* docs(commander): update SYS_HAS_NUM_GNSS meaning

---------

Co-authored-by: Matheo Taillandier <matheo.taillandier@rigi.tech>
2026-08-25 20:05:11 +02:00
3a35c014be feat(control_allocator): reversible-motor failure recovery for hexarotors (#28078)
* feat(control_allocator): add reversible-motor failure recovery for hexarotors

On a single motor failure (CA_FAILURE_MODE), handle the failed motor's
geometric-opposite motor on a hexarotor to recover the lost control authority:
  1 = remove failed + shut off opposite (restores symmetry)
  2 = remove failed + make opposite reversible (assumes a reverse-capable ESC)
Non-hex frames have no opposite and keep the upstream remove-only behavior.

The opposite motor is found geometrically (opposite spin, closest antipode) and
only for hexarotors. Reverse thrust is modeled as CA_REV_THR_FRAC of forward
thrust and the reversible actuator range is rescaled to [-1, 0] on publish.
Consumes failure_detector_status.motor_failure_mask, independent of detection.

* feat(uavcan): render reversible motor outputs as signed RawCommand

Re-encode reversible channels from the mixer's [min,max] range to a signed
RawCommand (negative = reverse). A channel at its disarmed value is passed
through untouched, so a stopped motor is never inverted to reverse.

* fix(dshot): match per-channel minimums to the 3D encoding

calculate_output_value() applies the 3D split when DSHOT_3D_ENABLE is set or the
channel is reversible, but the per-channel minimum was derived from the
reversible bit alone. Two problems followed.

A reversible channel made reversible at runtime kept a stale minimum, so its
neutral no longer landed on the mid-throttle split. A non-reversible channel
with 3D enabled was worse: it mapped from DSHOT_MIN, which sits below the split,
so zero commanded thrust decoded as near-full reverse.

Select the minimum from the same two facts the encoder uses. A reversible
channel keeps the range bottom so neutral lands on the split, a forward-only
channel starts just above it, and without 3D the DSHOT_MIN idle floor applies as
before. For a split channel the idle floor is applied per direction inside
convert_output_to_3d_scaling(), so it must not be added to the minimum. The
deadband is now applied only to reversible channels, since a channel that cannot
be commanded negative has no neutral to guard.

Apply the minimums from a new OutputModuleInterface::reversibleMaskChanged(),
called once the new mask is known and before any output is computed with it.
Applying them from Run() left the range one cycle behind the mask it depends on,
which in 3D mode changed the sign of the output on the transition.

The reversible mask can now change while armed, since failure recovery reverses a
motor in flight, so the reversibleOutputs() contract is updated to say so.

Changes output values for every DSHOT_3D_ENABLE=1 setup that has any
non-reversible motor. Verified on fmu-v4 with 3D-mode ESCs: forward-only
channels floor at 1001 with no samples below the split across 85 s armed, and a
runtime-reversed recovery motor tracks yaw input through the split in both
directions.

* docs(control_allocator): document motor failure recovery

Add a Motor Failure Recovery page covering CA_FAILURE_MODE, the hexarotor
stop-or-reverse behaviour of the opposite motor, CA_REV_THR_FRAC, the
detection prerequisites and which output protocols can drive a motor in
reverse.

Document the signed DroneCAN RawCommand encoding for reversible motors,
and correct the failure detector section, which claimed motor failures
are non-latching while the current-based check holds a flagged motor
until the vehicle disarms.

Add the page to the navigation and to the v1.18 release notes.

* docs(docs): subedit

* docs(docs): subedit

* refactor(control_allocator): align CA_REV_THR_FRAC naming and description

Rename the parameter member to _param_ca_rev_thr_frac to match the
parameter name, and note in the description that the reverse thrust
fraction is mostly a property of the propeller.

* docs(motor_failure_recovery): move under Actuators and target v1.19

The page documents how control allocation is reconfigured, so list it
under Actuators next to Actuator Allocation instead of under Safety, and
link it from the Actuators and multicopter Features indexes. Safety
configuration still links to it from the motor failure trigger section.

The release branch for v1.18 is already cut, so move the release notes
to main.md and set the version badges to main (PX4 v1.19).

* docs(motor_failure_recovery): spell out the reversing requirements

Any of the six motors can fail, so every motor has to be reverse-capable,
not just one. List the settings that mode 2 needs, split the per-protocol
detail out (DroneCAN reverses from the signed RawCommand alone, DShot also
needs the ESCs in 3D mode and DSHOT_3D_ENABLE to match), and say what
happens when they are not set: a reverse command comes out as forward
thrust, and on PWM the recovery motor sits at around half throttle.

Also note that motors do not have to be marked bidirectional (CA_R_REV)
for this, since the recovery motor is made reversible at runtime.

* Apply suggestions from code review

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>

* fix(uavcan_main): log final value in actuator_outputs, always run through reversible logic

We want worst case execution time all the time and as little control paths as possible. Also actuator_outputs is used to debug ESC behavior and should contain the final value that is sent out over the wire.

* refactor(DShot): directly calculate minimum dshot value in apply_min_values()

* refactor(control_allocator): static_cast, correct CA_FAILURE_MODE description

* fix(control_allocator): treat undefined parameter values as default, use matrix function to zero a collumn

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-08-07 09:46:17 +00:00
Leonardo Antonio Haitzmann a7bde41638 docs(commander): document terminate options for critical battery and lost position failsafes (#28112) 2026-08-06 15:31:13 +10:00
PX4BuildBot 723cee9bd8 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-08-03 09:31:56 +00:00
Silvan c1fdc5990d fix(docs): rename Position mode to Cruise in FW docs
Signed-off-by: Silvan <silvan@auterion.com>
2026-08-03 11:26:14 +02:00
PX4BuildBot f1bedda6fe docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-07-23 03:44:06 +00:00
Anil Kircaliali 63d7551970 fix(commander): add warning-only mode to COM_PARACHUTE (#27903) 2026-07-22 20:37:34 -07:00
PX4BuildBot fe71d3bec1 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-07-13 22:23:01 +00:00
5ea3cf8cb9 feat(navigator): extend detect and avoid module to follow regulatory standards such as ASTM F3442 (#26815)
* feat(navigator): extend detect and avoid module to follow regulatory standards such as ASTM F3442

* docs(docs): minor subedit

* refactor(navigator): reduce flash by grouping notif into same events

* docs(daa): Improve docs readability with ::: details blocks

* fix(navigator): single event when on ground with conflict

* refactor(boards): increase flash length from 4M - 128k to 5M - 128k

* rework(general): define DAA standard at build with new CONFIG_NAVIGATOR_ADSB_F3442

* clean(navigator): minor changes to clean the PR

* feat(boards): add CONFIG_NAVIGATOR_ADSB_FAKE_TRAFFIC in visionTargetEstStatic.px4board

* rework(daa): reduce amount of abstractions and minor cleaning

* refactor(boards): allyes revert flash length to 4M-128K

* refactor(boards): allyes increase flash length to 5M-128K

* rework(daa): rework event notifications to improve clarity

* docs(docs): move details inside of ::: details block

* docs(docs): run npx prettier

* refactor(daa): avoid void mutator functions

* docs(docs): Improve Python helper to decode daa unique id

* rework(daa): move encoded id handling to the adsb lib and refactor on_active

* refactor(daa): naming and zero init

* fix(daa): move dataman dep from daa level to unit test level

* refactor(daa): define common daa_input and rework process_transponder_report

* fix(daa): remove stale todo

* refactor(daa): rename crosstrack_based_daa to crosstrack_standard

* refactor(daa): rename F34_ params to DAA_

* docs(docs): revert changes to autogenerated docs

* docs(docs): Add Detect And Avoid in index.md

* refactor(daa): update message on init failed

* refactor(daa): only publish most_urgent conflict once in on_active()

* refactor(daa): move conflict buffer handling in the adsb lib

* refactor(daa): move notifications into new class ConflictNotifier and only notify once per cycle

* refactor(daa): uninit _cycle_changes to store into .bss (and save flash)

* docs(docs): remove unused image link

* refactor(daa): move automated action policy to the adsb lib

* refactor(daa): move self detection into adsb lib as DaaTrafficFilter

* refactor(daa): minor changes in unit tests

* refactor(daa): merge DaaTrafficFilter and DaaEncoding

* fix(daa): fix CI by removing navigator from the DAA deps

* refactor(daa): reduce stack size

* fix(daa): advertise _fake_traffic_pub in constructor

* refactor(daa): Comments only,  simplify and reduce comments

* fix(daa): brief comment missing end star

* Disable CONFIG_NAVIGATOR_ADSB in ark_fpv_default board

* docs(docs): General clarifications and remove the 1.18 badge

* refactor(daa): cleaning

* refactor(daa): minor cleaning

* refactor(adsb): simplify conflict tracker assuming push_back cannot fail

* build(cmake): cleaner fix to protect regex alternations

* refactor(daa): Crosstrack, remove unit test requiring finite yaw (yaw not used by standard)

* refactor(daa): minor cleaning and fix callsign to uint64

---------

Co-authored-by: jonas <jonas.perolini@rigi.tech>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-07-13 16:14:42 -06:00
Silvan Fuhrer 7cb2ac28ba feat(commander): add NAV_RCL_ACT 7 (Hold without failsafe) (#27792)
Signed-off-by: Silvan <silvan@auterion.com>
2026-07-02 14:42:34 +02:00
Sijia d018063b19 docs(failsafe): clarify Offboard proof-of-life and COM_OBL_RC_ACT docs (#27636) 2026-06-11 15:15:37 +10:00
ece74e8d24 refactor(navigator): Removed geofence breach avoidance feature (#27465)
* refactor(navigator): removed geofence breach avoidance library
- was disabled by default as an experimental feature
- is too unpredictable given that it commands reposition points, which could
be arbitrarily close to objects
- does not work well in space constrained scenarios

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* fix(docs): removed reference to GF_PREDICT

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* style(navigator): fix formatting

* docs(safety): add minimal guidelines on how to strictly avoid geofence breaches

* docs(safety): slightly simplify wording

* docs(safety): revert typo

* docs(docs): Tweak

---------

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Balduin <balduin@auterion.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-06-05 10:47:35 +03:00
pmjntand_pmjn_ 58b0009415 docs(compass): remove redundant CAL_MAGx_PRIO clarification (#27414)
The line "Priority is assigned automatically during calibration..."
added in #27393 duplicates information already conveyed by the
surrounding paragraph. Hamish flagged the redundancy in code review.

This PR was AI-assisted (Claude Code) and reviewed by a human
before submission.

Co-authored-by: _pmjn_ <pcminh170701@gmail.com>
2026-05-20 14:09:56 -06:00
pmjntandpcminh bbb7fdc2d2 docs: clarify compass priority is set automatically (#27393)
Fixes Algora bounty: https://github.com/PX4/PX4-Autopilot/issues/19970

This PR was AI-assisted (Claude Code) and reviewed by a human
before submission.

Co-authored-by: pcminh <pham.cao.minh@talentnet.vn>
2026-05-19 16:48:26 -06:00
PX4BuildBot 7261e064c7 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-05-18 07:46:52 +00:00
Matthias Grob fcb627f572 fix(commander): prevent arming if enabled parachute check fails 2026-05-18 09:40:09 +02:00
Hamish Willee 7f5d7ccb1c docs(update): Subedit 2026-05-18 09:40:09 +02:00
gguidone 66a1ae9704 docs: add parachute health failsafe documentation
Update safety.md, peripherals/parachute.md, and releases/main.md to document the extended COM_PARACHUTE parameter and the new configurable in-flight failsafe behaviour.
2026-05-18 09:40:09 +02:00
Julian Oes f81559ec64 fix(Tools and docs): PX4 Pro isn't really a thing (#27366)
These are just leftovers, probably worth cleaning up.
2026-05-17 21:25:37 -06:00
PX4BuildBot 23262bff1d docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-05-11 16:10:20 +00:00
48ea8ee939 feat(safety): GNSS redundancy failsafe (#26863)
* feat(gpsRedundancyCheck): add GPS redundancy failsafe with divergence check

- Monitors GPS count and triggers configurable failsafe (COM_GPS_LOSS_ACT) when count drops below SYS_HAS_NUM_GPS
- Tracks online (present+fresh) and fixed (3D fix) receivers separately; emits "receiver offline" vs "receiver lost fix"
- Detects position divergence between two receivers against combined RMS eph uncertainty plus lever-arm separation
- Pre-arm warns immediately; in-flight requires 2s sustained divergence to suppress multipath false alarms
- Adds GpsRedundancyCheckTest functional test suite

New parameters: SYS_HAS_NUM_GPS, COM_GPS_LOSS_ACT

* feat(sensor_gps_sim): publish second GPS instance using SENS_GPS1 lever arm params

When SENS_GPS1_OFFX or SENS_GPS1_OFFY is non-zero, publish a second sensor_gps instance offset by those values from the vehicle position.

fix(sensor_gps_sim): give second instance distinct device_id

Both simulated GPS instances previously shared the same device_id (address 0x00). This prevented testing the device-ID matching path in SITL since both slots would match the same receiver.

* refactor(gpsRedundancyCheck): address code review feedback

* refactor(gpsRedundancyCheck): address code review feedback

* docs: add GNSS check failsafe documentation

Update safety.md and releases/main.md to document the new GNSS check
failsafe (SYS_HAS_NUM_GNSS, COM_GPS_LOSS_ACT) introduced in PX4.

* docs(update): Subedit to taste

* refactor(gps): move GNSS redundancy detection into sensors module

Add GnssRedundancyStatus topic and GnssRedundancyMonitor in
vehicle_gps_position. Commander's gpsRedundancyCheck becomes a thin
consumer of the new topic. Detection lives with blending/fallback in
one module.

Also rename COM_GPS_LOSS_ACT -> COM_GNSS_LSS_ACT.

* docs(safety): clarify GNSS failsafe wording and rename COM_GNSS_LSS_ACT

* refactor(failsafe): consistent default case as fallback for existing option

* Rename COM_GNSS_LSS_ACT -> COM_GNSSLOSS_ACT

for readability

* fix(gnssRedundancyCheck): move logic back into the commander checks and various improvement suggestions

- Rename to GNSS instead of gps
- Use hysteresis
- Small logic refactorings
- Adapt unit tests to different interface
- User reporting on which GPS is offline or doesn't have a fix

* docs(gnssRedundancyCheck): simplify explanations

* refactor(gnssRedundancyCheck): update year numbers in copyright

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-05-11 18:02:55 +02:00
Hamish Willee f1c59932ee docs(docs): Hide the sidebar on the failsafe simulation page (#27298) 2026-05-08 06:42:08 +10:00
PX4BuildBot 095f5a48c6 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-05-07 15:51:05 +00:00
PX4BuildBot 4822e0a821 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-05-07 15:28:55 +00:00