Coverage overlaps with mavsdk_tests on iris (mission + offboard
posctl); MAVROS plugin behavior belongs to the MAVROS project.
Drops the workflow, .test launchers, rostest_px4_run.sh, and the
integrationtests/ python helpers.
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
* docs(releases): draft v1.17.0 release notes
Drafts the v1.17.0 release notes based on commits in the
release/1.16..release/1.17 diff, with every PR citation verified as an
ancestor of release/1.17 and not shared with release/1.16.
Major Changes leads with the experimental MC Neural Network Control
mode and the on-device TFLM integration, the new Altitude Cruise mode
for multicopters, FW Takeoff improvements, FW and Rover ROS 2 Control
Interface setpoints, and the in-tree Zenoh middleware maturing toward
rmw_zenoh compatibility.
Hardware Support is reorganized into four sub-groups: New Flight
Controllers, New Build Targets for Existing Hardware, New CAN
Peripherals & Vehicle Platforms, and Existing Boards: Improvements.
The Simulation section is split into Gazebo and SIH sub-groups. The
ROS 2 / DDS section is split into uXRCE-DDS and Zenoh.
Posted on main as a draft to give docs maintainers visibility and
collect review feedback. Backport strategy to release/1.17 (alpha/beta
banner variant vs the stable banner variant on main) is a follow-up
discussion.
Also fixes a long-anchor scroll-restoration bug in
px4_ros2_control_interface.md by giving the FwLateralLongitudinal
heading an explicit short anchor (#fw-lateral-longitudinal-setpoint),
and updates the corresponding link in releases/main.md.
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
* docs(releases): address review on v1.17.0 notes
- Cross-link Altitude Cruise in the intro paragraph.
- Reframe MC Neural Network Control as an experimental test path
rather than first-class on-device inference; move it to the bottom
of Major Changes.
- Drop the redundant "opt-in" wording from the Zenoh Major Changes
bullet.
- Rewrite Upgrade Guide as a true upgrade procedure (actionable
numbered steps with what to do and why) following the v1.14 release
notes pattern instead of a flat parameter-delta list.
- Add the missing PR reference for the extended MISSION_CURRENT entry
(#25034, populating the MAVLink mavlink/mavlink#1869 fields).
- Dedupe Safety / Commander against Common: failsafe takeover,
Offboard-to-Position-without-RC, and motor-failure timeout checks
are now listed only once in Common.
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
---------
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Restart the Micro-XRCE-DDS Agent before each integration test so DDS
graph state from a previous PX4 instance does not leak into the next
test.
The MicroXRCEAgent is started once per session, but PX4 reboots between
tests. The Agent retains writer entries from the previous PX4, so when
the new PX4 reconnects, count_publishers() in px4-ros2-interface-lib's
waitForFMU returns >0 immediately against a stale entry. Phase 1
(discovery) returns instantly, then Phase 2 (heartbeat) times out
waiting for a message on a subscription matched to a dead writer.
This is why ModesTest.denyArming (first test) passes while every later
ModesTest fails with "timeout while waiting for FMU heartbeat".
Adds an optional pre_test_hook on test_runner.Tester so ROS-specific
lifecycle stays out of the shared test_runner. The workflow stops
starting the Agent externally; ros_test_runner.py owns the lifecycle.
Refs #27328
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
* feat(gpsRedundancyCheck): add GPS redundancy failsafe with divergence check
- Monitors GPS count and triggers configurable failsafe (COM_GPS_LOSS_ACT) when count drops below SYS_HAS_NUM_GPS
- Tracks online (present+fresh) and fixed (3D fix) receivers separately; emits "receiver offline" vs "receiver lost fix"
- Detects position divergence between two receivers against combined RMS eph uncertainty plus lever-arm separation
- Pre-arm warns immediately; in-flight requires 2s sustained divergence to suppress multipath false alarms
- Adds GpsRedundancyCheckTest functional test suite
New parameters: SYS_HAS_NUM_GPS, COM_GPS_LOSS_ACT
* feat(sensor_gps_sim): publish second GPS instance using SENS_GPS1 lever arm params
When SENS_GPS1_OFFX or SENS_GPS1_OFFY is non-zero, publish a second sensor_gps instance offset by those values from the vehicle position.
fix(sensor_gps_sim): give second instance distinct device_id
Both simulated GPS instances previously shared the same device_id (address 0x00). This prevented testing the device-ID matching path in SITL since both slots would match the same receiver.
* refactor(gpsRedundancyCheck): address code review feedback
* refactor(gpsRedundancyCheck): address code review feedback
* docs: add GNSS check failsafe documentation
Update safety.md and releases/main.md to document the new GNSS check
failsafe (SYS_HAS_NUM_GNSS, COM_GPS_LOSS_ACT) introduced in PX4.
* docs(update): Subedit to taste
* refactor(gps): move GNSS redundancy detection into sensors module
Add GnssRedundancyStatus topic and GnssRedundancyMonitor in
vehicle_gps_position. Commander's gpsRedundancyCheck becomes a thin
consumer of the new topic. Detection lives with blending/fallback in
one module.
Also rename COM_GPS_LOSS_ACT -> COM_GNSS_LSS_ACT.
* docs(safety): clarify GNSS failsafe wording and rename COM_GNSS_LSS_ACT
* refactor(failsafe): consistent default case as fallback for existing option
* Rename COM_GNSS_LSS_ACT -> COM_GNSSLOSS_ACT
for readability
* fix(gnssRedundancyCheck): move logic back into the commander checks and various improvement suggestions
- Rename to GNSS instead of gps
- Use hysteresis
- Small logic refactorings
- Adapt unit tests to different interface
- User reporting on which GPS is offline or doesn't have a fix
* docs(gnssRedundancyCheck): simplify explanations
* refactor(gnssRedundancyCheck): update year numbers in copyright
---------
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
* fix(navigator): guard terrain altitude check for position mission items
updateAltToAvoidTerrainCollisionAndRepublishTriplet() calls
get_absolute_altitude_for_item() on the current mission item without first
checking whether the item contains a position.
For non-position mission items, the altitude field has no setpoint meaning.
Using it in the terrain descent condition can make the check operate on an
invalid mission-item altitude.
Add the same item_contains_position() guard used by other mission altitude
handling paths before reading the mission item altitude.
* navigator: remove redundant mission item checks
Remove checks already covered by item_contains_position() and update the
terrain avoidance comment to match the current condition.
* SITL: mavlink bind to a specific interface using an environment variable PX4_NET_INTERFACE
Fixes issue #26384
* document the usage of PX4_NET_INTERFACE
* Improved Docs:
- Added new Environment Configuration subsection at the end of SITL Simulation
- Removed the old Bind MAVLink to Specific Network Interface subsection (content consolidated into the new section)
---------
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
* EKF2: guard EV position bias updates on active fusion
Horizontal position resets were updating the external vision position bias
estimator even when EV position fusion was not active.
This is the same bug pattern as #27094. In resetAltitudeTo(), the height bias
estimators are only shifted when the corresponding height source is currently
being fused, for example _ev_hgt_b_est is updated only when
_control_status.flags.ev_hgt is true. That guard prevents an inactive EV height
bias estimator from being modified by an EKF state reset.
The horizontal reset paths did not have the equivalent guard. Both
resetHorizontalPositionTo() and resetLatLonTo() unconditionally applied
delta_horz_pos to _ev_pos_b_est. However, controlEvPosFusion() treats
_control_status.flags.ev_pos as the active EV position fusion state, and the
position observation is later computed as:
measurement - _ev_pos_b_est.getBias()
This means a horizontal position reset from another source could shift the EV
position bias estimator while EV position fusion was inactive. When EV position
fusion later resumed, the stale shifted bias could be used in the EV observation
path and produce incorrect innovations.
Only update _ev_pos_b_est during horizontal resets when EV position fusion is
currently active, matching the guarded resetAltitudeTo() behavior fixed by
* Update src/modules/ekf2/EKF/position_fusion.cpp
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
---------
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
AirspeedSource::SYNTHETIC is declared after SENSOR_3, so its integer value is
4 while _airspeed_validator only has MAX_NUM_AIRSPEED_SENSORS entries, with
valid indices 0..2.
select_airspeed_and_publish() only checked whether _prev_airspeed_src was less
than SENSOR_1 before indexing:
_airspeed_validator[prev_airspeed_index - 1]
When _prev_airspeed_src is SYNTHETIC, prev_airspeed_index is 4 and this becomes
_airspeed_validator[3], which is out of bounds. Treat sources above SENSOR_3 as
non-sensor sources so only SENSOR_1..SENSOR_3 can index the validator array.
This fixes the same class of bug as #27232. The external position
reset-by-fusion path explicitly intends to strongly correct correlated
states, including heading, as documented by the existing comment next to
the artificial Kalman gain increase.
However, when VEHICLE_CMD_EXTERNAL_POSITION_ESTIMATE is handled in
EKF2::Run(), it runs before _ekf.update(), so heading_observable can
still reflect the previous controlFusionModes() result. If it is false,
clearInhibitedStateKalmanGains() inhibits the intended heading
correction.
Set heading_observable before the external position fusion so the reset
can preserve the documented correction of correlated states. The normal
EKF update path recomputes the flag afterwards.
* fix(ekf2,commander): split "no heading source" from heading-innovation-failure
The pre_flt_fail_innov_heading flag conflated two distinct conditions: bad
heading innovations and the absence of any heading source. Optical-flow-only
quad setups (no magnetometer, no GNSS yaw, no external-vision yaw) never set
yaw_align, so the flag latched true and produced a misleading
"Preflight Fail: heading estimate invalid" message in modes that don't
actually depend on heading.
EKF2: pre_flt_fail_innov_heading now reports innovation failures only.
Commander: a new branch consumes estimator_status_flags.cs_yaw_align (when
fresh) to block heading-required modes (POSCTL, AUTO_*, ORBIT, AUTO_LAND,
FW AUTO_TAKEOFF) when no source is present, with a new "no heading
reference" message. The branch only fires for fresh estimator_status_flags
data so external-INS drivers (MicroStrain, VectorNav, ILabs, sbgecom) that
don't publish the flags topic retain prior behaviour. PR #26778's
mode-scoping and PR #26596's silent-pass protection are both preserved.
Resolves#27107.
* style: trim source comments per review
* Apply suggestions from code review
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
* refactor(commander): move no-heading-source check into checkEstimatorStatusFlags
* Update src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
---------
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>