49443 Commits

Author SHA1 Message Date
Ramon Roche
1ba562f400 ci(deb): use AWS regional mirror for apt in deb build container
The default archive.ubuntu.com round-robin can serve out-of-sync index
files mid-sync, which makes apt-get update fail with 'File has unexpected
size' errors and breaks the deb build job for everyone until the upstream
mirror catches up.

Rewrite the container's apt sources to point at us-west-2.ec2.archive.
ubuntu.com instead. The EC2 archive mirrors are Canonical-operated,
region-local to the runs-on instances, and sync aggressively, eliminating
the round-robin lottery as a CI failure mode.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-07 20:01:55 -06:00
Ramon Roche
4da1c11db9 fix(packaging): resolve host.docker.internal as IPv4 in SIH entrypoint
The SIH container entrypoint resolves host.docker.internal via getent
hosts and feeds the first result to mavlink -t and uxrce_dds_client -h.
On Docker Desktop for Windows the lookup can return an IPv6 ULA first,
and both PX4 modules only parse IPv4, so they error out with
'invalid partner ip' and PX4 boots with no working MAVLink or DDS link.

Switch to getent ahostsv4, which only returns IPv4 records, so the IP
injected into the startup scripts is always parseable.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-07 20:01:55 -06:00
Ramon Roche
e4d46f20f4 ci(container): add build_ref input to allow dispatch against arbitrary refs
The current workflow_dispatch path builds whatever HEAD of the dispatch ref
is, labels the resulting image with px4_version, and publishes. That's
fine for rebuilding current state but it cannot rebuild the exact commit
a release tag points to, because the dispatch loads the workflow file
from one ref and implicitly checks out the same ref for the build.

This matters for release recovery. When the v1.17.0-rc2 tag push failed
to publish containers back on 2026-03-13 (the v1 GHA cache protocol
removal in RunsOn v2.12.0), the tag was not re-pushed, so the only way
to publish rc2 containers now is via workflow_dispatch. Without this
change, a dispatch against release/1.17 builds release/1.17 HEAD and
labels it v1.17.0-rc2, which produces a container whose contents do not
match the rc2 tag's actual code. That is not a faithful recovery.

Add a build_ref input that controls only the checkout ref, defaulting
to empty which falls back to github.ref (preserving current behavior
for both push events and dispatches that omit the input). With this,
a release recovery looks like:

  gh workflow run dev_container.yml --repo PX4/PX4-Autopilot \
    --ref release/1.17 \
    -f px4_version=v1.17.0-rc2 \
    -f build_ref=v1.17.0-rc2 \
    -f deploy_to_registry=true

The workflow loads from release/1.17 HEAD (which has the cache fix
from 39b0568 and the hardening from d74db56a), but the build uses
Tools/setup/Dockerfile from the rc2 tag. The published image has
rc2 contents under the rc2 label, as if the original tag push had
worked.

All three actions/checkout steps (setup, build, deploy) take the same
ref expression so every job sees a consistent workspace. Non-dispatch
events (push, PR) evaluate github.event.inputs.build_ref to empty and
fall back to github.ref exactly as before.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-07 17:26:47 -06:00
Ramon Roche
86f0dc2cb1 ci(ros): stop uploading test logs to logs.px4.io
Drops --upload from the ROS integration test runner so CI runs no
longer publish ULogs to the public logs.px4.io server on every run.
Failure debugging is unaffected: the existing Upload failed logs step
already captures logs as GitHub Actions artifacts on failure.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-07 16:41:19 -06:00
PX4BuildBot
6b8ee5cba4 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-07 21:11:49 +00:00
Onur Özkan
823f033abe
refactor(mavlink): extract offboard control mode filling in mavlink receiver
Extract the repeated `offboard_control_mode_s` population logic into a shared
`fill_offboard_control_mode()` helper in MavlinkReceiver and, similar to
`fill_thrust()`, reuse it in both local and global position target handlers.

Reduces the code duplication without changing any behavior.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
2026-04-07 13:04:51 -08:00
Ramon Roche
d74db56a06 ci(container): harden dev_container workflow against cache-export flakes
Three related fixes to prevent a repeat of the v1.17.0-rc2 incident, where a
post-push GHA cache-export 404 failed the arm64 build after both registry
pushes had already succeeded, fail-fast cancelled amd64, and the deploy job
was skipped, leaving the registries with only a partial arm64 publish and no
multi-arch manifest.

- Mark cache export as non-fatal via ignore-error=true on cache-to. A
  successful registry push should never be undone by a cache-layer flake.
  This alone would have let rc2 publish correctly.

- Decouple the deploy job from the build job's exit code. Change its if:
  gate to !cancelled() + setup success only, and promote the existing
  "Verify Images Exist Before Creating Manifest" step from a warning into
  a hard precondition. Deploy now runs whenever both per-arch tags actually
  exist in the registries, which is its real precondition, and fails loudly
  if a tag is missing.

- Bump every action to the current major (runs-on/action v2,
  actions/checkout v5, docker/login-action v4, docker/setup-buildx-action v4,
  docker/build-push-action v7, docker/metadata-action v6). This gets the
  workflow off Node 20 before GitHub's June 2 2026 forced runtime switch
  and keeps runs-on/action on the same major as the runs-on platform.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-07 14:32:48 -06:00
