Commit Graph

25622 Commits

Author SHA1 Message Date
marcirsch a8b342722e mavlink_main: Add TIME_ESTIMATE_TO_TARGET stream to config, onboard, and onboard_low_bandwidth modes
Signed-off-by: marcirsch <marcell@auterion.com>
2022-08-10 09:13:58 +02:00
marcirsch 4bf6ebf4c3 TIME_ESTIMATE_TO_TARGET: Populate TIME_ESTIMATE_TO_TARGET MAVLink message with the estimated time to RTL
mavlink_messages: Added newly created MAVLink stream
mavlink_main: Enabled stream

Signed-off-by: marcirsch <marcell@auterion.com>
2022-08-10 09:13:58 +02:00
Daniel Agar 7f2fea1cca mpu9250: try all I2C addresses if not manually specified 2022-08-09 13:06:40 -04:00
Daniel Agar 7c809f034d replay: ReplayEkf2 disable parameter auto save
- not needed and silences a startup error
2022-08-08 21:27:47 -04:00
Daniel Agar 34dee09b74 ekf2: replay fixes, don't use HRT for timeout checks
- this interferes with current ekf2 replay where the latest IMU sample
is effectively the current timestamp
2022-08-08 21:27:47 -04:00
Daniel Agar 1c49a4349f ekf2: force skip multi-EKF config if replay is enabled 2022-08-08 21:27:47 -04:00
Daniel Agar 66b55d9d0a ekf2: fix yaw estimator velocity accuracy
- additionally require GPS speed accuracy is within EKF2_REQ_SACC
2022-08-08 21:27:01 -04:00
bresch d9d127a237 lightware dist sensor: set min range based on datasheet 2022-08-08 19:32:44 -04:00
Daniel Agar 0bce1ef573 drivers/imu: new TDK IIM-42652 IMU support 2022-08-08 13:51:39 -04:00
Thomas Stastny 0ea347a5c9 fw pos ctrl: fix the touchdown offset on flare, and nudge the wheel directly 2022-08-08 09:32:44 +02:00
Thomas Stastny 02d7a46025 fw pos ctrl: increase landing nudge rate 2022-08-08 09:32:44 +02:00
Daniel Agar bce4237963 move ekf2 Matrix helper utilities to mathlib 2022-08-05 09:58:07 -04:00
Silvan Fuhrer a064164c14 FW pos C params: add param group FW Auto Landing
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-05 14:11:59 +02:00
Silvan Fuhrer b039ae1614 FW pos c params: change grouping of some clearly longitudinal params to TECS
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-05 14:11:59 +02:00
Silvan Fuhrer 45073f000a FW Position control: reduce defaults for max pitch
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-05 14:11:59 +02:00
Silvan Fuhrer d04f21aa16 FW attitude controller: reduce FW_MAN_P_MAX from 45 to 30
45° is a very large pitch angle, and for me 30° is much more reasonable for
a default value.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-05 14:11:59 +02:00
Silvan Fuhrer 828992adf7 increase default of MPC_Z_VEL_MAX_DN and MPC_Z_V_AUTO_DN from 1 to 1.5
I think most vehicle can safely decend with at least 1.5m/s, and having this
value too low makes Descents/Landings/RTLs unnecessary long.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-05 14:11:59 +02:00
Matthias Grob 87cbda1992 FlightTaskOrbit: parameterize hardcoded maximum radius (#20012) 2022-08-05 09:19:32 +02:00
Daniel Agar dfdfbbfa9c msg/vehicle_odometry.msg: simplify covariance handling and update all usage (#19966)
- replace float32[21] URT covariances with smaller dedicated position/velocity/orientation variances (the crossterms are unused, awkward, and relatively costly)
 - these are easier to casually inspect and more representative of what's actually being used currently and reduces the size of vehicle_odometry_s quite a bit
 - ekf2: add new helper to get roll/pitch/yaw covariances
 - mavlink: receiver ODOMETRY handle more frame types for both pose (MAV_FRAME_LOCAL_NED, MAV_FRAME_LOCAL_ENU, MAV_FRAME_LOCAL_FRD, MAV_FRAME_LOCAL_FLU) and velocity (MAV_FRAME_LOCAL_NED, MAV_FRAME_LOCAL_ENU, MAV_FRAME_LOCAL_FRD, MAV_FRAME_LOCAL_FLU, MAV_FRAME_BODY_FRD)
 - mavlink: delete unused ATT_POS_MOCAP stream (this is just a passthrough)

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2022-08-04 12:55:21 -04:00
bresch 61f390b0dd ekf2_test: fix height offset compensation after origin reset 2022-08-04 16:50:31 +02:00
bresch e34de53e2e ekf2_test: let the GPS start before setting the new origin
fix test by reducing the distance to the new origin: the maximum size of
the local position origin is a cube of 1e6m. If the origin is moved
further than this, the state is clipped to that maximum value
2022-08-04 16:50:31 +02:00
Silvan Fuhrer 55f395a7e9 FlightTaskAuto: apply cruise speed from position triplet also when negative (#20006)
Navigator sets the cruise_speed to -1 if the controller shouldn't listen to
it and instead use the default speed (for MC: MPC_XY_CRUISE). This is for
example for RTL the case, where we want to return at the default speed,
independetly of what the mission speed before was.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-08-04 13:36:15 +02:00
Tony Cake f321117568 GHST: Add support for GPS Telemetry (#19953)
Add support for the basic GPS telemetry values when using the GHST protocol.

* Fix formatting in GHST GPS telemetry changes

* GHST GPS Telemetry formatting cleanup

* GHST GPS Telemetry, Last formatting change
2022-08-03 10:44:21 +02:00
Roman Bapst dbf7d32e07 Skip VTOL_TAKEOFF mission item when in fixed wing mode (#19985)
* mission: skip VTOL_TAKEOFF mission item when in fixed wing mode

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

* mission: added better comment regarding skipping VTOL Takeoff in fw mode

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-08-02 15:34:42 +02:00
RomanBapst f11f2e9797 addressed review comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-08-02 15:29:25 +02:00
RomanBapst fbd4534edc WindEstimator: reworked filter initialisation
- separate initialisation with and without airspeed

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-08-02 15:29:25 +02:00
RomanBapst a63f1b71fe wind_estimator: added simple check for validity of synthetic airspeed
- synthetic airspeed will only be declared valid as soon as the wind variance
has dropped below a parameterized threshold. This is useful for vehicles without
an airspeed sensor which rely on synthetic airspeed but only once the vehicle
has turned sufficiently for the wind estimates to be reliable.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-08-02 15:29:25 +02:00
Hamish Willee a715b5468e mc_wind_estimator - improve readability (#19545) 2022-08-02 09:26:06 +02:00
Hamish Willee 30e2490d5b Docs are now in user guide and main (#19977)
* Fix links to docs in source to point to docs on main not master

* More docs and scripts that need to point to main
2022-08-01 11:39:39 +10:00
Beat Küng e7588d2da0 px4io+pwm_out: set the PWM rate and disarmed value when a channel is first set to a servo
This should simplify the first setup a bit.
2022-07-31 11:20:57 -04:00
Daniel Agar 41d9c3dd2a ekf2: add AUX velocity aid src status
- also includes velocity and position helpers for using estimator aid
   source status messages that will later be used for GPS, EV, etc
2022-07-29 12:02:31 -04:00
Daniel Agar a397c09e59 ekf2: use estimator_aid_src for all yaw sources (mag, gnss, ev) 2022-07-29 11:20:48 -04:00
Silvan Fuhrer 638eff426a AirspeedValidator: increase max update step size of tas_scale_validated from 1% to 5%
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-07-29 09:29:27 +02:00
Beniamino Pozzan a20483ed11 msg/position_controller_landing_status.msg: fix constant name conventions
- msg constant names now comply with ROS conventions:
uppercase alphanumeric characters with underscores for separating words

partially fix #19917

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2022-07-28 11:29:03 -04:00
Daniel Agar 9ed861e0a3 lib/mixer_module: split functions into separate headers
- this arguably improves visibility/discoverability
2022-07-28 08:08:58 +02:00
bresch f7ff0a9961 WindEstimator: add test case for airspeed fusion singularity 2022-07-27 08:19:40 -04:00
Daniel Agar 38c02ea29a wind_estimator: cmake add symforce generation helper target (wind_estimator_generate_airspeed_fusion) 2022-07-27 08:19:40 -04:00
bresch 26190a7799 WindEstimator: use SymForce auto-generated function for airspeed fusion 2022-07-27 08:19:40 -04:00
Hamish Willee e6eed43648 Spelling errors (#19935) 2022-07-27 14:33:16 +10:00
RomanBapst 97f632a408 vtol_takeoff: reset reposition triplet before handing over to loiter mode
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-07-25 14:48:18 +02:00
Igor Mišić d6488fafc3 serial_test: fix first write_count_value for next write 2022-07-25 11:48:36 +02:00
Igor Mišić 32ca7ad706 serial_test: fix write for max buffer size 2022-07-25 11:48:36 +02:00
Taylor Nelms 21cb0ef50f Component: flash parameter storage on stm32h7. Fixes #15331.
As per the discussion in #15331, fixed issue where stm32h7 chips
    use hardware ECC bits in program memory that disallow overwriting
    32-byte flash line that has already been written. As such,
    this change allows for a variant implementation of the flashfs system
    that uses more space in the flash entry header in order to
    allow an entire line to be reserved for erasing an entry.

Signed-off-by: Taylor Nelms <tnelms@roboticresearch.com>
2022-07-25 08:19:00 +02:00
Thomas Stastny 6a0f394d46 rtl: reset rtl state only on activation
rtl state was getting reset on inactive, which meant that the state which triggered resuming e.g. mission landing would be overwritten, and the navigator mode would switch back and forth between rtl and mission. this commit:
1. moves the reset of rtl state to the on activation function (removing it from the on inactive function)
2. functionalizes the rtl state input to the rtl time estimator so that rtl time can still be calculated from state=none while inactive
2022-07-22 14:59:20 +02:00
Thomas Stastny e512d77b89 RTL: expose RTL state 2022-07-22 14:59:20 +02:00
Silvan Fuhrer 85a621303d VtolLandDetector: remove airspeed check
This commit removes the additional airspeed check (airspeed for VTOLs in
hover below LNDFW_AIRSPD_MAX), as it is not a required condition in the
landed state (headwind blowing into the airspeed sensor won't stop
once on the gruond). In FW mode the check would make more sense, but there
the land detector is currently simply disabled.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-07-22 08:31:32 +02:00
Daniel Agar 32c6ec061e sensors: add kconfig options to skip angular velocity and acceleration 2022-07-21 11:27:09 -04:00
Daniel Agar 70e95812e7 ekf2: reset mag_lpf (by zeroing _mag_counter) when resetting mag bias (or changing mags)
- so that there's new filtered data avaiable for reset
2022-07-21 09:24:28 -04:00
Daniel Agar ecdade3638 ekf2: mag in air reset fall back to regular resetMagHeading() if realignYawGPS() fails 2022-07-21 09:24:28 -04:00
Daniel Agar 05133aed27 ekf2: clear test ratios, flags, etc when stopping mag fusion 2022-07-21 09:24:28 -04:00