43935 Commits

Author SHA1 Message Date
Silvan Fuhrer
2ef7c45d97 CA: log torque setpoints
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-10 11:16:32 +02:00
Silvan Fuhrer
9bdc898ceb CA: extend status print
Print not only effectiveness matrix, but also raw and normalized
mixing matrix (inverted effectiveness).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-10 11:16:32 +02:00
Silvan Fuhrer
1fcd5b466f CA: handle servo failure detection
- add fd_servo to failure detector status
- inside control allocation: if one axis is no longer controllable with servos
then enable auxiliary motors for it's control (VTOL only)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-10 11:16:32 +02:00
Silvan Fuhrer
d27ac8a2cb CA: add fixed-wing airmode
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-10 11:16:32 +02:00
Silvan Fuhrer
3370b4583a CA: enable differential thrust on matrix 1 in VTOL FW
Introduce differential thrust SCALE and WEIGHT params that are used
to configure differential thrust on a VTOL vehicle.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-10 11:16:32 +02:00
Silvan Fuhrer
1695babe8a CA: Differentiate between STOPPED and DISABLED actuator
STOPPED: actuators are NOT remoted from the allocation, but
output is set to NAN. Intended for completely stopping a motor that
anyway already had a very low thrust setpoint.

DISABLED: Remove actuator from effectiveness matrix and set output to NAN.
Intended to tell the allocation when an actuator shouldn't be used
in the current flight state to allocate torque.

