Commit Graph

49858 Commits

Author SHA1 Message Date
Hamish Willee f1245b9154 docs(docs): Tweak
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-05-20 13:29:45 +10:00
Mahima Yoga 8962087ba4 docs: update
Co-authored-by: Mahima Yoga <mahima@auterion.com>
2026-05-19 13:54:06 +02:00
mahima-yoga 128760a3b5 fix: typo 2026-05-19 13:34:41 +02:00
mahima-yoga ca0ee1707c fix: require local_position_relaxed for guided course
This is consistent with manual position control
2026-05-19 11:49:05 +02:00
mahima-yoga 99a85865d6 feat: use MAV_CMD_GUIDED_CHANGE_HEADING 2026-05-18 17:27:04 +02:00
mahima-yoga bc459a8814 feat(navigator): respect geofence in course mode 2026-05-18 17:27:04 +02:00
Mahima Yoga 54241d9bf6 docs(guided_course): address review commends
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Mahima Yoga <mahima@auterion.com>
2026-05-18 17:27:04 +02:00
mahima-yoga 28aed0b8ce fix(navigator): deny setting course if not a fixed wing 2026-05-18 17:27:04 +02:00
mahima-yoga b38921cb88 chore(guided_course): update comment on lat/lon requirement in position triplet 2026-05-18 17:27:04 +02:00
mahima-yoga ae745189a4 chore(guided_course): align speed handling with other auto modes 2026-05-18 17:27:04 +02:00
mahima-yoga d6baf6fba9 chore: remove publishing useless local position setpoint 2026-05-18 17:27:04 +02:00
mahima-yoga ba89955887 feat(commander): only support VEHICLE_CMD_DO_CHANGE_ALTITUDE in hold & guided course 2026-05-18 17:27:04 +02:00
mahima-yoga 7fcbcb3869 chore(navigator): don't support VEHICLE_CMD_DO_REPOSITION in guided course 2026-05-18 17:27:04 +02:00
mahima-yoga 065f78e87e chore(mode): remove old comment 2026-05-18 17:27:04 +02:00
Hamish Willee 7ceacb283f docs(docs): subedit 2026-05-18 17:27:04 +02:00
mahima-yoga 259c75c358 fix(docs): add guided course mode to summary.md 2026-05-18 17:27:04 +02:00
mahima-yoga 2c00df9a09 chore(navigator): remove unused gps_position_valid() function 2026-05-18 17:27:04 +02:00
mahima-yoga 00c76cc81d docs(flight_modes): add docs on guided course mode 2026-05-18 17:27:03 +02:00
mahima-yoga c7ca6cc2df chore: rename to guided course 2026-05-18 17:27:03 +02:00
mahima-yoga 0e25bb9a6d feat(failsafe): add course mode to isFailsafeIgnored() auto mode list 2026-05-18 17:27:03 +02:00
mahima-yoga cda8d3b8c7 refactor(course): remove heading mode, keep course-only
Heading mode (CONDITION_YAW / airspeed-direction control) is extracted
from the Course flight mode. The mode now exclusively tracks ground
course, with no fallback to heading hold on GPS/velocity loss.

Changes:
- Remove ControlMode enum, _heading member, and set_heading() from
  Course navigator mode
- Remove on_active() fallback that switched to heading on velocity loss
- Simplify update_setpoint_triplet() to always set course (yaw=NAN)
- Remove CONDITION_YAW handler in navigator_main
- Remove VEHICLE_CMD_CONDITION_YAW case from Commander
- Remove Heading Hold branch in FixedWingModeManager::control_auto_position()
- Update early-return guard in control_auto() to check only course

Signed-off-by: mahima-yoga <mahima@auterion.com>
2026-05-18 17:27:03 +02:00
mahima-yoga a765d5ce7f feat(course): use velocity estimate instead of GPS for course/heading mode
This changes the guard to v_xy_valid (horizontal velocity estimate), which also holds
during dead-reckoning.

