41321 Commits

Author SHA1 Message Date
Paul Riseborough
dd259a288f EKF: Don't modify accel bias states and variances when inhibited 2021-01-09 11:03:31 -05:00
Paul Riseborough
3e1f2d8674 EKF: Set dvel bias variance to stored value when state is inactive 2021-01-09 11:03:31 -05:00
Jaeyoung-Lim
d42e57a066 Update sitl_gazebo to latest
This PR updates sitl_gazebo to latest
2021-01-08 21:33:22 -05:00
Daniel Agar
b9a721726d
sensors/vehicle_magnetometer: respect calibration offset update success
- the magnetometer calibration offset setter returns false if the new offset change is negligible
2021-01-08 15:34:48 -05:00
Mohamed Abdelkader Zahana
80dd841cad
Update launch files to enable multi-video stream in SITL (#16497)
* Update launch files to support multi-video stream in SITL

* Pass extra args to jinja_gen.py inside gazebo_sitl_multiple_run.sh to enable multi-video streaming
2021-01-08 19:29:47 +01:00
Silvan Fuhrer
706f806943 VTOL: standard VTOL and Tiltrotor manual MC throttle during transition
This sets the throttle of the Multicopter actuators to the throttle stick position
while in Stabilized, Acro or Manual mode.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-08 10:28:00 +01:00
xdwgood
802c68a62e Do not run transition flight task when not enable altitude control 2021-01-08 10:28:00 +01:00
Daniel Agar
bf330a51b2
sensors/vehicle_magnetometer: reduce offset update message length to fit 2021-01-08 01:22:31 -05:00
Thies Lennart Alff
eb60479e4c
UUV introduce param to skip controller (#15706)
* added skip_ctrl param to uuv

* fixed formatting
2021-01-08 06:50:40 +01:00
PX4 BuildBot
064511c2df Update submodule flightgear_bridge to latest Fri Jan 8 00:39:45 UTC 2021
- flightgear_bridge in PX4/Firmware (168468c12af805492f7a3eb80e7b9c8d7f8b40a0): 44b51d5b1c
    - flightgear_bridge current upstream: 7c2c623da9
    - Changes: 44b51d5b1c...7c2c623da9

    7c2c623 2021-01-06 slimonslimon - Switch Ign-math to Eigen3 (#5)
2021-01-07 21:21:02 -05:00
PX4 BuildBot
168468c12a Update submodule ecl to latest Thu Jan 7 12:50:52 UTC 2021
- ecl in PX4/Firmware (c999734463c9b23c6b56670d5242ca4496f9e6ef): https://github/commit/03fed323ab950125114eb34309d3a79119e572ee
    - ecl current upstream: https://github/commit/c212975abe83bf462bc512288ba30358f9a17865
    - Changes: https://github/compare/03fed323ab950125114eb34309d3a79119e572ee...c212975abe83bf462bc512288ba30358f9a17865

    c212975 2021-01-06 bresch - rng height: reset to baro using common logic
2021-01-07 12:08:21 -05:00
Daniel Agar
88f8da27ef
save learned mag bias per sensor (Multi-EKF support)
- handle saving the mag bias per sensor (across all estimator instances using that mag) in sensors/vehicle_magnetometer
 - this is now saving back to the actual mag calibration CAL_MAGn_OFF{X,Y,Z}
 - ekf2 reset mag mag bias on any magnetometer or calibration change
 - use Kalman filter scheme to update stored mag bias parameters using all available bias estimates for that sensor

Co-authored-by: Paul Riseborough <gncsolns@gmail.com>
2021-01-07 09:54:13 -05:00
Matthias Grob
537ee5b19b FlightTaskOrbit: smooth yaw like in missions 2021-01-07 13:31:05 +01:00
Matthias Grob
44606ca872 FlightTaskOrbit: further simplify circling yaw setpoint calculation
The whole angle adding and pi wrap was just necessary because the
correct atan2 arguments were never completely thought through.
2021-01-07 13:31:05 +01:00
Matthias Grob
f435bea57c state_machine_helper: orbit failsafe just with data link loss
RC is like the comment says not required.
2021-01-07 13:31:05 +01:00
Matthias Grob
6b8fa417e1 SlewRate: Add SlewRateYaw handling [-pi,pi] wraps 2021-01-07 13:31:05 +01:00
bresch
c212975abe rng height: reset to baro using common logic
The failsafe from rng height to baro height should occur after a reset
to baro triggered by the controlHeightSensorTimeouts function and not in
the fusion selector.

Until now, the EKF was fusing baro measurements between rng updates if
the range finder ODR was slower than the EKF update rate. This is not
the case anymore as the height reset occurs after 5 seconds.

The unit test has been extended to show this behavior.
2021-01-07 10:07:57 +01:00
Daniel Agar
6c9072720e
invensense/icm42688p: use full 20 bit data, increase ODR, disable all filters 2021-01-06 17:03:39 -05:00
Jaeyoung-Lim
d2b0f63e1f Handle offboard mode with acceleration setpoints
The case when acceleration setpoints were being passed in offboard mode was triggering control_climbrate_mode. This prevented the vehicle from taking off, since it made the vehicle skip the rampup phase of the takeoff
This commit fixes this by handling the case properly
2021-01-06 20:38:18 +01:00
garfieldG
3fb8f5df62
drivers/lsm303agr: fixed bug incorrectly assembling signed 16 bit integer from bytes 2021-01-05 21:37:08 -05:00
PX4 BuildBot
01e3f0d586 Update submodule matrix to latest Tue Jan 5 12:40:51 UTC 2021
- matrix in PX4/Firmware (fd97e28019fa9c665d9b3c6995098dd51b4ab022): https://github/commit/15e54ceda176f05e1ae38e71692d15cafb9e3a62
    - matrix current upstream: https://github/commit/054f8b12f4da79767df6e05bb1d2cc8d679b99f3
    - Changes: https://github/compare/15e54ceda176f05e1ae38e71692d15cafb9e3a62...054f8b12f4da79767df6e05bb1d2cc8d679b99f3

    054f8b1 2021-01-04 Julian Kent - Use a single inverse implementation for a single matrix size
2021-01-05 19:24:42 -05:00
PX4 BuildBot
ff82911d86 Update submodule ecl to latest Tue Jan 5 12:40:47 UTC 2021
- ecl in PX4/Firmware (824f78466ac4e32aecd6bda785e95eb348e1b31e): https://github/commit/78ce46f00777f07d24c31bdc5e2edb203be2c0f4
    - ecl current upstream: https://github/commit/03fed323ab950125114eb34309d3a79119e572ee
    - Changes: https://github/compare/78ce46f00777f07d24c31bdc5e2edb203be2c0f4...03fed323ab950125114eb34309d3a79119e572ee

    03fed32 2021-01-05 Paul Riseborough - EKF: Fix formatting
31fca9c 2021-01-05 Paul Riseborough - EKF: Update GPS loss message
c65cf13 2020-12-15 Paul Riseborough - EKF; Treat combined sideslip and airspeed as a horizontal aiding source
211c84c 2021-01-04 bresch - Rng finder unit test: cover "un-stuck" logic
2021-01-05 19:23:25 -05:00
Paul Riseborough
64ed96bd95
ekf2: Correct airspeed used by EKF for calibration errors 2021-01-05 19:22:53 -05:00
Daniel Agar
b94e346488
Update submodule sitl_gazebo to latest Tue Jan 5 12:40:40 UTC 2021 (#16493)
- sitl_gazebo in PX4/Firmware (850d0bc588af79186286652af4c8293daafd2c4c): 054e0a1be6
    - sitl_gazebo current upstream: 44de4acc3f
    - Changes: 054e0a1be6...44de4acc3f

    44de4ac 2021-01-02 Lorenz Meier - Update README.md

Co-authored-by: PX4 BuildBot <bot@px4.io>
2021-01-05 19:34:11 +01:00
Paul Riseborough
03fed323ab EKF: Fix formatting 2021-01-05 21:08:28 +11:00
Paul Riseborough
31fca9c31d EKF: Update GPS loss message 2021-01-05 21:08:28 +11:00
Paul Riseborough
c65cf13bb8 EKF; Treat combined sideslip and airspeed as a horizontal aiding source 2021-01-05 21:08:28 +11:00
bresch
211c84c85b Rng finder unit test: cover "un-stuck" logic 2021-01-05 20:04:17 +11:00
Julian Kent
054f8b12f4 Use a single inverse implementation for a single matrix size 2021-01-05 09:02:09 +01:00
Silvan Fuhrer
850d0bc588 vtol_type: remvoe const from function declaration
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-04 15:32:00 +01:00
RomanBapst
0871f0f52d vtol: refactor of maximum pwm value settings for main and alternate motors
- main motors are the ones which are meant to be used as propulsion in fw mode
- alternate motors are the ones usually meant to be switched off in fw mode

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 15:32:00 +01:00
Daniel Agar
bc1e9f72f7 Jenkins hardware temporarily remove px4_fmu-v2 2021-01-04 09:30:47 -05:00
Silvan Fuhrer
92634e7549 RTL: during climb, set NAV_CMD_WAYPOINT for RW modes, NAV_CMD_LOITER_TO_ALT for FW
Do not use LOITER_TO_ALT for rotary wing mode as it would then always climb to
at least MIS_LTRMIN_ALT, even if current clib altitude is below
(e.g. RTL immediately after take off)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-04 11:58:16 +01:00
Silvan Fuhrer
0b86c11c66 FW POS: remove setting of curr_sp to LOITER if next wp invalid
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-04 11:58:16 +01:00
Silvan Fuhrer
55a1d090a1 RTL: use NAV_CMD_LOITER_TO_ALT for Climb state
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-04 11:58:16 +01:00
RomanBapst
68f27ba7b7 navigator: deactivate line following after backt-ransition and before landing
- especially when there are strong winds it's better to just go straight
to the landing point instead of trying to follow the planned path

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
b63f756745 navigator: don't execute land pattern if vtol in rotary wing mode
- if vtol and in rotary wing mode then don't execute the mission landing
because it's designed to be flow as a fixed wing
- if vtol and in rotary wing mode and mission land is available then fly directly
to landing point and don't go home!

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
6c3f413379 mission: reset work_item_type during mission inactivation
- this fixes a race condition which happens when an RTL is triggered
during the final approach of a mission landing. In that case the mission inactive
method is never called.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
b63f202b3c various fixed for bugs encountered during testing
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
cfb3cdc82f rtl: use math namespace
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
94d3ab28ee rtl: fixed computation of return altitude when mission landing is available
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
12875f7869 mission: when land start marker present, look for loiter to altitude item
instead of using the previous waypoint as landing target
- the previous waypoint could be miles away

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
e0c394a00b mission: fixed bug in computation of landing altitude
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
a4a03e86da mission: be more intelligent about saying that we are on a mission landing
- previously the decision of being on a landing pattern was taken by just
looking at the current mission index. However, even if the current mission
index indicates a landing pattern the vehicle could be at an arbitrary location, far
from being established on the pattern.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
29c3ce6d5d reworked RTL cone implementation
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
dad5ce1e41 rtl: set proper acceptance radius for move_to_land item
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
6ff95ae645 RTL: implement proper RTL sequence for VTOL
- descend to RTL descend altitude
- transition
- move to land waypoint
- loiter and then land

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
197a21a22e rtl: for fixed wing (also vtol) make the descend state of RTL use type
NAV_CMD_LOITER_TO_ALT

- this allows vtol to track the loiter circle during the transition instead
of trying to fly to the landing position

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
bb2826ad27 rtl: for vtol first desend down to RTL descend altitude before doing a transition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
e81d5daa66 rtl: if very close to home then do not descend if higher than RTL_DESCEND_ALT
before reaching home

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00