20600 Commits

Author SHA1 Message Date
Beat Küng
685be9b3d1 io pins: avoid using GPIO_GPIOx_OUTPUT, use timer_io_channels instead
The whole system now uses timer_io_channels, which will allow the redundant
GPIO_GPIOx_OUTPUT definitions to be removed.
2020-02-13 03:49:16 -08:00
Beat Küng
8020e82c1c MultirotorMixer: allow for longer mixer geometry names (16 instead of 8) 2020-02-13 03:49:16 -08:00
Beat Küng
73bd90ddd5 crazyflie: fix PWM channel ordering
Channels belonging to a certain timer were not all grouped together.
This is required by the .first_channel_index and .last_channel_index data
members.

We introduce a new mixer geometry to solve the problem.
2020-02-13 03:49:16 -08:00
bresch
17ab617877 ecl update: contains important fixes for accel bias instabilities 2020-02-12 22:34:17 +01:00
Daniel Agar
8cdbc4c593 px4iofirmware: add PX4IO_PERF define to completely disable perf counters 2020-02-10 09:40:39 +01:00
Daniel Agar
2015cc2b39 logger: restore buffer statistics update
- this was accidentally dropped during a rebase of #14050
2020-02-10 00:17:28 -05:00
Daniel Agar
8df22541ef
sensors: filter sample rate calculate with simple interval average instead of perf count
- the perf counter intervals aren't numerically stable over extended periods (https://github.com/PX4/Firmware/pull/14046)
2020-02-07 13:04:02 -05:00
Silvan Fuhrer
a3710fcdef VTOL: flight task auto: disable weather vane when not stationary
Use yawrate setpoint from weather vane only if velocity setpoint is small
(smaller than half the cruise velocity)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-02-07 16:46:29 +01:00
Silvan Fuhrer
98aee29ddc VTOL: Manual Pos Flight Task: do not use yawrate sp from weather vane if position isn't locked
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-02-07 16:46:29 +01:00
Silvan Fuhrer
9ba0d5b706 tiltrotor tilt support: fix thrust compensation constraining
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-02-07 16:43:44 +01:00
Silvan Fuhrer
4c9dba8692 VTOL type and tiltrotor: use math::constrain() for constraining
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-02-07 16:43:44 +01:00
Silvan Fuhrer
e3310796ce tiltrotor: limmit the adapted thrust for tilt to [0,1]
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-02-07 16:43:44 +01:00
Silvan Fuhrer
a26e914ef4 VTOL pusher/tilt support: addressed review comments:
- remove gloabl variable and instead give back forward_thrust from function
 - give back increased vertical thrust from fct thrust_compensation_for_tilt()

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-02-07 16:43:44 +01:00
Silvan Fuhrer
5ae4ca8ff1 VTOL: Make pusher assist generic to enable also for tiltrotor
-move pusher assist functionality into vtol_type class and adapt it to also
work for tiltrotor VTOLs (pitch rotors down to accelerate forward)
-for tiltrotor: compensate for lost lift due to tilt by increasing the throttle
-enable pusher / tiltassist also in altitude mode

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-02-07 16:43:44 +01:00
bresch
7ca13a67b3 ZeroOrderHoverThrustEstimatorTest: add hover thrust jump test case
This is done to test the recovery function of the estimator in case
of divergence or sudden extreme hover thrust change.

Also specify seed of random generator
2020-02-07 11:52:52 +01:00
bresch
e15e94b00a HoverThrustEstimator: Add convergence tests
With noisy accel and thrust in hover, climb and descent conditions.
2020-02-07 11:52:52 +01:00
bresch
0f1c7590e9 HoverThrustEstimator: add a new single state estimator
with measurement noise auto-tuning

The purpose of this estimator is to improve land detection and vertical
velocity feedforward

Recovery strategy:
This is required when the setpoint suddenly changes in air or that the
EKF is diverging. A lowpassed test ratio is used as a trigger for the recovery logic
Also, a lowpassed residual is used to estimate the steady-state value
and remove it when estimating the accel noise to avoid increasing the
accel noise when the redisual is caused by an offset.
2020-02-07 11:52:52 +01:00
CarlOlsson
a61f1647ad replay: remove GPS relative timestamps
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2020-02-07 08:19:22 +01:00
Beat Küng
b399698306 ist8310: remove calibration code
- it does nothing useful
- increases boot time by 2 seconds on pixhawk 4 due to a poll timeout:
IST8310 on I2C bus 3 at 0x0e (bus: 100 KHz, max: 400 KHz)
WARN  [ist8310] ERROR: TIMEOUT 2
2020-02-06 12:39:39 -05:00
Daniel Agar
1aa514a8ea
Update submodule ecl to latest Wed Feb 5 12:39:46 UTC 2020
- ecl in PX4/Firmware (ad3865207f22e26534e04cde8825a07eda4399b5): a3e1eb9d50
    - ecl current upstream: ed260c4f1d
    - Changes: a3e1eb9d50...ed260c4f1d