PX4BuildBot
89e575ed34 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-07 19:56:42 +00:00
Nick
c592af7e8e
fix(parameters): show board_rot in show-for-airframe (#26989) 2026-04-07 11:48:52 -08:00
PX4BuildBot
461042f3f9 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-07 19:15:45 +00:00
Onur Özkan
cf517f50d8
docs(control-allocator): clarify torque-triggered setpoint handling
Clarify the unclear intention of how torque and thrust are handled.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
2026-04-07 11:08:09 -08:00
PX4BuildBot
be631ed584 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-07 11:48:55 +00:00
Niklas Hauser
9e0cd2fcf3 Fix mtd command for very small partition sizes of just 32B 2026-04-07 13:42:12 +02:00
PX4BuildBot
44c128aade docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-05 10:41:00 +00:00
Andrew Wilkins
6912ae7b14
feat(test): fixed wing test cards (#26824) 2026-04-05 20:34:22 +10:00
PX4BuildBot
f19adb896c docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-05 08:19:15 +00:00
PX4 Build Bot
c3f90af3ef
docs(i18n): PX4 guide translations (Crowdin) - ko (#26976)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-04-05 18:12:28 +10:00
PX4 Build Bot
a5e55ffd75
docs(i18n): PX4 guide translations (Crowdin) - uk (#26977)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-04-05 18:12:10 +10:00
PX4 Build Bot
3b4df0aead
docs(i18n): PX4 guide translations (Crowdin) - zh-CN (#26978)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-04-05 18:11:58 +10:00
PX4BuildBot
8576e07b73 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-04 19:52:21 +00:00
Anil Kircaliali
83c41dcf87
refactor(navigator): remove unused parameters from computeReturnAltitude (#26969)
* Remove unused parameters from function signature and make the parameter accessors consistent

* Update the caller function signature

* Update src/modules/navigator/rtl.cpp

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-04-04 11:45:22 -08:00
PX4BuildBot
550b7148a5 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-04 08:09:27 +00:00
Jacob Dahl
047fddbcd8
fix(sensors): fix baro publish rate limiter aliasing (#26967)
Use timestamp_sample instead of time_now_us for the rate limiter check
to sync to the sensor clock rather than the wall clock.

Switch from direct timestamp assignment to epoch-advance
(_last_publication_timestamp += interval_us) with a catch-up guard to
prevent aliasing artifacts when the sensor sample rate is close to the
configured publication rate.
2026-04-04 00:02:21 -08:00
PX4BuildBot
dd2530bb09 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-04 03:27:16 +00:00
Mirko Denecke
897ff241ce docs(sensor/airspeed): add UAV-DEV GmbH DroneCAN Airspeed and Barometer Sensor 2026-04-03 21:20:34 -06:00
Hamish Willee
6f18fa39e8 fix: template_module update to best practise 2026-04-03 21:14:55 -06:00
Pavel Guzenfeld
348a558a15 fix(navigator): correct mission resume waypoint with camera triggering
getPreviousPositionItems() already decrements the start index
internally before searching. The call in on_activation() at line 227
passed _inactivation_index - 1, causing a double-decrement that made
the vehicle resume at waypoint n-2 instead of n-1.

All other call sites (rtl_mission_fast_reverse.cpp:81,
rtl_mission_fast_reverse.cpp:133, mission_base.cpp:1149) pass the
index directly without pre-decrementing.

The bug has been present since commit 007ed11bbe (June 2023).

Closes #26795

Signed-off-by: Pavel Guzenfeld <pavelgu@gmail.com>
2026-04-03 21:10:11 -06:00
PX4BuildBot
b412796fc7 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-04 03:03:41 +00:00
Silvan
6597c4680c feat(battery): enable use of BAT_n_I_OVERWRITE for all battery estimation sources
Signed-off-by: Silvan <silvan@auterion.com>
2026-04-03 20:57:05 -06:00
PX4BuildBot
df8747eb10 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-03 21:15:36 +00:00
Jacob Dahl
04134dccab
fix(uavcan): use node-published timestamps for CAN sensor bridges (#26945)
The FC-side DroneCAN sensor bridges (accel, gyro, rangefinder) used
hrt_absolute_time() in the receive callback as timestamp_sample,
adding ~3-16ms of systematic CAN transport delay.

For messages with a uavcan.Timestamp field, the cannode can publish
the actual sample time via UAVCAN GlobalTimeSync. The RawIMU publisher
already did this for IMU data; apply the same pattern to the range
sensor publisher, and update all three FC bridges to prefer the
message timestamp with a fallback to hrt_absolute_time() for nodes
that don't set it.
2026-04-03 13:08:24 -08:00
PX4BuildBot
4d0efccb55 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-03 18:38:09 +00:00
Baardrw
115f205cbc
docs(gz_bridge): magnetometer device address documentation (#26940)
* fix: added comment explaining why dev id address can only be 3 or 4

* fix: change link to point to main px4 repo

* fix: typo

* formatted

* chore: formatting
2026-04-03 10:31:29 -08:00
Ramon Roche
039ec78d35 fix(ci): copy events metadata to top-level artifact directory
The packaging script only placed all_events.json.xz in an events/
subdirectory, but the firmware advertises the metadata URI at the
board directory top level. New build targets added after the
Jenkins-to-GHA migration had no legacy top-level copy, causing
QGC to get a 404 when fetching component metadata.

Fixes #26963

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 23:04:54 -06:00
PX4BuildBot
9cfd3a4506 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-03 01:03:39 +00:00
Ramon Roche
4281faa98a fix(docs): correct image path case mismatch in cuav_x25-evo pages
The asset file was renamed from X25-EVO.jpg to x25_evo.jpg in git but
all four locale files (en, ko, uk, zh) still referenced the old name.
macOS hid this because its filesystem is case-insensitive, but Linux CI
(case-sensitive) intermittently failed to resolve the reference during
Rollup bundling.

Fixes #26958

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 18:56:52 -06:00
PX4BuildBot
5189d42d68 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-02 23:37:34 +00:00
Jacob Dahl
9b6e7cb800
fix(ekf2): allow optical flow to start when range finder is height reference (#26960)
When EKF2_HGT_REF=2 (range sensor) with no GPS, optical flow could
never start. The starting condition required isTerrainEstimateValid()
or isHorizontalAidingActive(), but terrain is never "estimated" when
range is the height reference (ground is the datum, terrain state is
fixed at 0), and there's no horizontal aiding without GPS.

HAGL is directly known from the range measurement in this case, so
optical flow has everything it needs to fuse. Add the range height
reference check to the optical flow starting conditions.

Fixes: https://github.com/PX4/PX4-Autopilot/issues/25248
2026-04-02 15:30:24 -08:00
PX4BuildBot
ed387555e9 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-02 21:10:45 +00:00
Ramon Roche
dd03e18fee ci(packaging): publish container images with :latest tag
Add :latest tag alongside version tags for per-arch images and
multi-arch manifests on both Docker Hub and GHCR.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 15:03:04 -06:00
Ramon Roche
1079c57fd0 build(packaging): add PX4 SITL .deb packages
Add cmake/cpack infrastructure for building .deb packages from
px4_sitl_sih and px4_sitl_default targets. Includes install rules,
package scripts, Gazebo wrapper, and CI workflow.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 15:03:04 -06:00
Julian Oes
ebe0b727d8
fix(kakuteh7-wing): fix BOARD_FLASH_SECTORS to protect param sectors (#26897)
Set BOARD_FLASH_SECTORS to 13 so the bootloader does not erase the
parameter sectors (14 and 15) during firmware updates. Previously set
to 14 which allowed the bootloader to erase sector 14, potentially
wiping stored parameters.
2026-04-03 09:22:48 +13:00
Anil Kircaliali
ad895f7010
fix(setup): pin setuptools version to resolve pkg_resources ModuleNotFoundError (#26956) 2026-04-02 20:04:40 +02:00
Ramon Roche
685f9248e4 fix(sbom): fix false positives in monthly license audit
Three issues caused the monthly audit to report already-resolved submodules:

1. The audit workflow grepped for "NOASSERTION" anywhere in the output,
   matching the Detected column even when the Final column had a valid
   override (e.g. libtomcrypt detected as NOASSERTION but overridden to
   Unlicense). Changed to grep for "<-- UNRESOLVED" marker instead.

2. Submodules with an explicit NOASSERTION override in license-overrides.yaml
   (like libfc-sensor-api, which is proprietary) were still counted as
   failures. Now treated as "acknowledged" since someone intentionally
   added the override entry.

3. Added missing BSD-3-Clause override for sitl_gazebo-classic (PX4 org
   project with no LICENSE file in repo).

Fixes #26932

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 11:15:30 -06:00
PX4BuildBot
0ffa4e72ac docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-02 14:27:39 +00:00
Marco Hauswirth
c8a1a38147 style(ekf2): minor style fixes 2026-04-02 16:20:19 +02:00
Marco Hauswirth
8624682db1 chore(boards): remove optical flow from holybro-kakutef7 build 2026-04-02 16:20:19 +02:00
Marco Hauswirth
4caee55a76 submodule(mavlink): update to latest mavlink/main to include ESTIMATOR_SENSOR_FUSION_STATUS, MAV_CMD_ESTIMATOR_SENSOR_ENABLE 2026-04-02 16:20:19 +02:00
Marco Hauswirth
fffc1b5d04 test(ekf2): sync EkfWrapper with FusionControl enabled flags
EkfWrapper now holds a FusionControl pointer and enables all sensors
by default. Sensor-specific enable methods also set fc.enabled = true.
2026-04-02 16:20:19 +02:00
Marco Hauswirth
6a7e39aa64 feat(mavlink): ESTIMATOR_SENSOR_FUSION_STATUS stream
Add MAVLink stream that maps EstimatorFusionControl uORB message to
ESTIMATOR_SENSOR_FUSION_STATUS, exposing per-sensor intended/active
bitmasks to the GCS.
2026-04-02 16:20:19 +02:00