2364 Commits

Author SHA1 Message Date
Matthias Grob
9daff24e79 FlightTasks: move stick handling into library 2020-07-14 18:07:09 +02:00
Matthias Grob
624d8a58e9 FlightTaskOrbit: correct acceleration feed-forward
The acceleration setpoint gets implicitly inherited from the altitude
flight task since #14212. This feed-forward adds an unwanted
acceleration when the right stick is deflected. Instead I'm using it
to command the expected centripetal acceleration when flying
in a circle for better orbit tracking.
2020-07-14 09:02:38 +02:00
David Jablonski
589aff7e0d Orbit: Add RC controlled yaw mode
For the RC controlled yaw behaviour, we do a yaw setpoint according to
the stick expo. The uncontrolled yaw behaviour behaves undefined.
Switching between yaw behaviours makes the drone stand still for a
moment, which probably can be improved.
2020-07-13 20:26:13 +02:00
David Jablonski
21f2e9b654 Orbit: Adjust yaw setpoint on circle approach 2020-07-13 20:26:13 +02:00
David Jablonski
037c6f592f Orbit: add more yaw behaviours 2020-07-13 20:26:13 +02:00
Matthias Grob
03735f12a2 FlightTask: correct activate() doxygen comment 2020-07-04 12:29:10 +02:00
PX4 BuildBot
19d2de0726 Update submodule matrix to latest Tue Jun 30 14:40:13 UTC 2020
- matrix in PX4/Firmware (a1043f6ce068cc4d039d6808ef98fd8c3f379582): f529358e9a
    - matrix current upstream: 9a30828a0a
    - Changes: f529358e9a...9a30828a0a

    9a30828 2020-06-30 Julian Kent - Add explicit matrix + scalar test
f3cf615 2020-06-30 Julian Kent - Do += -= and scalar *= /= in place
2020-06-30 11:11:45 -04:00
PX4 BuildBot
38588f0c37 Update submodule ecl to latest Tue Jun 30 00:38:47 UTC 2020
- ecl in PX4/Firmware (bd4d3f2b9929271b2616d2e1d6952059a7e8bc72): e4b44f704b
    - ecl current upstream: 5356077a32
    - Changes: e4b44f704b...5356077a32

    5356077 2020-06-21 kamilritz - Make flow_innov/-var a matrix Vector2f
c2801eb 2020-06-21 kamilritz - Add const modifier and increase matrix library usage
d9afc2f 2020-06-21 kamilritz - Remove repeated division by same value
d16b43a 2020-06-21 kamilritz - Get rid of non functional piece of code
c3653e6 2020-06-21 kamilritz - Add const modifier
48f0eb1 2020-06-21 kamilritz - Remove uninformative comments
4a69b41 2020-06-21 kamilritz - Increase matrix library usage even more
630be60 2020-06-21 kamilritz - Increase matrix library usage
22274b1 2020-06-21 kamilritz - Add const modifier
61c139e 2020-06-21 kamilritz - Remove unused variable
afd4f3f 2020-06-21 kamilritz - Fix typo
a3706fd 2020-06-21 kamilritz - Make relative wind computation more compact
b8f9376 2020-06-21 kamilritz - Make mag_innov/-var a Matrix::Vector3f
0ea7cd8 2020-06-25 Kamil Ritz - Attempt to fix CI firmware build test
2927132 2020-06-25 Daniel Agar - clang-format set BreakBeforeBraces to Linux style
b96c62e 2020-06-25 sevenbill - Optionalized build dependency on git
794e6ec 2020-06-25 Bill Morris - Enforce tabs via editorcofig
2020-06-29 21:50:55 -04:00
PX4 BuildBot
b463a2f0d5 Update submodule matrix to latest Sun Jun 28 12:38:27 UTC 2020
- matrix in PX4/Firmware (2337b7e2f7b4eecddbb9103ab7672fac2c741fc5): 674bd99f3b
    - matrix current upstream: f529358e9a
    - Changes: 674bd99f3b...f529358e9a

    f529358 2020-06-27 kamilritz - Add missing const modifier