Additionally added a method to enable/disable motors that are considered
auxiliary (e.g. hover motors in FW flight on a Standard VTOL).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-10 11:15:27 +02:00
Silvan Fuhrer
41393f0618 CA: rename ControlAllocation::getEffectivenessMatrix to getEffectivenessMatrixAllocation
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-10 11:15:27 +02:00
Silvan Fuhrer
6aa2c0b6dc CA: change how normalization is done
Instead of using the same normalization algorithm for multicopters
and planes, this commit splits it up.
The multicopter one is left unchanged in it's core (has special
yaw handling e.g.), while the new (FW one) looks at all axes separately
and scales the mixer matrix such that an input of 1 results in
maximum actuator control setpoint.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-10 11:15:27 +02:00
Silvan Fuhrer
f75a0bec33 CA: make flight_phase class variable
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-10 11:15:27 +02:00
Silvan Fuhrer
fd9d0211aa CA: rename normalize_rpy to normalize_as_planar_mc
To make clear that this normalization method is optimized
for planar multicopters.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-10 11:15:27 +02:00
Ruoyu Wang
b9aa8818a4 kakute f7/h7/h7mini/h7v2: fix EKF2_IMU_CTRL typo 2024-06-10 11:08:33 +02:00
Beat Küng
52ac9336c4 boards: change default IP from 192.168.0.3 to 10.41.10.2
192.168.0.x is often used by routers for WIFI/ethernet networks, and thus
can create conflicts.
This can happen for example if a companion is connected to the FMU via
ethernet and at the same time connects to a WIFI network as DHCP client.
2024-06-10 11:05:50 +02:00
Beat Küng
a90cdcfe80 boards/px4/fmu-v{5,6}x: enable uxrce_dds_client on ethernet by default 2024-06-10 11:05:50 +02:00
Beat Küng
2524ac8c2b boards/px4/fmu-v{5,6}x: do not enable mavlink on ethernet for skynode 2024-06-10 11:05:50 +02:00
asifpatankar
746322d6d2 Update ubuntu.sh with Linux Mint 21.3 version 2024-06-10 16:20:48 +12:00
Jacob Dahl
2882e5c4e1
platforms: nuttx: SerialImpl: fix hang if baudrate is 0 (#23238) 2024-06-07 22:08:21 -06:00
chfriedrich98
5c64a3ed93
Rover Ackermann module (#23024)
New module handling Ackermann rover guidance and control.
Only enabled in SITL and in the rover builds for now.
2024-06-07 17:15:12 +02:00
Silvan Fuhrer
831160389e VTOL Tailsitter: remove throttle spike also for quad-chute
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-07 16:11:59 +02:00
Silvan Fuhrer
199a2f43be VTOL Tailsitter: treat back transition abort like a front transition
for throttle blending.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-07 16:11:59 +02:00
Silvan Fuhrer
b5988ed38f VTOL Tailsitter: add back transition throttle blending
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-07 16:11:59 +02:00
Silvan Fuhrer
f119b15ff1 VTOL Tailsitter: set differential thrust to 0 in first 50ms of front transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-07 16:11:59 +02:00
Silvan Fuhrer
77a3099154 VTOL Tailsitter: fix motor spikes to 0 when starting back transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-07 16:11:59 +02:00
Silvan Fuhrer
3a2b973aba VTOL Tailsitter: add front transition throttle blending
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-07 16:11:59 +02:00
Silvan Fuhrer
a081354933 VTOL tailsitter: fix motor spike to 0 when finishing front transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-07 16:11:59 +02:00
Silvan Fuhrer
1f7b4843dd FW position control: specify modes where FW_PN_R_SLEW_MAX applies
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-07 09:32:23 +02:00
Silvan Fuhrer
b8998933c9 AttitudeSetpoint.msg: FRD instead of NED for body frame
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-07 09:32:23 +02:00
Silvan Fuhrer
b53d2cdf39
battery: reset current filter when transitioning to FW (#22256)
VTOLs consume a lot more power in hover copared to fixed-wing fligt.
The remaining flight time thus should reset if one switches from MC to FW,
as otherwise it takes several minutes until the estimate goes down.
2024-06-07 09:28:37 +02:00
Joao Mario Lago
2ce92a678d arch.sh: Fix syntax error
Fix error of script failing with following error:
PX4-Autopilot/Tools/setup/arch.sh: line 99: syntax error near unexpected token `;'
2024-06-06 21:55:05 -04:00
Julian Oes
f6b65e68cc boards: update all bootloaders 2024-06-07 13:16:17 +12:00
Julian Oes
7137780654 Makefile: add missing bootloader targets
Quite a few were missing, and everything on one line was hard to diff.
2024-06-07 13:16:17 +12:00
Chris Lalancette
b1bf0ff888 Remove argparse from the requirements.txt.
The argparse module has been builtin to Python since
Python 3.2, released in 2011 (see
https://docs.python.org/3/whatsnew/3.2.html).  Further,
the argparse pip module has not been released or updated
since 2015, and lacks some of the features of the modern,
built-in argparse.  Drop the pip installed version in
favor of the built-in version.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
2024-06-06 10:09:11 -04:00
Daniel Agar
fb659ae200 ekf2: stopMagFusion() reset yaw_align if mag heading was active
- we also need to clear mag_aligned_in_flight
2024-06-06 10:08:20 -04:00
Daniel Agar
bfe3c86aeb ekf2: merge mag yaw angle observability into heading consistency
- the additional hyteresis logic for "yaw angle observable" was
   needed when it controlled time dependent mag_3d
2024-06-06 10:07:31 -04:00
Rowan Dempster
bc51eb37eb Only close server when errno is not EINTR 2024-06-06 07:40:12 +02:00
Matthias Grob
68769ea0ec mavlink: use reference instead of pointer to access the MAVLink instance from protocol classes 2024-06-05 16:13:52 +02:00
Matthias Grob
9a7a977625 mavlink_receiver: put all message handling in the same function 2024-06-05 16:13:52 +02:00
Daniel Agar
157f7cf40b simplify world_magnetic_model interface (degrees in, degrees out)
- this hopefully helps avoid accidental mis-use
 - try to clarify units everywhere
2024-06-04 09:14:36 -04:00
Daniel Agar
5fa3b9d86a lib/world_magnetic_model: fetch_noaa_table.py refactor and scaling improvements
- upate to NOAA grid API to build WMM table in one pass
 - refactor declination/inclination/totalintensity table printing to
   shared method
 - compute scaling factor to maximize resolution
2024-06-04 09:14:36 -04:00
Jacob Dahl
22a38c0c6d
drivers/imu: sch16t improvements (#23221)
* individual perf counters for frame errors
* don't treat saturation as an error
* added parameters for gyro/accel LPF and decimation ratio
2024-06-03 22:15:00 -04:00
Alex Klimaj
36ec576c0f
boards: ark-pi6x remove ekf delay param defaults (#23177) 2024-06-03 17:52:17 -08:00
Matteo Del Seppia
a8617cf681
Fix float and uint64_t comparison (#23199)
fix: ControlAllocator float and int comparison bug

There was an incorrect comparison between a float variable `dt` and a `uint64_t` value representing 5 milliseconds (`5_ms`). As a result, `do_update` could never become true even if the last torque setpoint was received more than 5 milliseconds before.

To solve this, the `5_ms` value has been converted to seconds (0.005f) for the comparison with `dt`.
2024-06-03 17:48:38 -08:00
Alex Klimaj
de0e73d505
vscode cmake-variants fix ark_septentrio-gps (#23222) 2024-06-03 19:43:26 -06:00
Matteo Del Seppia
de5087ae3e
Patch for issue #22818 (#23170)
When calling "differential_drive stop" a missing return statement was causing a segmentation fault due to access to already freed memory.
2024-06-03 21:10:28 +02:00
Peter van der Perk
c22f725d85 fmu-v6xrt: Support RC telemetry 2024-06-03 08:31:18 -04:00
Peter van der Perk
7fab93ede8 fmu-v6xrt: Fix flash configuration
Fixes correct dummy cycle count of 20
2024-06-03 08:26:48 -04:00
bresch
0a665a526c ekf2: add mag type init
In this mode, the mag is used to inilialize the heading.
During flight, the heading is predicted using gyros and corrected
by GNSS measurements if available.
2024-06-03 13:28:12 +02:00
Beat Küng
ca112fea8a fix commander: make sure to count all valid mags in preflight check
Previously, if a mag was not required (not index 0 and not used by ekf),
it was not counted in num_enabled_and_valid_calibration.
If a user set SYS_HAS_MAG to e.g. 3, it would then trigger a preflight
failure, even if there were 3 calibrated and enabled mags.
2024-05-31 12:30:34 -04:00
bresch
53210dd8f3 ekf2-mag: with NE aiding, constrain heading drift only before takeoff
After takeoff, the heading is easily observable
2024-05-31 10:38:17 -04:00
bresch
3dac9af09e ekf2-mag: do not reset on WMM change when NE aiding is active
The mag field states are observed. No need to reset them.
2024-05-31 10:38:17 -04:00
bresch
ee765e7859 ekf2-mag: do not reset when NE aiding is active 2024-05-31 10:38:17 -04:00