18097 Commits

Author SHA1 Message Date
PX4 BuildBot
81ff0925f8 boards: update all NuttX defconfigs 2025-08-07 20:35:04 -04:00
mahima-yoga
ecceb403a0 docs: Clarify bit 0 handling in ASPD_DO_CHECKS 2025-08-06 11:34:29 +02:00
Hamish Willee
c737df3e82 mavlink_main.cpp - PROTOCOL_VERSION 2025-08-06 16:30:06 +10:00
bresch
77e8ccaf6a fw-atune: fix immediate failure on first try
The flight mode needs to be updated before starting the autotune,
otherwise it appears as a mode change and aborts the autotune
2025-08-04 16:42:54 +02:00
Matthias Grob
887ca6d497 ManualControlSelector: address invalid prioritized input and don't check if sample is from the future 2025-07-31 11:34:53 +02:00
Matthias Grob
461433d7f6 ManualControlSelector: is InputValid refactor with switch case for code readability 2025-07-31 11:34:53 +02:00
Matthias Grob
a09352c079 ManualControl: add option to prioritize RC or MAVLink but with fallback 2025-07-31 11:34:53 +02:00
Matthias Grob
b876aa5b45 ManualControlSelector: robust timeout check 2025-07-31 11:34:53 +02:00
Mahima Yoga
a7e01b18d8
MC PositionControl: Add timeout for invalid TrajectorySetpoint (#25283)
* MulticopterPositionControl: Add timeout before triggering emergency setpoint on invalid TrajectorySetpoint

* Apply suggestions from code review

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>

* Cleanup & address review comments

* Safegaurd against using old setpoint if states aren't valid anymore

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2025-07-30 17:18:34 +02:00
Ian Scholl
5736b948ac increase battery max logging instances to 3 2025-07-30 16:43:21 +02:00
Marco Hauswirth
c9206d6bd1
EKF2: gnss reset improvements (#25297)
* ekf2: allow manual position reset when horizontal aiding is active

This allows the pilot to override position esitmates manually

* mavlink sim: add support of failure gps struck

* mavlink sim: add GNSS failure "wrong" type

* ekf2-gnss: add reset mode

This allows the user to choose whether the position should immediately
be reset to GNSS on fusion timeout or if the EKF can continue with
velocity dead-reckoning.

* ekf2: fix unit test changes due to GNSS start logic

Especially because the EKF doesn't need to reset the states if the test
ratio is already passing

* rename mode enum

* reset to gps lat lon on init

* remove obsolete reset-condition (handled in #25223)

* WIP try to upgrade compiler externally

---------

Co-authored-by: bresch <brescianimathieu@gmail.com>
Co-authored-by: Niklas Hauser <niklas@auterion.com>
2025-07-30 11:39:56 +02:00
bresch
61e741e7d0 FlightTask manual acc: handle ekf position reset properly 2025-07-29 14:29:19 +02:00
bresch
b740a43b3d ekf2: reset manual position update through fusion
This provides a position reset-like behavior while still updating the
correlated states through fusion of position information.
2025-07-29 14:29:19 +02:00
bresch
582b8f0a2b ekf2: allow manual position reset when horizontal aiding is active
This allows the pilot to override position esitmates manually
2025-07-29 14:29:19 +02:00
bresch
646133a4bf AGP: format enum names 2025-07-29 14:29:19 +02:00
bresch
0b2e4f1ab6 ekf-agp: add reset mode behavior 2025-07-29 14:29:19 +02:00
Jacob Dahl
463ddcab86 payload deliverer: remove PD_GRIPPER_EN as unnecessary, reduce gripper timeout to 1s 2025-07-28 11:25:17 -08:00
Matthias Grob
79b46e08a8 Rename manual_lockdown to kill for clarity 2025-07-28 17:07:08 +02:00
Matthias Grob
53efcbd2c2 control_allocation: Consistently replace with ActuatorVector alias for readability 2025-07-28 14:10:50 +02:00
Matthias Grob
37899269a8 control_allocator: fix PID dependency definition 2025-07-28 14:10:50 +02:00
Matthias Grob
930c0451b5 ActuatorEffectivenessRotorsTest: add Hexarotor X 2025-07-28 14:10:50 +02:00
Matthias Grob
b9f7b8f705 commander failsafe: never override user intended termination + unit test 2025-07-28 11:36:21 +02:00
Silvan
e0a35b21a8 Navigator: fix param description of NAV_LOITER_RAD
Account for negative=CCW.

Signed-off-by: Silvan <silvan@auterion.com>
2025-07-28 10:57:56 +02:00
Silvan
63f9acfa84 Navigator: loiter direction check: use -FLT_EPS instad of <0
Signed-off-by: Silvan <silvan@auterion.com>
2025-07-28 10:57:56 +02:00
Silvan
85ccc064bd FW Mode Manager: handle loiter radius and direction correctly if not from position_sp
In that case we take radius and direction from the param NAV_LOITER_RAD,
CCw if negative.

Signed-off-by: Silvan <silvan@auterion.com>
2025-07-28 10:57:56 +02:00
Silvan
44be2a3f91 Navigator: add get_default_loiter_CCW() to get loiter direction
Signed-off-by: Silvan <silvan@auterion.com>
2025-07-28 10:57:56 +02:00
Silvan
9f83ccfca7 Navigator: in get_default_loiter_rad return absolute of NAV_LOITER_RAD
Signed-off-by: Silvan <silvan@auterion.com>
2025-07-28 10:57:56 +02:00
Silvan
431f507d29 Navigator: rename get_loiter_radius to get_default_loiter_rad
Signed-off-by: Silvan <silvan@auterion.com>
2025-07-28 10:57:56 +02:00
Matthias Grob
972acf0203 commander params: disable remaining flight time failsafe by default
Currently if you configure a battery capacity the battery library calculates a remaining flight time and you by default get an RTL when the flight time - return time is running out.

Since the state of charge threshold based battery failsafes `COM_LOW_BAT_ACT` are disabled by default I was asked to also disable the flight time based failsafe to be consistent.
2025-07-28 10:37:43 +02:00
mahima-yoga
f66192326c commander: only clear hold delay when failsafes are being deferred 2025-07-28 09:48:34 +02:00
Hamish Willee
bae1b25b0c Run make format 2025-07-28 12:50:08 +12:00
Hamish Willee
01abe35563 MAV_CMD_DO_SET_MODE - add support 2025-07-28 12:50:08 +12:00
E-Krantz
600c717eb9
Add namespace support for uxrce-dds client during firmware upload (#25291) 2025-07-25 11:43:30 -08:00
Matthias Grob
200be07021 action_request: rename ACTION_TERMINATE to ACTION_TERMINATION for clarity 2025-07-25 13:01:25 -06:00
Matthias Grob
9d75bdbe62 IO: rename FORCE_FAILSAFE to TERMINATION for clarity 2025-07-25 13:01:25 -06:00
Matthias Grob
7fe78e184e Rename force_failsafe to termination for clarity 2025-07-25 13:01:25 -06:00
Matthias Grob
34dacffc4a Commander: shell command commander termination instead of lockdown on for clarity 2025-07-25 13:01:25 -06:00
Sindre Meyer Hegre
3be0cb077c
Neural Control Mode (#24366)
* Add tflm to px4 with module

 - Add TensorFlow Lite Micro(TFLM) as a library in px4
 - Make a module that uses neural network inference for control, which uses TFLM for inference
 - Make board config files for PX4 with neural module

* Added neural flight mode

* Add posibility to read of inference times

* Fix comments from review:

- Switch ssh link to https link in submodule
- Remove mc_nn_control from startup

* Add tflm to px4 with module

 - Add TensorFlow Lite Micro(TFLM) as a library in px4
 - Make a module that uses neural network inference for control, which uses TFLM for inference
 - Make board config files for PX4 with neural module

* Added neural flight mode

* Add posibility to read of inference times

* Remove auto start

* Add logging from neural control module

* Fix automatic startup to only be when module is included

* Switch to flight mode registration

* Add docs

* Change min/max/coeff to actual parameters

* add figures to neural network docs

* Switch to e2e network

* Remove toolchain changes and replace with instructions in docs

* Get ready for merge after toolchain upgrade

* switch back to submodule

* Try to figure out cmake

* Get CI working with new toolchain

* Remove fork dependency

* Finalize PR

* fix toolchain inclusion

* Fix ctype_base.h include

* Cleanup includes for TFLM

* Remove redundant std

* Update FW module names in board files

* Fix docs

* Remove cstdlib copy

* Copy header from nuttx

* Prettier, markup, layout

* NeuralControl.msg - update uorb comments to current standard

* Add description to neural topic

* Fix typo

* Typo

* TFLM and Module utitlities

* Neural networks top level

* Update docs

* Add manual control

* Update docs

* Revert the manual control attempt

* Update docs/en/advanced/nn_module_utilities.md

* Add posibility to set trajectory setpoint with manual control

---------

Co-authored-by: Pedro Roque <padr@kth.se>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
2025-07-25 09:42:12 -08:00
Matthias Grob
539ef8b0d1
PositionControlTest: Additional test case velocity setpoint with invalid states (#25286) 2025-07-25 09:04:56 +02:00
Pedro Roque
be2e0b8990
feat: airframe config for spacecraft (#25287) 2025-07-24 12:07:56 -08:00
Pedro Roque
5f797fa210
fix: removes buoyancy from all default worlds from server config (#25285) 2025-07-24 09:36:49 -08:00
Pedro Roque
e14eea5615
feat: BlueROV2 Heavy updated control (attitude and position) and model (#25052)
* rft: clean merge to PX4

* fix: formatting

* fix: extra line

* fix: moved submarine out of "is_ground_vehicle", added proper check for center-throttle

* feat: updated gazebo models to include bluerov update

* fix: use 'is_uuv_vehicle', remove FW_MM/LLC from uuv build

* fix: added saturation to thrust and torque messages via param

* doc: updated parameters documentation for uuv

* fix: formatting

* feat: matching hardware reference

* fix: thrusters kg

* rft: removed commented lines

* fix: update gz reference given hw setup

* fix: hardware references

* fix: recommendations

* fix: updated settings to match hardware

* rft: check only for fixed and rotary wing for high throttle

Co-authored-by: Daniel Agar <daniel@agar.ca>

* fix: commit oupsie

* fix: format

* rft: remove is_uuv

* fix: hw parameters, uuv build target for v6x

* feat: added support for D-pad attitude changes in stabilized position control

* fix: position setpoint update and parametrized trajectory age and att change

* fix: format

* fix: removed duplicated call to check_validity_setpoint

* fix: setpoint update on arming logic

* fix: setpoint initialization for stabilized mode

---------

Co-authored-by: Daniel Agar <daniel@agar.ca>
2025-07-23 10:29:22 -07:00
Pedro Roque
2f55dff8b9
feat: spacecraft support (#24734)
* rft: initial merging of controllers for spacecraft vehicles

* feat: rate controller nominal

* feat: spacecraft tooling for commander and VehicleStatus

* feat: spacecraft tooling for commander and VehicleStatus

* fix: format

* fix: format

* fix: remove iostream

* fix: remove iostream

* feat: spacecraft attitude control and minor refactoring of params

* feat: add position controller

* fix: format

* fix: moved trajectories to new message, removed derivative filters

* fix: format

* fix: removed extra newline

* fix: spacecraft allocation builds

* feat: add thrusters to effectivenes, add spacecraft build to cmake, clean comments

* feat: required changes for allocation

* feat: thruster simulation interface

* fix: update maximum and minimums

* fix: format

* fix: added newline at the end of spacecraft actuator effectiveness

* feat: configurable board pwm freq from Kconfig

* feat: mavlink compliant spacecraft definition

* feat: add orbiter to define

* boards: Increase TELEM2 rx buffer size for DDS over serial use-case (ARK Jetson)

feat: spacecraft tooling for commander and VehicleStatus

fix: format

fix: remove iostream

feat: mavlink compliant spacecraft definition

* feat: add orbiter to define

* feat: add orbiter to define

* fix: change mav_type to new spacecraft orbiter enum value

* fix: build issue

* feat: update mavlink

* feat: update mavlink to latest master with spacecraft

* feat: update mavlink

* feat: update mavlink to latest

* feat: cleanup and synchronization with new mavlink vehicle definition

* fix: get away without specifying spacecraft vehicle

* fix: removed unnecessary definition

* fix: format

* feat: cmake variant for spacecraft

* feat: proper mav_type and rc init

* fix: removed dart from build system

* add: thrusters to actuator type

* rft: reordering actuator type

* rft: initial merging of controllers for spacecraft vehicles

* feat: rate controller nominal

* fix: format

* feat: spacecraft attitude control and minor refactoring of params

* feat: add position controller

* fix: format

* fix: moved trajectories to new message, removed derivative filters

* fix: format

* fix: removed extra newline

* fix: spacecraft allocation builds

* feat: add thrusters to effectivenes, add spacecraft build to cmake, clean comments

* feat: required changes for allocation

* feat: thruster simulation interface

* fix: update maximum and minimums

* fix: format

* fix: added newline at the end of spacecraft actuator effectiveness

* feat: configurable board pwm freq from Kconfig

* feat: add orbiter to define

* feat: cleanup and synchronization with new mavlink vehicle definition

* fix: get away without specifying spacecraft vehicle

* fix: conflicts

* fix: format

* fix: remove duplicate entry

* rft: remove Kconfig changes

* rft: revert main Kconfig

* rft: revert main kcoonfig on platforms

* rft: remove changes to board PWm (go on another PR)

* rft: revert changes to commander (main is correct)

* fix: extra char on commander_helper

* rft: removed extra spaces

* rft: moved effectiveness to spacecraft

* fix: spacecraft effectiveness

* fix: extra space

* feat: preliminary version, still using thrusters

* rft: initial pipeline on PX4 side with rotors instead of thrusters

* feat: add atmos model

* feat: spacecraft with rotor pipeline tested, working

* feat: update gz

* rft: removed thruster interfaces

* fix: format

* fix: remove control allocation

* fix: thruster normalization

* fix: format

* fix: nuttx version

* fix: clang tidy error

* feat: updated gz to add atmos model

* fix: update gz

* fix: update mavlink

* fix: remove friend class from allocation lib

* fix: remove actuator_outputs/motors

---------

Co-authored-by: Alexander Lerach <alexander@auterion.com>
2025-07-23 08:26:27 -07:00
Matthias Grob
dbc36c9e3d commander params: Further clarify termination vs kill 2025-07-23 11:13:11 +02:00
mahima-yoga
a5f92a4615 docs: clarify RC termination switch behavior 2025-07-23 11:13:11 +02:00
Matthias Grob
6c5c88f72e Commander: only trigger MAVLink parachute on termination
This can now be tested using the new termination RC switch.
2025-07-23 11:13:11 +02:00
Matthias Grob
52e8a0a0db Add RC termination switch 2025-07-23 11:13:11 +02:00
Nicolas MARTIN
f0dcd06f5e
HITL/SIH: Battery status depend on battery configuration from parameters (#24103)
* HITL/SIH: Battery status depend on battery configuration from parameters

* fix format
2025-07-23 00:25:37 -08:00
Jacob Dahl
9cd6840695
fix formatting (#25270) 2025-07-23 19:52:16 +12:00
Jacob Dahl
af878cee7b
uavcan: add node status logging to uORB (#23890)
Co-authored-by: Jordan Leiber <jordan.leiber@vertiq.co>
2025-07-22 23:17:58 -08:00