Commit Graph
1673 Commits
Author SHA1 Message Date
PX4BuildBot fc6bdd504f docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-04 08:34:22 +00:00
Hamish Willee 79431c0a3c docs(boards): restructure ARKV6X page to the board template (#29587)
* docs(boards): restructure ARKV6X page to the board page template

Move the existing content into the flight-controller page template's
sections, headings and anchors, with no change to what the page says,
so that the content additions that follow can be reviewed on their own.

The flat Sensors, Microprocessor, Other Features, Power Requirements and
Additional Information lists become Specifications sub-sections, Where to
Buy moves after them, and See Also becomes Further Information. Port
labels are in code style, and headings, units and spelling follow the
docs style guide. No page links to the anchors that changed.

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

* docs(boards): add ARKV6X specifications, PWM outputs and setup sections

Fill in the sections the board page template expects, from the board
source (boards/ark/fmu-v6x) and ARK's own documentation.

- Specifications: core, IO processor, sensor buses, the IIM-42653
  Extended Range variant, interface counts, power monitoring and
  operating temperature
- PWM Outputs: FMU outputs, DShot and bidirectional DShot support,
  timer groups, PX4IO outputs on carriers that have one, and the
  FMU_CAP capture channel
- Power, Voltage Ratings, Ethernet, SD Card, Assembly (Radio Control,
  GPS & Compass, Telemetry, CAN) and Debug Port, describing the ARK PAB
  Carrier where the connectors depend on the carrier
- Serial Port Mapping: flow control column, and GPS1 label
- Version badge, firmware build tip, and links to ARK's current docs,
  datasheet and 3D model

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

* docs(boards): fix ARKV6X version badge and voltage ratings

The ARKV6X target was backported to the 1.13 branch and first shipped
in v1.13.1, so the badge said the board wasn't supported on v1.13.x
when it is.

The voltage ratings had been taken from the Pixhawk 6X, and claimed
the power inputs survive up to 10 V. ARK's datasheet gives 4.8 V
minimum and 5.5 V absolute maximum for the module, so use ARK's
figures, with the ARK PAB Carrier's input priority and protection
thresholds from its own page.

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

* docs(boards): apply ARKV6X review style fixes

Apply the style findings from review: carrier port labels as printed
(UART4/I2C3, RC/SBUS), MCU peripheral names as plain text and device
paths in code, links for the first use of terms the page relies on,
the Radio Controller option label, the carrier's unsupported PPM and
DSM ports, Ethernet speed, mounting hole spacing, and the board's
other build targets.

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

* docs(boards): apply ARKV6X review minor fixes

Link ARK's and InvenSense's canonical URLs rather than ones that
redirect, give the input voltage range from ARK's datasheet, count
power monitoring by power inputs, and drop casual italics.

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

* docs(boards): apply ARKV6X review fixes

Apply the fixes from dakejahl's review of #29587, checked against the
carrier schematic and the board source. Correct the stale ARK PAB Carrier
voltage thresholds and warn that inputs above the module's 5.5 V absolute
maximum still pass through. Note that the Extended Range needs v1.14.
Cover DSM binding and power on the RC/SBUS port, FMU_CAP as a PWM output,
encrypted_logs output labelling, and INA238 setup for the 12S PAB power
module. Format the USB pin table on the PAB page.

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

* docs(boards): apply ARKV6X board review fixes

A board docs review against the board source and sibling pages found
that the ARKV6X Ethernet uses a static 192.168.0.4 address with no DHCP,
so the defaults on the linked Ethernet setup page don't apply. It also
found that the DSM port can't be read in any build, because it carries
only a timer capture pin, and that the encrypted_logs build loses the
carrier's PX4IO outputs and RC input as well as the output labels. Align
the reference-design and standards links, Ethernet speed and capture-pin
details with the FMUv6X sibling pages, and give the RC/SBUS connector type
from ARK.

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

---------

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
2026-11-04 15:22:39 +11:00
Jonas Perolini 155f415168 fix(navigator): circle instead of land for a fixed-wing on RTL_TYPE 5 without a rally point (#29479)
Assisted-by: Claude:claude-opus-5-5
2026-11-04 01:05:20 +01:00
PX4BuildBot 53434189b5 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-03 18:45:51 +00:00
Jacob DahlandBeniamino Pozzan be03ec79c9 feat(uxrce_dds_client): accept RTCM corrections from ROS 2 (#29368)
* feat(uxrce_dds_client): accept RTCM corrections from ROS 2

ROS 2 setups that need RTK had to keep a MAVLink link beside DDS just for GPS_RTCM_DATA. Routing by device_id gives each DDS source its own rtcm_corrections instance, so two publishers never interleave their byte streams. The DDS side needs no framing: the injectors reframe the stream from arbitrary chunks.

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

* docs(releases): note RTCM corrections over uXRCE-DDS

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

* fix(uavcan): bound RTCM corrections length before forwarding

uXRCE-DDS is the first rtcm_corrections source that does not bound len. A ROS 2 RtcmData with len over 300 made the DroneCAN forwarder read past the data array and broadcast that memory as RTCMStream.

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

* docs(msg): drop the uXRCE-DDS routing note from RtcmData

It described the client's routing rather than the message, and the device_id field comment already covers it.

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

* fix(uavcan): bound moving-baseline length before forwarding

The forwarder trusted the publisher's len, the same gap just closed for rtcm_corrections. No current publisher exceeds the array, so this only keeps a future one from reading past it.

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

---------

Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2026-11-03 11:39:08 -07:00
Jacob Dahl 5b518d2d95 refactor(mavlink)!: drop the deprecated float mission protocol (#29558)
* refactor(mavlink)!: drop the deprecated float mission protocol

MISSION_ITEM and MISSION_REQUEST have been deprecated since 2020. Keeping them meant a mode flag that a single float message flipped for the next transfer, so a MISSION_REQUEST was answered with MISSION_ITEM instead of the MISSION_ITEM_INT the spec asks for, and integer items were read through float structs by pointer casts. A MISSION_REQUEST is now answered like MISSION_REQUEST_INT, and an upload that sends MISSION_ITEM is rejected with MAV_MISSION_UNSUPPORTED.

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

* refactor(mavlink): say why MISSION_ITEM is still handled

The case looks like a leftover of the float protocol. It stays so a
float upload is answered with MAV_MISSION_UNSUPPORTED at once instead
of being ignored until the sync timeout. The hash static_assert now
covers y as well as x.

Assisted-by: Claude:claude-fable-5-1
2026-11-03 10:51:37 -07:00
Jonas Peroliniandjonas a1b24f1f19 refactor(navigator): simplify the mission route cache (#29564)
* refactor(navigator): drop the route cache land item sync

Missions are only written in place to update DO_JUMP counters, and the
published land index always points at a landing item. The land item sync
therefore returned at its first check on every write.

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

* refactor(navigator): drop the route cache API only tests use

No flight code borrows the mission view, reads the sync result or
invalidates the cache. A ready cache has loaded every item, so a sync
patches it like the loaded prefix. The generation now only discards
stale read responses. Tests no longer invalidate a cache that is fresh
or about to reload anyway.

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

* refactor(navigator): simplify the route cache load states

A cache that is not ready loads unless a retry is scheduled, so
validation_pending only restated the retry time. Drop it, together with
what it made redundant:
- The full cache's initialized, source_valid and too_large flags become
  a count of -1 and one loadable flag.
- A read response is matched by its generation alone.
- The land item guards could not fail.

safePointUpdatePending() only negated safePointsReady(), which RTL now
uses directly.

The generation is now the only filter for a stale read, so two tests
receive that read before the write, and a land test also covers a retry
that succeeds.

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

---------

Co-authored-by: jonas <jonas.perolini@rigi.tech>
2026-11-03 16:24:01 +01:00
PX4BuildBot 6e34633a02 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-03 15:23:05 +00:00
Jacob Dahlanddanielbuleandra ae7977f868 feat(dshot): log the ESC EEPROM dumps (#28800)
* fix(dshot): retry telemetry init until the motor mask is known

rc.serial issues `dshot telemetry` right after `dshot start`, and the first
Run() usually handles it before the mixer has reported the outputs.
initSettingsHandlers() then latches with an empty motor mask, so no ESC
settings handler is ever created and the EEPROM is never read.

Co-authored-by: danielbuleandra <daniel.buleandra@auterion.com>
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* feat(logger): log the ESC EEPROM dumps

The raw dump is logged through the existing queued esc_eeprom_read topic.
The layout depends on the ESC firmware and its EEPROM revision, so decoding
happens offline in Tools/esc_eeprom_decode.py against the schema the ESC
vendor publishes.

A subscriber that joins after the first publish only sees the newest queued
entry. The logger subscribes on a sweep that can lag a new topic by half a
second while all ESCs answer within milliseconds of each other, so the topic
is advertised when the settings handlers are created, well before the first
request goes out at ESC_INIT_TELEM_DELAY.

Co-authored-by: danielbuleandra <daniel.buleandra@auterion.com>
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* feat(dshot): publish and refresh cached ESC settings

Logs can start after boot or during flight, so cached settings must be published independently of arming. The queue must retain a complete set of ESC dumps for the logger and MAVLink stream.

Keep programming uninterrupted and cached data valid across saves and reconnects. Failed reads remain pending with spaced retries so one unresponsive ESC cannot starve the rest.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Assisted-by: Codex

* fix(tools): decode repeated ESC dumps across firmware layouts

Logs contain repeated dumps and may mix EEPROM layouts. Collapse unchanged samples, apply the schema's version bounds and disabled values, and keep overlays immutable so one ESC cannot change another's decoding.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Assisted-by: Codex

* fix(dshot): bound ESC settings read retries

A pending settings read blocks the telemetry round-robin until it completes or times out, and the retry spacing was kept per ESC. With several ESCs that never answer, reads ran back to back, telemetry went stale and the arming check reported every ESC offline.

Space retries across all ESCs, give up on one after three failed reads until it reconnects or is asked for again, and time a read out at 100 ms: AM32 answers within milliseconds of the sixth frame, and anything under the 400 ms arming-check window keeps telemetry fresh.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(dshot): keep programming active until the save is sent

The flag was cleared when the save command was queued, so it no longer guarded the save itself. Only the finished() gate in the vehicle command loop kept a CONFIGURE_ACTUATOR from replacing it. Clear the flag when the last save frame goes out so the guard covers the whole sequence.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(dshot): send each ESC EEPROM read once per MAVLink link

The once-a-second republish that keeps the dumps in every log also went out on every link with ESC_EEPROM configured, low-bandwidth ones included, one message per ESC per second. timestamp_sample records when a dump was read, so the stream forwards each read once per link and still reaches a link that connects later.

A motor waiting on an EDT retry or out of EDT attempts took the command slot without sending anything, so settings reads never ran while any ESC left EDT unconfirmed. Vehicle commands now wait for an outstanding settings read, which ends within 100 ms, instead of CONFIGURE_ACTUATOR being rejected.

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

* fix(msg): queue one ESC EEPROM dump per esc_status ESC

The republish queues every cached dump at once, so the queue needs one entry per ESC and no more. DSHOT_MAX_MOTORS is capped at CONNECTED_ESC_MAX, and the static_assert in AM32Settings.cpp keeps the two in step.

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

* fix(dshot): mark the settings save explicitly

Programming ended when any finished command carried the value 12, which the address and value frames do whenever they write offset 12 (active brake power) or a value of 12. The write then stopped part way, with the ESC still in programming mode and the next write resuming mid-sequence.

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

* fix(dshot): keep settings requests and writes to configured motors

An all-ESC save requested settings for every motor slot, and the single-ESC request and write paths took any index below the motor limit. Reads only go to motors with a settings handler, so the other bits stayed pending in dshot status forever. A write to an index with no output was never sent, so the command never finished and blocked every later command and the serial telemetry until reboot.

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

* docs(dshot): describe the logged ESC settings and their decoding

The page said the settings are only read at boot and only reach a ground station.

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

* feat(dshot): set the ciclicity to 10s for eeprom logging

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: danielbuleandra <daniel.buleandra@auterion.com>
2026-11-03 08:14:51 -07:00
Jonas Peroliniandjonas a408b6584a fix(navigator): stop Home updates from disabling mission-based Return (#29441)
* fix(navigator): keep RTL using the checked mission after a Home update

Since 25a903f403 (#27804), RTL uses the mission only while the mission
check result carries the current Home update counter. Mission reruns
the check only for a new mission or fence, or when Mission mode
activates, but Commander also updates Home at arming, at takeoff
outside a mission, when the disarmed vehicle is moved, on the GNSS
altitude correction in the first 120 s after takeoff and on DO_SET_HOME.
After any of these, and until the check ran again, RTL_TYPE 2 and 4
returned directly instead of along the mission, types 1 and 3 ignored
the mission landing and the remaining time estimate used the direct
path. Type 1 is the FW and VTOL default, so every FW or VTOL that armed
outside Mission ignored its mission landing.

Match only the mission and fence IDs, so a Home update leaves the
verdict in place as it did before 25a903f403. Rechecking on every Home
update instead would recheck in flight: the RTL mission modes inherit
MissionBase::on_inactive() and run every cycle, so even the inactive
Return mode would rerun the check, and a check that now fails makes
Commander fail over out of Mission.

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

* fix(navigator): let Return's mission modes keep Mission's verdict

RTL creates a new mission-based Return mode whenever the return type
changes, for example when RTL_TYPE 4 switches from the reverse to the
forward mission. The new mode starts with its mission check unchecked,
so its first cycle reruns the check if Home was updated since Mission
checked the mission. Before the previous commit RTL used the mission
only while the result carried the current Home counter; now it also
creates these modes after a Home update, in flight too. There a
recheck with the new Home can reject the mission being flown: an
absolute takeoff altitude now below Home, GF_MAX_HOR_DIST or
GF_MAX_VER_DIST measured from the new Home over items already flown,
or a landing relative to Home now above its absolute approach. The
result is shared, so Commander would fail over out of Mission, and a
Return that creates the mode at activation would loiter instead of
following the mission.

RTL creates these modes only for a mission and fence that Mission has
already checked, so start them with the check complete. A new mission
or fence still triggers a check through the existing path, and in
flight a Home update keeps the verdict, as it does for Mission.

A mode created at Return activation, or in the last inactive cycle
before it, also no longer reloads its items in its first active cycle.
On the ground that reload started the mission that on_activation() had
just declined because the vehicle is landed (for RtlDirectMissionLand,
its landing).

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

* fix(navigator): recheck the mission when armed on the ground

Mission checks the mission when the mission or fence changes and when
Mission mode starts, not when Home is updated, and RTL now keeps that
verdict after a Home update. Home follows the disarmed vehicle and is
set again at arming and on DO_SET_HOME, so a verdict from an older
Home can be wrong for the Home the vehicle takes off from. For example
a fixed-wing landing relative to Home ends up above its absolute
approach when Home moves up, which
FeasibilityChecker::checkFixedWingLandApproach() rejects, yet Return
with RTL_TYPE 1 (the fixed-wing and VTOL default) would fly it.

Mission, which owns the check, now asks for a recheck when it is armed
on the ground before takeoff and the verdict was computed with an
older Home. The existing path reruns the check and, if Mission is
active, reloads its items. While disarmed the verdict is kept, so
moving the vehicle around does not recheck on every Home update. No
state is needed: Commander clears takeoff_time only at disarm, and the
land detector reports the takeoff before Commander sets Home for it,
so a Home update in flight or after a landing keeps the verdict.

So on the ground the check reruns once armed; in flight a Home update
keeps the verdict, and relative altitudes (also Return's mission
landing) follow the current Home, as for an active Mission.

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

* docs(navigator): correct why RTL does not compare Home

The comment said a Home update never re-runs the mission check, but
since the previous commit Mission rechecks once armed on the ground.

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

* refactor(navigator): clarify intent behind check

---------

Co-authored-by: jonas <jonas.perolini@rigi.tech>
2026-11-03 16:11:21 +01:00
Ahmet Burak TektasandJacob Dahl 216039a12b docs(releases): add v1.17 upgrade notes for parameter files, failsafes and defaults (#29356)
* docs(releases): note that v1.17 parameter files are not migrated

The upgrade guide calls several renamed parameters auto-migrated. That
holds only when PX4 upgrades the parameters stored on the vehicle;
loading a parameter file saved on v1.17 in QGroundControl sets each
parameter by name, so values under old names are dropped and RC*_REV
saved as -1.000000 is loaded as 0.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: A.Burak Tektas <15087318+Abtektas@users.noreply.github.com>

* docs(releases): add failsafe, parachute and default changes to the upgrade guide

The upgrade guide does not list three changes that alter behaviour on an
upgrade from v1.17 without changing the stored parameters. Bit 1 of
COM_RCL_EXCEPT and COM_DLL_EXCEPT now covers all auto modes,
COM_PARACHUTE=1 no longer prevents arming, and FD_ACT_EN and
SENS_MAG_AUTOCAL are disabled by default.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: A.Burak Tektas <15087318+Abtektas@users.noreply.github.com>

* docs(releases): note the new EKF2_AGPn_NOISE default

Only stored values are migrated, so a vehicle on the v1.17 default of
0.9 m takes the new default of 1.0 m.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: A.Burak Tektas <15087318+Abtektas@users.noreply.github.com>

* docs(releases): cover the ESC checks that FD_ACT_EN now gates

FD_ESCS_EN was removed, so the not-all-ESCs-armed disarm now depends on
FD_ACT_EN, whose default became 0, and ESC offline and fault reports
depend on COM_ARM_CHK_ESCS. Also note that a v1.17 file loaded in
QGroundControl restores old defaults, that Land and Precision Landing
ignore data link loss with or without the exception bit, and link the
main PR for COM_PARACHUTE.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: A.Burak Tektas <15087318+Abtektas@users.noreply.github.com>

* docs(releases): note that COM_ARM_CHK_ESCS now triggers the actuator failsafe

With COM_ARM_CHK_ESCS set, v1.18 counts an offline ESC or any ESC fault
as a motor failure, so COM_ACT_FAIL_ACT acts in flight. v1.17 only
reported ESC faults, and item 16 recommends enabling the check.

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

* docs(releases): note the ESC fault disarm that FD_ESCS_EN took with it

The v1.18 spool-up check under FD_ACT_EN only covers ESCs that are not
armed, so no setting restores the v1.17 disarm on an ESC fault.

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

---------

Signed-off-by: A.Burak Tektas <15087318+Abtektas@users.noreply.github.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-11-02 12:59:40 -07:00
PX4BuildBot dc918f9918 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-02 17:13:47 +00:00
PX4BuildBot 2e795d1136 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-02 09:37:57 +00: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
Jonas Peroliniandjonas 6429206ea2 fix(navigator): Return executor lifecycle and VTOL approach status (#29444)
Assisted-by: Claude:claude-opus-5-5
Co-authored-by: jonas <jonas.perolini@rigi.tech>
2026-11-02 07:12:53 +01:00
PX4 Build BotandCrowdin Bot 826e6b154a docs(i18n): PX4 guide translations (Crowdin) - ko (#29559)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-11-01 18:38:34 +11:00
PX4 Build BotandCrowdin Bot 3ff73051b8 docs(i18n): PX4 guide translations (Crowdin) - zh-CN (#29561)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-11-01 11:27:16 +11:00
PX4 Build BotandCrowdin Bot 286ee192dd docs(i18n): PX4 guide translations (Crowdin) - uk (#29560)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-11-01 11:22:58 +11:00
PX4BuildBot ddeee9887a docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-10-31 18:12:39 +00:00
PX4BuildBot 030ed4d88c docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-10-31 16:56:01 +00:00
Julian Oes 36919f8415 fix(mavlink): accept unsigned traffic only on traffic receiver links (#29488) 2026-10-31 10:49:24 -06:00
abhijith cf5756b069 feat(boards/agam): add v6xrt secure boot (#28950)
Adds secureboot and bootloader_secureboot variants for fmu-v6xrt
(ed25519 image signing).

The image starts with the 0x2000 FlexSPI boot header, so the TOC sits
at 0x2800, past the vector table, and its first entry starts at
APP_LOAD_ADDRESS.

bl.c: apply APP_VECTOR_OFFSET to the vector base when the TOC has no
vectors entry. No change for boards with a zero offset.

Bootloader grows 8192 B to 96656 B (73.7% of 128 KB).

Tested on hardware: signed image boots; unsigned, tampered and
test-key-signed images are refused.

Signed-off-by: abhijithcv <abhijithcv1212@gmail.com>
2026-10-31 19:47:10 +13:00
PX4BuildBot 266ed648d5 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-10-30 22:53:21 +00:00
Ahmet Burak TektasandJacob Dahl b3cee891b2 fix(ekf2): keep v1.17 auxiliary global position settings on upgrade (#29351)
* fix(parameters): migrate EKF2_AGP_* to EKF2_AGP0_*

The auxiliary global position parameters became per-source EKF2_AGP<n>_*
parameters in #26306 without a translation, so on an upgrade from v1.17
the stored EKF2_AGP_CTRL, _MODE, _DELAY, _NOISE and _GATE are dropped as
unrecognised. Move them to the first slot.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: A.Burak Tektas <15087318+Abtektas@users.noreply.github.com>

* fix(ekf2): mark EKF2_AGPn_ID as reboot required

The sources are created when EKF2 starts, for the slots whose ID is not
zero, so a changed ID only takes effect after a reboot.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: A.Burak Tektas <15087318+Abtektas@users.noreply.github.com>

* docs: explain EKF2_AGPn_ID for auxiliary global position

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: A.Burak Tektas <15087318+Abtektas@users.noreply.github.com>

* fix(parameters): set EKF2_AGP0_ID when migrating a v1.17 AGP source

Migrating EKF2_AGP_* alone fuses nothing: a slot with ID 0 has no source. v1.17 messages had no ID, but a v1.17 source now arrives with ID 1 either way, from the message translation node or as GlobalPositionMeasurementInterface's default, so a non-zero EKF2_AGP_CTRL also sets EKF2_AGP0_ID to 1.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: A.Burak Tektas <15087318+Abtektas@users.noreply.github.com>
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-10-30 16:46:55 -06:00
PX4BuildBot ecda339a7b docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-10-30 18:02:18 +00:00
PX4BuildBot 6832906c46 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-10-30 12:54:45 +00:00
Mathéo Taillandier d787172b81 feat(drivers): add a max range param for the LL40LS distance sensors (#29434) 2026-10-30 13:48:32 +01:00
PX4BuildBot 64f85effd2 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-10-30 00:21:40 +00:00
Julian Oes f0ce24e153 build(docs): update vulnerable docs dependencies (#29498)
Clears the Dependabot alerts for @xmldom/xmldom, markdown-it and
@vue/server-renderer in the docs toolchain. xmldom is pinned to 0.9.8
by speech-rule-engine, so it needs a resolutions override; vue is
re-resolved within vitepress's existing range.

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

Signed-off-by: Julian Oes <julian@oes.ch>
2026-10-30 09:07:40 +11:00
PX4BuildBot c53575bddb docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-10-29 15:53:20 +00:00
dependabot[bot] f84042f1a5 build(deps): bump source-map-js from 1.2.1 to 1.2.2 in /docs (#29015)
Bumps [source-map-js](https://github.com/7rulnik/source-map-js) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/7rulnik/source-map-js/releases)
- [Changelog](https://github.com/7rulnik/source-map-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/7rulnik/source-map-js/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: source-map-js
  dependency-version: 1.2.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 04:28:49 +13:00
Michael FritscheandHamish Willee d998124a2a feat(rover): add SurfaceVehicleCourseSetpoint for course hold (#29243)
* docs(msg): clarify RoverPositionSetpoint field descriptions

* feat(rover): introduce a course parameter to get rid of the course-hold workaround hack (#29245)

* fix(ros2): update ros2 interface lib pin to include course and target_ned in RoverPositionSetpoint

* style(msg): use single space before comments in RoverPositionSetpoint

The column padding triggers the msg doc generator's multiple-whitespace
note on every field.

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

* fix(msg): update RoverPositionSetpoint descriptions

* feat(msg): add SurfaceVehicleCourseSetpoint

* fix(repositories): update px4 ros2 interface lib version

* fix(msg): add comment that yaw in RoverPositionSetpoint msg is currently not used

* fix(msg): rename surface_vehicle_course_setpoint to planar_course_setpoint

* fix(rover): keep the course line while a course setpoint is streamed

A PlanarCourseSetpoint without start_ned re-anchored the line at the
vehicle position on every message. Publishers that stream the setpoint,
the usual pattern over ROS 2, therefore never got cross-track error
corrected: in SITL the rover drifted 3.8 m off course over 54 m. Keep the
current line while the same course is published without a start
position, and only re-anchor when the course changes.

Also document that a NaN course leaves the position controller idle and
that yaw is currently unused, matching RoverPositionSetpoint.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Fritsche <frimi999@gmail.com>

* fix(msg): rename planar_course_setpoint to ugv_usv_course_setpoint

* docs(msg): add documentation for UgvUsvCourseSetpoint

* feat(rover): proper guided course implementation

* fix(rover): rename course setpoint cruising_speed param to speed

* fix(msgs): rename ugv_usv_course_setpoint.msg to surface_vehicle_course_setpoint.msg

* docs(rover): clarify course setpoint wording

Doc review fixes for the course hold docs and message comments:
unclear antecedents, a misplaced modifier, a missing verb, and the
pure pursuit sentence separated from the course setpoint text it no
longer described. The yaw @invalid tag now matches in both messages,
since no controller reads the field.

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

* Apply suggestion from @hamishwillee

* docs(rover): fix course tracking formulation for the different rover types

* fix(rover): maintain current speed upon guided course mode entry

* docs(rover): clarify guided course mode documentation.

* fix(rover): handle nav_state_land in rovers

* fix(rovers): polish the used terminology

* docs(rover): switch to list for guided course mode usable commands

---------

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Signed-off-by: Michael Fritsche <frimi999@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-10-29 11:12:41 -04:00
Jonas Peroliniandjonas 91acc1b4fa fix(navigator): use the home altitude for the reverse Return landing (#29484)
* fix(navigator): use the home altitude for the reverse Return landing

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

---------

Co-authored-by: jonas <jonas.perolini@rigi.tech>
2026-10-29 14:52:19 +01: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
Samuel Adetunji e9418b3948 fix: Typo in ROS2 docs (#29477) 2026-10-29 10:24:30 +11:00
Abel Mendoza ebbb909885 feat(simulation): apply VIO failure injection in gz_bridge (#29361)
The Gazebo bridge publishes vehicle_visual_odometry from the model's
odometry topic without consulting the failure state, so `failure vio`
had no effect on Gazebo (the support table listed it as `—`).

Route the odometry sample through the shared failure_injection::process()
so `off` suppresses the publication and `stuck` replays the last good
sample with fresh timestamps, matching how the bridge already handles
GPS. Allow `stuck` for VIO in the manager's capability table so the
command is not rejected before it reaches the bridge.

Add a functional test for the odometry callback (stuck, off, isolation
from a GPS failure, recovery) and pin VIO's capabilities in the
FailureTable catalogue test. Update the failure injection docs.

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

Signed-off-by: Abel Mendoza <abelxmendoza@gmail.com>
2026-10-28 16:52:26 -06:00
PX4BuildBot 57495ab932 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-10-28 19:06:39 +00:00
PX4BuildBot 02d6a0619d docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-10-28 08:40:55 +00:00
PX4 Build BotandCrowdin Bot 1b2030df2f docs(i18n): PX4 guide translations (Crowdin) - uk (#29418)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-10-28 15:34:38 +11:00
PX4 Build BotandCrowdin Bot 22824f54dd docs(i18n): PX4 guide translations (Crowdin) - ko (#29417)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-10-28 15:34:35 +11:00
PX4 Build BotandCrowdin Bot 29f0ae2668 docs(i18n): PX4 guide translations (Crowdin) - zh-CN (#29419)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-10-28 15:31:44 +11:00
SaibernardandHamish Willee c1159d8e7c docs(releases): add three notes lines, move the GNSS height line to 1.18 (#29420)
* docs(releases): add three notes lines, move the GNSS height line to 1.18

PX4/PX4-Autopilot#28944 widens the dataman client IDs to 16 bit,
PX4/PX4-Autopilot#29050 starts Precision Land at the current position
when it is selected as a mode, and PX4/PX4-Autopilot#28997 stops the
magnetometer thermal compensation from reading the accelerometer sample
as the barometer sample.

The GNSS height noise line moves from main.md to the Estimation section
of 1.18.md, since PX4/PX4-Autopilot#29083 put that fix on release/1.18,
and the Safety section of 1.18.md gets the battery disconnect line for
PX4/PX4-Autopilot#29081.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>

* docs(releases): note the Offboard loss hold for NAV_RCL_ACT 7 in the v1.18 notes

PX4/PX4-Autopilot#28961 makes an Offboard vehicle without manual control
go to Hold when its companion stops, which value 7 promised, and the
backport PX4/PX4-Autopilot#29421 put it on release/1.18, so the line for
that option says so.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>

* docs(releases): move the tempcomp line to 1.18 and drop the precland line

The #28997 magnetometer thermal compensation fix was backported to
release/1.18 by #29458, so its line moves from main.md to a new Sensors
section in 1.18.md, together with the #28750 magnetometer selection line,
which is also a sensors module change rather than an estimator one.

The #29050 Precision Land line is dropped: it reverts behaviour that
#27836 introduced on main after release/1.18 branched, so both ship in
the same release and users upgrading from v1.18 see no change.

The NAV_RCL_ACT 7 line now states that the Hold on companion loss only
applies when COM_OBL_RC_ACT is a manual mode, and the dataman and battery
disconnect lines are reworded for clarity.

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

---------

Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-10-28 13:06:31 +11:00
Jooyoung Lim a10f60006e docs(flight_controller): add mailto to Accton Godwit GA1 sales links (#29462)
The two sales@accton-iot.com links had no mailto: scheme, so the docs
site rendered them as relative links (./sales@accton-iot.com) that
return 404. The support address on the same page already uses mailto:.

Assisted-by: Claude:claude-opus-5-5
2026-10-28 12:13:22 +11:00
PX4BuildBot a266432b71 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-10-28 00:41:54 +00: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
Hamish Willee 4f0bb11c53 docs(sensor): restructure Benewake TFmini page (#29459)
The page predated the rangefinder page template: it had no specifications,
pinout, firmware support or testing sections, and claimed TFmini-i support,
although the TFmini-i only has RS-485 and CAN interfaces that the tfmini
driver can't read. The page now covers the TFmini-S and TFmini Plus, sourced
from Benewake's current datasheets and manuals and the driver, and the
rangefinder index lists each model.

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

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
2026-10-28 11:01:28 +11:00
Hamish Willee 4aeafd9ec6 docs(sensor): restructure Ainstein US-D1 rangefinder page (#29185)
* docs(sensor): restructure Ainstein US-D1 rangefinder page

The page said the driver is not in most firmware and has to be started
from a configuration file. Neither is true: ulanding_radar is in the
common distance sensor set, and is started by SENS_ULAND_CFG.

Add specifications, mounting, pinout and wiring from the current
Ainstein manual, a Firmware Support section giving the board
configuration keys, and testing instructions. Remove the unsupported
NDAA tick from the rangefinder index and give the range as min-max.

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

* Apply suggestion from @hamishwillee

---------

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
2026-10-28 08:57:49 +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