28602 Commits

Author SHA1 Message Date
Kimminkyu
517f04259c
Add Gazebo MotorFailure Plugin (#25776)
* Add Gazebo MotorFailure Plugin

* switch from ROS2 to Gazebo Transport

* Clean up old/dead comments, Refactor variable

* gz: submodule update
2025-11-06 01:06:42 -08:00
Marco Hauswirth
84b5ce9010
AirspeedSelector: enable changing ASPD_SCALE manually in-air mid-flight (#25817)
Includes a reset in wind estimator states if changed
2025-11-05 16:25:15 +01:00
Balduin
ab1c880aad
pusher_assist: keep pitch setpoint VT_PITCH_MIN (#25871)
* pusher_assist: keep pitch setpoint VT_PITCH_MIN

resetting the pitch setpoint to zero made little sense, because we lose
the forward thrust component of the hover motors, while the pusher
throttle was calculated to be applied in addition to the hover forward
component

* pusher assist: change default min pitches to 0

To make for a smoother transition for users who don't care much about
pitch when pusher-assisting and were fine with it (mostly) being at zero
2025-11-05 09:55:49 +01:00
Phil-Engljaehringer
fb13b880ce
sensors: add ads7953 adc
* sensors: add ads7953 adc

* Update src/drivers/adc/ads7953/ADS7953.h

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

* Implemented changes suggested by review

* Implemented suggested changes

* removed unused variables and moved scope of ch_id

* Activated distance sensor again

* Update msg/AdcReport.msg

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

* Update ADC report message field comments

* Update ADC msg - fix layout

* update comments

* changed group to Sensors in module.yaml

* created new module subcategory "adc"

* reverted group change in module.yaml

* added module descrption to modules_driver.md

* removed module description in modules_driver.md (autogenerated)

* removed unused variable, changed board_adc publication method to "multi"

* added static assert

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-11-04 17:22:10 +01:00
Matthias Grob
ae03630570 uavcan: more efficient calculation of esc.RawCommand.cmd array size 2025-11-03 08:18:55 -09:00
Matthew Berk
9702a2a899
Navigator: Fix mission RTL for fixed-wing by setting previous waypoint correctly (#25600)
This aligns setActiveMissionItems() in rtl_direct_mission_land.cpp and in rtl_mission_fast.cpp with what was already in mission.cpp. It probably was on oversight when the RTL restructure happened. The FW landing requires the previous waypoint to be correctly set, that's why it was only noticeable there.

* Fix position setpoint update logic in Mission RTL

Currently, when proceeding to the landing point the previous setpoint is not updated, which results in an unexpected and off course landing pattern in fixed wing. (see #25436)

* Change to work more like `mission.cpp`

* Fix rtl_direct_misssion_land formatting for style guide

* rtl_mission_fast: fix FW landing by setting previous wp in landing

Signed-off-by: Silvan <silvan@auterion.com>

---------

Signed-off-by: Silvan <silvan@auterion.com>
Co-authored-by: Silvan <silvan@auterion.com>
2025-11-03 17:52:26 +01:00
Claudio Chies
cfe4cc82ea
UAVCAN: fix message definition issues (#25809) 2025-11-03 09:34:54 +01:00
Jukka Laitinen
d5eea0dd92 sensors/VehicleImu: Don't set _backup_schedule_timeout_us shorter than normal scheduling interval
With IMUs of higher report rate (e.g. ADIS16470), setting backup schedule timeout simply
to half of the ORB queue length may cause the backup firing before required updates are received.

Set backup schedule to queue length - 1 instead. Additionally, double-check that the backup
doesn't get too short after finding the largest integer multiple of gyro_integral_samples.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-10-31 16:21:08 -08:00
alexklimaj
be9fa620fd drivers: rm3100 add i2c/spi ifdefs 2025-10-31 13:16:49 -08:00
Niklas Hauser
6ec106a0ed
INA2xx: Debounce battery connection state (#25786)
To prevent critical low battery messages on a single I2C issue.
2025-10-31 13:19:10 +01:00
Beat Küng
f9595319b8 mavlink: remove ODOMETRY stream from ONBOARD_LOW_BANDWIDTH mode
It's not used in our setups and it reduces the TX rate from 11.8 KB/s to
4.4 KB/s on a bench setup.
2025-10-29 13:53:09 -04:00
Jacob Dahl
05c5293596 gz: init submodule before configuring build 2025-10-29 13:50:50 -04:00
Hamish Willee
7d509d832a
Update to latest mavlink that includes support for WIP warnings (#25804)
* Update to latest mavlink that includes support for WIP warnings

* mavsdk_tests: pass build for now

We need this until the figure eight stuff has moved to common.

---------

Co-authored-by: Julian Oes <julian@oes.ch>
2025-10-29 12:43:10 +11:00
cuav-liu1
37398248aa BMM350: Fix BMM350 temperature calculation 2025-10-28 20:29:16 -04:00
mahima-yoga
73ee098a25 fw_autotune: continue to next axis in case of convergence timeout 2025-10-28 13:16:40 +01:00
mahima-yoga
97c16352a5 fw-autotune: increase abort timeout to 30 seconds
Avoids abort on heavily undertuned systems during amplitude detection state
2025-10-24 17:38:54 +02:00
mahima-yoga
fe35f1a34b fw-autotune: run state machine at 50Hz 2025-10-24 17:38:54 +02:00
mahima-yoga
7323075527 fw-autotune: use 0.75*rate_limit as the target rate. 2025-10-24 17:38:54 +02:00
Silvan Fuhrer
17e96554ec
Navigator: fix RTL_TYP=2 with NAV_CMD_CONDITION_GATE (#25648)
* rtl_mission_fast: make sure to set a position item on activation

* rtl_mission_fast_reverse: make sure to set a position item on activation

---------

Co-authored-by: Konrad Rudin <konrad@auterion.com>
2025-10-24 10:10:33 +02:00
Balduin
1c821cf83d
FlightTaskAuto: disable MPC_LAND_RADIUS by default with value -1 (#25275)
* FlightTaskAuto: disable MPC_LAND_RADIUS by default

* format & comment

* Remove position valididy check again

* clean up according to review
2025-10-23 17:36:46 +02:00
Matthias Grob
540e80eb77 FilaureDetector: publish failure_detector_status in class and call that from commander 2025-10-23 09:23:45 +02:00
Matthias Grob
2adc36b2af FailureDetector: write out status veriable name for clarity 2025-10-23 09:23:45 +02:00
Matthias Grob
70eecf6070 FailureDetector: adhere to the parameter naming convention 2025-10-23 09:23:45 +02:00
dawr68
9276dc5abd
feat: add attitude and odometry pub rates limits (#25792) 2025-10-22 14:55:51 +02:00
Marco Hauswirth
59f6c69067
EKF2: rotate vel on heading reset (#25753)
* correct NED velocity according to yaw reset to keep "body-velocity" consistent
* add unit test velocityRotationOnYawReset
* '[AUTO COMMIT] update change indication'
* dont adjust velocity on yaw-reset when NE aiding active

---------

Co-authored-by: haumarco <haumarco@users.noreply.github.com>
2025-10-21 11:48:03 +02:00
Tobias Fenner
71f56df23b adsb: Fix vertical separation check using wrong parameter
The collision detection incorrectly used crosstrack_separation
(horizontal radius) for both horizontal and vertical checks.
This resulted in the vertical separation threshold being ignored,
creating a spherical detection zone instead of the intended
cylindrical "hockey puck" shape.

Fixed by using vertical_separation parameter for altitude
difference check on line 80.

The bug was likely introduced as a copy-paste error when creating
the vertical check from the horizontal check template. The existing
unit test uses identical values for both parameters (500.0f),
which masked this bug.

Testing: Code review. The existing unit tests pass, but they don't
catch this bug due to using equal values. Future test improvement
would be to use different crosstrack_separation and vertical_separation
values.

Signed-off-by: Tobias Fenner <tobyrfenner@gmail.com>
2025-10-21 11:21:27 +02:00
Jacob Dahl
d30fa62f40 mavlink: take in @dakejahl 's refactoring and extend it 2025-10-21 10:24:30 +02:00
Matthias Grob
65c5bd6906
Fix (dis)arm reason enumeration (#25766) 2025-10-20 09:12:36 -04:00
Jacob Dahl
444b31be21 uavcan: fix logic for static node id 2025-10-17 18:35:20 -08:00
Jacob Dahl
b3acde4899 use uavcan::NodeID::Max 2025-10-17 18:35:20 -08:00
Jacob Dahl
0b63b8317a uavcannode: add CANNODE_NODE_ID to allow setting static node ID 2025-10-17 18:35:20 -08:00
Alexander Sherikov
6e8f61c551
various cmake fixes (#25748)
- enable building in a cmake subdirectory:
    - use consistent path to "etc" in build directory
    - add a quick fix for mavlink inclusion with
      `mavlink/<version>/mavlink.h`, presumably the problem does not
      appear normally since somewhere the build root directory is added
      to include paths.
- install gazebo config and plugins, the goal is to enable packaging of
  PX4 sitl binaries.
- fix dependency on dds_topics.h generation in uxrce_dds_client:
  *** No rule to make target 'PX4-Autopilot/src/modules/uxrce_dds_client/dds_topics.h', needed by 'PX4-Autopilot/events/px4.json'.  Stop.
  https://github.com/PX4/PX4-Autopilot/issues/21788

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2025-10-17 11:11:00 -08:00
Henry Kotzé
7418d84001
ekf2: ev vel, use measurement timestamp to update aid_src timestamp_sample (#25774)
- the estimator_aid_src::sample_timestamp would use its own timestamp to update, this
  would cause the estimator_aid_src for ev velocity not to log, since the
timestamp_sample would always equal to zero and thus never be greater
than the previous published time

Co-authored-by: henrykotze <henry@autonosky.com>
2025-10-17 10:43:34 -08:00
Phil-Engljaehringer
dc0af1ab9d
health: Fix displayed value in power check (#25751)
* Changed the healthFailure call in the PowerChecks to ensure that no value above the low_error_threshold or below the high_error_threshold is reported in AMC

* fix format

* made _latest_low_failure and _latest_low_failure member variables. Only update them when hystersis state changes from false to true.
2025-10-17 14:54:16 +02:00
Hamish Willee
f03131cfd3
MAVLink PARAM_ERROR support (#25699)
Co-authored-by: PX4BuildBot <bot@pixhawk.org>
2025-10-17 13:29:23 +11:00
Peter van der Perk
faee1da630
docs: Zenoh middleware guide (#25737) 2025-10-16 20:48:12 +11:00
Hamish Willee
104759b90c
Update mavlink with more PARAM_ERROR values (#25772) 2025-10-16 14:09:02 +11:00
Jacob Dahl
54866b886e
gz: fix gimbal message type (#25770) 2025-10-15 13:28:14 -08:00
Jacob Dahl
9c1f3306a4
mission: delay until: mark next setpoint invalid (#25728)
Fixes bug with the NAV_CMD_DELAY where the copter would "pace" back and forth while waiting at the delay waypoint
2025-10-15 13:21:28 -08:00
Matthias Grob
3e3bb82331
navigator: increase stack by 30 bytes (#25769) 2025-10-15 11:21:26 -08:00
Erkki Eilonen
f32c3024b8 gazebo: fix unused variables warning ([-Wunused-private-field]) 2025-10-15 11:32:16 -04:00
Erkki Eilonen
2297e66a9d gazebo: fix implicit conversion errors ([-Wdouble-promotion]) 2025-10-15 11:32:16 -04:00
Jacob Dahl
a64536802b
gz: fix gimbal yaw, add dds publisher (#25754)
* gz: correct gimbal yaw

* uxrce_dds: add publisher /fmu/out/gimbal_device_attitude_status

* chore: use explicit ENU_to_NED rotation

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>

* format

---------

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2025-10-14 11:45:43 -08:00
Matthias Grob
babe094d06
FailureDetector: use robust timeout checks for motor failure detection (#25757) 2025-10-14 10:46:29 -08:00
Alexander Lerach
376f52f51d mavlink: add som/fmu config params 2025-10-14 19:14:41 +02:00
Matthias Grob
7706aae67d mavlink_receiver: only switch outgoing MAVLink version to 2 if it was 1 before
to avoid the message that comes with it being spammed.
2025-10-14 18:38:02 +02:00
Matthias Grob
4842c542b8
rc_update: remove 1% deadzone for RC channels 1-8 (#25502)
* rc_update: remove 1% deadzone for all channels

this should be handled higher level.

* Remove all references to the RC{n}_DZ parameters

Regular expression: RC.{0,2}_DZ

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2025-10-13 21:41:11 -08:00
Matthias Grob
12035682d7
Use MAVLink v1 only as opt-in (#25583)
* Remove support for MAVLink 1

* Add back support for MAVLink 1 but don't default to it

* Update src/modules/mavlink/mavlink_params.c

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

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-10-13 20:58:34 -08:00
Marco Hauswirth
2f06f03728
calibration: mag: only allow mag calibration when at least one mag is available and enabled (i.e. not prio=0) (#25714) 2025-10-13 20:51:25 -08:00
Jacob Dahl
2c62caeb7d
flight task auto: fix offtrack mission landing bug (#25725)
During a mission the last waypoint is often a LAND. If the previous waypoint is not directly above the land waypoint the offtrack calculation is incorrect. This regression was introduced when the offtrack calculation switched from 2D to 3D.
2025-10-13 19:56:23 -08:00