27910 Commits

Author SHA1 Message Date
bresch
287f881543 TVC: fix unallocated torque calculation 2025-01-28 15:28:24 +01:00
bresch
80d98db3a3 mc rate control: add gyroscopic torque compensation loop
Single (rigid) rotor aircrafts have their dynamics dominated by the
gyroscopic torque. Compensating for this effect by a feedback greatly
improves stability.
Multirotors can also benefit from this feature when the difference in
RPM between the CW and CCW rotors is large (the sum of the angular
momentum of the rotors is non zero).
2025-01-27 16:43:18 +01:00
bresch
a16dfa9587 CA: add thust vectoring actuator effectiveness 2025-01-27 16:43:18 +01:00
Alex Klimaj
07e7c64e60
drivers/power_monitor/ina238: retry if read fails
* ina238: retry if read fails
* ina238: increase retries and only publish not connected if register check fails
* ina238: use I2C resets
2025-01-22 15:32:26 -05:00
Roman Bapst
045c8d9831
Mission feasibility checks: make adding new check less error prone (#24241)
* make adding new feasibility checks less prone to errors

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* Update src/modules/navigator/MissionFeasibility/FeasibilityChecker.hpp

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

---------

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2025-01-22 16:56:31 +01:00
RomanBapst
57fdda597b vtol_takeoff: store altitude on takeoff and don't use home position altitude
as vehicle does not need to be close to home position

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2025-01-22 14:03:18 +03:00
PavloZMN
ee150a15b4
Optical Flow: add unit testes for only using downward distance sensor (#23266)
* Test for Optical Flow checks correct camera position

* Formatting fixed

* Update src/modules/sensors/vehicle_optical_flow/test/CMakeLists.txt

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

* Update src/modules/sensors/vehicle_optical_flow/test/VehicleOpticalFlowTest.cpp

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

* Update src/modules/sensors/vehicle_optical_flow/test/VehicleOpticalFlowTest.cpp

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

* For test GIVEN/WHEN/THEN added

---------

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2025-01-22 11:58:07 +01:00
bresch
caaae6ed51 ekf2: allow sideslip fusion to always start with airspeed fusion
This allow sideslip fusion to start during VTOL front transition or even
on a multirotor with a vertical stabilizer and an airspeed sensor for example.
2025-01-22 09:33:16 +01:00
Jacob Dahl
1900d2c98f
uavcan: fix hw_errors from mutex lock, hide ESC/Servo status if no function set (#23888) 2025-01-22 12:48:05 +13:00
Jacob Dahl
a3215419d7
gz: remove model spawn offset (#24165) 2025-01-22 12:47:25 +13:00
Jacob Dahl
918eca8de4
gz: increase timeout for service request (#24164)
* gz: increase timeout for service request

* change error messages to warnings, specify retrying

* fix typo
2025-01-21 22:14:38 +01:00
RomanBapst
f36b45b2ff VehicleOpticalFlow: use 32bit integer for dt
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2025-01-21 16:48:33 +03:00
RomanBapst
25e76883b7 Integrator: use 32bit integer to store dt to avoid overflow
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2025-01-21 16:48:33 +03:00
Matthias Grob
af062c85eb Revert "FLightTaskAuto: limit nudging speed based on distance sensor"
This reverts commit 97cb933cff6d837e59dd55123804cd78abdca22a.
2025-01-21 09:59:47 +01:00
Marco Hauswirth
7a9608e54b
increase EKF2_RNG_FOG for FW and VTOL 2025-01-20 14:43:30 -05:00
Marco Hauswirth
4a5aa1e947
Fix max-hagl restriction to position/altitude control (#23667)
* fix max-hagl restriction to position/altitude control

* max hagl vel restriction in ManAcc position mode

* use interpolate func, change naming

* simplyfied vertical vel limitation

* move velocity-constraint adjustment to StickAccelXY
2025-01-20 15:50:21 +01:00
Mathieu Bresciani
0d22905558 VTOL params: fix param name 2025-01-20 15:50:06 +01:00
Pedro Roque
b09340cc98
Control Allocator: Add option for metric allocation (skip normalization) (#24199)
* add: metric allocation

* add: actual files

* rft: moved metric allocation to pseudo-inverse via flag with public method

* del: removed metric allocation test and added test in pseudo-inverse testing

* rft: deleted extra newline at the end of pseudo inverse test file

* feat: removed unnecessary log include
2025-01-20 13:30:51 +01:00
mahimayoga
65a8cc0e0a sf45: scale measured distance with pitch and roll.
Calls function from ObstacleMath library that accounts for the vehicle's attitude w.r.t the obstacle. Obstacles are assumed to be flat, vertical walls.
2025-01-20 11:11:29 +01:00
mahimayoga
ab46502cbd obstacle-math: add unit tests for project_distance_on_horizontal_plane function. 2025-01-20 11:11:29 +01:00
mahimayoga
29f981f14c collision-prevention: extract rotation scaling function into new ObstacleMath library.
New library created for static and/or repeated code across collision prevention and driver files.
2025-01-20 11:11:29 +01:00
Daniel Agar
b1ca0495e2 ekf2: yaw estimator additional validity checks 2025-01-20 09:45:41 +01:00
Balduin
1eb9434b8c stream ATTITUDE_QUATERNION in low bandwidth mode 2025-01-17 11:20:12 +01:00
Matthias Grob
f693fab7c8 rc_update params: remove comment about default static mixing
Was added back in 2014:
7441efde4745c0dddc08a36a0bbf83307f82948a
2025-01-17 08:18:42 +01:00
alexklimaj
33841cf438 Update GPS submodule 2025-01-15 11:54:04 -05:00
bresch
c99cb6e94b ekf2: do not auto-generate sideslip measurement jacobian
This is to trade a bit of CPU load for more flash space.
2025-01-15 11:05:50 -05:00
Matthias Grob
e01fef755a Control allocation: make heli rpm control an optional build flag disabled by default
to save flash.
The rpm capture dirver is also disabled on default releases
2025-01-15 14:35:35 +01:00
Mathieu Bresciani
8ecb76aba2
[Multirotor] add yaw torque low pass filter (#24173)
co-authored-by: danielmellinger <107884356+danielmellinger@users.noreply.github.com>
co-authored-by: Eric Katzfey <eric.katzfey@modalai.com>
2025-01-15 14:02:28 +01:00
Jaeyoung Lim
974446c0e8
Make control allocation and actuator effectiveness a non-module-specific library (#24196)
* Remove more circular dependencies with ActuatorEffectiveness

* Separate vehicle specific actuator effectiveness

Keep actuator effectivenss in control allocator

* Remove test dependency for now

* Group library directories
Fix

* Change directory names

* Rebase fix
2025-01-15 10:12:29 +01:00
PX4 BuildBot
9f8325e8e0 Update submodule mavlink to latest Wed Jan 15 00:39:11 UTC 2025
- mavlink in PX4/Firmware (fd5b52d4c53f35a520646a6c4ec75588f6b87e0f): 5e3a42b8f3
    - mavlink current upstream: 619947d8bc
    - Changes: 5e3a42b8f3...619947d8bc

    619947d8 2024-12-19 Hamish Willee - common.xml - PING fix (#2197)
2f44ceff 2024-12-18 Julian Oes - common: use camera ID for CAMERA_IMAGE_CAPTURED (#2196)
2025-01-14 21:45:04 -05:00
bresch
12a9087e92 ekf2: constrain max variance by zero innovation update
Clipping the variance of the covariance matrix has a destabilizing
effect as it increases the correlation between the states.
2025-01-14 21:42:33 -05:00
Matthias Grob
bc92008885 RpmControl: Better consider the case where there's no rpm measurement (anymore) 2025-01-14 14:55:34 +01:00
Matthias Grob
5e2848312d Commander: start timer for auto disarm after spoolup 2025-01-14 14:55:34 +01:00
Matthias Grob
2506bd3b5d RpmControl: simplify the entire control logic 2025-01-14 14:55:34 +01:00
Matthias Grob
1c4325db6d RpmControl: split into cpp source file fixing includes 2025-01-14 14:55:34 +01:00
Matthias Grob
2772ae7e0e RpmControl: maximum rpm outliers are now caught by RpmCapture 2025-01-14 14:55:34 +01:00
Matthias Grob
ddd410e9d8 RpmControl: remove status message because it by now only contains redundant information 2025-01-14 14:55:34 +01:00
Matthias Grob
4050cedfaf RpmControl: call local message instance after message name following the convention 2025-01-14 14:55:34 +01:00
Matthias Grob
cd0e04f8b0 RpmControl: name current timestamp now following the convention 2025-01-14 14:55:34 +01:00
oravla5
ee67e4bb28 RpmControl: class clean up 2025-01-14 14:55:34 +01:00
Matthias Grob
940fe45ba7 ControlAllocator: introduce helicopter rotor rpm controller 2025-01-14 14:55:34 +01:00
Silvan Fuhrer
e4e975806f Enable CONFIG_EKF2_AUX_GLOBAL_POSITION by default
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2025-01-14 02:19:49 -05:00
Jacob Dahl
0fb8463b79
logger: always log can_interface_status (#24071)
* logger: always log can_interface_status

* logger: log topic can_interface_status using CONFIG_BOARD_UAVCAN_INTERFACES
2025-01-13 10:15:40 -07:00
mahimayoga
879e0ea9b1 MC-hte: use allocated thrust as input for hover thrust estimator.
Improves estimates on vehicles where thrust is often saturating.
2025-01-13 11:56:09 +01:00
mahimayoga
28fa044386 MC-stabilized: rescale thrust input to hover thrust at zero stick input
Use hover thrust estimate in stabilized mode to rescale stick inputs. Prevents vehicle from losing/gaining altitude when switching from position to stabilized mode.
2025-01-13 11:56:09 +01:00
Jaeyoung-Lim
f5c05f6d01 Take 2: Cleanup circular dependencies ActuatorEffectiveness 2025-01-13 09:29:42 +01:00
Jaeyoung Lim
208d37e703
Remove circular dependency if control allocation (#24195)
... and actuator effectiveness
2025-01-10 16:58:15 +01:00
Balduin
a231fafafa
SIH: Add Standard VTOL Airframe (#24175)
* add standard vtol airframe to SIH.

mostly took changes from 4d930bde and applied to main.

generate_fw_aerodynamics now takes four arguments rather than using the
_u class member, because depending on vehicle type _u is used
differently.
2025-01-09 15:40:06 +01:00
Silvan Fuhrer
44b423f48d
drivers: ulanding: description: fix link to user guide section (#24189)
Signed-off-by: Silvan <silvan@auterion.com>
2025-01-09 08:54:58 +01:00
Jari Nippula
cbbbbc9dfa logger: fix file open issue if crypto algorithm is disabled
move init_logfile_encryption() call after the buffer start_log() call
to have log file already open while storing the header and key data to
the beginning of the file.
2025-01-09 07:45:09 +01:00