Commit Graph

42931 Commits

Author SHA1 Message Date
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
henrykotze 3cee941f64 Kconfig subs and controllers for uavcan
small changed to revert back to px4::main

Make kconfig more readble

Combine esc and servo controllers under one option
2023-09-28 07:36:36 +02:00
Matthias Grob a03af59c5c battery: show unknown cell count
Unkown cell count is the default and
should be possible to select again from the drop down.
2023-09-28 07:32:06 +02:00
Niklas Hauser 43d859313b px4/fmu-v5/6x: Upstream power manager for FMU
Detects and configures it correctly for the Auterion INA226-based power
modules.
2023-09-27 10:39:31 -04:00
alexklimaj 23cf0a7317 workqueue: increase hp_default stack 2023-09-26 15:18:31 -04: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 619616b9f0 vscode add Makefile extension to recommended and devcontainer.json 2023-09-25 12:26:29 -04: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
Ville Juven 6cb2c176d5 events: Move implementation of events::send() to lib/events
Events have a global, system-wide sequence number, which must be handled
atomically, (fetching and incrementing the sequence AND sending the event
to uORB must be atomic). Currently in FLAT mode, only one instance of this
sequence number exists, so it is OK to have it in px4_platform.

However, in PROTECTED mode px4_platform is instantiated both in kernel-
and user spaces, which makes two instances of this sequence number, which
causes problems in the mavlink event handling logic.

When mavlink receives and handles events, it expects that:
- The sequence numbers arrive in order (seq n is followed by n+1 etc)
- It increments by 1
- There is only one instance of the sequence number

In PROTECTED mode this is violated, as the kernel and user sequence
numbers run freely on their own. This patch fixes the issue by moving
the event backend to the kernel and by providing user access to it via
ioctl.
2023-09-25 09:54:11 +02:00
Vincent Poon fafec397e8 Fix Default Output Protocol - Airframe 4019_x500_v2
Remove "param set-default PWM_MAIN_TIM0 -4"
2023-09-25 09:28:47 +02:00
Daniel Agar 61aee73b91 boards: px4_fmu-v5_stackcheck disable common RC to save flash 2023-09-22 11:19:29 -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
David Sidrane e920bfb188 px4_fmuv6x:Fit Rev6 Sensors 2023-09-21 16:22:44 -04:00
David Sidrane 9151d582ed px4_fmu-v6:Add Sensor Set Rev 6 2023-09-21 16:22:44 -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
2fbb70d9ca
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
Igor Mišić c1dbe177b8
boards: move FRAM emulated sector size to the 32-byte granularity (#21204) 2023-09-20 16:50:36 -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
AlexKlimaj 7ff00db9c5 Update AFBR to 1.4.4. Remove changing measurement modes. Add parameters. Default to Long range mode" 2023-09-19 19:15:02 -04: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
bresch 9c41c06325 square matrix: add function to uncorrelate part of the matrix 2023-09-19 09:37:50 -04:00
bresch b612467593 square matrix: add partial trace computation
This is useful when we need the sum of some variances in a large
covariance matrix
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
Silvan Fuhrer 48acf98fd5 Navigator: remove deprecated _can_loiter_at_sp and _need_takeoff
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-19 10:04:30 +02:00
Silvan Fuhrer bb212ea6ec Navigator: refactor logic that aligns altitude prior to starting mission
New: always climb to altitude of active waypoint if mission is started/resumed.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-19 10:04:30 +02:00
Silvan Fuhrer 5fa8985477 ROMFS: SITL config iris_opt_flow: fix disabling of GPS fusion
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-19 10:04:30 +02:00
Silvan Fuhrer 93dbf17eab Navigator: rename WORK_ITEM_TYPE_TAKEOFF to WORK_ITEM_TYPE_CLIMB
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-19 10:04:30 +02:00
Silvan Fuhrer 15641f62d2 Navigator: rename WORK_ITEM_TYPE_ALIGN to WORK_ITEM_TYPE_ALIGN_HEADING
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-19 10:04:30 +02:00
Maciej Małecki 18e47f9b65 Landing Target Estimator: fix param group casing consistency
`target` -> `Target`. Useful to users of machine-readable documentation.
2023-09-19 09:12:40 +02:00
Daniel Agar d351f16d04 drivers/optical_flow/paa3905: backup scheduling to fetch 0 flow
- this sensor provides a MOTION interrupt used for default scheduling, but we also need to publish
   zero flow information
2023-09-18 12:46:39 -04:00