52107 Commits
Author SHA1 Message Date
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
Jacob Dahl b0ce720286 refactor(boards/ark_fmu-v6x): remove the commented-out SPI4 bus (#29768)
The stub is a leftover from px4/fmu-v6x, where SPI4 is a sensor bus
powered from PG8. This board has no SPI4 and uses PG8 as a plain GPIO
for the sensor rail, so the note to move PG8 into the bus table has
nothing to act on.

Assisted-by: Claude:claude-fable-5-2
2026-11-11 16:27:50 -07:00
PX4BuildBot 91516d4c44 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-11 21:50:29 +00:00
Jacob Dahl e192036345 fix(commander): ack calibration cancels once and stop promptly (#29514)
* feat(simulator_sih): add orient command to pose the vehicle for calibration

Accel and mag calibration need the vehicle held still on each side and
rotated, which SIH could not do, so neither could be tested in
simulation. `simulator_sih orient` sets the attitude kinematically,
keeping the IMU and the simulated mag consistent with it, and `orient
all` runs every side in turn so a calibration started from a GCS
completes on its own.

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

* fix(commander): hand a calibration cancel to the running calibration

A cancel got TEMPORARILY_REJECTED from Commander and ACCEPTED from the
calibration, in either order. The calibration polled for it with a
fresh vehicle_command subscription that only saw the newest command,
filtered it by a per-side start time, and did not poll while waiting
for the vehicle to be still or while measuring a side. Baro and level
calibration never polled. A cancel could be lost or take until the
vehicle was held still.

Commander now hands the cancel to the running calibration, which acks
it once when it stops, or rejects it if it ends without stopping.
Every calibration loop checks for it, and accel calibration no longer
reports a failure after a cancel.

Fixes #29424

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

* test(mavsdk_tests): run accel and mag calibration and cancels on SIH

Covers a full accel and mag calibration, and a cancel in each place it
used to be missed or delayed, checking it gets exactly one ack.

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

* perf(simulator_sih): build the orient command for SITL only

Commander denies sensor calibration when SIH runs on flight controller
hardware, so orient was about 1.8 KB of unusable code on every NuttX
board that builds SIH.

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

* fix(commander): open calibration cancels before the worker thread starts

Commander handles one command per loop and the worker thread runs at
low priority, so a cancel queued right behind the start could be
rejected before the worker opened it, and the calibration kept running.

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

* fix(commander): stop reporting a cancelled gyro calibration as failed

A cancel broke out of the retry loop into the failure report, as accel
calibration did before.

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

* test(mavsdk_tests): cover gyro cancel and remove two calibration races

A retried start is rejected once the calibration runs, and that late
ack could be counted against the cancel, so the start is sent once.
The baro cancel landed 1 s into a 3 s calibration, about 200 ms of
host time at speed factor 10; it is now sent right after the start.

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

* style(mavsdk_tests): wrap the calibration start assert for flake8

The 104-character line failed the Python CI checks.

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

* fix(commander): require param7 zero for a calibration cancel

An ESC calibration (param7 = 1) or baro temperature calibration
(param7 = 3) sent while a calibration ran matched the cancel test. It
stopped the running calibration and was acked ACCEPTED, though the
requested calibration never started. `commander calibrate esc` did the
same.

Assisted-by: Claude:claude-fable-5-2
2026-11-11 14:38:01 -07:00
Henry Kotzé ff8f44e8e1 docs(mavlink): document the MAV_X_REMOTE_IP partner IP parameter (#29627) 2026-11-12 08:18:56 +11:00
PX4BuildBot 3695a9e9fb docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-11 04:10:37 +00:00
g945643frankieandFarhang 56ebfa63c8 feat(drivers/imu): add ICM-56686 driver and enable it on GA1 (#28677)
feat(drivers/imu): add ICM-56686 driver and enable GA1 alternate IMUs

Add an InvenSense ICM-56686 SPI FIFO driver (WHO_AM_I 0x08, DEVTYPE
0x39, DS-000563 v1.1 register map, 6400 Hz FIFO). It publishes the
16-bit FIFO fields at full scale (as in #28134) and passes
config.external to the publishers (as in #28352).

GA1 (accton-godwit):
- Each internal SPI socket can hold an ICM-42688P, ICM-45686,
  ICM-56686 or LSM6DSV32X/LSM6DSK320X. Probe them in an if/fi chain
  and stop at the first one found. SPI2 is probed first so the heater
  binds to the heated instance.
- The LSM6DSV now uses the same rotation as the Invensense parts on
  each socket (-R 6 on SPI2, -R 14 on SPI1), following #27625.
- The ICM-42688P and ICM-45686 on SPI2 are polled instead of using
  DRDY, because only INT2 is routed to the MCU there. This removes
  the missed-DRDY counts.
- Drop six drivers that nothing starts at boot (BMP388, MS5611,
  BMM150, MMC5983MA, MCP23009, landing target estimator).
  Flash use: 98.67% -> 97.52%.

Tested on GA1 hardware with a v1.17-based build: SPI2 polling and the
driver cleanup. Not yet tested on hardware: the ICM-56686 decode
change and the LSM6DSV rotation.

Assisted-by: Grok:grok-4.6
Assisted-by: Kiro:claude-opus-5.5
Signed-off-by: g945643frankie <g945643@oz.nthu.edu.tw>
Co-authored-by: Farhang <46557204+farhangnaderi@users.noreply.github.com>
2026-11-10 23:03:32 -05:00
Jacob Dahl cd0e647af5 fix(boards): size the fmu-v2/v3 parameter partition for a 16 KiB FRAM (#29198)
Some FMUv2/v3 units, including many Pixhawk 2.4.8 clones, carry a 16 KiB FM25V01 instead of the 32 KiB FM25V02. Since 1.15 the default MTD layout asks for a 32 KiB parameter partition, which such a part rejects, so those units had no parameter storage. A 16 KiB partition fits both parts, and it is what these boards had before.

Assisted-by: Claude:claude-opus-5-5
2026-11-10 16:05:07 -07:00
Jacob Dahl 91a4c21ca8 refactor(drivers): share the start/stop/status dispatch of I2C/SPI drivers (#29556)
90 driver main functions repeated the same three strcmp() checks and
calls. I2CSPIDriver<T>::module_main() does it once; drivers with extra
verbs keep their own dispatch.

Assisted-by: Claude:claude-opus-5-5
2026-11-10 15:58:59 -07:00
PX4BuildBot d5af342ac7 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-10 22:28:51 +00:00
Hamish Willee cec32f5ea7 docs(msg): fix WheelEncoders field comments and units (#29746)
Follow-up to #28848. Use the standard timestamp comment, replace the
[counts/rev] unit the msg doc generator rejects with [-], add the
missing unit tag to encoder_counts, and punctuate the multi-sentence
comments.

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

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
2026-11-10 17:22:17 -05:00
Jonas Perolini c1d5757020 feat(navigator): skip automatic front transitions after a quadchute (#29625) 2026-11-10 18:45:59 +01:00
Jonas Perolini 4f7e35a06a fix(navigator)!: reject a DO_JUMP that targets a DO_JUMP before a waypoint (#29566)
Assisted-by: Claude:claude-opus-5-5
2026-11-10 18:45:08 +01:00
PX4BuildBot 8d5be2b9cb docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-10 15:57:22 +00:00
Michael Fritsche 240d6c36cc feat(rover): make the manual mode stick mapping configurable (#29640)
* feat(rover): make the manual mode stick mapping configurable

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

* fix(rover_mecanum): apply the stick mapping to manual parking sideways driving

Manual Parking kept driving sideways with the roll stick, which is the
turn stick in the default mapping. Switching from another manual mode
into Manual Parking while turning made the rover drive sideways instead.
The tank-style sides only use the vertical axes and the sideways
assignment is always a horizontal axis, so it can follow RO_STICK_MAP.

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

* docs(rover_control): shorten the RO_STICK_MAP description

The option labels already list which stick does what, and parameter
descriptions ship in ROMFS on boards with flash to spare.

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

* docs(rover): mention RO_STICK_MAP in the rover basic setup

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

* docs(rover): describe motions instead of stick positions in the tuning guides

The stick positions depend on RO_STICK_MAP, so name the motion to drive
and link to the stick mapping instead.

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

* docs(rover): update the rover manual controls image to comply with the new stick mapping

* docs(rover): fix CI by re-adding rover_manual_controls.png

---------

Signed-off-by: Michael Fritsche <frimi999@gmail.com>
2026-11-10 16:48:54 +01:00
PX4BuildBot 0753cee3ac docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-10 14:02:04 +00:00
e03e075003 feat(rover): add high level encoder support (#28848)
* feat(rover): add high level encoder support

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fix(rover): add gz mixing interface to output encoder position

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fix(rover): add wheel encoder to logged topics, high rate sensors

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fix(rover): fix wheel encoder division by zero and stream iteration

Corrected Roboclaw driver to initialize counts_per_rev, fixed wheel encoder stream to iterate over multiple wheels, and added trapezoidal integration to GZMixingInterfaceWheel. Removed unused RO_WHEEL_RAD from position controllers and restricted the wheel encoder stream to rover targets.

Assisted-by: Qwen-Code

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fix(rover): adjust wheel radius default for SITL

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* Update src/lib/rover_control/rovercontrol_params.yaml

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* Update src/lib/rover_control/rovercontrol_params.yaml

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* Update msg/WheelEncoders.msg

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* chore(rover): fixes to decimal and constrained flash mavlink message

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* chore(gz): update encoder counts reference

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* chore(rover): fix to outdated encoder pos reference

* fix(rover): update uorb message to account for 4 wheel encoders

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* Update msg/WheelEncoders.msg

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* fix(roboclaw): add in encoder position, counts per rev. Msg desc update

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* chore(wheel_encoders): add description to top of msg file for docs

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* chore(sim): fixes to initialize wheel pos m, rename wheel_encoder to wheel_distance

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* Update src/lib/rover_control/rovercontrol_params.yaml

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* Update src/modules/mavlink/streams/WHEEL_DISTANCE.hpp

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* Update src/modules/simulation/gz_bridge/GZMixingInterfaceWheel.cpp

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* Update src/modules/simulation/gz_bridge/GZMixingInterfaceWheel.hpp

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* chore(rover): update wheel encoder msg, fixes to gz bridge

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* chore(rover): Apply batched suggestions from code review

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

---------

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>
2026-11-10 08:54:19 -05:00
Jonas Perolini 908f99ad32 refactor(navigator): trim the Return destination selection stack (#29669)
setRtlTypeAndDestination() kept room in its frame for a
battery_status_s, used only by the RTL_TYPE 6 battery loop, and for a
copy of the global position, also while it looked up rally points and
VTOL landing approaches. getVtolLandApproachesNearLocation() returned a
different object on its early exit, so GCC did not apply NRVO and its
208 B land_approaches_s result was on the stack twice.

Read the batteries in a separate function, take the global position by
reference and return one named result. On fmu-v6c the two frames drop
from 336 B to 176 B and from 272 B to 80 B.

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

Signed-off-by: jonas <jonspero@me.com>
2026-11-10 10:58:16 +01:00
Michael FritscheandHamish Willee e4212fe915 docs(concept): add navigation terminology page (#29347)
* docs(concept): add navigation terminology page

Heading, course, track, bearing and drift have caused friction because
aviation and marine navigation use the same words with different
meanings, and PX4 code mixes both. Collect the official ICAO, FAA,
Bowditch, IHO and NMEA definitions in one place, together with the
reference frames, a precedence rule for conflicting terms, and a
separate section for where PX4 represents things differently (radians,
local map projection, signed cross-track error, wind vectors, deviating
field names), so that new code sticks to the official terminology.

Graphics are placeholders for now.

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

* docs(concept): add ground vehicle terms to navigation terminology

ISO 8855 and SAE J670 reuse navigation words with different meanings:
the course angle is the actual direction of motion, and the vehicle
sideslip angle is ground-referenced, unlike the aerodynamic one. Add
the ground vehicle standards as a source, extend the precedence rule
and conflicts table, cover the z-up vehicle frames, and list the rover
names that use "bearing" for a course setpoint.

Also tone down the boat statement in the intro, as boat support is
still minimal.

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

* Add ground vehicle references

* fix(docs): add navigation nomenclature overview

* fix(docs): hide not yet used nomenclature

* feat(docs): navigation docs update overview image

* feat(docs): split navigation terminology doc into main and advanced page

* feat(docs): navigation terminology update overview image

* fix(docs): navigation terminology clarify heading and desired track definitions

* fix(docs): clean up navigation terminology tab

* fix(docs): clean up navigation_terminology.md

* fix(docs): clean up navigation_terminology_advanced.md

* fix(docs): correct navigation terminology field and range claims

position_controller_status.nav_bearing and xtrack_error have had no
producer since the fixed-wing position controller rework, so
NAV_CONTROLLER_OUTPUT forwards zeros; say so instead of describing
them as live values. Not all uORB angles are wrapped to [-pi, pi]
(transponder_report.heading is [0, 2pi]), Ackermann and differential
rovers use bearing_setpoint as a heading setpoint, and
estimator_innovations.beta is an innovation, not the sideslip angle.

Drop the FLU to FRD conversion note, which was wrong for ROS yaw and
does not belong on a terminology page, replace the caption of the
missing track frame figure with a TODO, and apply prettier.

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

* docs(concept): update navigation_terminology page

* docs(concept): navigation terminology add course / course setpoint distinction vs course / course over ground

* docs(concept): navigation terminology - add detail images

* docs(concept): fix navigation terminology review findings

Fix issues found in review of the navigation terminology pages:

- Figures: make the SVGs visible in dark mode, draw the course setpoint
  pointing back towards the desired track (as NPFG commands it) rather
  than along it, match the track's end direction to the course, add an
  illustrative future track, and fix clipped and mis-spaced labels.
- Links: avoid in-page links into the collapsed details block, link the
  summary table fields and first uses of estimator, NPFG, pure pursuit
  and mecanum rovers.
- Accuracy: MAVLink headings are in centidegrees, the bearing example is
  the current (not next) waypoint, magnetometer calibration is applied
  by the sensors module, and only Ackermann/mecanum use bearing_setpoint.
- Style: rename "the norms" to "official definitions", remove casual
  bold emphasis, fix heading levels, British spelling, and one sentence
  per line.

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

* docs(concept): apply suggestion on px4 path follow computation

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

* docs(concept): pull user-facing notes from advanced navigation terminology

Readers operating, tuning or reading logs should not need the advanced
page, so add the rover reversing case, the sideslip/drift naming hint,
and the user-facing names that don't match the terminology.

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

* docs(concept): split local frame into tangent-plane and navigation frames

Local positions are a projection in the tangent-plane frame at the
estimator origin, while velocities and attitude are relative to the
north-east-down frame at the vehicle. Describe both, keeping the main
page short and the details on the advanced page.

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

* docs(agents): point to navigation terminology before naming nav fields

Keep new code, uORB fields, parameters and docs from drifting away from
the agreed heading/course/track/bearing definitions again.

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

* docs(concept): address review comments by mbjd

---------

Signed-off-by: Michael Fritsche <frimi999@gmail.com>
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-11-10 10:12:17 +01:00
PX4BuildBot f8a8b7c950 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-09 21:59:58 +00:00
Alex E 59fa7a4a7d docs(modules): add auto-generated disclaimer to every module reference page (#29673)
Only modules_main.md told readers that the module reference is generated
from source. The per-category pages (modules_driver.md, modules_system.md,
...) and the per-subcategory pages (modules_driver_imu.md, ...) had no such
note, so contributors kept fixing typos directly in docs/en/modules/ and
the next metadata sync silently reverted them (see #29614).

Emit a `::: info` block right under the H1 of every category and
subcategory page. The wording follows the existing disclaimers on the
airframe reference and the uORB message index: it links to the generator
script and names the `make module_documentation` target.

docs/en/modules/*.md are regenerated with the updated generator and run
through Prettier, mirroring what the docs-orchestrator metadata sync does
on main, so the diff is only the new note.

Fixes #29624

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

Signed-off-by: Alex E <aelejandro9@gmail.com>
2026-11-10 08:51:33 +11:00
Peter van der Perk ca7b6d9819 fix(dshot): skip FlexIO in up_dshot_arm when no channel was initialised (#29677)
When no output is configured for DShot, init fails and the destructor
calls up_dshot_arm(false) before up_dshot_init() ever ran. Since the
FlexIO driver rework up_dshot_arm() writes SHIFTSIEN and TIMIEN
unconditionally, but FlexIO1 is still clock gated at that point and an
access to a gated i.MX RT peripheral stalls the bus: the app dies about
12 s after boot with no fault, before the USB autostart. Seen on the
RT1064 (MR-VMU-TROPIC); RT1176 boards init DShot successfully first.

Return early when the channel mask is empty.
2026-11-09 12:56:58 -07:00
440179383a feat(SIH): Added optical flow sensor continues on #28270 (#29676)
* feat(sih): model the distance sensor range limits, quality and noise

The simulated distance sensor reported a noise free reading with no signal
quality, and saturated only against the upper range limit. Readings below the
minimum range were passed through unchanged, which is not what a range finder
does.

Report the raw saturated value with a zero quality outside of the measurement
range, derate the quality over the last 20% of the range, and add configurable
Gaussian noise (SIH_DISTSNSR_NOI). The quality is decided on the true distance
so that a measurement sitting at a range limit does not flicker in and out of
validity.

The sensor is now enabled with SIH_DISTSNSR_EN instead of by an out of band
value of the override parameter, and the ground distance computation moves into
a helper.

* feat(sih): add optical flow simulation

Simulate a downward facing optical flow sensor in SIH so that flow aided
navigation can be exercised without a rendered camera image. The flow rate is
the sum of the body rates and of the ground relative velocity scaled by the
distance to the ground, integrated over one publication interval and published
on sensor_optical_flow with configurable rate (SIH_OF_RATE) and noise
(SIH_OF_NOISE).

The sensor reports the integrated flow only: the flow module completes the
sample with the vehicle gyro and the downward facing distance sensor, which
therefore has to be enabled as well. Quality drops to zero above
SIH_OF_H_MAX or when the flow rate exceeds what the sensor can correlate.

The topic is advertised before the simulated clock starts, because the sensors
module brings up its flow pipeline on the first appearance of the topic, and
publishing during startup deadlocks the lockstep clock this thread advances.

Add the quadx_flow and standard_vtol_flow models with matching airframes:
SYS_AUTOSTART 10046 flies the multicopter on flow only with no GNSS, 10047
fuses the flow next to GNSS on a VTOL.

* prune configs

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

* more config cleanup

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

* added EKF2_HGT_REF to vtol flow config

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

* feat(simulation): added tests for optical flow for both quadx and stanard vtol
modes and enable them in CI

- for the test we monitor error on ground truth position and velocity

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

* feat(docs): document addition of optical flow in SIH

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

* fix(mavsdk_tests): unsubscribe flow ground truth comparison on destruction

The ground truth comparison callbacks capture `this` and touch members of
AutopilotTesterFlow. If a REQUIRE fails between start and stop, the tester
is destroyed during unwinding while the subscriptions are still active,
so a callback could run on the destroyed mutex and sample buffers.

Make stop idempotent and call it from the destructor, and stop any running
comparison before starting a new one.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: RomanBapst <bapstroman@gmail.com>

* tests for python

* fix(mavsdk_tests): start the VTOL flow loiter already on its radius

The loiter was centered on the vehicle's position right after the
transition, so it started at the center and had to fly straight out to the commanded
radius before the lateral guidance curved onto the track.

Assisted-by: Claude:claude-sonnet-5

* fix(mavsdk_tests): resend the flow test EKF origin until it is taken

The SITL startup script starts ekf2 after MAVLink. When MAVSDK connected
first, the single SET_GPS_GLOBAL_ORIGIN was published before ekf2 existed
and MAVSDK's RUN_PREARM_CHECKS followed it. Ekf2 then subscribed, saw
only the newest vehicle command and never got an origin. The Coverage
build starts slowly enough to hit this every time.

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

* ci(sitl_tests): run the VTOL flow test without coverage

As a Coverage job it built with coverage on every PR and uploaded the
sitl-vtol flag from PRs, which replaced main's carried-forward VTOL
coverage with the flow-only flight. The quadx_flow entry also sat
between the Coverage comment and the standard_vtol entry it describes.

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

* fix(mavsdk_tests): sum the flow test heading sweep with its sign

Adding up the absolute heading changes counted yaw oscillation toward the
360 degrees, so the wait could end before a full orbit was flown.

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

* refactor(airframes): keep only the non-default params in the SIH flow airframes

SIH_OF_H_MAX, SIH_DISTSNSR_EN and EKF2_OF_CTRL were set to their defaults
and SENS_EN_GPSSIM is already set by the quadx base airframe. The quadx
forced EKF2_RNG_CTRL to 2 while the VTOL used the conditional default for
no stated reason, so both now use the default.

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

* docs(sim_sih): mark the SIH flow airframes as new in PX4 v2.0

release/1.18 has branched, so these airframes first ship in v2.0, not
v1.17.

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

---------

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-11-09 11:13:16 -07:00
Matthias Grob 7e34e87d3a fix(mavlink): keep ADS-B receiver reporting online when it saturates on traffic stream (#29385)
Some ADS-B receivers, e.g. the pingRX Pro, give their traffic reports
priority over HEARTBEAT when there is a lot of traffic. The heartbeat then
times out and the traffic avoidance system shows as lost, which can trigger
the traffic_avoidance_unhealthy failsafe, while traffic is still
arriving.

ADSB_VEHICLE messages from the component that announced itself as
MAV_TYPE_ADSB now also reset the ADS-B liveness timeout. At least one
heartbeat is still needed to identify the receiver. Traffic from other
systems or components, such as a GCS forwarding traffic, does not keep it
online.
2026-11-09 17:03:41 +01:00
Michael Fritsche d34142bc4e refactor(rover): run each rover controller on its own trigger topic (#29630)
* refactor(rover): run each rover controller on its own trigger topic

The rover modules ran the whole controller cascade from the gyro callback,
so the position and speed controllers ran several times per EKF output on
stale estimates. Each controller is now a work item triggered by the topic
it consumes (local position, attitude, angular velocity, steering
setpoint), and the module only generates setpoints and enables the
controllers the active control mode needs. All work items share the
rate_ctrl queue, so enabling and resetting never overlaps a controller run.

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

* fix(rover): register controller callbacks top-down

Position and speed control share the vehicle_local_position trigger and
uORB schedules callbacks in registration order. Speed was registered
first, so it always consumed the previous cycle's position-control
setpoint, adding one EKF period of latency.

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

* docs(rover): move controller update descriptions back to their functions

The init() and setEnabled() declarations were inserted between the
update*Control() doc comments and their functions, leaving two stacked
@brief blocks.

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

* fix(rover): widen the dt clamp of the EKF-triggered controllers

Attitude and speed control now run on vehicle_attitude and
vehicle_local_position instead of the gyro. Their period is the EKF2
output period, nominally exactly the old 10 ms upper bound, so jitter or
a larger EKF2_PREDICT_US clipped dt and slowed the slew-rate limiters and
PID integrators below real time. Allow up to 50 ms.

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

* docs(rover): correct the attitude controller dt comment

vehicle_attitude is published on every EKF2 output predictor update at
IMU_INTEG_RATE, not at the EKF2_PREDICT_US filter update rate.

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

* fix(rover): restart the controller dt when a controller is re-enabled

A controller keeps its last run timestamp while it is disabled, so the
first run after a mode switch computed dt over the whole disabled time
and hit the upper clamp. With the speed and attitude clamps at 50 ms that
step was six EKF periods long for the slew limiters and integrators.
Restart the timestamp on enabling, so the first dt is the lower bound.

SIH rover (10045), position -> manual -> position while driving, speed
PID integral after the first re-enabled run: dt 50 ms before, 1 ms after
(normal runs 8 ms).

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

* fix(rover): pace the actuator controllers by the gyro

The actuator controllers ran only when a steering setpoint arrived. A
mode change resets the rate controller's setpoint to NaN, so the next
cycle published no steering setpoint and therefore no actuator setpoint.
SIH lockstep waits for an actuator output every step and froze there:
switching to stabilized or offboard velocity stalled the simulation.
Trigger the actuator controllers on vehicle_angular_velocity, registered
after the rate controller, so they publish every cycle with the steering
setpoint of the same cycle.

SIH rover (10045), manual/acro/stab/position/offboard velocity cycle, 3 runs
each: before all 3 runs froze (offboard switch in all, stab switch in one), after no
lockstep timeouts, actuator outputs every cycle (max gap 8 ms) and >= 99.7 %
of them use the steering setpoint of the same cycle.

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

* perf(rover): only wake the enabled controllers

All controllers stayed registered on their trigger topics, so in every
mode and while disarmed the disabled ones were scheduled at up to gyro
rate just to return. Register a controller's callback when it gets
enabled and unregister it when it gets disabled. A newly enabled
controller runs once right away, because it registered after the trigger
of the current cycle fired; without that the lockstep simulation misses
the cycle's actuator output and stalls. When an upper controller is
enabled while the lower one sharing its trigger topic keeps running
(position/speed on vehicle_local_position, rate/actuator on
vehicle_angular_velocity), the lower one is re-registered behind it to
keep the cascade order.

SIH rover (10045), 3 runs each:
- work_queue status: disarmed only the module runs, manual adds the
  actuator controller, acro rate + actuator, stab + attitude, position all
  five, offboard velocity all but position; no lockstep timeouts.
- Value-based order check (servo command vs steering setpoint, speed
  controller setpoint vs position controller setpoint): every consumer
  uses the setpoint of the same cycle after manual -> acro, manual ->
  offboard velocity and offboard velocity -> Go-To. With the
  re-registration disabled the actuator controller used the previous
  cycle's steering setpoint after acro / offboard, and the speed
  controller the previous cycle's speed setpoint in Go-To (153 of 153).
- Re-enable probe: first dt after position -> manual -> position is still
  1-2 ms.

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

* fix(rover): assign the rover control workitems to nav_and_controllers

* fix(rover): retry a failed controller callback registration

setEnabled() marked a controller enabled even when registering its
trigger callback failed. The next call then saw no change and never
retried, so the controller ran once from ScheduleNow() and then stayed
idle with a single error. A controller now only counts as enabled once
its callback is registered, so the next module cycle retries. A failed
re-registration for the cascade order clears it the same way. The
modules report a failure once instead of every cycle.

SIH rover (10045), attitude controller registration forced to fail for
the first 1500 attempts: the controller stays off while it fails and
starts at 250 Hz on the first successful retry, one error per failure
episode. Mode cycle without the fault unchanged.

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

* refactor(rover): share the controller trigger logic in a base class

All 15 rover controllers carried the same copy of init(), setEnabled(),
enabled(), reregisterTrigger() and the enabled check in Run(). Copies of
the code that decides when a controller runs and in which order can
drift apart, so RoverControllerWorkItem in lib/rover_control now owns
the trigger subscription, the work queue and the enable state. A
controller only implements its step and, if it has a time step, the
restart on enabling.

The trigger only wakes the controller, so the controllers read their
inputs through plain subscriptions again. The actuator controllers no
longer drain the gyro topic: callbacks are scheduled on new
publications, not on unread data.

A functional test covers the contract the modules rely on: no runs
while disabled, one run right away on enabling, a run on every trigger,
registration order for controllers sharing a trigger and re-registering
to restore the cascade order.

SIH rover (10045), manual/acro/stab/position cycle: each mode wakes the
same controllers at the same rates as before, actuator setpoints at
250 Hz, no errors.

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

* fix(rover): drop the protected destructor of the controller base class

clang-tidy (cppcoreguidelines-virtual-class-destructor) rejects a
destructor that is both protected and virtual. WorkItem already has a
public virtual destructor, so the implicit one is enough.

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-09 08:23:12 -05:00
Sofian ElmotiemandSofian Elmotiem 92b18d17f3 fix(msg): escape IDL keywords in uORB field names for idlc (#29696)
A uORB field named after an IDL keyword, such as `sequence` in several
MAVLink-M messages, made CycloneDDS idlc fail with a syntax error on any
build with CONFIG_LIB_CDRSTREAM, such as the Zenoh targets. Escaping the
name in the shared IDL is not enough: rosidl_parser, which computes the
RIHS01 type hash, rejects escaped identifiers.

Generate a second IDL copy for idlc with every field and constant name
escaped by a leading underscore. idlc strips the underscore, so the
generated C member names are unchanged. The hash step keeps reading the
plain IDL, so RIHS01 hashes and Zenoh key expressions are unchanged too.

Fixes #29600

Signed-off-by: Sofian Elmotiem <191787501+SofianElmotiem@users.noreply.github.com>
Co-authored-by: Sofian Elmotiem <191787501+SofianElmotiem@users.noreply.github.com>
2026-11-09 13:17:42 +00:00
Jonas Perolini ca6b8c8e03 fix(navigator): keep the mission-landing Return altitude current (#29684)
Assisted-by: Claude:claude-opus-5-5
2026-11-09 09:45:51 +01:00
Saibernard ded6314ffd fix(vtol): restart the tailsitter front transition mid back transition (#29608)
A tailsitter that got a fixed-wing request while still transitioning
back to hover switched straight to fixed-wing mode, even with the nose
part way up and the airspeed below the transition speed. The standard
VTOL had this removed in 2016 because it can result in an unsafe flying
state, and restarts the front transition instead. Do the same for the
tailsitter.

Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
2026-11-09 09:09:43 +01:00
Saibernard cdf9cfb28b fix(vtol): restart the tiltrotor front transition mid back transition (#29609)
* fix(vtol): restart the tiltrotor front transition mid back transition

A tiltrotor that got a fixed-wing request while still transitioning
back to hover switched straight to fixed-wing mode, which commands full
forward tilt in one step and starts the throttle blend from the hover
thrust on the front rotors, even with the rotors already part way to
vertical and the motors off. In Gazebo that can pitch the aircraft up
50 degrees and stall it. Keep the instant switch while the rotors are
still forward of VT_TILT_TRANS and otherwise restart the front
transition from the current tilt, as the standard VTOL does. The first
front transition phase sets the pitch weight and ramps the throttle
weight back up, since the back transition zeroes both while the rotors
rotate.

Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
2026-11-09 09:09:31 +01:00
jc-works d83b4e7df9 fix(airspeed_selector): skip validation checks during landing
Navigator publishes the active setpoint through position_setpoint_triplet.
Subscribing to the standalone dependency left the setpoint at its default
POSITION value, so the existing LAND exclusion was never applied and the
load-factor check could latch the airspeed sensor as invalid during landing.

Consume the current triplet setpoint so the intended exclusion takes effect
without changing existing failure-latching behavior.

Assisted-by: Codex:gpt-5
Signed-off-by: jc-works <jc-works@users.noreply.github.com>
2026-11-09 09:02:06 +01:00
Jonas Perolini defc7844a7 fix(navigator): move to the mission landing at altitude after the Return climb (#29688)
Assisted-by: Claude:claude-opus-5-5
2026-11-09 08:45:58 +01:00
f9088053ab fix(zenoh): px4_sitl_zenoh build on macOS (#29538)
zenoh is now part of px4_sitl_default, so the macOS SITL build compiles
it and fails in two places:

- msg: zenoh_topics was a static library with only a header as its
  source. macOS ar rejects the resulting empty archive ("no archive
  members specified"). It only orders header generation, so make it a
  custom target.
- zenoh: POSIX_COMPATIBLE makes zenoh-pico define ZENOH_LINUX ahead of
  its own Darwin detection, which pulls in the Linux-only getrandom().
  Set it only on non-Apple platforms. Linux is unaffected, and NuttX
  (CMAKE_SYSTEM_NAME Generic) keeps it.

Also mark the uORB_Zenoh_Subscriber overrides, consistent with the
publisher.

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
Co-authored-by: Farhang <46557204+farhangnaderi@users.noreply.github.com>
Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2026-11-08 22:15:08 -05:00
Holybro-ZebulonandFarhang 100d257c91 feat(boards/px4_fmu-v6x): add LSM6DSV fallback support (#29697)
Probe ICM45686 and IIM42653 first on V6X008 and start LSM6DSV only when neither is detected, preserving existing IMU priority.

Assisted-by: Codex

Signed-off-by: Brown <zebulon-86@outlook.com>
Co-authored-by: Farhang <46557204+farhangnaderi@users.noreply.github.com>
2026-11-08 21:54:21 -05:00
Luka Dragar aad332ac93 fix(boards/fmu-v6xrt): use ENET_1G_RX_ER_2 for GPIO_ENET2_RX_ER (#29678)
All three fmu-v6xrt boards use ENET_1G (CONFIG_IMXRT_ENET2) and wire
ETH_RX_ER to GPIO_DISP_B1_01, as noted in the inline comment.

GPIO_ENET2_RX_ER was using GPIO_ENET_RX_ER_1, which is the 10/100 ENET
pin on GPIO_DISP_B2_09 (ETH_PHY_nINT). This muxed ETH_PHY_nINT to
10/100 ENET_RX_ER, left GPIO_DISP_B1_01 as a GPIO input, and left the
ENET_1G_RX_ER_SELECT_INPUT daisy register at its reset default (0 =
GPIO_EMC_B2_18, SPI3_DRDY2_SENSOR3 / BMI088 gyro DRDY).

Use GPIO_ENET_1G_RX_ER_2 so GPIO_DISP_B1_01 is muxed to ENET_1G_RX_ER
and the daisy input selects GPIO_DISP_B1_01_ALT1.

Assisted-by: Claude:claude-opus-5

Signed-off-by: TheLukaDragar <lukadragarbusiness@gmail.com>
2026-11-08 18:53:37 -05:00
PX4 Build BotandCrowdin Bot 68c3a54d1c docs(i18n): PX4 guide translations (Crowdin) - uk (#29691)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-11-09 07:40:18 +11:00
PX4 Build BotandCrowdin Bot 160b8ab149 docs(i18n): PX4 guide translations (Crowdin) - ko (#29690)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-11-09 07:20:46 +11:00
PX4 Build BotandCrowdin Bot f5793cb3b1 docs(i18n): PX4 guide translations (Crowdin) - zh-CN (#29692)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-11-09 07:20:33 +11:00
Jonas Perolini caf75ad3c1 fix(mavlink): report missing Return time estimates as unknown (#29685)
Assisted-by: Claude:claude-opus-5-5
2026-11-08 16:18:35 +01:00
Jonas Perolini 5dc8ab048f refactor(navigator): collapse Return's executor switches (#29683)
Assisted-by: Claude:claude-opus-5-5
2026-11-08 16:17:22 +01:00
treston 14a7aec820 fix(tunes): return defined note fields for rests and repeated tunes (#29132)
Tunes::get_next_note() returned Continue from the N0 rest and from the
end of a repeating tune without writing frequency and duration. The
MAVLink tune publisher and the tune_control command keep uninitialised
locals for them, publish them as they are and schedule the next note
from now + duration + silence, so a tune such as "N0" or "MBC" played
an indeterminate note after an indeterminate delay.

Zero frequency and duration on the N0 rest as P and R already do, and at
the end of the string so a repeating tune restarts through a zero-length
rest. Add a gtest for both paths.
2026-11-07 23:08:57 +13:00
Jonas Perolini 0814160230 refactor(navigator): check for the geofence file with access() (#29667)
Navigator::run() only returns when the navigator stops, so the struct stat
it filled only to test whether the geofence file exists stayed on the stack
below every navigator call. access() gives the same answer and keeps its
buffer in its own frame.

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

Signed-off-by: jonas <jonspero@me.com>
2026-11-07 07:56:38 +01:00
Jonas Peroliniandjonas 95a0c23482 fix(navigator): keep mission feasibility checks off the stack (#29656)
* fix(navigator): keep mission feasibility checks off the stack

Since the geofence path checks (#28759 to #28762), a full path batch is
checked through Geofence::checkPolygonPaths() while check_mission_valid(),
the DO_JUMP resolution and the batch helpers are still on the stack. On
fmu-v6c this chain reached 2552 B in SIH, over the 2176 B that were usable
before #29638.

Keep the per-check state out of those frames: the feasibility checker is a
MissionBase member instead of a 248 B local, the DO_JUMP branches and read
buffers are statics like the path batch, the path pieces are a Geofence
member, paths are written into the batch without a temporary and breach
reports run in their own functions. The path geometry is unchanged.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: jonas <jonsper@me.com>

* fix(navigator): keep pathPieces() out of checkPaths()

pathPieces() is a file-local function with a single caller, so GCC inlines
it into checkPaths(). Its double math then needs more saved FPU registers
in checkPaths(), whose frame grows from 88 to 120 B on fmu-v6c while
checkPolygonPaths() runs below it.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: jonas <jonsper@me.com>

* refactor(navigator): keep the feasibility scratch buffers in the checker

* refactor(navigator): keep new member vars uninit to save flash

---------

Signed-off-by: jonas <jonsper@me.com>
Co-authored-by: jonas <jonsper@me.com>
2026-11-06 11:06:42 -07:00
Mathéo Taillandier e82e109073 fix(gz_plugins/gstreamer): force I420 before H.264 encoder (#29635)
From RGB appsrc input, videoconvert negotiates Y444 by default, so
x264enc produces a High 4:4:4 Predictive stream. Many decoders
(openh264dec, most hardware and browser decoders) cannot play that
profile, so the simulated camera stream fails to display.

Pin the converter output to I420 with a capsfilter so the encoder
emits a standard High profile stream. I420 is also accepted by the
NVENC path.

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

Signed-off-by: Matheo-13 <matheo.taillandier@gmail.com>
2026-11-06 10:52:45 -07:00
Ahmet Burak Tektas 06036f2163 feat(tools): add a script to convert v1.17 parameter files for v1.18 (#29363)
* feat(tools): add a script to convert v1.17 parameter files for v1.18

param_translation.cpp converts renamed parameters only when PX4 upgrades
the parameters stored on the vehicle. QGroundControl loads a .params
file parameter by parameter, so values saved under old names are
ignored, and RC*_REV saved as -1.000000 load as 0 into the now integer
parameters. The script applies the same conversions to the file.

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

* fix(tools): keep the v1.18 heater sensor default in converted files

A v1.17 vehicle does not store SENS_TEMP_ID at its default of 0, so the
upgrade never converts it and HEATER1_SENS_ID keeps its v1.18 default,
the board's sensor or auto-select. The script wrote -1 instead, which
disables the heater on boards that v1.18 heats by default.

Also list EKF2_REQ_PDOP, which v1.18 raises to 4 on fixed-wing, log
integer values without an exponent, end a copied line that has no
newline before the parameters follow it, and say what the translation
test catches.

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

* docs(releases): link the v1.17 parameter file script in 1.18 notes

Item 13 tells users to check a parameter file saved on v1.17 by hand.
Point them to Tools/migrate_param_file.py, which converts such a file.

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

* fix(tools): convert the v1.17 auxiliary global position parameters

param_translation.cpp moves EKF2_AGP_CTRL, _MODE, _DELAY, _NOISE and
_GATE to the first source set, EKF2_AGP0_*, and sets EKF2_AGP0_ID to 1
when EKF2_AGP_CTRL is set. The script listed them as removed, so a
converted file came out with aux global position fusion disabled.

Convert them the same way. QGroundControl lists EKF2_AGP0_* only once
EKF2_AGP0_ID is set and the vehicle reboots, so the script and item 13
of the 1.18 notes say to load the file again after a reboot.
EKF2_AGP_NOISE at 0.9 is listed as a v1.17 default (1.0 in v1.18).

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

* fix(tools): replace the v1.17 RoboClaw output defaults

The RoboClaw outputs moved from 0 to 256 with stop at 128 to 0 to 254
with stop at 127. A saved file holds the v1.17 defaults, and the script
kept them: RBCLW_DIS 128 drives the motors forward at speed 1 while
disarmed, and RBCLW_MAX 256 is above the v1.18 maximum of 254.

At their v1.17 defaults RBCLW_DIS, _MIN and _MAX now get the v1.18
default, as after an upgrade of the parameters stored on the vehicle,
since the firmware does not store defaults. Other RBCLW_DIS, _MIN, _MAX
and _FAIL values are kept and listed for a check.

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

* fix(tools): drop the reload after a reboot for EKF2_AGP0_*

QGroundControl sends the rows of a .params file that the vehicle does not
list as new parameters, since the file holds their types, and PX4
accepts PARAM_SET for any parameter in its table. So EKF2_AGP0_* are set
on the first load, and the note to load the file again after a reboot
is wrong. Only a Mission Planner file, which has no types, cannot send
them.

Remove the note from the script and from item 13 of the 1.18 notes.

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

* fix(tools): list the X25-EVO core heater and other components

- CORE_IMU_TEMP, _FF, _I, _P and CORE_TEMP_ID of the CUAV X25-EVO core
  heater are gone in v1.18 without a translation, the board now uses
  HEATER2_*. They passed through unlisted; list them as removed with
  the HEATER2_* parameter to set.
- rc.boat_defaults still sets NAV_ACC_RAD 2, so the note that v1.18 uses
  10 applies to multicopters only.
- A vehicle with MAV_COMP_ID other than 1 saves its parameters under
  that component, so the script converted nothing and said nothing.
  Warn when the file has no parameters of component 1.

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

* fix(tools): list board defaults changed on Skynode and i.MX RT

A saved v1.17 file holds the v1.17 board defaults, and v1.18 changed
some of them:
- On Skynode the fmu-v5x defaults set EKF2_MULTI_IMU 0 and
  SENS_IMU_MODE 1, since it is too loaded for the three EKF instances of
  the STM32F7 defaults (3 and 0).
- The i.MX RT defaults match fmu-v6x: EKF2_MULTI_IMU 3, SENS_IMU_MODE 0,
  IMU_GYRO_FFT_EN 1 and UAVCAN_ENABLE 2, where v1.17 used 0, 1, 0 and 0.

List these values as v1.17 defaults with the boards they apply to. One
parameter can change differently on each set of boards.

Airframes 4016, 4020 and 24001 still set NAV_ACC_RAD 2 in v1.18, so name
them in the multicopter note.

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

---------

Signed-off-by: A.Burak Tektas <15087318+Abtektas@users.noreply.github.com>
2026-11-06 10:44:27 -07:00
Jonas Perolini a439da789d fix(navigator): move geofence polygon scratch storage off the stack (#29649)
* fix(navigator): move geofence polygon scratch buffer to .bss

A maximum-size 64-vertex polygon consumes 512 bytes of temporary stack
storage. Reserve the bounded scratch array in .bss to protect navigator
stack headroom without heap allocation or callback indirection.

On px4_fmu-v6c_default with GCC 13.2.1 (-Os), the function's own frame at
64 vertices falls from 608 to 80 bytes. Static RAM increases by 512 bytes
and firmware flash decreases by 40 bytes. Projection and geometry remain
unchanged; document serialized access and reject oversized input.

Signed-off-by: Jonas Perolini <jonspero@me.com>
Assisted-by: Codex

* refactor(navigator): move vertice array as class member

* refactor(navigator): clean comment

---------

Signed-off-by: Jonas Perolini <jonspero@me.com>
2026-11-06 10:43:44 -07:00
PX4BuildBot 51c2a973fd docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-11-06 15:51:09 +00:00
Peter van der PerkandHamish Willee 243f20a8a1 docs(flight_controller): address the mavlink-router review and wire up uXRCE-DDS on the MR-NavQ95
Only the imx-image-ros image ships mavlink-router, and its main.conf
exposes a UDP server on port 10000 instead of pushing to a ground
station, on purpose, so Wi-Fi is not flooded with broadcast traffic.
Say so, tell the reader to add the board as a UDP server in
QGroundControl or to add a Normal endpoint for a fixed ground station,
and point at the router's own endpoint documentation.

/dev/ttyros existed but no PX4 module could use it: it was not a board
serial port, so UXRCE_DDS_CFG could not select it and nothing started the
client. Registering it as TELEM 2 lets the generated rc.serial start
uxrce_dds_client on it from the parameter, like a companion link on any
other board, with nothing enabled by default. Tested on the board: with
UXRCE_DDS_CFG set to 102 the client starts at boot on /dev/ttyros at
921600 baud and its session frames arrive on the Linux side. The page
gets a ROS 2 section with the three steps, and the agent install points
at the uXRCE-DDS page since the Linux images do not ship it.

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-11-06 07:32:53 -08:00
Peter van der Perk db2a8ce3cb fix(uxrce_dds_client): enable UDP only on NuttX boards with Ethernet
The NuttX UDP MTU is taken from ETH_UDP_MSS(), which NuttX only defines
with CONFIG_NET_ETHERNET. Boards that enable CONFIG_NET for SocketCAN
alone, such as the MR-NavQ95, failed to compile. Gate the UDP transport
on CONFIG_NET_ETHERNET in both the header and the library build.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-11-06 07:32:53 -08:00
Peter van der PerkandAndre Heinemans fec5cf5d14 fix(boards): address MR-NavQ95 review feedback
- USB VALID/CONNECTED set to 0
- TPM: reject OneShot when the clock can't support it, fix W1C status
  and hw channel indexing, scale TPM3 to its correct tick
- Set pad pulls through the iomux
- Calibrate LOOPSPERMSEC on hardware (159856)
- Drop I2C_LATEINIT, the ADC critical section and the FAT DMA pool
- Add validateSPIConfig
- Round the LPIT reload up
- Make imx9 its own CI chip family, with its own group and seeder
- Reject BDShot150 and fall back to plain DShot (also a long-standing
  bug on i.MX RT)

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
2026-11-06 07:32:53 -08:00