16649 Commits

Author SHA1 Message Date
Konrad
5c021d8fa4 RTL: Keep only the selected RTL type in memory. 2023-09-29 14:25:03 +02:00
Konrad
d4ea106f9e RTL: When RTL_TYPE is set to 1 make sure to always use a mission landing/safepoint if available and not in RW mode. 2023-09-29 14:25:03 +02:00
Konrad
9a48d375ce mavlink-mission: Calculate land_start and land item directly on mission upload. 2023-09-29 14:25:03 +02:00
Konrad
007ed11bbe Mission+RTL: Refactoring mission and RTL to keep them separate. RTL does all its mission related computation in its own class.
Dataman: Add write function to dataman cache.

RTL and mission have a new common base class mission_base. Both inherit from them and mission, RTL mission, and rtl reverse mission inherit from them and implement their desired functionalities. This simplifies the logic in mission as well as make the logic in rtl mission reverse and mission more readable.
Rtl mission reverse now functional again for VTOL flying back the mission and transitioning to MC at the home position.
Dataman cache has new write functionality to write to dataman while updating write item in its cache if necessary.
Dataman cache is now only updated when the respective module is active. Leads to a higher computation time once on activation, but decreases unnecessary cache updates when inactive.
2023-09-29 14:25:03 +02:00
Silvan Fuhrer
913a7ea295 FW Position Control: improve/shorten param descriptions
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-29 11:07:46 +02:00
Silvan Fuhrer
8bc3785345 AirspeedSelector: improve/shorten param descriptions
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-29 11:07:46 +02:00
Silvan Fuhrer
700402a031 EKF2: improve/shorten param descriptions
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-29 11:07:46 +02:00
Silvan Fuhrer
f67b3a8a03 VTOL: improve/shorten param descriptions
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-29 11:07:46 +02:00
Silvan Fuhrer
6b09882758 FW attitude/rate controller: shorten/improve param descriptions
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-29 11:07:46 +02:00
Daniel Agar
b817eb0370 ekf2: collect_gps() don't throttle updates until WMM set initially 2023-09-29 09:37:30 +02:00
Daniel Agar
1e594747ab ekf2: fix WMM NAN checks
- if any of the stored WMM is NAN then it should be updated
2023-09-29 09:37:30 +02:00
Silvan Fuhrer
0df5134156
vfr_hud: fix throttle display for FW and show magnitude for 3D thrust (#22154)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-28 17:15:26 +02:00
Matthias Grob
8ea04b0f8f ActuatorEffectivenessHelicopterCoaxial: fix copy paste error in saturation logic 2023-09-28 08:55:06 +02:00
Matthias Grob
8a2d2fb1cd HelicopterCoaxial: only publish unallocated thrust in the saturation case 2023-09-28 08:55:06 +02:00
Matthias Grob
169a0f580d HelicopterCoaxial: correct constraining for minimum 2 swash plate servos 2023-09-28 08:55:06 +02:00
Matthias Grob
20f2df4410 HelicopterCoaxial: handle yaw saturation
This had to be done for the integrators to work at all.
2023-09-28 08:55:06 +02:00
Matthias Grob
cf40d95ef0 HelicopterCoaxial: adjust for coaxial allocation 2023-09-28 08:55:06 +02:00
Matthias Grob
b3b373e074 control_allocator: add coaxial helicopter effectiveness
It's now just a copy of the helicopter such that changes get well
visible in the history.
2023-09-28 08:55:06 +02:00
Matthias Grob
b56e7a036c control_allocator: allow for only 2 swash plate servos
This is required to support fixed pitch propeller helicopters that have
no collective but only cyclic pitch with two degrees of freedom and
hence only two servos.

The amount of thrust in the body z axis is then controlled using the
motor speed which makes particularly sense on coaxial helicopters
that need to control yaw with changing motor speeds already.
2023-09-28 08:55:06 +02:00
Matthias Grob
35b32e8cb0 ActuatorEffectivenessHelicopter: spacing 2023-09-28 08:55:06 +02:00
Matthias Grob
2be687a84c Helicopter: add collective pitch offset to Actuator UI parameters 2023-09-28 08:55:06 +02:00
Matthias Grob
99e2acf89c ActuatorEffectivenessHelicopter: explicitly handle unsaturated case
This became necessary otherwise
the allocation reports saturation all
the time and the rate integrator doesn't work.
2023-09-28 08:53:35 +02:00
Daniel Agar
14a967e2ca ekf2: remove aid src status fusion_enabled flag 2023-09-26 10:30:16 -04:00
bresch
99197919d7 ekf2: access state covariance using helper functions 2023-09-26 06:41:04 +02:00
Daniel Agar
aa97ef9d50 EKF: covariance remove extra semicolon 2023-09-25 12:26:12 -04:00
Mathieu Bresciani
b3f460f30c
ekf2: update quaternion covariance at yaw reset(#22123)
- Preserve tilt variance while doing a yaw reset
 - Yaw variance is now correctly set instead of increased

---------

Co-authored-by: Dominique <dominique.leblanc@donecle.com>
Co-authored-by: bresch <[brescianimathieu@gmail.com](mailto:brescianimathieu@gmail.com)>
2023-09-25 09:36:42 -04:00
bresch
514e0330e5 ekf2_terrain: handle height reset 2023-09-25 09:34:14 -04:00
bresch
db97a38a9d ekf2 rng kin: allow check to become true during horizontal motion
Even if there is some horizontal motion, a passing check should be
accepted as the terrain can be flat. However, the vehicle must not be
moving horizontally to invalidate the consistency as a change in terrain
can make the kinematic check temporarily fail.
2023-09-22 09:02:35 -04:00
Silvan Fuhrer
5590ab3caa
FW Position Controller: handle IDLE waypoints in FW_POSCTRL_MODE_AUTO, also with NAN setpoints (#22114)
A setpoint of type IDLE can be published by Navigator without a valid position,
and should be handled in the auto function in FW_POSCTRL_MODE_AUTO. If it wouldn't be
handled there the controller would switch to mode FW_POSCTRL_MODE_OTHER, in which case
no attitude setpoint is published and the lower controllers would be stuck with the
last published value (incl. thrust).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-21 17:27:54 +02:00
Silvan Fuhrer
acec07fb25 Update src/modules/mc_att_control/mc_att_control_main.cpp
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2023-09-21 17:25:53 +02:00
Matthias Grob
710f977349 mc_att_control: ramp thrust in after spoolup time 2023-09-21 17:25:53 +02:00
Matthias Grob
4ca366c04f mc_att_control: respect spoolup time in Stabilized mode 2023-09-21 17:25:53 +02:00
Matthias Grob
24111df176 mc_att_control_main: zero minimal thrust when landed
but this time compared to
2fbb70d9ca94f442de1345221be18ba738cda952
the minimum thrust is ramping to not produce a thrust jump.

The better long term solution will be to always have airmode but
with the effect limited to a magnitude of MPC_MANTHR_MIN.
2023-09-21 17:25:53 +02:00
Jari Nippula
7239e8473e microxrce_client to use px4_poll for uorb subs
Subscribe to poll uorbs instead of sleeping px4_usleep to
allow more accurate timing.
2023-09-21 08:30:28 -04:00
bresch
9e962f3efa ekf2: update more hardcoded indexes 2023-09-21 08:27:52 -04:00
bresch
ebf962bf68 ekf2: remove size in name of state vector and matrix types
Then the state vector size can be changes without having to update the
name
2023-09-21 08:27:52 -04:00
RomanBapst
4f1682c3c8 UTM_GLOBAL_POSITION: prevent uint16 overflow
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-09-21 08:21:56 -04:00
Matthias Grob
be56f74c1d mc_acro_params: beginner/tuning friendly defaults
high rates and (super) expo are necessary for
- acrobatic flying
- fpv
- racing
but they are not useful for:
- a typical vehicle's rate control tuning
- beginners

The defaults that I set in #8036 were put with the assumption Acro mode
is mainly used on racing drones for acrobatic manouvers but instead
users including me use it most of the time to tune any drone.
When tuning the rates are lowered and expo disabled.

My suggested strategy is to make the beginner friendly rates without
expo which are good for tuning the default and document more clearly
how this can be raised for acrobatic flying in documentation and later
on hopefully also directly in the ground station UI
on an Acro mode specific page.
2023-09-20 17:45:07 -04:00
Matthias Grob
77c2df2e04 mc_acro_params: separate parameter group 2023-09-20 17:45:07 -04:00
Matthias Grob
189fa6831a mc_acro_params: more readable descriptions 2023-09-20 17:45:07 -04:00
Matthias Grob
df3a0de734 mc_rate_control: move acro parameter to separate file 2023-09-20 17:45:07 -04:00
Silvan Fuhrer
ec7db4b30d
FW Positon Controller: set references to 0 if not provided by local_position (#22101)
* FW Positon Controller: set altitude_ref to 0 if not provided by GPS

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

* FW Positon Controller: set lat/lon reference to 0 if not provided in local_position

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

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-20 15:45:32 +02:00
RomanBapst
6d71224cdb vtol_takeoff: use global position for takeoff location instead of home position.
- home position and takeoff position don't necessarily need to match

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-09-19 20:00:54 +03:00
bresch
dac337efc4 ekf2: auto-generate state vector size constant 2023-09-19 09:37:50 -04:00
Daniel Agar
8a9a303354 ekf2: update include guards 2023-09-19 09:37:50 -04:00
bresch
51dbd8ee4c ekf2: simplify state var constraint 2023-09-19 09:37:50 -04:00
bresch
779ea3f4d1 ekf2: access state covariance using enum 2023-09-19 09:37:50 -04:00
Silvan Fuhrer
1cbaa78eba Takeoff: don't use Home altitude but current altitude
If no altitude setpoint is specified then takeoff to the default
altitude above the current global position, not above Home.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-19 10:04:30 +02:00
Silvan Fuhrer
de5b769093 Navigator: Use MIS_TAKEOFF_ALT only as default, not as min
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-19 10:04:30 +02:00
Silvan Fuhrer
71f8f47f62 Navigator: remove deprecated calculate_takeoff_altitude()
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-19 10:04:30 +02:00