- Replace gps_position_valid() with v_xy_valid in set_course() and on_activation()
- Initialise course from velocity vector (atan2(vy, vx)) instead of heading
- Guard lat/lon with xy_global in both course and heading branches
- Fall back to heading mode automatically if velocity estimate is lost
- Introduce ControlMode enum replacing the _use_heading bool
- Rename update_course_setpoint() to update_setpoint_triplet()
2026-05-18 17:27:03 +02:00
mahima-yoga b6bd106ec7 fix: allow altitude changes in course mode 2026-05-18 17:27:03 +02:00
ttechnick 5641a34d0a feat(modes): make course and heading one mdoe 2026-05-18 17:27:03 +02:00
ttechnick 97279b3c03 feat: make course change possible 2026-05-18 17:27:03 +02:00
ttechnick 7f88ec1232 fix: rename Course Hold to Course 2026-05-18 17:27:03 +02:00
Silvan 596abdaba6 feat: add Course Hold mode
Signed-off-by: Silvan <silvan@auterion.com>
2026-05-18 17:27:03 +02:00
PX4BuildBot acf3ac6c96 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-05-18 14:28:15 +00:00
Phil-Engljaehringer aa7c66e0a7 feat(uavcan): flash firmware onto CAN nodes from SD card (#27043)
Place firmware .bin files at the SD card root or staging directory
(/fs/microsd/ufw_staging/); on boot the UAVCAN server migrates them
to /fs/microsd/ufw/ and updates FW.db, then flashes any connected
node whose firmware version mismatches.

- Add firmware migration from SD root and staging dir into /fs/microsd/ufw/
- Maintain FW.db flat-file database mapping board IDs to original filenames
- Use cache-aligned DMA-safe read/write buffers (required on STM32H7)
- Add Tools/auterion/remote_update_fmu.sh for SSH-based FMU+canio updates
2026-05-18 16:19:25 +02:00
Balduin 11fa1dae1e chore(mavlink): update submodule to include extended ACTUATOR_TEST_GROUP
Merged in https://github.com/mavlink/mavlink/pull/2476
2026-05-18 16:14:31 +02:00
Balduin 7ad8406b96 feat(commander): add actuator_group_test command to test actuators
- control surfaces default to +1, thrust to +/-0.1 if no argument given
   or parsing fails
2026-05-18 16:14:31 +02:00
Balduin 310da96175 feat(control_alloctor): Add actuator group preflight check
The current preflight check works by sending individual actuator
commands over mavlink. This can only be done sequentially, so the
surfaces do not move in a coordinated way, instilling little confidence.

To alleviate, this adds a control surface preflight check which causes
the allocator to command torque in the given direction, so the control
surfaces move as they would in flight.

Triggered by `{MAV,VEHICLE}_CMD_ACTUATOR_GROUP_TEST`. Only runs when
pre-armed (control surfaces, tilts) or armed (thrust). Test runs for 0.5
seconds -- for longer duration, send repeatedly from the GS.

Check is rejected in flight and cancelled when nav_state changes.
2026-05-18 16:14:31 +02:00
Balduin 84a287cd43 feat(msg): add VEHICLE_CMD_ACTUATOR_GROUP_TEST for actuator group testing
matching
 - https://github.com/mavlink/mavlink/pull/2224
 - https://github.com/mavlink/mavlink/pull/2476
2026-05-18 16:14:31 +02:00
Balduin da2b23e57e feat(control_allocator): allow overriding tiltrotor collective tilt
- Expose overrideCollectiveTilt in ActuatorEffectiveness, empty base, only overridden for Tiltrotor
 - Allow giving collective tilt that is used in updateSetpoint in place
   of command from tiltrotor_extra_controls
 - Needs to be called with do_override = false to clear override
 - add comment explaining technical debt
2026-05-18 16:14:31 +02:00
PX4BuildBot 7261e064c7 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-05-18 07:46:52 +00:00
Matthias Grob fcb627f572 fix(commander): prevent arming if enabled parachute check fails 2026-05-18 09:40:09 +02:00
Hamish Willee 4caac66328 docs(update): Parachute enabled extended addition 2026-05-18 09:40:09 +02:00
Hamish Willee 7f5d7ccb1c docs(update): Subedit 2026-05-18 09:40:09 +02:00
gguidone 66a1ae9704 docs: add parachute health failsafe documentation
Update safety.md, peripherals/parachute.md, and releases/main.md to document the extended COM_PARACHUTE parameter and the new configurable in-flight failsafe behaviour.
2026-05-18 09:40:09 +02:00
gguidone f74c7625b3 feat(commander): add COM_PARA_ACT to configure parachute unhealthy failsafe
Previously the parachute unhealthy failsafe was hardcoded to RTL.
2026-05-18 09:40:09 +02:00
PX4BuildBot 5eecffe60a docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-05-18 03:32:39 +00:00
Julian Oes f81559ec64 fix(Tools and docs): PX4 Pro isn't really a thing (#27366)
These are just leftovers, probably worth cleaning up.
2026-05-17 21:25:37 -06:00
PX4BuildBot daf6732e97 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-05-18 01:37:28 +00:00
NickCurranScout ad899ba2a7 Mavlink Receiver: Don't ack DO_SET_MODE commands (#27343)
01abe35563 introduced a handler for the
`MAV_CMD_DO_SET_MODE` enum, which directly forwards a vehicle command
into uORB. It did not disable immediate acknowledgement of this command directly in `mavlink_receiver`. This means that the command is always ack'd once with ACCEPTED prior to the ack issued from Commander

The fix is to set `send_ack=false` immediately after dispatching the
command message to uORB in mavlink receiver
2026-05-18 13:30:48 +12:00
PX4BuildBot b24f13a62c docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-05-18 00:35:06 +00:00
Jacob Dahl 6ab5e4b235 fix(dshot): 3D mode deadzone disarm + inclusive deadband (#26685)
* fix(dshot): send motor stop for 3D mode deadzone instead of min throttle

In DShot 3D mode, convert_output_to_3d_scaling() returns DSHOT_DISARM_VALUE
(0) for deadzone inputs. But up_dshot_motor_data_set() adds the MIN_throttle
offset (+48), causing motors to spin at minimum throttle instead of stopping.

Check the result of calculate_output_value() for DSHOT_DISARM_VALUE and send
an explicit motor stop command, bypassing the +48 offset.

* fix(dshot): make 3D deadband inclusive on both ends

Change the 3D deadband check from [L, H) to [L, H] so that setting
DSHOT_3D_DEAD_L equal to DSHOT_3D_DEAD_H (both default to 1000) produces
a single-point deadband at that value, matching the natural reading of
"between L and H" in the param description.

Clarify the DSHOT_3D_DEAD_L/H param descriptions to state the range is
inclusive and note the L=H default behavior.
2026-05-17 18:28:00 -06:00
Jacob Dahl a188301a3e fix(make): clean NuttX submodules when board target changes (#27363)
Build all targets / Scan for Board Targets (push) Has been cancelled
Checks / Gate Checks [check_format] (push) Has been cancelled
Checks / Gate Checks [check_newlines] (push) Has been cancelled
Checks / Gate Checks [module_documentation] (push) Has been cancelled
Checks / Gate Checks [shellcheck_all] (push) Has been cancelled
Checks / Gate Checks [validate_module_configs] (push) Has been cancelled
Checks / Unit Tests (push) Has been cancelled
MacOS build / build (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:22.04) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:24.04) (push) Has been cancelled
Container build / Set Tags and Variables (push) Has been cancelled
Docs - Orchestrator / T1: Detect Changes (push) Has been cancelled
Docs - Orchestrator / T2: Metadata Sync (push) Has been cancelled
Docs - Crowdin - Upload Guide sources (en) / upload-to-crowdin (push) Has been cancelled
Failsafe Simulator Build / build (failsafe_web) (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v5x (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v6x (push) Has been cancelled
ITCM check / Checking nxp_mr-tropic (push) Has been cancelled
ITCM check / Checking nxp_tropic-community (push) Has been cancelled
ITCM check / Checking px4_fmu-v5x (push) Has been cancelled
ITCM check / Checking px4_fmu-v6xrt (push) Has been cancelled
Python CI Checks / build (push) Has been cancelled
ROS Integration Tests / build (push) Has been cancelled
ROS Translation Node Tests / Build and test [humble] (push) Has been cancelled
ROS Translation Node Tests / Build and test [jazzy] (push) Has been cancelled
SITL Tests / Testing PX4 iris (push) Has been cancelled
Build all targets / Seed [${{ matrix.chip_family }}] (push) Has been cancelled
Build all targets / Build [${{ matrix.runner }}][${{ matrix.group }}] (push) Has been cancelled
Build all targets / Upload Artifacts (push) Has been cancelled
Container build / Build Container (amd64) (push) Has been cancelled
Container build / Build Container (arm64) (push) Has been cancelled
Container build / Deploy To Registry (push) Has been cancelled
Docs - Orchestrator / T2: PR Metadata (push) Has been cancelled
Docs - Orchestrator / T2: Link Check (push) Has been cancelled
Docs - Orchestrator / T3: Build Site (push) Has been cancelled
Docs - Orchestrator / T4: Deploy (push) Has been cancelled
FLASH usage analysis / Publish Results (push) Has been cancelled
Static Analysis / Clang-Tidy (push) Has been cancelled
NuttX builds into the shared submodule trees at
platforms/nuttx/NuttX/{nuttx,apps}, not into per-board build/<target>/.
Its recursive make does not treat PX4 defconfig changes as a reason to
recompile, so switching board configs links stale objects from the
previous config (e.g. kmm_* and stm32_spi4select from a protected/fmu-v5
build into a later flat/ark_fmu-v6x build), and the kernel ELF fails to
link with hundreds of undefined references.

Tools/ci/build_all_runner.sh already handled this in CI by wiping the
submodules between iterations. Bring the same fix to local builds: stamp
the active target in build/.last_target and run git clean -dXfq on both
NuttX submodules when it changes. Same-target rebuilds, which #27324
made cheap, stay unaffected (no-op rebuild remains ~0.14 s).

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-05-17 18:00:42 -06:00
PX4BuildBot 3f16fca955 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-05-17 22:54:31 +00:00
Jacob Dahl be3f6e2279 fix(drivers/device): make I2C::init() idempotent (#27352)
A successful I2C::init() attaches to the bus (per-platform: NuttX
i2c_master_s* via px4_i2cbus_initialize, POSIX /dev/i2c-N fd via
::open, QuRT bus fd via _config_i2c_bus). Only the destructor releases
it. The init() implementations on all three platforms unconditionally
re-attached on every call, so any driver that called init() more than
once on the same instance leaked:

- NuttX: kmm_malloc() of a fresh i2c_master_s inst, plus an unbalanced
  increment of the per-port refcount in stm32_i2cbus_initialize() (and
  the equivalent across other arch ports). The previous inst pointer
  was overwritten and the matching uninitialize() never ran, so the
  bus refcount could not reach zero on destruct.
- POSIX/QuRT: file descriptor leak (re-open without close).

The pattern that triggers this is "init() retried on failure," used in
keep_running mode and in drivers like INA228 whose RunImpl re-enters
init() whenever a later step (e.g. a register write) failed. Drivers
that init() exactly once from instantiate() were unaffected.

Mirror what SPI::init() (nuttx/SPI.cpp) already does for its bus-bind
step and short-circuit on second-and-later calls. Re-running probe()
and CDev::init() on an already-attached device was also avoided here
because the existing cleanup path on probe failure would tear down the
preserved _dev that earlier callers still depended on.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-05-17 16:46:50 -06:00
Jacob Dahl 7f32786a29 fix(cmake): pin Python to project-local .venv on macOS (#27361)
PR #27324 swapped find_package(PythonInterp) for find_package(Python3),
whose macOS defaults (FRAMEWORK=FIRST, STRATEGY=VERSION) override
Python3_ROOT_DIR and PATH to resolve the highest-versioned framework
Python. CI then matched Homebrew's 3.14 while pip installed kconfiglib
into the actions/setup-python 3.10 venv, breaking `make px4_sitl`
configure with "No module named menuconfig".

Pin Python3_EXECUTABLE to .venv/bin/python when present (macos.sh
creates the venv but neither it nor CI exports VIRTUAL_ENV), and set
FIND_STRATEGY=LOCATION + FIND_FRAMEWORK=LAST so dev machines and Linux
containers without a venv still pick the interpreter that has the
project's pip dependencies.
2026-05-17 16:03:40 -06:00