17819 Commits

Author SHA1 Message Date
bresch
2aaa54037c ekf2: split gnss pos/vel flags
They can be selected independently in the control parameter, so there is
no reason why they should share the same flag.
2025-03-11 14:14:40 +01:00
bresch
da3a0656d4 ekf replay: set timestamps in us 2025-03-11 14:14:00 +01:00
bresch
cae4f94476 ekf2-replay: best effort replay when no ekf2_timestamps
Run at sensor_combined speed and publish all other sensors occuring
between 2 sonsor_combined samples.
This allows a crude replay in case ekf2 replay was not enabled during
the flight.
2025-03-11 14:14:00 +01:00
Eric Katzfey
5a05444bad
QuRT logging improvements (#24462)
- Made general improvements to the QURT platform message logging so that module name is printed both in mini-dm and on apps side terminal
2025-03-10 18:59:52 -04:00
bresch
7e0d04e446 ekf2: fix flow derivation for negative hagl
The partial derivative of the flow observation with respect
to the terrain and height states involve calculating the derivative
of 1/x, which is -1/x^2. This function is even, making the estimate
diverge in case x (the height above ground) is negative.
The solution is to take the derivative of 1/|x|,
which is -x/|x|^3 and is an odd function; preserving the sign of x.
Note that for positive values of x, the expression reduces to -1/x^2
2025-03-10 17:11:53 -04:00
chfriedrich98
d1b0be18b2 pure_pursuit: update library 2025-03-10 11:14:00 +01:00
Jacob Dahl
7c2aa72690
gz: add gstreamer plugin (#24475) 2025-03-09 10:11:52 +01:00
Konrad
c83fd11924 RTL: Always publish available approaches from home and rally points irrespective of rtly type 2025-03-07 09:01:19 +01:00
Jacob Dahl
ea8bcd9cef
gz: use server config file for loading world plugins (#24441)
* gz: use server config file for loading world plugins

* submodule

* use server.config in tree

* newlines

* format

* gzbridge: rename function

* format

* gzbridge: add magnetometer callback

* change gz_find_package to find_package

* fix up directory structure and cmake to allow multiple plugins

* newlines

* add comment block explaining gz_env.sh

* remove dupe readme

* remove SENS_EN_MAGSIM from all gz airframe files except spacecraft

* update gz submodule
2025-03-05 17:37:16 -07:00
Mathieu Bresciani
0ab3e45c13
MC auto: improve behavior of RC help during landing
Letting the autopilot set the heading during landing while the pilot is
nudging the vehile leads to a weird UX as the vehicle would make a turn
instead of translating.
With this modification, the initial land heading is immediately overridden when the pilot
begins to adjust the drone's position, providing the sensation of full control.
2025-03-05 16:37:26 +01:00
jmackay2
0ee592f67c
cleanup gz_msgs CMakeLists (#24450)
* cleanup gz_sim CMakeLists

* Check if protobuf is found

* ignore old protobuf float warning

---------

Co-authored-by: jmackay2 <jmackay2@gmail.com>
2025-03-04 18:58:33 -09:00
chfriedrich98
d1e4198864
rover_control: migrate params from .yaml to .c file (#24445)
* rover_control: migrate params from .yaml to .c file

* Update src/lib/rover_control/rovercontrol_params.c

---------

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2025-03-04 17:28:09 +01:00
Silvan Fuhrer
d857a278ff Commander: use is_ground_vehicle() consistently instead of checking vehicle_type
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2025-03-04 12:15:01 +00:00
Silvan Fuhrer
7cb6464cfb VehicleStatus.msg: remove VEHICLE_TYPE_UNKNOWN
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2025-03-04 12:15:01 +00:00
bresch
71d514d359 replay: avoid recursion when adding subscriptions
readAndAddSubscription uses nextDataMessage to find the first
corresponding data and nextDataMessage calls readAndAddSubscription
when it finds a new message definition.
2025-03-03 22:32:55 -05:00
Beniamino Pozzan
9198125ec5
Remove reboot_required from IMU_GYRO_* parameters (#24435)
* fix: IMU_GYRO_* parameters do not requires reboot

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

* restore IMU_GYRO_RATEMAX reboot_required to true

---------

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2025-03-03 12:33:02 -09:00
Jacob Dahl
6dc39d9deb
[wip] gz plugins (#24153)
* added optical flow to gz bridge

* log high rate sensor data

* it builds

* it builds and publishes, need to figure out build system now

* single library

* rename files

* add gz_msg for proto, fix build, test basic flow impl

* update rate, no blur

* PX4-OpticalFlow impl

* rename OpticalFlowSensor

* rename plugins

* disable gps, add plugin path

* cleanup

* fix plugin path export

* properly add OpticalFlowSystem dependency to gz

* move everything under gz_bridge

* cleanup

* add GZ_VEBOSE

* cleanup model/world build target cmake

* added GZ_DISTRO env, harmonic or ionic

* fix gz transport, unstage ark fpv bootloader

* unstage logged_topics.cpp

* cleanup

* make format

* ci fixes

* fix cmake

* remove required for gz-transport

* use model/world namespace for multi vehicle sim. Make format

* make format

* license

* remove needless member var

* made separate Kconfig for gz_msgs, gz_plugins, and gz_bridge

* move OpticalFlow build to it's own cmake

* fix clang

* cleanup comments

* fix rebase
2025-03-03 12:21:28 -09:00
Jacob Dahl
3b2d74b017
gz: Refactor GZBridge and px4-rc.simulator (#24421)
* disable SENS_EN_GPSSIM for all gz airframes

* add GPS + noise to GZBridge

* remove mutex from gz callbacks. Callbacks run synchronously after sim update step and run() loop does not share resources.

* remove hrt check in callbacks

* format

* remove param set-default for already default params

* update submodule

* remove unnecessary comments

* overhaul of the GZBridge and px4-rc.simulator script

* remove arg

* shellcheck disable

* add bus/address

* start gz_bridge before adjusting sim speed or camera follow
2025-03-03 11:29:21 -09:00
bresch
2d1652f499 Commander: fix parachute trigger
Setting "lockdown" disables the actuators. In this mode,
"force_failsafe" has no effect as the actuators are disabled, so the
parachute is not getting released as it requires the output to change to
its failsafe value.
2025-03-03 15:41:39 +01:00
Sebastian Domoszlai
b5f37c9fa6
Simplify Battery-related Enum Naming (#24265)
* Simplify battery-related enum naming

* Fix mistakenly removed string in enum names

* Fix missing renamings

* Update outdated file

* msg: Increase battery_status version since the enum naming was changed

* Revert message version increase

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2025-02-28 11:42:40 -09:00
Marco Hauswirth
1f5a9e526c dont change mode_change-flag if mode was not allowed to change 2025-02-28 14:23:58 +01:00
Silvan
14941bc270 Commander: handle mode change rejection the same for RC and MAVLink
Previously, when requesting a mode switch to Position without a valid
position estimate through an RC button, the mode change to Position mode
was not rejected if COM_POSCTL_NAVL was set to 1 and instead the system
switched to Altitude mode.
If the mode request instead came in through MAVLink it was rejected.
This commit aligns the two ways of changing a flight mode.

Signed-off-by: Silvan <silvan@auterion.com>
2025-02-28 14:22:36 +01:00
Beat Küng
93b8bc1515 commander: add hysteresis for avionics power low/high check
We had a setup where the voltage was right at the threshold and the check
toggled continuously.

It still triggers immediately, and then keeps for 15 seconds
2025-02-27 22:24:28 -05:00
Eric Katzfey
5fb810a5ea voxl_esc: Added Mavlink tunnel UART pass-through mechanism 2025-02-26 18:04:34 -05:00
Eric Katzfey
d4918ea118 mavlink: updated to latest 2025-02-26 18:04:34 -05:00
Jacob Dahl
1ba9eeafd9
ekf2: silence output from symforce module check (#24384)
Co-authored-by: Alex Klimaj <alex@arkelectron.com>
2025-02-26 11:23:13 -07:00
Andrew Brahim
75c0089c26
Faster than Real -Time support in GZ (#23783)
* add rtf service to gzbridge

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* physics before model spawn

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

---------

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
2025-02-26 18:52:07 +01:00
Marco Hauswirth
84134e5123 clean up variable declaration 2025-02-26 13:48:59 +01:00
Matthias Grob
f69361f742
vtol_type: remove unused variable and function for deceleration pitch integral (#24419)
This functionality was moved to FlightTaskTransition and the variable was forgotten in 079b756f1b79866720c76417b8edd24547894703
2025-02-26 13:37:21 +01:00
Alexander Lerach
5d2814f6c9
dataman KConfig for persistent storage 2025-02-26 12:48:23 +01:00
Marco Hauswirth
2169ea561b
PR: add optical flow arming check (#24375)
* add optical flow arming check

* removed deprecated mavlink_log_critical

* change SYS_HAS_NUM_OF description, keep max sensor at 1 since multiple instances are currently not support.

* restructure if/else blocks
2025-02-26 08:41:12 +01:00
Pernilla
65a80dc8e6
VTOL: Don't overwrite attitude setpoint in Stabilized transition modes (#24406)
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2025-02-25 20:06:16 +01:00
chfriedrich98
7c63468e8b mecanum: refactor code architecture 2025-02-25 17:06:17 +01:00
bresch
c09c63171c MC auto: fix land nudging
Revert removal of isTargetModified as this is required when the target
is changed by "RC help" (nudging) during landing.
2025-02-25 09:11:23 +01:00
Ted
35d96d57f9
control_allocator: Added linearization feature for 4 servo swash plates to prevent binding (#23961)
* control_allocator: Added linearization feature for heli swashplates to help prevent servo binding

* Apply suggestions from code review

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>

* update description of CA_LIN_SERVO parameter

* update variable name

* add missing semi-colon

* fix variable referenced before assignment

* add missing indentation

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>

* removed param unnecessary param

* removed whitespace

* remove CA_LIN_SERVO and enable feature if CA_MAX_SERVO_THROW > 0 plus Update param description.

* remove CA_MAX_SVO_THROW from actuators tab to avoid confusion during standard swashplate setup.

* added comment and fixed spelling mistake

* fix spelling mistake

* fix formatting

* reduce CA_MAX_SVO_THROW short description length to stop test failure

* ActuatorEffectivenessHelicopter: clarfification suggestions for servo linearization feature

* remove NAN check.

---------

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2025-02-24 12:17:11 +00:00
Hamish Willee
4ea7de449a
InternalCombustionEngineControl - doc corrections (#24359)
* InternalCombustionEngineControl - doc corrections

* Update InternalCombustionEngineControl.cpp
2025-02-21 08:34:08 +11:00
Silvan Fuhrer
24da87db12
FW Position Control: keep flaps in landing config during abort if below AIRSPD_MIN (#23877)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2025-02-20 09:28:27 +01:00
Jacob Dahl
1db50cb331 mavlink: add missing fields for DISTANCE_SENSOR 2025-02-19 12:11:42 -05:00
chfriedrich98
04a3c4af20
Differential Rover: Refactor and clean up, align with Ackermann rover(#24318)
* differential: refactor code architecture

* Offboard fix

* fix accel/decel slew rate
2025-02-18 18:26:38 +01:00
Silvan Fuhrer
3c129aefa1
Add IC engine control module (#24055)
Internal combustion engine control module.
New actuator functions and RPM based start/restart logic.
Not enabled by default. 

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Pernilla <pernilla@auterion.com>
2025-02-18 17:15:32 +01:00
Perre
412d4390a6
MC Slowmode: Yawstick for gimbal control, vehicle yaw follows gimbal (#24242)
* Yawsticks on gimbal, vehicle follows gimbal in slowmode, once vehicle has taken off

* Increase queue length to avoid automatically unadvertise queued publications with queue length 1

* Improve readability

---------

Co-authored-by: Pernilla <pernilla@auterion.com>
2025-02-18 14:38:11 +01:00
bresch
5e06ab1430 ekf-agp: do not reset to AGP if GNSS fusion is active 2025-02-18 14:35:10 +01:00
Silvan Fuhrer
3119510f25 Remove health_component::avoidance
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2025-02-18 14:33:16 +01:00
Matthias Grob
ed9111ec49 Remove obstacle avoidance test with Gazebo classic and ROS 1 2025-02-18 14:33:16 +01:00
Matthias Grob
0b370ab5d3 Remove obstacle avoidance MAVLink Heartbeat check 2025-02-18 14:33:16 +01:00
Silvan
04cd247c90 FlightTaskAuto: remove isTargetModified()
As it is no longer needed w/o avoidance.

Signed-off-by: Silvan <silvan@auterion.com>
2025-02-18 14:33:16 +01:00
Silvan
b916a96e00 Remove uorb topics exclusively used for avoidance
- TrajectoryBezier.msg
- TrajectoryWaypoint.msg
- VehicleTrajectoryBezier.msg
- VehicleTrajectoryWaypoint.msg

Additionally remove TRAJECTORY_REPRESENTATION_WAYPOINTS mavlink stream.

Signed-off-by: Silvan <silvan@auterion.com>
2025-02-18 14:33:16 +01:00
Silvan
b7b6d45e18 lib: remove bezier
Signed-off-by: Silvan <silvan@auterion.com>
2025-02-18 14:33:16 +01:00
Silvan
b34a5eb6f7 PositionControllerStatus: remove unused fields
Remove yaw_acceptance and altitude_acceptance_radius fields as they were only
filled by now removed avoidance controller.

Signed-off-by: Silvan <silvan@auterion.com>
2025-02-18 14:33:16 +01:00
Silvan
1f2dba68d2 remove avoidance library and logic
Signed-off-by: Silvan <silvan@auterion.com>
2025-02-18 14:33:16 +01:00