16618 Commits

Author SHA1 Message Date
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
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
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
efbed3bfc1 sensors/vehicle_optical_flow: don't publish interval lower than configured rate 2023-09-18 12:46:39 -04:00
Daniel Mesham
15036c1761
Allow changing parameters during replay (#22071)
* replay: add scheduled parameter changes

* replay: store scheduled parameter change events as structs
2023-09-18 18:38:09 +02:00
Daniel Agar
153f7bbced ekf2: update all copyright headers 2023-09-15 10:02:09 -04:00
Daniel Agar
1e9f0ad2c6 ekf2: add kconfig for barometer support (enabled by default) 2023-09-15 10:02:09 -04:00
Daniel Agar
10b54d08fc ekf2: add dedicated EKF2_CONFIG_TERRAIN in kconfig
- new estimator_aid_src_terrain_range_finder for HAGL RNG
2023-09-15 10:02:09 -04:00
Daniel Agar
845b01a00d ekf2: add kconfig for magnetometer support (enabled by default) 2023-09-15 10:02:09 -04:00
PX4 BuildBot
3107860a89 Update submodule mavlink to latest Wed Sep 13 20:14:21 UTC 2023
- mavlink in PX4/Firmware (06b8477f853bf0234d0a894dcf6af4718597989f): 58435f6a83
    - mavlink current upstream: 81524c2b34
    - Changes: 58435f6a83...81524c2b34

    81524c2b 2023-09-13 Hamish Willee - Update pymavlink - for fixed wireshark (#2038)
fe14d798 2023-08-31 Matthias Grob - common: extend MANUAL_CONTROL with auxiliary continuous inputs (#2031)
546edec2 2023-08-30 Peter Barker - common.xml: display GIMBAL_MANAGER_STATUS.flags as bitmask (#2035)
16754498 2023-08-28 Richard Allen - fix RC_CHANNELS_SCALED inactive channel (#2032)
a31bf384 2023-08-24 Hamish Willee - Fix c_library_vX build order (#2026)
5887a6af 2023-08-17 auturgy - reserve range in all.xml (#2030)
2023-09-13 18:31:37 -04:00
Thomas Stastny
28fe15d829 FixedwingPositionControl: initialize the airspeed slew rate controller with trim airspeed in the constructor 2023-09-13 16:18:16 -04:00
Thomas Stastny
a1cd4fd5df Commander: make sure unsupported do reposition command result is published
todo: need to consolidate the command ack strategy in this function
2023-09-13 15:29:31 -04:00
Thomas Stastny
bec0d83cf4 Commander: dont accept reposition commands without the mode switch bit
avoids erroneous (unexpected) position setpoints when switching into hold from another mode
2023-09-13 15:29:31 -04:00
Thomas Stastny
2d80291b43 loiter: only accept reposition setpoint if commanded within last 0.5 sec
guards against left over reposition commands (potentially set via geofence) from previous flights
2023-09-13 15:29:31 -04:00
Konrad
679a532e61 failsafe: When rtl_time_estimate failsafe is triggered, only disable it when the user changes the mode, or it is disarmed. 2023-09-13 16:19:08 +02:00
Daniel Agar
016db84d69
ekf2: covariance update use IMU sample dt (#22032)
- usually the delta angle and delta velocity dt is the same, but they can be slightly different
2023-09-13 09:58:56 -04:00
Thomas Stastny
4ec4ce5fa9 FixedwingPositionControl: rework airspeed slew controller handling
- force initialize takeoff airspeed setpoint at start of takeoff modes
- force set airspeed constraints if slewed value is out of bounds
- always slew airspeed setpoints as long as inside constraints
- move target airspeed setpoint calculation into mode specific logic regions (hand vs runway)
2023-09-13 09:50:41 +02:00
Silvan Fuhrer
f1b47b14b8 FW Pos Control: add in_takeoff_situation argument to adapt_airspeed_setpoint()
when we're in a takeoff situation, we only want to adapt the airspeed to
avoid accelerated stall due to load factor changes. Disable othre logic
like minimum ground speed, wind based adaption and airspeed slew rating.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-09-13 09:50:41 +02:00
bresch
78eb0cdb72 opt flow: fix msg naming
optical_flow got replaced by sensor_optical_flow and vehicle_optical_flow
2023-09-11 10:12:16 -04:00
Daniel Agar
3476831246
dataman: explicitly check file existence to init
- on NuttX if the SD card was just cleared (quick format) it's possible for the newly created uninitialized dataman file to still have the previous compatibility key, which causes the initialization to be skipped
2023-09-08 10:16:24 -04:00
Thomas Stastny
def4ce6ba8 FixedwingPositionControl: slightly simplify manual position control (use navigateLine() to be sure no turnaround)
make notes on odd things that are likely still wrong
2023-09-08 16:08:38 +02:00
Thomas Stastny
16bd0a2ba0 FixedwingPositionControl: revise navigateLine(), navigateBearing() and naivgatePathTangent() briefs 2023-09-08 16:08:38 +02:00
Thomas Stastny
7b7d762582 FixedwingPositionControl: forgot to rename input args in navigateWaypoints() declaration 2023-09-08 16:08:38 +02:00
Thomas Stastny
e71804d976 FixedwingPositionControl: reuse line() and waypoint() methods in navigateWaypoints() method 2023-09-08 16:08:38 +02:00
Thomas Stastny
ad9e3d72d9 FixedwingPositionControl: split out single waypoint following method
makes more clearly defined interfaces and behaviors. also cleaned up the controlAutoPosition() method
2023-09-08 16:08:38 +02:00
Thomas Stastny
c3012a551f FixedwingPositionControl: track single point when no prev point exists for waypoint following
make sure correct local position setpoint output is logged
2023-09-08 16:08:38 +02:00
Thomas Stastny
f90783547f FixedwingPositionControl: correct navigation method param description typos 2023-09-08 16:08:38 +02:00
Thomas Stastny
3047cad05d FixedwingPositionControl: follow (infinite) lines instead of waypoints during takeoff and landing 2023-09-08 16:08:38 +02:00
Thomas Stastny
3ffb57bcce FixedwingPositionControl: handle degenerate tangent setpoint in navigatePathTangent() 2023-09-08 16:08:38 +02:00