ed260c4 2020-02-03 Daniel Agar - validation: remove unused vibration metric
e52e2b8 2020-02-01 kritz - Sensor Replay (#717)
da752c9 2020-01-28 kamilritz - Hot flow fusion fix
ee859e0 2020-01-28 kritz - Robustify timestamp checks (#729)
f20726d 2020-01-23 kamilritz - Expand auto-format coverage and tiny style changes
fbdd75d 2020-01-27 kritz - Update CONTRIBUTING.md
5d38b73 2020-01-24 kamilritz - Update description of Firmware build tests
e3af91c 2020-01-24 bresch - Ekf: use helper functions to centralize the checks of horizontal aiding (gps, flow, ev_pos, ev_vel)
2020-02-05 14:24:38 -05:00
CarlOlsson
37db7d3bba ekf2: define max number of range finders seperate from max number of mutli uORB topics
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2020-02-05 08:03:23 +01:00
Daniel Duecker
36f836be79
add support for unmanned underwater vehicles (#14079)
* add support for unmanned underwater vehicles:
* airframe uuv_generic + uuv_hippocammpus including mav_type = 12 for submarines
* mixer for UUVs with X-shaped thruster setup similar to quadcopter
* add module  uuv_att_control for underwater robot attitude control
* add rc.uuv_defaults/apps for autostarting e.g. ekf2 and uuv_att_control app
2020-02-04 23:24:37 -05:00
Daniel Agar
36c6e36b9d sensors: refactor common corrections and rotation code 2020-02-04 09:44:40 -05:00
Hamish Willee
ca96b6b0ea CBRK_AIRSPD_CHK: Doc driver not started 2020-02-04 09:22:18 +01:00
bresch
c80593a144 FlightTaskManualAltitude: Rename _min_speed_down -> _max_speed_down as it is the maximum allowed downward speed 2020-02-03 18:05:17 +01:00
bresch
c0d1aa1654 FlightTaskManualAltitude: Follow altitude limit given by the estimator 2020-02-03 18:05:17 +01:00
Daniel Agar
36b37189ba
drivers/rpm/pcf8583: minor cleanup
- split out header and main
 - move to ModuleParams
 - add copyright header to all new files
 - don't store unnecessary state
2020-02-03 10:01:40 -05:00
Nico van Duijn
7778cbd463
Mavlink: Add MAV_x_RADIO_CTL parameter to disable RADIO_STATUS flow control
* Add param for software flow ctl on 3DR radios
* Dont reset telemetry type on radio timeout
* Treat 3DR radio as generic link type
* Rename 3DR to SiK radio
2020-02-03 09:49:47 -05:00
SalimTerryLi
9612e40464
purge drivers/linux_sbus
- rc_input now provides reliable parsing for SBUS on Linux platform. linux_sbus can be fully removed.
2020-02-03 08:40:27 -05:00
SalimTerryLi
20ad3a0ded fix batt_smbus build error
fix `error: variable-sized object ‘lifetime_block_one’ may not be initialized`
2020-02-03 08:22:43 +01:00
Daniel Agar
3dc23afb3e fw_pos_control_l1: move to px4::params 2020-02-02 21:04:21 -05:00
SalimTerryLi
e0abe7090e
SBUS on Linux: replace termios with termios2 and add UNKNOWN UART WQ 2020-02-02 14:06:27 -05:00
Roman Dvořák
c8a58c5c9d
drivers: add PCF8583 RPM sensor (#14018) 2020-02-02 12:10:20 -05:00
Nicolas Martin
cfa74b9106 logger: choose logged instances by logger_topics file
new versions of logger does not allow to log multiple instances of a topic when using 'logger_topics.txt'

This commit restores the default behavior (log all instances of a topic) and ad the option to specify an instance to log
2020-01-31 09:43:29 +01:00
Daniel Agar
035c3e6f6a commander params fix whitespace 2020-01-30 22:31:50 -05:00
Hamish Willee
1acb947124 commander_params: subedit com_rc_override 2020-01-30 19:30:17 -05:00
Daniel Agar
e49112d406 invensense/icm20608-g: delete unnecessary perf counters 2020-01-30 13:07:44 -05:00
Daniel Agar
aad27c4f94 invensense/icm20602: use watermarak interrupt instead of data ready and remove unnecessary perf counters 2020-01-30 13:07:44 -05:00
Daniel Agar
ca4b8e4e76 invensense/mpu9250: delete redundant interval perf counter 2020-01-30 13:07:44 -05:00
Daniel Agar
6fe35d522a new icm20689 driver using FIFOs and raw sampling (8 kHz gyro, 4 kHz accel) 2020-01-30 13:07:44 -05:00
Daniel Agar
3910028fc5 new mpu6000 driver using FIFOs and raw sampling (8 kHz gyro, 1 kHz accel) 2020-01-30 13:07:44 -05:00
Hamish Willee
9886b11f99 EKF params - clarify body frame origin/orientation 2020-01-30 07:29:11 -05:00
Matthias Grob
69af6386b3 mc_pos_control_main: remove obsolete input setpoint assignments
These assignments were temporary for correct logging of the input
setpoint which now properly also comes out of the controller again.

This is reverting the hotfix from:
dee8d200d8bb42cd964065f9a6506e3c4a901f10
2020-01-30 07:28:18 -05:00
Matthias Grob
b75c1308f9 PositionControl: replace interfacemapping checks
Removing the skip_controller and interfaceMapping
concept and replacing it with a single method checking
if the position control update was successful and
return the result in the PositionControl.update().
2020-01-30 07:28:18 -05:00
Matthias Grob
e06fff94bb PositionControl: handle yaw NAN inputs 2020-01-30 07:28:18 -05:00
Matthias Grob
dcc0339773 PositionControl: calculate velocity integral once using Vector3f 2020-01-30 07:28:18 -05:00
Matthias Grob
9109d22c28 PositionControl: simplify horizontal thrust limiting 2020-01-30 07:28:18 -05:00
Matthias Grob
83653d6581 PositionControl: readd direct thrust setpoint support
This restores original horizontal thrust setpoint execution
that I intentionally broke three commits ago. It's necessary
for correct stick to tilt mapping of FlightTaskManualAltitude.
2020-01-30 07:28:18 -05:00
Matthias Grob
282d46efcb PositionControl: add feed-forwards with addIfNotNan() 2020-01-30 07:28:18 -05:00
Matthias Grob
62fb06bd58 PositionControl: calculate velocity PID once using Vector3f 2020-01-30 07:28:18 -05:00