Commit Graph

31580 Commits

Author SHA1 Message Date
Julian Oes
874c6f385b commander: unify offboard timeouts
The implementation before this change had two timeouts, a hard-coded
timeout of 0.5 seconds as well as a by param configurable timeout with
certain failsafe actions set.

This change aims to fix two problems:
1. The hard-coded offboard timeout can be triggered easily with sped up
   lockstep simulation. Since i t is hard-coded it can't be adapted to
   the speed factor.
2. The offboard signal can time out but no action will be taken just
   yet. This means we end up in an in-between stage where no warning or
   failsafe action has happened yet, even though certain flags are set
   to a timeout state.

This patch aims to fix this by unifying the two timeouts to the existing
configurable param. The convoluted double timeout logic is replaced by a
simple hysteresis.

For anyone that has previously not changed the default timeout param (0),
the param will now be changed to 0.5 seconds which reflects the
previously hardcoded time. For anyone with a specific timeout
configured, the behaviour should remain the same.

Also, going forward, timeouts lower than 0.5 seconds should be possible.
2020-03-04 09:35:14 +01:00
Daniel Agar
fca7700746 Update submodule nuttx to latest Wed Mar 4 01:36:16 UTC 2020
- nuttx in PX4/Firmware (b7a83e23c5e50896bb137266cf89ff928dfaae42): d509b1edd7
    - nuttx current upstream: bf646dcf46
    - Changes: d509b1edd7...bf646dcf46

    bf646dcf46 2020-03-03 Daniel Agar - [BACKPORT] stm32h7: spi_exchange (no dma) available with CONFIG_STM32H7_SPI_DMATHRESHOLD
    f2a7ef0ade 2020-03-03 Daniel Agar - [BACKPORT] stm32f7: spi_exchange (no dma) available with CONFIG_STM32F7_SPI_DMATHRESHOLD
    7ffc59ba3d 2020-03-03 Daniel Agar - [BACKPORT] stm32: spi_exchange (no dma) available with CONFIG_STM32_SPI_DMATHRESHOLD
    d1c8fdb5fb 2020-03-02 Daniel Agar - [BACKPORT] arm/stm32h7 add STM32H7_SPI_DMATHRESHOLD
    fa8d636118 2020-03-02 Daniel Agar - [BACKPORT] stm32f76xx77xx_dma.h fix DMAMAP_SPI2_RX_2/DMAMAP_SPI2_TX_2
    762d80b217 2020-03-02 Daniel Agar - [BACKPORT] arm/stm32f7 add STM32F7_SPI_DMATHRESHOLD
    4f4bbbbf1c 2020-03-02 Daniel Agar - [BACKPORT] arm/stm32 add STM32_SPI_DMATHRESHOLD

Co-authored-by: PX4 Build Bot <bot@px4.io>
2020-03-03 20:56:48 -05:00
Julian Oes
581b92dd3f attitude_estimator_q: enable lockstep without LPE
When lockstep is enabled and LPE is not running, the
attitude_estimator_q needs to publish ekf2_timestamps in order to signal
to the simulator module that it has fully run.