2020-06-28 19:55:06 -04:00
bresch
1761ef3952 FlightTaskAuto: Update prev and next waypoint depending on validity
This fixes the corner case where a NAV_DELAY command changes the
validity of the next WP but not the rest of the triplet. The logic in
FlightTask was ignoring this change because the check was only based on
WP position change.
2020-06-26 09:48:22 -04:00
PX4 BuildBot
6dd0932158 Update submodule ecl to latest Wed Jun 24 00:39:40 UTC 2020
- ecl in PX4/Firmware (fff83fdee69789ec9da259b564bbfe67585a4b5f): a8bb8ea99f
    - ecl current upstream: e4b44f704b
    - Changes: a8bb8ea99f...e4b44f704b

    e4b44f7 2020-06-23 PX4 BuildBot - Update geo_lookup WMM  to latest Tue Jun 23 14:15:04 UTC 2020
4b746a3 2020-06-23 bresch - GPS Yaw: add consts and remove fusion starting message
2bafe9d 2020-06-22 bresch - GPS Yaw: wait to fuse at yaw at least once before declaring it faulty
51cd63d 2020-06-22 bresch - GPS Yaw: fall back to other yaw aiding source in case of bad data
fe2a9d3 2020-06-22 bresch - GPS Yaw: move isfinite checks in control.cpp
3c6790f 2020-06-22 bresch - GPS Yaw: Always reset Yaw when GPS Yaw fusion is starting
ff8b5ec 2020-06-21 kamilritz - Extract general functions into utils
fda30d8 2020-06-15 Daniel Agar - geo_lookup: expand latitude to +-80 degrees
109eca5 2020-06-15 Daniel Agar - geo_lookup: create simple python script to update tables
41b9e4f 2020-06-15 Daniel Agar - geo_lookup: move tables to separate file
2020-06-24 08:29:20 +02:00
Beat Küng
55d06241b3 fix unit tests: do not stub pthread_cond_wait
and fix the tests instead.
Some unit tests depend on pthread_cond_wait to work as expected.
2020-06-23 11:53:55 -04:00
Daniel Agar
22daa26955 msgs/sensor_mag: remove unused raw, add timestamp_asmple, shrink error count
- move mpu9250 sensitivity handling back to driver (this isn't common)
2020-06-22 10:11:22 -04:00
Daniel Agar
56c86e77bd replace FIFOSample -> sensor_accel_fifo/sensor_gyro_fifo 2020-06-18 20:49:15 -04:00
Daniel Agar
87250ca47f move ecl L1, TECS, and data validator to PX4/Firmware 2020-06-18 19:26:30 -04:00
Daniel Agar
f55ed0992c
accel and gyro calibration refactor and cleanup
- remove all remaining IOCTLs for accel and gyro and handle all calibration entirely in sensors module with parameters
 - sensor_accel and sensor_gyro are now always raw sensor data
 - calibration procedures no longer need to first clear existing values before starting
 - temperature calibration (TC) remove all scale (SCL) parameters
    - gyro and baro scale are completely unused
    - regular accel calibration scale can be used (CAL_ACC*_xSCALE) instead of TC scale
2020-06-17 22:50:09 -04:00
Matthias Grob
bcd771d832 Update ecl and adapt to new AlphaFilter location 2020-06-17 09:29:35 -04:00
Daniel Agar
e819f99064 new Bosch BMI055 IMU driver using FIFOs and DRDY
- accel & gyro FIFOs enabled
 - FIFO watermark on data ready interrupt
 - sensor side filtering completely disabled
 - gyro now respects `IMU_GYRO_RATEMAX` (up to 2 kHz)
 - saves a few % cpu (at default rate)
2020-06-15 10:19:14 -04:00
Matthias Grob
1efc8c27eb FlightTaskAuto: check yawspeed saturation before constraining
to avoid possible numerical float equality issues.
2020-06-15 10:40:48 +02:00
bresch
12449c23c5 FlightTaskAuto: add missing wrap_pi and do not override yaw_sp_aligned 2020-06-15 10:40:48 +02:00
bresch
7a401e5ca3 FlightTaskAuto: Create artificial yaw speed sp for feedforward 2020-06-15 10:40:48 +02:00
PX4 BuildBot
eee87cd605 Update submodule ecl to latest Mon Jun 15 00:38:18 UTC 2020
- ecl in PX4/Firmware (adc733932566f0198a8892c3cebe9e5c8345e391): 38cbd1a182
    - ecl current upstream: e835bc34c4
    - Changes: 38cbd1a182...e835bc34c4

    e835bc3 2020-06-06 Kamil Ritz - remove inline modifier
74780aa 2020-06-06 Kamil Ritz - Refactor gps fusion commencing
2020-06-14 22:14:14 -04:00
PX4 BuildBot
f89dac03f3 Update submodule matrix to latest Sun Jun 14 12:39:39 UTC 2020
- matrix in PX4/Firmware (18f14ebefad29873ddeef6396c7c3a728c90b996): 2bee0d078c
    - matrix current upstream: 674bd99f3b
    - Changes: 2bee0d078c...674bd99f3b

    674bd99 2020-06-11 kamilritz - Add operator* and operator/ for slice with type
38b3acc 2020-06-11 Nicolas MARTIN - fix conjugate_inversed comment
2020-06-14 11:18:00 -04:00
Daniel Agar
13e34b32e6 new Bosch BMI088 IMU driver using FIFOs and DRDY 2020-06-11 12:25:13 -04:00
PX4 BuildBot
13d983d305 Update submodule ecl to latest Tue Jun 9 20:35:44 UTC 2020
- ecl in PX4/Firmware (af11fa456d7282e324d662a452c71ae85ee59d9b): b3dc06d0cb
    - ecl current upstream: 38cbd1a182
    - Changes: b3dc06d0cb...38cbd1a182

    38cbd1a 2020-06-09 Matthias Grob - AlphaFilter: prevent setParameters division by zero
b7d54b5 2020-06-04 RomanBapst - gps: fixed filter initialization bug around gps - do not gps reference altitude to zero in case gps checks pass before the filter initialized - reset the filtered gps position and position derivative filters in case we are in air or there is movement on the ground
8f533cb 2020-06-03 bresch - terrain_estimator: fix sensor aid selection
821e1fa 2020-06-03 bresch - terrain_estimator: add unit tests
aa96fa6 2020-06-03 bresch - Random style fixes in the code
5d6a72e 2020-06-03 bresch - sensor_simulator: add possibility to set GPS position rate
2020-06-09 17:21:49 -04:00
Matthias Grob
b607630ee7 battery_params: relax maximum for capacity thresholds 2020-06-05 09:55:24 -04:00
PX4 BuildBot
b5a5e8e45b Update submodule ecl to latest Fri Jun 5 00:39:52 UTC 2020
- ecl in PX4/Firmware (d4fcf77c546c31c4c0b813e5034c66581b3b2877): c91c78dcf6
    - ecl current upstream: b3dc06d0cb
    - Changes: c91c78dcf6...b3dc06d0cb

    b3dc06d 2020-05-25 Roman Bapst - Added height above ground source bitmask indicating which sensor is used
62e15cb 2020-06-03 bresch - sensor_simulator: set IMU rate to 200Hz as this is the new value used in the Firmware
6126c19 2020-06-03 bresch - sensor_simulator: update EKF at IMU rate
59183f7 2020-06-02 Paul Riseborough - EKF: Reduce EKF-GSF vulnerability to large yaw gyro bias errors (#831)
d0ddda8 2020-05-29 Matthias Grob - tecs: fix typo init(i)alized
86fc94b 2020-05-24 Kamil Ritz - Remove tilt align from position innovation check
b024cdd 2020-05-25 Mathieu Bresciani - unit test: check that the accel bias is only learned when observable (#827)
2020-06-04 21:15:59 -04:00
Daniel Agar
31fe7af454 selectively increase optimization -Os -> -O2
- targetted at modules/libraries that benefit without drastically
increasing flash usage
 - ignored on boards with CONSTRAINED_FLASH set
2020-06-04 20:59:52 -04:00
Beat Küng
5ce006dd8b SYS_HITL: reserve value -1 for external HITL 2020-06-04 20:58:40 -04:00
Daniel Agar
e34bdb4be9
move IMU integration out of drivers to sensors hub to handle accel/gyro sync
- IMU integration move from drivers (PX4Accelerometer/PX4Gyroscope) to sensors/vehicle_imu 
 - sensors: voted_sensors_update now consumes vehicle_imu
 - delete sensor_accel_integrated, sensor_gyro_integrated
 - merge sensor_accel_status/sensor_gyro_status into vehicle_imu_status
 - sensors status output minor improvements (ordering, whitespace, show selected sensor device id and instance)
2020-05-30 11:07:54 -04:00
Hamish Willee
14853539e3
CBRK_FLIGHTTERM: Does not affect takeoff failure safety detection (#14972)
* CBRK_FLIGHTTERM: Clarify does not affect takeoff failure safety detection

* FD_FAIL_P FD_FAIL_R - clarify apply on takeoff

* Improve param text

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2020-05-28 08:30:48 +02:00
Matthias Grob
d92e66863a mc_pos_control: migrate MPC_*_VEL_* parameter to acceleration scaling
Before #14212 the velocity control gains used in the multicopter
position controller were defined as a scale between velocity error in
one axis (or it's integral and derivative respectively) and the unit
thrust vector. The problem with this is that the normalization of the
unit thrust vector changes per vehicle or even vehicle configuration
as 0 and 100% thrust get a different physical response. That's why
the gains are now defined as scale between velocity error
(integral/derivative) and the output acceleration in m/s².
2020-05-26 14:44:41 +02:00
Matthias Grob
88c21337fa Make all battery sensor drivers report their sample interval
To make use of the time abstraction in the leaky integrator.
2020-05-25 11:04:24 +02:00
Matthias Grob
4dc9ca69ab battery: use AlphaFilter class
Replace the filtered value calculations with calls to the class.
This will allow time abstraction.
2020-05-25 11:04:24 +02:00
PX4 BuildBot
10d67efd13 Update submodule ecl to latest Sat May 23 12:39:43 UTC 2020
- ecl in PX4/Firmware (1d49243ee21930dc1c0ba1f08a4c03284c4713c1): 600240d95f
    - ecl current upstream: c91c78dcf6
    - Changes: 600240d95f...c91c78dcf6

    c91c78d 2020-05-21 Paul Riseborough - EKF: Allow reset of yaw to EKF-GSF later in flight
2020-05-23 13:18:36 -04:00
PX4 BuildBot
a4c77056f6 Update submodule ecl to latest Wed May 20 16:46:07 UTC 2020
- ecl in PX4/Firmware (73de85e258590461b6fe14668df8de1fc9c54cb7): 24f2e60b7e
    - ecl current upstream: 600240d95f
    - Changes: 24f2e60b7e...600240d95f

    600240d 2020-05-20 Daniel Agar - EKF: resetGpsAntYaw() fix double promotion
39c09b8 2020-05-19 kamilritz - add basic gps yaw fusion test
21f49c2 2020-05-16 Kamil Ritz - Use resetQuatStateYaw during gps yaw reset
7f21364 2020-05-20 Carl Olsson - EKF: use initial wind uncertainty with no airspeed sensor (#823)
bf78044 2020-05-20 kritz - EKF: fix initialization of local position validity 2 (#820)
716caa5 2020-05-19 kritz - Refactor position resets (#822)
37d9cef 2020-05-19 Mathieu Bresciani - ekf: disable xy accel bias learning before takeoff (#818)
9788c3b 2020-05-15 Mathieu Bresciani - ekf: split accel bias learning in independant xyz components (#817)
19bbea7 2020-05-14 Paul Riseborough - Fix GPS altitude not fused if GPS checks fail and GPS is primary height source (#813)
2020-05-20 15:48:27 -04:00
Matthias Grob
17d4fd064f FlightTaskManualAltitude: add an optional stick tilt input filter 2020-05-20 19:30:19 +02:00
Julian Oes
44be9d5568 controllib: fix implicit cast warn with clang 10 2020-05-19 09:58:43 -04:00
kritz
3897030c6f
Support odometry velocity in body and local frame (#14703)
* Update submodule ECL

* increase lower bound on EVV param
2020-05-13 12:43:02 +02:00
Daniel Agar
05886e053f mavlink_log_info: always print to console and merge with mavlink_and_console_log_info 2020-05-12 08:53:51 +02:00
PX4 BuildBot
b933557f56 Update submodule ecl to latest Tue May 12 00:39:54 UTC 2020
- ecl in PX4/Firmware (286bf4f0b911fcc040788117ea79c432f6a95a83): 97b437233e
    - ecl current upstream: 03191847f9
    - Changes: 97b437233e...03191847f9

    0319184 2020-05-11 kritz - Fix ev_pos_obs_var(1) entry (#809)
440383f 2020-05-09 Kamil Ritz - Increase matrix library usage and remove white line
2020-05-11 22:11:19 -04:00
PX4 BuildBot
49981627dd Update submodule ecl to latest Sun May 10 12:39:42 UTC 2020
- ecl in PX4/Firmware (43bf631832ab836534f2197c286c1fd380872625): 12835b999e
    - ecl current upstream: 97b437233e
    - Changes: 12835b999e...97b437233e

    97b4372 2020-05-08 bresch - ekf: remove unused function
26d4fbc 2020-05-08 bresch - EKF: reduce scope of variable and remove redeclaration of member
edc8a88 2020-05-08 bresch - yaw_fusion: remove useless initialization
75c49b2 2020-05-08 bresch - ekf_helper: fuse double if
0e3bf28 2020-05-08 bresch - EKFGSF_yaw: cleanup initialization of member variables
2020-05-10 11:51:31 -04:00
Samuel Garcin
b12a655c5b
Notch filter Direct Form I implementation that support dynamic change of frequencies
* New NotchFilter methods ahead of RPMFilter implementation.
 * Added Direct Form I implementation that support dynamic change of frequencies.
 * Added update method to update frequency on an existing filter.
 * Added setCoefficients method to easily and efficiently create clones of a filter.
 * LowSide, HighSide, Onnotch and array tests testing the applyDF1 method.
2020-05-08 12:00:27 -04:00
PX4 BuildBot
fa64c3862d Update submodule matrix to latest Thu May 7 00:38:16 UTC 2020
- matrix in PX4/Firmware (b14143229d5aa79e060c2bf65a2eb35f36b7a38c): d613055462
    - matrix current upstream: 2bee0d078c
    - Changes: d613055462...2bee0d078c

    2bee0d0 2020-05-06 Matthias Grob - Quaternion: refactor multiplication to matrix multiplication style
2020-05-06 22:27:07 -04:00
Daniel Agar
9963bb6c40 parameters: lock shutdown earlier in param_save_default()
- this ensures the parameter file is closed properly before shutdown
2020-05-06 13:53:54 -04:00
PX4 BuildBot
ce0e531d45 Update submodule ecl to latest Wed May 6 00:44:34 UTC 2020
- ecl in PX4/Firmware (476a51f32c96fe886edb70f7c7e0bf15f7ec67ad): cda7486897
    - ecl current upstream: 12835b999e
    - Changes: cda7486897...12835b999e

    12835b9 2020-05-01 Daniel Agar - cmake update CXX standard 11 -> 14
2020-05-05 23:31:23 -04:00
Daniel Agar
ca998c1822
IMU: parameterize IMU integration time (IMU_INTEG_RATE)
- default integration rate now 200 Hz (5000 us interval)
 - set update rate for all drivers and simulators using PX4Accelerometer/PX4Gyroscope
2020-05-05 20:34:09 -04:00
Daniel Agar
466b5db36f
uORB::Publication improvements and cleanup (#14784)
- create common uORB::PublicationBase
 - uORB::PublicationQueued types are now type aliases
 - ORB_PRIO use enum type everywhere to avoid accidental misuse
 - PX4Accelerometer/PX4Gyroscope/etc driver libs explicitly advertise on construction, unadvertise on destruction. This is a workaround for any potential issues that might appear when accel/gyro cdev and uORB indexing doesn't align.
2020-05-04 11:09:30 -04:00
rfu
8787780de4 some printf format and conversion fixes 2020-05-04 09:49:23 +02:00
rfu
90c3819df5 fxos8701cq + fxas21002c: add support for I2C 2020-05-04 09:49:23 +02:00