Commit Graph

2313 Commits

Author SHA1 Message Date
baumanta 200d905b63 delete ROTATION_YAW_293_PITCH_68_ROLL_90 as usage implies it is the same as ROTATION_ROLL_90_PITCH_68_YAW_293 2020-05-01 21:00:55 -04:00
baumanta 38a6304d53 cleanup unneccessary complicated formulations 2020-05-01 21:00:55 -04:00
baumanta c758da2391 add test for rotations, add new rotations, fix old rotations 2020-05-01 21:00:55 -04:00
baumanta c37424aff2 sort enum by mavlink MAV_SENSOR_ORIENTATION 2020-05-01 21:00:55 -04:00
Daniel Agar 0c8dcf94bc drivers/pwm_out: cleanup for multi-platform use 2020-05-01 20:53:35 -04:00
PX4 BuildBot c5341da813 Update submodule ecl to latest Fri May 1 00:39:52 UTC 2020
- ecl in PX4/Firmware (838a470e922076d18ad67a580b9cbab65e8e1f14): https://github.com/PX4/ecl/commit/8b6d665a1331f94091caf2f262e09d508eb8975c
    - ecl current upstream: https://github.com/PX4/ecl/commit/cda74868976d0f806d821960e71f58d0b2c40051
    - Changes: https://github.com/PX4/ecl/compare/8b6d665a1331f94091caf2f262e09d508eb8975c...cda74868976d0f806d821960e71f58d0b2c40051

    cda7486 2020-04-30 Paul Riseborough - EKF: Prevent yaw reset to GPS caused by loss of GPS data (#805)
2020-04-30 21:24:33 -04:00
Matthias Grob 81e576b63a rotation conversion: deconfuse roll 90 yaw 90 2020-04-29 10:12:50 +02:00
baumanta 48cf38d623 support mag power compensation with battery_status instance 1 2020-04-28 08:36:44 +02:00
baumanta 503bd15b82 change python script to calculate right params 2020-04-28 08:36:44 +02:00
PX4 BuildBot 97bdfd9cec Update submodule ecl to latest Mon Apr 27 12:39:40 UTC 2020
- ecl in PX4/Firmware (27232514fcaf04924ecb405e144615c23ac6e2e0): https://github.com/PX4/ecl/commit/8a9d961f0d7b0cf6371ab1fcd6d0d2ccb581d3d1
    - ecl current upstream: https://github.com/PX4/ecl/commit/8b6d665a1331f94091caf2f262e09d508eb8975c
    - Changes: https://github.com/PX4/ecl/compare/8a9d961f0d7b0cf6371ab1fcd6d0d2ccb581d3d1...8b6d665a1331f94091caf2f262e09d508eb8975c

    8b6d665 2020-04-26 kamilritz - Avoid subtraction of two uint
70d65ea 2020-04-16 kamilritz - Test:Increase GPS jump need for rejection
c19f40e 2020-04-15 Kamil Ritz - Add reset position test for GPS and VISION
78a6b9f 2020-04-15 Kamil Ritz - SensorSimulator: Fix GPS horizontal position step
050298f 2020-04-08 Kamil Ritz - Improve matrix library usage
5749273 2020-04-08 Kamil Ritz - refactor resetPosition
2020-04-27 10:19:22 -04:00
Daniel Agar cc62a52553 PX4Rangerfinder: delete unused CDev 2020-04-26 22:36:46 -04:00
Daniel Agar 3832214145 PX4Accelerometer/PX4Gyroscope: fix calibration offset for integrated FIFO case
This is a quick follow up fix to to a bug introduced by #14752. In the case of FIFO data (new IMU drivers) the calibration offset wasn't being applied correctly to the result of integrating the FIFO samples.

This slipped through basic sanity testing (simple bench testing, the test rack, and SITL CI) due to the calibration offsets being zeroed.
2020-04-26 13:24:51 -04:00
Daniel Agar 37d5d1b4d2 PX4Accelerometer/PX4Gyroscope: integrated data avoid loss of numerical precision 2020-04-26 14:28:50 +02:00
Daniel Agar 31f3a21849 update ecl/EKF with improved covariance prediction stability and change default IMU integration period 4000 us -> 2500 us
- bring in PX4/ecl#795 "EKF: Improve covariance prediction stability"
    - the ecl/EKF filter update period has changed from 8 ms to 10 ms
 - change default integration period 4000 us -> 2500 us (aligns with new EKF filter update period)
2020-04-23 13:55:34 -04:00
Mathieu Bresciani be2bb4a479 FlightTask: Fix ekf2 reset race condition during task switch (#14692)
* FlightTask: Fix ekf2 reset race condition during task switch

During a loss of GPS data when using GPS as primary height source,
the height is reset to baro and the local position gets invalid at the
same time. This triggers a switch to altitude flight task and a setpoint
reset.
This combination of events had the effect to ignore the height reset,
the large sudden height error could create an abrupt change of altitude
or even a crash.
The ekf2 reset is now done at the beginning of each update call.
2020-04-22 13:18:35 +02:00
Jin Chengde e82880d6d7 add new rotation (#14512)
* add new rotation  ROLL_270_YAW_180

fix compile error

fix rotation

modify roatation

* modify enum to 41
2020-04-22 09:03:55 +02:00
Matthias Grob 809b45eac8 FlightTasks: do not adjust tilt limit of the position control
Adjusting the tilt limit can lead to diverging position control
and should only be used by setting a sanity limit for the controller
and not to adjust during the descent phase of a Land or RTL.
Otherwise it leads to flyaways in important failsafe modes when
there's stronger disturbance e.g. wind.
2020-04-21 09:35:52 +02:00
Matthias Grob 630af7fb58 FlightTaskOffboard: fix header comment 2020-04-16 14:38:32 -04:00
mcsauder 6548fde024 Whitespace cleanup to quiet new blank line at EOF git hook. 2020-04-15 23:00:39 -04:00
Beat Küng 0c5fbf5954 fix param_translation: set address to 0 only on NuttX
On Linux it can be non-zero.
2020-04-14 10:16:01 -04:00
Daniel Agar 746b3124ab Update submodule matrix to latest Wed Apr 8 12:39:43 UTC 2020
- matrix in PX4/Firmware (222e0636c4b53ea18013f2bf0d35a798fab6ae76): https://github.com/PX4/Matrix/commit/a32892926c69ea0bad031fd9d7bfc915cc5e9b68
    - matrix current upstream: https://github.com/PX4/Matrix/commit/d613055462bcbeacfd188cbd53de56c1dbc7b94d
    - Changes: https://github.com/PX4/Matrix/compare/a32892926c69ea0bad031fd9d7bfc915cc5e9b68...d613055462bcbeacfd188cbd53de56c1dbc7b94d

d613055 2020-04-06 kamilritz - Add more assignment operators for slices
976ada4 2020-03-21 Matthias Grob - Matrix: min max comments and test style
fa7153e 2020-03-21 Matthias Grob - Matrix: omit min max nan case with same result
2020-04-08 16:25:00 -04:00
Daniel Agar cf37be8c44 ekf2 handle accelerometer clipping
- track clipping per IMU axis and pass through to ecl/EKF
 - update ecl/EKF to include delta velocity clipping changes (PX4/ecl#663)
2020-04-07 20:11:08 -04:00
Julian Oes 5927bb3635 battery: add requirements to ESCs as battery 2020-04-06 15:56:54 +02:00
Julian Oes f650b91718 battery: check source param inside battery lib
This moves the handling of the BAT%d_SOURCE param inside of the battery
library. Users of the library now pass the source instead of the flag
whether to publish. The battery library then checks if the source is
selected using the param and publishes accordingly.

Since we removed the strange system_source flag, we now need to look at
all batteries in commander.
For current estimation - I think - it makes sense to sum them up.
2020-04-06 15:56:54 +02:00
Julian Oes dcd34ed08d battery: add ESCs source, remove wrong unit 2020-04-06 15:56:54 +02:00
Julian Kent 9404b19906 Fix bezier scaling 2020-04-06 09:02:12 +02:00
Beat Küng dfb5b5d7d9 fix param import transition
* fix param import transition for MC_DTERM_CUTOFF

The previous implementation did not work, as there was a check for
param_find_no_notification() returning PARAM_INVALID for IMU_DGYRO_CUTOFF,
and therefore would not call param_modify_on_import().

This moves param_modify_on_import() before the check and makes it modify
the bson node directly.

* parameters: fix param import transition when testing is enabled

BUILD_TESTING is used for unit test builds, PX4_TESTING is used to enable additional test material within PX4

Co-authored-by: Daniel Agar <daniel@agar.ca>
2020-04-02 18:41:00 -04:00
Matthias Grob 2baa5ca4d7 minor build fixes and ignored warnings for GCC 9 (#14159)
- px4io task_main_trampoline add return
 - iridiumsbd main_loop_helper add return
 - drivers/uavcan ignore Wcast-align, Wdeprecated-copy, and Waddress-of-packed-member for now
 - flashparams ignore Wvla-larger-than
 - test_time fix printf type
2020-04-02 10:24:36 -04:00
Roman Bapst 47f0e91076 Apply suggestions from code review
Co-Authored-By: Mathieu Bresciani <brescianimathieu@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst a916cc2a26 better comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst baf5e86f81 transition flighttask: don't control yaw and altitude during trans
Signed-off-by: RomanBapst <bapstroman@gmail.com>

# Conflicts:
#	src/lib/flight_tasks/tasks/Transition/FlightTaskTransition.cpp
2020-04-02 13:45:52 +03:00
Daniel Agar 02f4ad61ec I2C/SPI require device type in constructor 2020-04-01 12:24:22 -04:00
Daniel Agar 04bf9afd1b CDev delete unused pub_blocked 2020-04-01 11:23:26 -04:00
Daniel Agar 09ba9d62eb PX4Magnetometer: add external() getter and default temperature to NAN 2020-04-01 10:07:08 -04:00
bresch 3f15ccd2dd Update ECL
Add "Fly without magnetometer" and some interface changes
2020-04-01 11:47:39 +02:00
Daniel Agar 2b82b471c1 sensor_accel_fifo increase to 32 samples 2020-03-31 13:26:50 -04:00
Matthias Grob 49d22edc33 battery: cell voltage fill refactor 2020-03-31 09:14:50 +02:00
Timothy Scott 14a61a6695 Fixed reporting of battery voltages in uORB 2020-03-31 09:14:50 +02:00
Matthias Grob f6ceb08522 FlightTaskTransition: don't overwrite setpoints with estimates
Previously acceleration setpoints were not executed and just used
to pass a possible rough initialization value for the next task. Now
they get executed by the multicopter controller and hence
overwriting them with rough estimates doesn't work anymore.
2020-03-30 09:58:39 +02:00
Matthias Grob 91057fe024 FlighTasks: remove FlightTaskSport
This mode was just kept as an example after
its usage in a single case. It's basically untested
and doesn't make much sense anymore since it's
incompatible with the jerk limited trajectory
implementations. It's implementation only switched
hte configuration parameter of the velocity resulting
from maximum stick deflection to be
MPC_XY_VEL_MAX instead of MPC_VEL_MANUAL.
This is according to todays understanding undesired
because when hitting that limit the position
controller has no room for corrections anymore.

Also it saves some flash space on omnibus to remove
the task at this point and makes romm for the
acceleration feed-forward.
2020-03-30 09:58:39 +02:00
Matthias Grob b79b095ce7 FlightTasks: adapt to acceleration based control 2020-03-30 09:58:39 +02:00
Beat Küng e5dd2e7a19 mag_compensation.py: some minor fixes + indentation 2020-03-27 11:07:50 +01:00
Dusan Zivkovic 26a8707298 flight task auto: set acceptance radius when setting loiter as a responce to invalid setpoint 2020-03-26 21:02:20 +01:00
bresch dc38930bb2 AutoSmoothVel: desynchronize XY from Z for small changes in speed
This fixes the issue that makes the drone slow-down even in straight
lines due to the Z component being constrained to a really small value
2020-03-26 08:31:09 +01:00
baumanta 7fd77fedaa add python script for offline param identification 2020-03-26 08:00:30 +01:00
baumanta 22ceeccc26 add library for current- or thrust-based mag compensation 2020-03-26 08:00:30 +01:00
Daniel Agar f4e2cd36d4 add new invensense/mpu6500 driver for airmind mindpx 2020-03-25 01:05:38 -04:00
Daniel Agar f5fe50f839 invensense/icm20608g driver minor improvements
- interupt pin set active low and latch
 - relax retry timeout if configure failed
 - improve configured empty rate (sample rate) rounding
 - fix RegisterCheck
 - check FIFO count as part of full transfer and reset or adjust timing if necessary
 - rename DRV_IMU_DEVTYPE_ICM20608 -> DRV_IMU_DEVTYPE_ICM20608G
2020-03-25 01:05:38 -04:00
Beat Küng 6ad5357d1a SPI+I2C: remove unused defines and printf's 2020-03-24 09:46:20 -04:00
JacobCrabill 1e5784609f UAVCAN Sensors: Improve error handling
Also add new 'generic' device types for UAVCAN sensors

Other misc. cleanup and style changes.
2020-03-21 12:39:29 -04:00