29245 Commits

Author SHA1 Message Date
murata,katsutoshi
fc53da51fa
refactor(bmp388): refactor variable declaration and initialization
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-04-09 15:38:17 -08:00
Ramon Roche
3c5574c051
feat(sih): add propeller model with advance ratio (#26720)
---------

Signed-off-by: romain-chiap <romain.chiap@gmail.com>
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: romain-chiap <romain.chiap@gmail.com>
2026-04-08 15:57:17 -07:00
Onur Özkan
aaace556cd
refactor(offboarding-check): report specific failures (#26938)
* offboard: report specific failures

Figuring out offboard failures is quite difficult because the user currently
gets a single, very generic error message that does not identify the actual
missing requirement.

This change aims to improve the user experience by:

- moving offboard failure reporting into OffboardChecks, where the exact cause is known
- reporting specific arming failures for missing local position, local velocity and attitude estimates
- keeping the generic offboard signal error only as a fallback for true signal-loss cases
- removing the duplicate offboard check from ModeChecks (as already invoked by HealthAndArmingChecks)

Signed-off-by: Onur Özkan <work@onurozkan.dev>

* offboard: handle attitude mode in offboard check

Signed-off-by: Onur Özkan <work@onurozkan.dev>

---------

Signed-off-by: Onur Özkan <work@onurozkan.dev>
2026-04-08 08:23:20 -08:00
Claudio Chies
70e31870af
feat(params): update max values for various parameters (#27002) 2026-04-08 08:07:47 -08:00
Eric Katzfey
4917b17116 feat(voxl2): Added i2cdetect system command to voxl2-slpi build. Needed to implement the required i2c API for it.
Also, changed the printf into PX4_INFO so the output can be seen for Qurt platforms.
2026-04-08 08:52:25 -07:00
ttechnick
35cbbc1967 fix(fw_attitude_control): use euler angles to construct stabilized setpoint 2026-04-08 15:05:41 +02: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
Nick
c592af7e8e
fix(parameters): show board_rot in show-for-airframe (#26989) 2026-04-07 11:48:52 -08: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
Niklas Hauser
9e0cd2fcf3 Fix mtd command for very small partition sizes of just 32B 2026-04-07 13:42:12 +02: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
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
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
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
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
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
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
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
Marco Hauswirth
c8a1a38147 style(ekf2): minor style fixes 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
Marco Hauswirth
6306c78f79 feat(ekf2): EKF2_SENS_EN param, SensEnBit enum, MAVLink fusion command
Add EKF2_SENS_EN bitmask parameter (replaces EKF2_EN_BOOT) with
per-sensor enable bits. initFusionControl reads SENS_EN while disarmed.
handleSensorFusionCommand sets FusionSensor.enabled via
VEHICLE_CMD_ESTIMATOR_SENSOR_ENABLE. syncSensEnParam writes back to
param on disarm. Update EstimatorFusionControl.msg to bool
intended/active fields. Update VehicleCommand.msg FUSION_SOURCE enum.
2026-04-02 16:20:19 +02:00
Marco Hauswirth
b9a1c429b3 refactor(ekf2): FusionSensor available/enabled/intended() data model
Split FusionSensor into available (CTRL param != disabled) and enabled
(runtime-toggleable). intended() = enabled && available. EKF core aid
sources now set available themselves and use intended() or _params
directly for CTRL-level checks. Remove drag/imu from FusionControl,
add aspd/rngbcn. Add AGP sourceFusingBitmask() for active-status.
2026-04-02 16:20:19 +02:00
Marco Hauswirth
0dd1640a54 feat(ekf2): enable fusion-ctrl toggle over mavlink cmd, CTRL param act only as reference 2026-04-02 16:20:19 +02:00
Nick
76eca4b7a4
feat(actuators): Control Flaps from AUX channel (#26913)
* feat(rc): flaps via AUX channel

* docs(actuators): add flaps and spoilers from RC

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

* docs(actuators): Update docs/en/payloads/generic_actuator_control.md

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

* docs(actuators): move flaps setup docs

---------

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-04-02 11:48:44 +02:00
alexcekay
56c69f4c07 fix(mavftp): don't use cache for other sys/comp ids 2026-04-02 11:20:23 +02:00
ttechnick
935a21d05c fix(fw_attitude_control): correct turn coordination 2026-04-02 09:28:44 +02:00
ttechnick
d2e3668ad9 fix(fw_attitude_controller): fix typo 2026-04-02 09:28:44 +02:00
Marco Hauswirth
93955bd313 chore(gazebo): update gazebo-classic submodule, remove ranging-beacon from constrained-flash-boards 2026-04-01 15:01:31 +02:00
Marco Hauswirth
65c96fb2bf feat(simulation): add ranging beacon simulation in SIH 2026-04-01 15:01:31 +02:00
Marco Hauswirth
f4c820c7e1 feat(ekf2): add ranging beacon fusion support
- Add Symforce-derivation
- No altitude correction
- EKF2 replay
- New params
2026-04-01 15:01:31 +02:00
Marco Hauswirth
c260794122 feat(mavlink): add ranging beacon parser and uORB message 2026-04-01 15:01:31 +02:00
Onur Özkan
7d392394dd
fix(build): add kconfig support for fortified toolchains 2026-03-31 22:23:50 -08:00
Jacob Dahl
a09c76d30d fix(mpl3115a2): correct timestamp_sample to integration midpoint
The MPL3115A2 ADC conversion at OSR 2 (ratio 4) takes ~18ms. The
driver polls until the conversion completes, so the read time is at
the end of the integration window. Correct timestamp_sample to the
midpoint by subtracting CONVERSION_TIME / 2.
2026-03-31 16:37:12 -08:00
Jacob Dahl
4b6cd37a23 fix(lps25h): correct timestamp_sample to integration midpoint
The LPS25H one-shot measurement is integrated over a ~40ms window
(at 25Hz-equivalent internal averaging). The read time corresponds to
the end of the integration window. Correct timestamp_sample to the
midpoint by subtracting CONVERSION_INTERVAL / 2.
2026-03-31 16:37:12 -08:00
Jacob Dahl
ffa10ab362 fix(lps22hb): correct timestamp_sample to integration midpoint
The LPS22HB one-shot measurement is integrated over a ~40ms window
(at 25Hz-equivalent internal averaging). The read time corresponds to
the end of the integration window. Correct timestamp_sample to the
midpoint by subtracting CONVERSION_INTERVAL / 2.
2026-03-31 16:37:12 -08:00
Jacob Dahl
e253c1e20c fix(ms5837): correct timestamp_sample to integration midpoint
Same fix as MS5611: the MS5837 ADC conversion at OSR 1024 takes
~2.28ms, but the data is read after a 10ms scheduling delay. Correct
timestamp_sample by subtracting (CONVERSION_INTERVAL - CONVERSION_TIME/2)
from the read time.
2026-03-31 16:37:12 -08:00
Jacob Dahl
c149bad4f2 fix(ms5611): correct timestamp_sample to integration midpoint
The MS5611 ADC conversion at OSR 1024 takes ~2.28ms, but the data is
read after a 10ms scheduling delay. The current code timestamps the
read time, which is ~8.9ms after the true integration midpoint.
Correct timestamp_sample by subtracting the full offset
(CONVERSION_INTERVAL - CONVERSION_TIME/2) from the read time.
2026-03-31 16:37:12 -08:00
Jacob Dahl
8170e113fd fix(bmp581): correct timestamp_sample to integration midpoint
The BMP581 pressure measurement is integrated over a configurable
window (~23ms at 32x pressure / 2x temperature oversampling). The
read time corresponds to the end of the integration window, introducing
a systematic timing bias. Correct timestamp_sample to the midpoint by
subtracting measurement_time / 2.
2026-03-31 16:37:12 -08:00
Jacob Dahl
7f59e5dc16 fix(bmp280): correct timestamp_sample to integration midpoint
The BMP280 pressure measurement is integrated over _measure_interval
(~43ms at 16x pressure / 2x temperature oversampling). The read time
corresponds to the end of the integration window, introducing a
systematic timing bias. Correct timestamp_sample to the midpoint by
subtracting measurement_time / 2.
2026-03-31 16:37:12 -08:00
Jacob Dahl
654306e9ed
feat(logger): add high rate sensor topics at 100hz (#26922)
Set all high_rate_sensors_topics to 100hz (10ms interval) and add
vehicle_air_data, vehicle_thrust_setpoint, estimator_aid_src_baro_hgt,
and vehicle_magnetometer.
2026-03-31 16:09:50 -08:00
Jacob Dahl
0deb6b33ee
fix(bmp388): correct timestamp_sample to integration midpoint (#26920)
The BMP388 pressure measurement is integrated over a configurable
window (e.g. 37ms at 16x oversampling). The previous code used the
read time as timestamp_sample, which is the end of the integration
window. Correct to the midpoint by subtracting half the measurement
time, with a guard against unsigned underflow.
2026-03-31 15:35:36 -08:00
Victor Nan Fernandez-Ayala
62b94fa73e
docs(frames_sub): update BlueROV2 docs and align UUV surge/heave stick mapping (#26822)
* Swap joystick surge/heave mapping in manual, stabilized and acro modes to make it similar to position modes

* docs: update UUV/BlueROV2 modes and joystick mapping

* Document basic control axes and joystick mapping

Added basic control axes and stick mapping for BlueROV2.

* Fixed formatting issue

* Enhance clarity of control axes and stick mapping

Clarified descriptions of motion axes and joystick controls for BlueROV2.
2026-03-31 14:42:52 -07:00
Jacob Dahl
d5d2ce26d7
fix(dshot): map MAVLink standard ACTUATOR_OUTPUT_FUNCTION to PX4 OutputFunction (#26909)
The MAVLink standard defines ACTUATOR_OUTPUT_FUNCTION_MOTOR1=1..MOTOR16=16,
but PX4 internally uses OutputFunction::Motor1=101..Motor12=112. The DShot
driver only handled PX4 internal values (101+) and QGC legacy values (1101+),
so any standards-compliant GCS sending the MAVLink enum values would get
VEHICLE_CMD_RESULT_UNSUPPORTED back from MAV_CMD_CONFIGURE_ACTUATOR.

Add a mapping from MAVLink standard values (1-16) to PX4 internal values
(101-116) by adding 100, matching the existing QGC backwards-compat pattern.
2026-03-31 08:52:25 -08:00
Nick
1d81ecb08d
fix(dshot): no warning if dshot unconfigured (#26917) 2026-03-31 08:52:15 -08:00
alexcekay
d24d4a4fc4 uavcan: fix battery sub not working 2026-03-31 13:12:23 +02:00
Anil Kircaliali
d4e60cb1dc
feat(navigator): support MAV_FRAME_GLOBAL_INT and MAV_FRAME_GLOBAL_RELATIVE_ALT_INT for RTL safe points (#26901)
* navigator:  support MAV_FRAME_GLOBAL_INT and MAV_FRAME_GLOBAL_RELATIVE_ALT_INT for RTL safe points

* Fix descriptive comment

* refactor(rtl): consolidate frame cases that are duplicate

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-03-30 19:33:46 +02:00
ttechnick
c2c811072e fix(mavlink): GPS jamming only warning 2026-03-30 14:48:51 +02:00