This essentially fixes flying in lockstep when SYS_MC_EST_GROUP is 3.
2020-03-03 09:31:52 +01:00
David Sidrane
ee220a5086 px4_fmuv5x:Update manifest for USB not present 2020-03-02 19:59:36 -05:00
David Jablonski
ff4ec31d29 templated creation of stream list items
and constexpr for get_id_static and get_name_static in mavlink streams
2020-03-02 19:56:16 -05:00
David Jablonski
f57c5ef4a7 Mavlink: implemented SCALED_PRESSURE streams 2020-03-02 19:56:16 -05:00
PX4 BuildBot
862cb2052c Update submodule ecl to latest Mon Mar 2 12:39:50 UTC 2020
- ecl in PX4/Firmware (43aab81fdebc5c70d8ddb9285ee1e5005f4ee8a1): 05d391c785
    - ecl current upstream: 3fa5f501ae
    - Changes: 05d391c785...3fa5f501ae

    3fa5f50 2020-02-27 Carl Olsson - EKF: dont check gps_check_fail_status in velocity reset (#761)
71d4d22 2020-02-21 Daniel Agar - EKF: covariances() helper return const reference and fix code style
8b91856 2020-02-21 bresch - ekf: fix angle wrapping in realignYawGPS
00872fc 2020-02-18 Daniel Agar - EKF: ImuDownSampler pass imuSample as const reference
81c6d66 2020-02-13 bresch - ekf: clean uncorrelateQuatStates function
c6d5a74 2020-02-12 Julian Kent - Update change indicator
2020-03-02 14:03:21 -05:00
Julian Kent
770c724f17 Adapt run-clang-tidy.py to Python3 2020-03-02 13:26:03 -05:00
Julian Kent
50577732b7 Fix run-clang-tidy.py path 2020-03-02 13:26:03 -05:00
David Sidrane
431f7c16c8 NuttX with PX4 Contrib backported imxrt:Call out to board to set up FlexRAM 2020-03-02 10:20:33 -08:00
David Sidrane
cad3a811d2 nxp_fmurt1062-v1:Run from OCRAM 2020-03-02 10:20:33 -08:00
David Sidrane
e12bce3a20 px4_add_board:Add Optional LINKER_PREFIX 2020-03-02 10:20:33 -08:00
David Sidrane
3ed643f3d7 fmurt1062-v1:Update imxrt_flexspi_nor_boot configurable 2020-03-02 10:20:33 -08:00
Julian Kent
e173df80a1 Improve readibility of ternary 2020-03-02 18:10:52 +01:00
Martina Rivizzigno
678e32caf7 CollisionPrevention remove mavlink_log outputs 2020-03-02 16:49:56 +01:00
Martina Rivizzigno
a9491dfaf7 run avoidance also in Loiter 2020-03-02 16:49:56 +01:00
Martina Rivizzigno
aee1e70642 check avoidance status in commander and set sys status
remove mavlink log
2020-03-02 16:49:56 +01:00
Martina Rivizzigno
48b7cd926e mavlink_messages: add frame field to obstacle distance and correct typo 2020-03-02 16:49:56 +01:00
Martina
9d06bd1383 mavlink_main: add osbstacle_distance stream to extvisionmin mode 2020-03-02 16:49:56 +01:00
Martina
a4acb6b92a CollisionPrevention: set frame for obstacle_distance_fused topic 2020-03-02 16:49:56 +01:00
baumanta
7801ed129f Add safety measure and test for missing sensor data 2020-03-02 16:49:56 +01:00
baumanta
67d0f5c5d1 CollisionPrevention: No movement if FOV is zero 2020-03-02 16:49:56 +01:00
TSC21
39317e9207 update submodule Tools/jMAVSim 2020-03-02 14:59:45 +00:00
Silvan Fuhrer
9edb1179d0 VTOL: run vtol state update not only when mc or fw sp are updated, but always
This change is necessary to give the pilot the ability to switch VTOL state
even if for some reason no attitude sp are published anymore.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-03-02 14:10:58 +03:00
Lorenz Meier
3a2f15eba1 License: It is 2020 now
This is not significant, but it is always a good idea to show that things are actively maintained.
2020-03-02 08:27:40 +01:00
Daniel Agar
60cd6f9e90 vscode: possible improvements for cpp extension cpu usage 2020-03-01 12:44:13 -05:00
David Sidrane
64cf310c8a Uavcan:Fix null pointer defrefenence 2020-02-29 11:26:35 +01:00
TSC21
993755b24b bitmask.h: compile only if in POSIX/LINUX platforms 2020-02-28 10:59:50 +00:00
TSC21
f5000a9691 px4_platform_common: add bitmask.h for templated type safe bitmask operations 2020-02-28 10:59:50 +00:00
TSC21
8a999fecfc update submodule Tools/sitl_gazebo 2020-02-28 10:59:50 +00:00
TSC21
d1cefe9e65 simulator: move enum declaration out of preprocessor condition 2020-02-28 10:59:50 +00:00
TSC21
b3ea28c8e4 update submodule Tools/sitl_gazebo 2020-02-28 10:59:50 +00:00
TSC21
bcb6056a12 simulator: make sensor update rate dependent of the HIL_SENSOR bitmask 2020-02-28 10:59:50 +00:00
Daniel Agar
e6ab5fc2a8 HIL test runner temporarily disable uORB test and fix typo 2020-02-28 10:03:39 +01:00
Florian Achermann
be35f5555c Add comment to explain iridium exception in the mavlink module 2020-02-28 07:54:25 +01:00
Florian Achermann
eb215358fc Fix crashing for the mavlink in the iridium mode
Special handling in the mavlink_open_uart function if mavlink is in the iridium mode.
2020-02-28 07:54:25 +01:00
Daniel Agar
d7e502ec72 uORB_tests increase stack 2020-02-27 21:12:49 +01:00
Matthias Grob
f90d3671c0 vehicle_attitude_setpoint: get rid of unused q_d_valid flag 2020-02-27 09:17:52 +01:00
Julian Oes
b53bd2b77f LPE: make compatible with lockstep simulation
This fixes SITL with lockstep when using LPE and q estimator.

The required changes are:
- Publish ekf2_timestamps because simulator_mavlink expects them.
- Run LPE at 250 Hz instead of 80 Hz in order to keep everything in
  lockstep running at 250 Hz.
2020-02-26 15:46:58 +01:00
Julian Oes
3be8b3d177 logger: style fix 2020-02-26 14:52:39 +01:00
Julian Kent
18754225c9 Update matrix library 2020-02-26 10:27:32 +01:00
Matthias Grob
46f76cb621 Commander: enable RC override in takeoff
and remaining auto modes which are used more rarely.
2020-02-26 10:22:33 +01:00
Paul Riseborough
d9ae242760 logger: fix unused variable build error 2020-02-26 18:44:20 +11:00
Daniel Agar
2a0fe169e6 logger: disable logger_status publiation in replay builds
- this is disabled in replay builds to ensure all data in ekf2 replay logs only contains the same time range, otherwise the plots can be unreadable using common tools
 - fixes #14230
2020-02-26 18:44:20 +11:00
CarlOlsson
7e00dcd382 EKF2: Fix GPS blending time jitter 2020-02-26 07:39:47 +01:00
JaeyoungLim
a38b167614 Update: sitl_gazebo 2020-02-26 07:29:16 +01:00
Martina Rivizzigno
abe33af5b3 map mavlink orientation enum to uorb distance_sensor orientation 2020-02-26 07:27:09 +01:00
Daniel Agar
779ba0fda5 px4_fmu-v4/v4pro: switch to new InvenSense icm20602/icm20608g IMU drivers
* 8 kHz gyro, 4 kHz accel
 * DLPF disabled
 * scheduled using data ready interrupts
 * FIFO is emptied at 1 kHz by default, but can adjusted via IMU_GYRO_RATEMAX from 250 Hz - 2000 kHz.
 * On both px4_fmu-v4 and px4_fmu-v4pro the secondary IMU is an mpu9250 with the same driver
2020-02-26 01:19:12 +01:00
Julian Kent
5bf2648c1f Add debugger options for mavsdk test runner 2020-02-25 17:15:40 +01:00
Beat Küng
77b854b7c3 omnibus: enable SPI dma + use new ICM-20602 driver (disabled DLPF) 2020-02-25 09:59:52 +01:00