Commit Graph
52005 Commits
Author SHA1 Message Date
Marco Hauswirth d0775f2e40 fix(ekf2): limit mag heading change on the innovation that is applied 2026-11-17 16:46:55 +01:00
Marco Hauswirth 9e2629ee24 refactor(ekf2): name the accumulating fusion helpers after what they do with the state 2026-11-17 16:46:55 +01:00
Marco Hauswirth 77c72664e6 refactor(ekf2): compute pos/vel innovations once 2026-11-17 16:46:55 +01:00
Marco Hauswirth 14ca6d176e test(ekf2): check sequential fusion against the batch update
Sequential fusion of a vector observation must equal the vector Kalman
update at the linearisation point; the batch update has no processing
order. The test builds a prior with correlated velocity, attitude and
terrain, feeds the optical flow fusion two 2.5 sigma innovations that
both pass the gate, and compares state and covariance with the batch
update. A second test does the same through measurementUpdate() in both
processing orders.

On main the second flow axis is rejected after the first one moved the
state (test ratio 3.0), the state ends 2.5 away from the batch update
and the covariance 0.22; with an uncorrelated prior, recomputing the
second innovation from the already corrected state alone moves the
state by 0.045.
2026-11-17 16:46:55 +01:00
Marco Hauswirth 5510811f66 feat(ekf2): edit sequential fusion residuals at the a priori state
The whitepaper warns that relinearizing between the scalars of one
vector measurement pushes the following residuals outside the edit
thresholds, so which of them survive depends on the processing
order.
2026-11-17 16:46:55 +01:00
Marco Hauswirth ee0b7c6976 feat(ekf2): make remaining sequential fusions order-invariant 2026-11-17 16:46:55 +01:00
Marco Hauswirth a3f3b861e3 feat(ekf2): make sequential fusion order-invariant (NASA Whitepaper 2025 Algorithm 4.1) 2026-11-17 16:46:55 +01:00
PX4BuildBot b534b2a0b0 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-17 15:21:24 +00:00
Silvan Fuhrer 6967a283d5 feat(commander): remove implicit RTL on GCS loss after mission finished (#29722)
With manual control disabled (or Mission excluded via COM_RCL_EXCEPT) and
NAV_DLL_ACT=0, losing the GCS link after the mission finished silently
triggered a Return. This overrides the explicit choice to disable the
data link loss failsafe, is not configurable and is not documented.
Users who want a reaction to data link loss should set NAV_DLL_ACT.

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

Signed-off-by: Silvan <silvan@auterion.com>
2026-11-17 16:14:40 +01:00
PX4BuildBot a6814cc7b6 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-17 09:46:03 +00:00
Andrea Bernasconi 67f5c57e9a feat(GNSS): Introduce kinematic consistency check (#29660)
* feat(gnss): check that the position change matches the velocity

A receiver computes its position from the code (time of flight) and its
velocity from the Doppler shift. Multipath and other degradation hit the
two differently, so a degraded receiver's position change stops matching
its velocity, often before its reported accuracy shows it. The existing
drift checks compare the two only at rest on the ground.

The new strict check filters the position change rate minus the mean
velocity over about 1 s and fails above GNSS_REQ_POSVEL, also in flight,
so the selection prefers another receiver that passes. It is off by
default (GNSS_CHECK bit 12) until the threshold is tuned on logs; the
filtered value is logged in sensors_status_gnss either way.

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

* fix(gnss): skip the position step at a fix type change in the consistency check

When a receiver starts or stops applying differential or RTK corrections,
its position steps by up to a few meters in one epoch while the Doppler
velocity is unaffected. That is a new solution, not degradation, and it
shouldn't demote a receiver that just reached RTK fixed. On a 10 Hz log
with DGPS dropping in and out, these steps drove the filtered value to
4.5 m/s; without them it peaks at 0.8 m/s, during a real vertical drift.

Only the interval spanning the change is skipped and the filter keeps its
state, so a receiver that keeps switching isn't blind for longer.

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

* refactor(gnss): Reduce check description

* fix(GNSS): Make the feature enabled by default but with more margin

* fix(gnss): restrict the position/velocity consistency check to horizontal

Receivers that don't report the vertical velocity failed the check on any
climb. Merge the consistency tests into fewer cases.

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

* refactor(gnss): mark the position/velocity consistency check as horizontal

The check only compares the horizontal position change with the horizontal
velocity. Name the parameter, flags and status field after that, so that a
vertical counterpart can be added later as GNSS_REQ_VPOSVEL / CHECK_VPOSVEL.

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

* refactor(gnss): rename the position/velocity check to kinematic consistency

HPOSVEL read like a check on position and velocity separately, next to
HDRIFT and HSPEED. "Kinematic consistency" names the property being
tested and leaves room for a vertical counterpart (VKIN). Messages,
flag comments and the parameter's long description keep the plain
wording, since "kinematic" alone can be read as RTK.

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-17 10:38:26 +01:00
PX4BuildBot e5fd8c1655 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-17 01:09:09 +00:00
Jotheesh KummathiandJacob Dahl 0937553e1c fix(uavcan): correct GNSS timestamp conversion (#29803)
* fix(uavcan): correct GNSS timestamp conversion

Fix GPS and TAI leap-second offsets in DroneCAN GNSS timestamps.

Assisted-by: OpenAI:Codex

* refactor(uavcan): keep the GNSS UTC conversion in gnss.cpp

The fix is a units change in one switch. A shared header, a gtest and a test-build step that compiles the whole uavcan DSDL namespace cost more to maintain than they protect.

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

---------

Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-11-16 18:02:34 -07:00
Julian Oes d995af2184 fix(commander/mavlink): DO_SET_HOME improvements (#29786)
* fix(commander): accept only 0 or 1 as DO_SET_HOME param1

MAV_CMD_DO_SET_HOME param1 is a MAV_BOOL: 1 uses the current position,
0 the specified location, and any other value is invalid. Any value
above 0.5 was taken as "use current", so an invalid value silently set
home to the current position instead of being denied.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julian Oes <julian@oes.ch>

* fix(mavlink): honour the COMMAND_INT frame for DO_SET_HOME

The frame of a COMMAND_INT was only used to scale x/y and then dropped,
and Commander takes the DO_SET_HOME altitude as AMSL. A relative
altitude, as sent by MAVProxy, therefore set home to that many metres
above mean sea level, and local frames gave meaningless coordinates.

A global altitude is passed on as before, a relative altitude is
converted to AMSL using the current home altitude, and other frames
are rejected with MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME. The frame
does not matter when the current position is used.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julian Oes <julian@oes.ch>

* fix(commander): allow DO_SET_HOME with COM_HOME_EN disabled

COM_HOME_EN is documented as setting home automatically, but disabling
it also denied MAV_CMD_DO_SET_HOME, leaving the vehicle without any way
to get a home. Disabling it now only stops home from being set
automatically, and home can still be set manually.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julian Oes <julian@oes.ch>

---------

Signed-off-by: Julian Oes <julian@oes.ch>
2026-11-16 18:00:37 -07:00
mumumuandSummermu 8638fa397e fix(control_allocator): reject negative tilt indices (#29797)
CA_ROTORn_TILT is declared as an enum (0..4), but parameter ranges are
not enforced by param_set(). ActuatorEffectivenessRotors::updateParams()
stores tilt_param - 1 directly, and both consumers only skip the sentinel
value -1. Any value below -1 therefore indexes _params[] and _torque[]
with a negative index, which crashes the control allocator on the next
parameter update.

Treat every negative index as "not tilted" in updateTorqueSign() and
updateAxisFromTilts().

Test: main SITL, CA_AIRFRAME=8 + CA_ROTOR0_TILT=-100000 (SIGSEGV in
ActuatorEffectivenessTilts::updateTorqueSign)


Assisted-by: deepseek

Signed-off-by: Summermu <23356722+Summermu@users.noreply.github.com>
Co-authored-by: Summermu <23356722+Summermu@users.noreply.github.com>
2026-11-16 16:44:56 -07:00
Julian Oes d694bf0d53 fix(mavlink): reset the log entry on LOG_ERASE (#29831)
LOG_ERASE closed the open log file but kept the entry and the log count,
so a following LOG_REQUEST_DATA for the same id went to SendingData
without a file and crashed in ftell(nullptr). A failed fopen() and a
failed fseek() left the handler in the same state.

Reported by @KANG982.

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

Signed-off-by: Julian Oes <julian@oes.ch>
2026-11-16 16:41:42 -07:00
jeroldcamacho 32c68d75c8 fix(rc): bound ST24 write index against shared rc_decode_buf union (#29693)
RCInput's protocol auto-scan rotates between RC decoders without
resetting their static state, and all decoders alias the same global
rc_decode_buf union. If a sibling decoder overwrites the union's
length byte while ST24 is mid-frame, st24_decode()'s GOT_TYPE write
index can never resynchronize and walks off the end of st24_data.

Bound the GOT_TYPE write and GOT_DATA CRC read against the buffer's
real size, resyncing to UNSYNCED instead of writing out of bounds.
Add a regression test reproducing the cross-protocol clobber.
2026-11-17 12:36:29 +13:00
Anil Kircaliali f6562b1075 fix(commander): mark adsb warning text as event duplicate (#29829) 2026-11-16 15:28:06 -07:00
Hamish WilleeandJulian Oes 4d755a614f fix(mavlink): Make MAV_CMD_SET_ACTUATOR scale properly in missions (#27336)
* fix(mavlink): scale DO_SET_ACTUATOR params 5/6 in mission items

MISSION_ITEM_INT carries params 5/6 in the int32 x/y fields, so the actuator
5 and 6 values (-1..1) only arrived as -1, 0 or 1, and an unset (INT32_MAX)
value drove the actuator to saturation instead of leaving it unchanged.

Scale them by 1e7 like COMMAND_INT does, map unset to NaN, and encode them
the same way on download.

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Signed-off-by: Julian Oes <julian@oes.ch>
Assisted-by: Claude:claude-opus-5-5

* docs(navigator): list all supported mission commands

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julian Oes <julian@oes.ch>

* fix(mavlink): keep ARM_DISARM and AUTOTUNE params on global-frame download

A global-frame mission item zeroes param1-4 before filling in the
command-specific ones, and COMPONENT_ARM_DISARM and DO_AUTOTUNE_ENABLE
had no case there. An uploaded "arm" (param1 = 1) therefore downloaded
as "disarm" (param1 = 0).

Signed-off-by: Julian Oes <julian@oes.ch>
Assisted-by: Claude:claude-opus-5-5

* fix(mavlink): ignore unset COMMAND_INT x and y individually

COMMAND_INT x/y were only treated as unset when both were INT32_MAX. A
DO_SET_ACTUATOR setting only actuator 5 (y = INT32_MAX) therefore set
actuator 6 to 214.7, saturating it, instead of leaving it unchanged.

Map each of x and y to NaN on its own when unset, which also covers
INT32_MIN from a NaN converted to int.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julian Oes <julian@oes.ch>
Co-authored-by: Julian Oes <julian@oes.ch>
2026-11-17 10:45:39 +13:00
Jonas Perolini 722ebc9635 refactor(mavlink): reduce mission-handler nesting (#29791)
* refactor(mavlink): reduce mission-handler nesting

Signed-off-by: jonas <jonspero@me.com>

* refactor(mavlink): drop negation in mission request list busy check

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

---------

Signed-off-by: jonas <jonspero@me.com>
2026-11-16 12:04:40 -07:00
Ramon Roche f1b15087f0 ci(commit_checks): post title and description comments on fork PRs
A fork PR gets a read-only token under pull_request, so the PR title and
PR description comments were skipped for forks. A fork contributor with
a bad title got a red check and the reason only in the job summary that
#29816 added as a workaround.

Run the workflow on pull_request_target, like the labeler, so the token
can post the comments on fork PRs too. The jobs only read the title, the
body and the base branch from the event and run Tools/ci from the base
branch, never code from the PR. Group the concurrency by PR number,
because github.ref is the base branch under this trigger and PRs against
the same branch would cancel each other. Drop the fork-only job summary,
which the comment replaces.

Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-11-16 10:39:20 -08:00
Ramon Roche 40fee1673f ci(commit_checks): accept a backport tag in release branch PR titles
Backport PRs are titled "[BACKPORT 1.18] fix(mavlink): ...". The PR title
check anchors on the conventional commit type, so it fails all of them
even though the header after the tag is valid. Replaying the check over
the 210 PRs opened against release/1.16, release/1.17 and release/1.18,
62 fail only because of the tag.

Skip a leading backport tag before validating the header. The header
after the tag still has to be a conventional commit. The tag is accepted
only on PRs that target a release/* branch, so a backport opened against
main by mistake fails with a comment that says so. The title suggested
in the failure comment keeps the tag.

Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-11-16 10:33:46 -08:00
FARHANG 0b7837cccf fix(boards/matek-h743): match bootloader BOARD_TYPE to Matek H743 board ID
PX4-Bootloader/board_types.txt assigns 1013 to Matek H743 and 139 to
Durandal. hw_config.h's BOARD_TYPE was hardcoded to 139 (Durandal's
ID) on both h743 and h743-mini, causing QGroundControl to reject
flashing with a "board ID 1013 != 139" mismatch.

Fixes #27731

Signed-off-by: FARHANG <farhang.nba@gmail.com>
2026-11-16 10:29:47 -08:00
blar 7e4b18611a fix(rover): hold a straight line when reversing in Position mode (#29773)
The differential and Ackermann position controllers measured the
heading error against the bearing to the target, also when driving in
reverse, where the rover has to point away from that bearing. A rover
that was lined up to reverse therefore had a heading error of 180 deg.
The differential rover spot turned because of it, and since the yaw
setpoint is only turned around while the speed setpoint is negative, it
kept alternating between turning towards the bearing and away from it.
The Ackermann rover applied the RO_SPEED_RED speed reduction for that
error. Turn the yaw setpoint around before the heading error is
calculated.

Position mode stored the bearing of its desired track when the track
hold started. Moving the stick from forwards to reverse without resting
at zero kept that bearing, so the target stayed in front of the rover,
which turned around to back up towards it. Store the heading of the
track instead and take the bearing from the sign of the stick, so the
rover reverses along the line it drove forwards on.

Assisted-by: Claude:claude-fable-5-2

Signed-off-by: blar-tw <blar.huang@gmail.com>
2026-11-16 12:17:04 -05:00
TheLukaDragar 99a3048735 build(nuttx): pin the merged i.MX RT ENET backports
Point platforms/nuttx/NuttX/nuttx at the PX4/NuttX branch tip, which now
has the merged backports:
- PX4/NuttX#447: arch/arm/imxrt: a fixed link when no PHY answers
  (apache/nuttx#20457)
- PX4/NuttX#449: arch/arm/imxrt: hold RX frames while the ENET TX ring
  is full (apache/nuttx#20562)

The tip also carries the i.MX 9 backports #439 to #445, which do not
touch arch/arm/src/imxrt.

Assisted-by: Claude:claude-opus-5
Signed-off-by: TheLukaDragar <lukadragarbusiness@gmail.com>
2026-11-16 14:49:35 +01:00
TheLukaDragar 41f1522d90 feat(boards/fmu-v6xrt): support Ethernet carriers without a PHY
- platforms/nuttx/NuttX/nuttx: bump to the backport of apache/nuttx
  eafd01cecc ("arch/arm/imxrt: a fixed link when no PHY answers").
- boards/px4/fmu-v6xrt: enable CONFIG_IMXRT_ENET_FIXED_LINK. The driver
  still probes the board's PHY list first. If no PHY answers, the MAC
  runs at 100 Mbps full duplex, so a carrier that wires the FMU's RMII
  bus straight to a switch port or another MAC brings eth0 up. Carriers
  with a PHY are unchanged.

Assisted-by: Claude:claude-opus-5
Signed-off-by: TheLukaDragar <lukadragarbusiness@gmail.com>
2026-11-16 14:49:35 +01:00
Ramon Roche a85c5014fc ci(checks): delete each unit test build tree after its run
The Unit Tests job builds five SITL test trees in sequence and keeps all
of them on disk until the job ends, which filled the default RunsOn volume
and was papered over with volume=60gb in #29374. Nothing reads a tree after
its own make target returns, so remove each one as soon as its tests pass
and drop the volume override.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-11-16 05:47:41 -08:00
Balduin 4742fdbb2e ci(commit_checks): explain PR title failure when no comment is posted (#29816)
* ci(commit_checks): render the PR title report in the job summary for forks

On PRs from forks, CI cannot post comments directly. When the PR title 
does not satisfy conventional commits, a CI error refers to a PR comment 
that did not exist. 

Fix: Output the content of the comment in case of fork PRs
 - In the action summary, properly rendered like the real comment
 - In the job log, as plain text

---------

Signed-off-by: Balduin <balduin@auterion.com>
2026-11-16 14:45:17 +01:00
PX4BuildBot dc7b9011cb docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-16 10:56:16 +00:00
Silvan FuhrerandMahima Yoga 18f0524791 fix(commander): continue fixed-wing mission takeoff without position (#29719)
* fix(commander): continue fixed-wing mission takeoff without position

A fixed-wing vehicle losing its position estimate during Takeoff mode keeps
climbing wings-level (FW_POSCTRL_MODE_AUTO_TAKEOFF_NO_NAV), because fixed-wing
Takeoff mode does not require a position. During the takeoff item of a
mission, the mode fallback instead checked the Mission requirements and
escalated to Descend.

Check the mode fallback against the Takeoff mode requirements while a
fixed-wing vehicle flies the takeoff item of a mission, so both behave the
same. Once the takeoff item is done, the mission requirements apply again.

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

* feat(commander): add FW mission takeoff state to failsafe simulator

The failsafe state now distinguishes the takeoff item of a fixed-wing
mission, which only needs the Takeoff mode requirements. Expose it in the
simulator so this fallback can be tried out there too.

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

* Update docs/en/flight_modes_fw/mission.md

Co-authored-by: Mahima Yoga <mahima@auterion.com>

* Update docs/en/flight_modes_fw/mission.md

Co-authored-by: Mahima Yoga <mahima@auterion.com>

---------

Co-authored-by: Mahima Yoga <mahima@auterion.com>
2026-11-16 11:49:11 +01:00
Christian Rauch 169b2bc88d fix(system_identification): reset _y_lpf (#29805)
SystemIdentification::reset calls _u_lpf.reset(0.f); twice. This is very likely a typo, where the intention was to call _y_lpf.reset(0.f); instead.
2026-11-16 11:25:12 +01:00
PX4BuildBot 5a7f3ab512 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-16 08:02:23 +00:00
Mathéo Taillandier 336eafd0c5 fix(drivers): fix wrong RPM in UAVCAN ESC telemetry (#29580) 2026-11-16 08:55:04 +01:00
PX4 Build BotandCrowdin Bot c4b8f107ae docs(i18n): PX4 guide translations (Crowdin) - zh-CN (#29802)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-11-15 11:31:22 +11:00
PX4 Build BotandCrowdin Bot c3c6b24b07 docs(i18n): PX4 guide translations (Crowdin) - uk (#29801)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-11-15 11:31:09 +11:00
PX4 Build BotandCrowdin Bot 035df89164 docs(i18n): PX4 guide translations (Crowdin) - ko (#29800)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-11-15 11:30:51 +11:00
aaronfullerandHamish Willee 53afcc82b2 feat(boards/avianautomata): add Avian Automata 305AP flight controller (#29689)
* feat(boards/avianautomata): add 305AP flight controller

Add the Avian Automata 305AP: STM32H743, two IMU slots that accept
either an LSM6DSV16X or an ICM-45686, BMP581 barometer, MMC5983MA
magnetometer, two CAN buses and eight motor outputs plus docs. 

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

---------

Signed-off-by: Aaron <aaron.s.fuller@gmail.com>
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-11-13 17:42:06 -05:00
PX4BuildBot 0bd95058aa docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-13 10:31:53 +00:00
Andrea BernasconiandHamish Willee db94ca49db feat(failure_injection): add wrong, garbage and drift IMU failures (#29601)
* feat(failure_injection): add wrong, garbage and drift injection for gyro and accel

Corrupt the addressed IMU's samples on all three axes: wrong adds a
constant bias (SYS_FAIL_{G,A}_BIAS), garbage uniform noise within
+-SYS_FAIL_{G,A}_NOISE and drift a bias growing by SYS_FAIL_{G,A}_DRIFT
per second since injection. Applied to both the plain and FIFO driver paths.

* refactor(failure_injection): handle IMU failures in process_imu()

Mirror process_gnss(): resolve the mode once, run the generic Off / Stuck
first and only then apply the Wrong / Garbage / Drift offset, so the Stuck
cache keeps the uncorrupted sample and a later Stuck never replays a
drifted one. Drop the second process() on the integrated FIFO report, which
cached the already-corrupted report. The offset is still computed before
Off so drift_start is reset while the sensor is off.

* docs(failure_injection): align IMU failure docs with code

The Syntax section did not list drift and described garbage as
uninitialised-memory output, while gyro/accel garbage adds bounded noise
to the real measurement. Also match the new parameter descriptions to
the wording of the existing SYS_FAIL_* parameters.

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

* fix(failure_injection): add drift RC mode and clarify bias param text

* refactor(drivers): Drop extra comment

* test(mavsdk_tests): add SITL test for IMU failure injection

Fly the SIH quad through gyro and accel bias, noise and drift with the
default SYS_FAIL_{G,A}_* magnitudes and check it holds altitude.

Holding altitude alone also passes when the injection never reaches the
sensor data, so the test also checks that the IMU noise level jumps
while noise is injected and returns once cleared. Bias and drift are
not checked in the data: the rate controller and the estimator react
to them and partly hide them in flight.

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

* test(mavsdk_tests): inject IMU failures through MAVSDK 4.2.0

MAVSDK-Python 4.2.0 adds FailureType.DRIFT (mavlink/MAVSDK#3211), so the
IMU failure test no longer needs to send a raw MAV_CMD_INJECT_FAILURE
with its own copies of the unit and type values. Use the tester's
inject_failure() like the motor failure tests, and bump the mavsdk pin
so the new type is available.

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

---------

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-11-13 11:24:05 +01:00
PX4BuildBot bdd8f2caa6 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-13 09:14:26 +00:00
Michael Fritsche e8b3274ab0 feat(msg): rename rover throttle setpoint to surface_vehicle_thrust_setpoint (#29777)
* feat(msg): rename rover throttle setpoint to surface_vehicle_*

The throttle setpoint was the last rover topic shared by rovers and boats
without the surface_vehicle_* prefix decided in #29524. Rename
RoverThrottleSetpoint to SurfaceVehicleThrottleSetpoint and the
TYPE_ROVER_THROTTLE_* setpoint types to TYPE_SURFACE_VEHICLE_THROTTLE_*.
The type values are unchanged.

The topic rename breaks ROS 2 users anyway, so also shorten the fields of
the throttle and speed setpoints to x and y: the message name already says
what the value is and [@frame Body] states the frame.

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

* fix(zenoh): bring surface_vehicle rename to the zenoh dds topics

* fix(concept): rename rover throttle setpoint to surface_vehicle_* in navigation terminology

* fix(tools): update px4-ros2-interface-lib pin

* docs(msg): describe sideways fields as omnidirectional, not mecanum

The surface vehicle messages are shared by rovers and boats, and the lateral
axis applies to any vehicle that can move sideways, not only mecanum rovers.

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

* docs(ros2): use the surface vehicle setpoint type names of the interface lib

The pinned px4-ros2-interface-lib names the rover setpoint types
SurfaceVehicle*SetpointType. The table and the example reference still used
the old Rover*SetpointType class names, which do not exist in that version.

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

* feat(msg)!: rename surface vehicle throttle setpoint to thrust setpoint

The setpoint is a normalized force command along the body x and y axes,
which is a thrust, not a throttle. Throttle stays the name for the motor
command the actuator control derives from it.

surface_vehicle_throttle_setpoint is now surface_vehicle_thrust_setpoint
(SurfaceVehicleThrustSetpoint), and SetpointConfig
TYPE_SURFACE_VEHICLE_THROTTLE_* are now TYPE_SURFACE_VEHICLE_THRUST_*
(same values). The px4-ros2-interface-lib pin follows the matching rename
there.

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

* fix(tools): update px4-ros2-interface-lib pin

* fix(commander): do not enable velocity control for surface vehicle thrust setpoints

The SurfaceVehicleThrust* setpoint types enabled the velocity flag, taken
over from the original interface lib configuration. Nothing in these types
uses velocity, and offboard mode maps the same combinations without it.

The flag kept the rover speed controller running: switching from a
SurfaceVehicleSpeed* to a SurfaceVehicleThrust* type sets the same flags,
so the controllers were not reset and a stale speed setpoint kept
overriding the commanded thrust. It also made external modes that only
command thrust require a local position estimate.

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

* docs(msg): apply review suggestions for the surface vehicle setpoints

Add long descriptions to the thrust and speed setpoints and the speed
status, name modules instead of C++ classes, and use single spaces before
field comments. Rename the speed status PID integrals from pid_throttle_*
to pid_thrust_*, since the speed controller drives the thrust setpoint.

Update the docs and the rover control structure diagram for the thrust
setpoint and omnidirectional vehicles, note the Rover*SetpointType names of
PX4 v1.17 and v1.18, and add the ROS 2 release note.

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

---------

Signed-off-by: Michael Fritsche <frimi999@gmail.com>
2026-11-13 10:05:26 +01:00
Alexander Kalmykov 7d362c6f38 docs(simulation): PteroSim offers every vehicle on every license tier (#29729) 2026-11-13 08:13:35 +11:00
Matthias Grob 8e94784e1d refactor(flight_mode_manager): remove unused code
ManualVelocitySmoothingXY has had no user since
FlightTaskManualPositionSmoothVel was removed. Its position lock test
after a reset moves to the still used ManualVelocitySmoothingZ.

Also remove members and methods of the flight tasks that are never
used: the acceleration setpoint feedback and the activation timestamp
were only written, updateVelocityControllerFeedback(), errorToString()
and StickAccelerationXY::getVelocityConstraint() were never called,
and _accelerationValid(), setGearAccordingToSwitch() and
_updateYawCorrection() were declared without a definition.
2026-11-12 19:56:01 +01:00
Matthias Grob 85228f2111 fix(motion_planning): plan trajectories before integrating them 2026-11-12 19:56:01 +01:00
PX4BuildBot 65bf937b88 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-12 13:02:03 +00:00
Matthias Grob c339b0a8c8 refactor(simulator_sih): keep terrain argument parsing out of NuttX builds (#29778)
Select the terrain model directly in sih.hpp, dropping the extra
Terrain.hpp header. Only build load_terrain() and the -t usage for POSIX
because NuttX has no DEM to load, and make TerrainFlat::load() non-virtual
so it is no longer linked there. This saves 368 bytes of flash on
px4_fmu-v6c_default.

SITL builds without the DEM libraries still refuse to start when given a
terrain file.
2026-11-12 13:54:44 +01:00
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
PX4BuildBot 19f17a7a81 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-12 05:56:36 +00:00
cb00217286 feat(sih): add optional support for non-flat terrain for MC, FW and VTOL (#29619)
* feat(simulator_sih): add a GeoTIFF terrain elevation model for SITL

SIH only simulates flat ground. This adds the loader for a terrain
elevation model (DEM) in a GeoTIFF file, the base for non-flat terrain
in SITL.

The DEM is read with libtiff and libgeotiff. A DEM in a projected CRS is
resampled once at load time with PROJ onto a WGS84 lat/lon grid, so a
lookup in the simulation loop is a plain bilinear interpolation. It is
built only for px4_sitl and only when the three libraries are found, so
hardware builds and SITL without them are unchanged.

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

* feat(simulator_sih): use the terrain DEM for ground contact and the rangefinder

With PX4_SIH_TERRAIN set to a GeoTIFF DEM, SIH in SITL places the vehicle
on the terrain at start, lands it on the terrain, ray-casts the downward
distance sensor against it, and publishes it as the groundtruth
terrain_alt. Outside the DEM the ground stays flat at SIH_LOC_H0.

Terrain is only used for multicopters, VTOLs and fixed-wing; other
vehicle types keep flat ground. The DEM is loaded in task_spawn() so a
bad file fails the start command, and because the SIH task stack is too
small for libtiff and PROJ.

The groundtruth terrain_alt now holds the WGS84 terrain altitude, as the
message documents, instead of the height above the origin.

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

* build(setup): install the SIH terrain dependencies with the simulation tools

Install libtiff, libgeotiff and PROJ so SITL builds SIH with terrain
elevation (DEM) support. They are optional: without them SIH builds as
before.

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

* docs(sim_sih): document terrain elevation from a GeoTIFF DEM

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

* docs(sim_sih): fix and clarify the terrain elevation section

Address review findings on the new terrain section: list the sample
types the loader actually reads, note that the prebuilt px4 package and
px4io/px4-sitl container are built without terrain support, and say
when SIH_LOC_H0 still sets the start altitude.

Also add a version badge, link GeoTIFF, EPSG and GDAL, mention the
dist_bottom groundtruth field, and correct the GLO-30 coverage.

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

* fix: cast to double for MAC builds

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

* chore: implement TerrainBase interface

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

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

* chore: improve isolation of terrain logic from sih core

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

* refactor(simulator_sih): move DEM handling into the terrain classes

SIH should only use the terrain, not manage it. TerrainFlat becomes the
base class, since flat ground is what every terrain model builds on, and
TerrainDem falls back to it until a DEM is loaded. Terrain.hpp picks the
model at compile time, so SIH holds the terrain by value with no #ifdef,
new/delete or pointer handover, and NuttX builds only get the flat model.

Tracking whether the vehicle is inside the DEM, and the matching
warnings and status, move from SIH into TerrainDem.

The DEM is still loaded in task_spawn() because the SIH task stack is too
small for libtiff and PROJ, so the terrain is a static member that the
instance uses directly instead of moving it.

A terrain file with an unsupported vehicle type now fails the start like
a bad file instead of silently using flat ground.

---------

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>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-11-12 16:49:11 +11:00
Hamish Willee 5a533b77d1 fix(mavlink): accept DO_SET_ROI_WPNEXT_OFFSET pitch/roll/yaw offsets (#29758)
The param validation table allowed only param1 for
MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET, but params 5-7 carry the pitch, roll and
yaw offsets that navigator copies into vehicle_roi and the gimbal applies.

As a result, every QGroundControl Structure Scan upload was rejected
(INVALID_PARAM5, or INVALID_PARAM7 with a zero gimbal pitch, because QGC
sends a 90 degree yaw offset), and the command form was denied.

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

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
2026-11-12 13:49:55 +13:00