Compare commits

...

6060 Commits

Author SHA1 Message Date
JacobCrabill 8e01fe661a fixup! Update submodule nuttx 2022-03-18 10:56:44 -07:00
JacobCrabill 64863fe54e uavcan_v1: Add Publishers dir to includes 2022-03-18 09:03:48 -07:00
JacobCrabill 73b1de85cb uavcan_v1: SocketCAN set 'can_fd' based on CONFIG 2022-03-18 09:03:06 -07:00
JacobCrabill fd3662097f fixup! Update submodule nuttx 2022-03-18 09:02:00 -07:00
JacobCrabill 76da12fce3 uavcan_v1: Immediate transmit() from Publishers
Add 'do_transmit()' to UavcanNode
Add 'transmit()' to Publisher base class to call do_transmit()
Call transmit() after canardTxPush from Publishers
2022-03-17 17:01:54 -07:00
JacobCrabill 9531900afa mro/ctrl-zero-h7-oem: Start adding socketcan support 2022-03-16 10:21:10 -07:00
JacobCrabill 25271a3f04 fixup! Update submodule nuttx 2022-03-16 10:20:29 -07:00
JacobCrabill 4048ac57bf fixup! Update submodule nuttx 2022-03-15 18:53:13 -07:00
JacobCrabill 399ab35a4f fixup! HACK: Disable SO_TIMESTAMP in uavcan_v1 temporarily while bringing up H7 SocketCAN driver 2022-03-15 18:52:00 -07:00
JacobCrabill f4f8eee02d cubeorange: Add TX_DEADLINE support 2022-03-15 18:24:03 -07:00
JacobCrabill dec15b4fa9 Update submodule nuttx 2022-03-15 18:23:22 -07:00
JacobCrabill 7db8d3ad78 HACK: Disable SO_TIMESTAMP in uavcan_v1 temporarily while bringing up H7 SocketCAN driver 2022-03-15 17:45:34 -07:00
JacobCrabill 7e34806046 mavlink: Replace CONFIG_NET with CONFIG_NET_UDP
Allows use of SocketCAN w/o also enabling UDP support in NuttX
2022-03-15 17:22:27 -07:00
JacobCrabill 9f18ef6688 Orange Cube: Add socketcan target 2022-03-15 17:11:42 -07:00
Daniel Agar 5717434e93 ekf2: initialize GPS drift metrics to NAN rather than 0 2022-03-14 10:09:24 -04:00
alessandro 62d1058cc2 log irlock_report and landing_target_pose messages
Need to log both, because on some systems the
information will come in directly as a 
landing_target_pose message, and on others
it's coming in as irlock_report and then filtered
in PX4 to produce the landing_target_pose message.
2022-03-14 10:13:08 +01:00
Matthias Grob f1e44c6e2a PreFlightCheck: only allow modes suitable for takeoff 2022-03-14 09:03:39 +01:00
Daniel Agar a430f0ccae ekf2: add simple zero velocity update when vehicle at rest (#19149)
- further decreases initial tilt alignment time (now down to 2.5 seconds if still) and improves initial bias estimates
2022-03-12 12:56:31 -05:00
Daniel Agar 3d54d25867 sensor calibration delete temperature (CAL_ACCx_TEMP, CAL_GYROx_TEMP, CAL_MAGx_TEMP)
- this was an experiment to casually monitor sensor offsets relative to temperature, but now that all calibration offsets can be adjusted post-flight the stored temperature can be misleading
 - deleting to save a little bit of flash (and storing the temperature wasn't useful)
2022-03-12 11:38:49 -05:00
wangwwno1 aa64789792 sensors/vehicle_imu: Fix Integration Rate greater than Gyro Rate (#19318) 2022-03-12 11:29:23 -05:00
RomanBapst 58a4c38519 rtl: don't fly mission landing if we trigger rtl in hover
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-03-11 15:23:31 +03:00
bresch 58bd3d0c60 cmake: use elif -> elseif 2022-03-11 11:59:20 +01:00
JunwooHWANG 04f8453f4a Reduce Beeepr Default volume : 40 -> 20, since it's too loud for TAP_ESC devices from Yuneec (#19311) 2022-03-11 10:27:57 +01:00
Silvan Fuhrer f4c300af25 FlightTaskAuto: Nudging: only set yawrate_sp if WV is disabled or stick out of dead-zone
Otherwise the setpoint from weather vane is constantly overwritten by it,
even if the yaw stick is not moved.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-03-11 09:18:31 +01:00
Alex Klimaj 71850eeda6 mavlink: Add flow control parameters (#19254) 2022-03-10 08:22:00 -08:00
Daniel Agar b66dd5ffa6 adis16470: fix gyro scaling 2022-03-09 23:00:54 -05:00
Roman Bapst 69560bd4f4 Compensate VTOL transition time for air density (#19293)
* vtol: compensate front transition minimum time and front transiton openloop time
for air density

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-03-09 08:41:30 -05:00
alessandro 0617fd2b6f fmu-v6x: increase UART5 buffer size
The same fix had to be done for the fmu-v5x:
PX4/PX4-Autopilot#14932
2022-03-09 08:39:34 -05:00
bresch 182980526f commander: allow rearming grace period for arming switch only 2022-03-09 08:42:21 +01:00
wangwwno1 cd5a1e510a ekf2: typo Fix: pub.advertised() -> pub.advertise() (#19302) 2022-03-09 08:39:08 +01:00
Jacob Dahl 3e21efb721 ina228: fix sign error on CURRENT reading (#19296) 2022-03-08 19:47:11 -05:00
Daniel Agar b7e0f17c6a ekf2: minor position/velocity reset cleanup
- try to use avoid resetVelocity() call where possible
 - reset timeouts centrally
2022-03-08 11:16:35 -05:00
Daniel Agar c10ea97967 ekf2: fusion helpers return success/fail and set pos/vel update timestamps centrally (if healthy) 2022-03-08 11:16:35 -05:00
Matthias Grob c4bc062714 helper_functions: generalize unwrapping function 2022-03-08 10:56:32 +01:00
Matthias Grob c86c2db07f helper_functions: simplify unwrap function 2022-03-08 10:56:32 +01:00
Thomas Stastny 5a3aba9c21 matrix: add angle unwrapping method 2022-03-08 10:56:32 +01:00
Matthias Grob 68a0414622 Quaternion: rename function to rotate vectors 2022-03-07 20:03:54 -05:00
Daniel Agar 5affa693f2 uavcan: increase ESC max rate 200->400 Hz
- this should run synchronized with the rate controller and can be
limited by IMU_GYRO_RATEMAX
2022-03-07 10:28:51 -05:00
Beat Küng 601c588294 holybro/kakuteh7: disable bluetooth 2022-03-04 08:02:11 -05:00
Beat Küng 047352d049 holybro/kakuteh7: update bootloader binary 2022-03-04 08:02:11 -05:00
Beat Küng 591c95ce2f mixer_module: print actual failsafe value 2022-03-04 08:02:11 -05:00
Bulut Gözübüyük 80c6ab7106 Add support for Omnibus F4 boards with ICM20608G IMUs
One can use following command to compile:
make omnibus_f4sd_icm20608g

Co-Authored-By: berkercanatar <19846944+berkercanatar@users.noreply.github.com>
2022-03-04 08:27:48 +01:00
Matthias Grob 666cf2326d mission_block: handle SET_ROI_LOCATION with absolute altitude correctly (#19258) 2022-03-03 13:25:00 +01:00
Daniel Agar 49df00c319 lib/mixer_module: check thrust factor range valid and minor optimization (#19272) 2022-03-03 08:10:09 +01:00
JunwooHWANG 35af604a82 Added RTL Switch Setting for ATL Mantis Edu (#19267)
Co-authored-by: Junwoo Hwang <junwoo@auterion.com>
2022-03-02 16:57:20 +01:00
Daniel Agar 52221b0bb7 vscode: add stlink debug config (#19269)
Co-authored-by: Jacob Crabill <jacob.crabill@gmail.com>
2022-03-01 09:47:22 -05:00
PX4 BuildBot c2c455be0d Update submodule flightgear_bridge to latest Sat Feb 26 16:47:29 UTC 2022
- flightgear_bridge in PX4/Firmware (8549fadb6c): https://github.com/PX4/PX4-FlightGear-Bridge/commit/ea9b6cb5b93365928190864a6592c0a280e101ea
    - flightgear_bridge current upstream: https://github.com/PX4/PX4-FlightGear-Bridge/commit/f47ce7b5fbbb3aa43d33d2be1f6cd3746b13d5bf
    - Changes: https://github.com/PX4/PX4-FlightGear-Bridge/compare/ea9b6cb5b93365928190864a6592c0a280e101ea...f47ce7b5fbbb3aa43d33d2be1f6cd3746b13d5bf

    f47ce7b 2022-02-07 Roman Dvořák - Add support of TF-G1 and TF-G2 to FG bridge, update readme, update mavlink communication Add support of TF-G1 and TF-G2 to FG bridge, update readme, update mavlink communication
2022-02-26 16:57:20 -05:00
Daniel Agar 6224e11463 Update world_magnetic_model to latest Sat Feb 26 16:47:08 UTC 2022 (#19262)
* Update world_magnetic_model to latest Sat Feb 26 16:47:08 UTC 2022
* [AUTO COMMIT] update change indication

Co-authored-by: PX4 BuildBot <bot@px4.io>
2022-02-26 15:39:37 -05:00
Daniel Agar 44f0278d97 Update submodule GPSDrivers to latest Sat Feb 26 16:47:30 UTC 2022 (#19264)
- GPSDrivers in PX4/Firmware (be9dbf6a077309c4c6bcf8d2de91b82502bf5d01): https://github.com/PX4/PX4-GPSDrivers/commit/d6940d9c8ccb8ab3273c677097a29d46903021ff
    - GPSDrivers current upstream: https://github.com/PX4/PX4-GPSDrivers/commit/fa275c39935e00906d7a691770d2c10f1ea95d3c
    - Changes: https://github.com/PX4/PX4-GPSDrivers/compare/d6940d9c8ccb8ab3273c677097a29d46903021ff...fa275c39935e00906d7a691770d2c10f1ea95d3c

    fa275c3 2022-02-17 chalkytoast - ubx: ensure payloadRxDone does not return -1

Co-authored-by: PX4 BuildBot <bot@px4.io>
2022-02-26 15:38:43 -05:00
PX4 BuildBot d94ad5bd6d Update submodule mavlink to latest Sat Feb 26 16:47:38 UTC 2022
- mavlink in PX4/Firmware (95358ae501e92687b00d2786bc8eadf28ff93930): https://github.com/mavlink/mavlink/commit/4ee1eebbd173a3a483b79088b58fef6ec0a4dfef
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/b568a60fca42599d9998434e606f6e38e0b5e298
    - Changes: https://github.com/mavlink/mavlink/compare/4ee1eebbd173a3a483b79088b58fef6ec0a4dfef...b568a60fca42599d9998434e606f6e38e0b5e298

    b568a60f 2022-02-24 Hamish Willee - Update pymavlink to latest (#1805)
b86834e0 2022-02-23 Hamish Willee - Component info - tidy descriptiosn (#1803)
79e9545a 2022-02-23 Hamish Willee - Remove external dialect doc and improve dialect pages (#1802)
fd7ccfbe 2022-02-23 Hamish Willee - MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION - improve linking to command (#1774)
2b7de26c 2022-02-23 Hamish Willee - [Discuss.] MAV_PROTOCOL_CAPABILITY_FTP - supports FTP protocol not specific message (#1772)
a7541658 2022-02-18 Alessandro Ros - fix common.xml include in AVSSUAS (#1800)
5b4482fe 2022-02-17 Hamish Willee - RFC 0016 - Mavlink Standard Modes - Add to development.xml
2022-02-26 15:07:42 -05:00
ShiauweiZhao 8549fadb6c add icm42670p driver kconfig 2022-02-25 12:21:06 -05:00
Jukka Laitinen aae0876d82 platforms/rpi: Clean away the removed hrt_elapsed_time_atomic
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-25 13:35:14 +01:00
Jukka Laitinen 77f71e61d2 Add a generic hrt driver userspace interface
This adds a nuttx userspace interface for hrt driver, communicating with
the actual px4 hrt driver via BOARDCTL IOCTLs

This is be used when running PX4 in NuttX protected or kernel builds

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-25 13:35:14 +01:00
Jukka Laitinen 9f049b4dca Inline ts_to_abstime and abstime_to_ts
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-25 13:35:14 +01:00
Beat Küng 3e6a35fe8a px4/fmu-v2/rover: disable module to reduce flash 2022-02-25 08:30:58 +01:00
Beat Küng 29d5dd9b8f omnibus/f4sd: disable module to reduce flash 2022-02-25 08:30:58 +01:00
Beat Küng bc9dfe8599 holybro/kakutef7: disable module to reduce flash 2022-02-25 08:30:58 +01:00
Beat Küng ddad4c31c9 control_allocator: compute thrust scaling individually per axis
Before, adding the pusher to the same matrix as the upwards motors affected
the scaling for the upwards motors, resulting in values not equal to -1
anymore.
2022-02-25 08:30:58 +01:00
Beat Küng 76d8d8cae6 control_allocator: generic motor configuration for standard vtols
This adds the pusher/puller to the standard motors and makes the axis
configurable.
2022-02-25 08:30:58 +01:00
Beat Küng b2dc9ee710 control_allocator: add title & help url to geometry UI 2022-02-25 08:30:58 +01:00
Beat Küng cbcae260e4 mavlink: update submodule 2022-02-25 08:30:58 +01:00
Beat Küng e10ff59340 px4/fmu-v5/stackcheck: disable module to reduce flash 2022-02-25 08:30:58 +01:00
Beat Küng dce2968470 ROMFS: set CA_* + HIL_ACT_* params for hitl+sih airframes 2022-02-25 08:30:58 +01:00
Beat Küng 9b629a9e95 hitl,sitl,sih: use separate actuator_outputs_sim for SYS_CTRL_ALLOC==1
- removes the need to do type-specific rescaling of pwm to normalized values
- allows to run physical output drivers alongside HIL/SIH
2022-02-25 08:30:58 +01:00
Charles Cross 1e32398217 Adds scheduling call to ControlAllocator initialization 2022-02-25 08:16:08 +01:00
Charles Cross aecfbef128 Enables 20Hz backup scheduling for ControlAllocator 2022-02-25 08:16:08 +01:00
Charles Cross b0352135bb Restores Dshot trigger condition and adds dynamic mixing condition 2022-02-25 08:16:08 +01:00
Charles Cross 51c055832f Changes ControlAllocator to always publish actuator controls and status 2022-02-25 08:16:08 +01:00
Charles Cross 59f9a40584 Changes Dshot commands to always trigger from updateOutputs(), unless outputs are completely off 2022-02-25 08:16:08 +01:00
Charles Cross 46f8de3a17 Changes actuator_test syscmd value arg to be a float from -1 to 1 2022-02-25 08:16:08 +01:00
Daniel Agar 32a91377bf Tools/process_sensor_caldata.py fix scipy import 2022-02-24 20:27:26 -05:00
Jukka Laitinen caaa13ddc0 uORB performance updates
Move some logic from Subscriber into uORBManager. This reduces calls from the
modules to the uORB manager, improving performance in protected build.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-24 11:50:05 -05:00
Daniel Agar 611d50edf3 boards: holybro kakutef7 disable tone_alarm to save flash 2022-02-24 11:33:25 -05:00
Daniel Agar 8de2c80b34 mavlink: SCALED_IMU streams add temperature
- preference for accel or gyro temperature before mag
2022-02-23 14:05:31 -05:00
Daniel Agar 5b5d428189 boards: px4_fmu-v5_stackcheck disable fake_gps to save flash 2022-02-23 10:44:09 -05:00
Daniel Agar 01daf8d6d6 boards: omnibus_f4sd disable events module to save flash 2022-02-23 10:42:48 -05:00
Daniel Agar 11f617ca9b ekf2: default to in air and not at rest
- this is a more conservative default if a vehicle isn't set (no land detector running)
 - handled horizontal preflight failures in commander when disarmed
rather than overloading xy_valid and v_xy_valid flags
 - ekf2 no longer depend on arming or standby status
2022-02-22 16:59:10 -05:00
Daniel Agar d6d529539d ekf2: consolidate and simplify gnd effect logic 2022-02-22 16:59:10 -05:00
Daniel Agar 1d7791dad6 commander: monitor GPS validity and EKF2 dead reckoning
- ekf2: expose dead reckoning as control status flags
 - commander:
    - add GPS validity check
    - in AUTO MISSION if dependent on GPS then a loss of GPS will
2022-02-22 09:46:21 -05:00
Julian Oes 6021b8efb3 navigator: only apply breaking for multirotors 2022-02-22 09:41:22 -05:00
Julian Oes fa6c051ae5 navigator: break smoothly when entering hold mode
This uses the existing breaking functionality when hold/loiter mode is
activated.
2022-02-22 09:41:22 -05:00
Julian Oes f88dd28e85 navigator: extract breaking functionality out
This only moves the breaking functionality out from the reposition
command handling to a function, so that it can get re-used in other
places.
2022-02-22 09:41:22 -05:00
bresch 0e0e0d8be7 [AUTO COMMIT] update change indication 2022-02-22 11:49:25 +01:00
bresch 4f0a959244 gps_hgt: add and improve unit tests 2022-02-22 11:49:25 +01:00
bresch edabfd2f0e ekf_hgt: call specific height reset function instead of generic one
- Also use the delayed current data instead of newest that might not be
available (gps buffer is sometimes empty if the dt between samples is
larger than the delayed horizon).

- Separate "baro fault" from "baro intermittent": intermittent is a
  temporary failure and should prevent from switching to baro right now,
  but "fault" means that it should never be used anymore

- In case of height timeout, check for metrics but not for consistency
  as the filter is likely to have diverged already.
2022-02-22 11:49:25 +01:00
bresch cba73585e1 use recorded last sensor timestamp for intermittent check 2022-02-22 11:49:25 +01:00
Daniel Agar f431b233f3 ekf2: preflight checker fix flow y innovation filter 2022-02-22 09:39:22 +01:00
Daniel Agar 4f62b01dc7 Tools/px4moduledoc: add new rpm_sensor subcategory 2022-02-22 07:57:30 +01:00
Charles Cross f31f3370ef Add support for Timer15 on H743 boards (#19228)
* Adds Timer15 to stm32_common, if the timer base is defined
* Adds Timer15 logic for DMA and AltFunc config on stm32h7 boards
* Adds TIM15 BDTR->MOE support in stm32_common timer init
* Adds support for TIM15 pwm channels on Matek H743 Slim
2022-02-21 16:52:38 -05:00
Daniel Agar 710185d2ad drivers/magnetometer/rm3100: cleanup and simplify (#19238)
* switch to continuous mode at 75 Hz 
 * add simple failure count and reset mechanism
 * add range checks and perf counts
2022-02-21 16:48:20 -05:00
Roman Dvořák 976c994156 Extend the PCF8583 driver to support multiple instances (#19232)
* Add some restart events into pcf8583 driver

Co-authored-by: Vít Hanousek <vithanousek@seznam.cz>
2022-02-21 16:47:16 -05:00
Daniel Agar 3c58932aff boards: px4_fmu-v2_default disable ms4525 to save flash 2022-02-21 16:45:22 -05:00
Charles Cross 699f34ba83 drivers/magnetometer/rm3100: self-test procedure revision (#19207)
* Adds retry behavior and additional checks to RM3100 BIST

Signed-off-by: Charles Cross <charles@missionrobotics.us>
2022-02-21 11:27:42 -05:00
Beat Küng 960003a86a control_allocator: fix weak authority matrix check & update
- use max(fabsf(val)) instead of max(val)
- use correct actuator count
2022-02-21 11:17:00 -05:00
Daniel Agar 591b7b6934 ekf2: add new estimator_gps_status.msg
- includes the estimator status check fail bits broken out as descriptive booleans
 - absorbs ekf_gps_drift.msg
2022-02-21 08:58:59 -05:00
Daniel Agar f8d7574d3c ekf2: simplify global position publication validity check 2022-02-21 08:57:33 -05:00
fury1895 be92165c54 AirspeedSelector: fix messaging 2022-02-21 15:21:13 +03:00
David Sidrane c0facec889 cdc_acm_check:Prevent USB disconect on param save
If the hardware support RESET lockout that has nArmed ANDed with VBUS
   vbus_sense may drop during a param save which uses
   BOARD_INDICATE_EXTERNAL_LOCKOUT_STATE to prevent external resets
   while writing the params.  If we are not armed and nARMRED is low
   we are in such a lock out so ignore changes on VBUS_SENSE during this
   time.
2022-02-21 10:56:41 +01:00
Julian Oes 9b35b680f6 gimbal: fix input selection
Once we have valid input we should use that and not overwrite our
update_result with the result from other inputs, otherwise the
automatic selection does not actually work.

This behavior means that only the first update will be used if there are
several sources updating in the same cycle.
2022-02-21 08:38:16 +01:00
Igor Mišić 3c09448daf dataman: add silence flag for _file_initialize 2022-02-21 08:36:36 +01:00
murata cc6c6c3b8c power_monitor: Determine I2C communication errors 2022-02-20 16:05:44 -05:00
Daniel Agar 09e36e6cb4 gimbal: new pitch limits [MNT_LND_P_MIN, MNT_LND_P_MAX] when landed 2022-02-20 16:04:09 -05:00
Justin 59f28517c5 Force ignition to use version 5 (edifice) which is what it is built for so it doesn't default to a newer version 2022-02-19 19:04:26 +01:00
Daniel Agar d147ad3a9a gimbal: add parameter units 2022-02-18 14:15:58 -05:00
Daniel Agar 2a8aa17a81 mavlink: streams MOUNT_ORIENTATION populate time_boot_ms 2022-02-18 14:14:56 -05:00
Daniel Agar 1f77a3750e mavlink: don't reset _src_addr_initialized on parameter updates 2022-02-18 14:14:36 -05:00
Daniel Agar e0a8d217fc mavlink increase HEARTBEAT timeout 1.5->2.5s
- tolerate missing one HEARTBEAT + jitter
2022-02-18 10:16:20 -05:00
Daniel Agar 1addbe469e mavlink: STATUSTEXT increase stale message timeout 2022-02-18 10:16:20 -05:00
Daniel Agar d5d50d5855 gyro_calibration: add additional validity check before finalizing calibrations
- this can slip through if sensors are running normally, but then stop publishing valid data
2022-02-18 09:12:30 -05:00
Jukka Laitinen dab7b007de Auto-generate a list of kernel-side built-in modules(drivers)
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-18 07:58:58 +01:00
Jukka Laitinen 9449ed6e66 Add support for protected build in drivers, systemcmds and modules Kconfig
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-18 07:58:58 +01:00
Jukka Laitinen 6071b87afc platforms/common/uORB: Separate IOCTLs going through boardctl interface from the original ones
It was a mistake to mix these two together, it is simpler to implement the boardctl interface
for the protected build, if the boardctl ioctls are different

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-18 07:53:13 +01:00
Jukka Laitinen f0d9f44f45 Add an ioctl handler to launch built-in modules in kernel side
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-18 07:53:13 +01:00
Jukka Laitinen db3baf6c26 Add an ioctl interface for userspace to kernel calls
This adds an ioctl interface for NuttX protected build, allowing
system calls from user space to kernel for uORB, HRT and crypto

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-18 07:53:13 +01:00
Daniel Agar 8489cec08f boards: spracing h7extreme keep icm42688p in RAM
- to make space move rc_update itcm -> sram
2022-02-17 10:30:14 -05:00
Daniel Agar 9aca693945 boards: spracing h7extreme add alternate IMU icm42688p 2022-02-17 10:30:14 -05:00
Silvan Fuhrer c51dc3b4b7 ControlAllocator: Set all the elements of a row to 0 if that row has weak authority
Weak authority on a axis is currently defined as: none of the actuators have an
effectivness on this particular axis larger than 0.05.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-17 13:21:50 +01:00
Silvan Fuhrer 97a280d41d CA: Tiltrotor: set tilts to exactly -1 or 1 if close to these end points
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-17 13:21:50 +01:00
Silvan Fuhrer 25f5152583 Tiltrotor: make sure tilt doesn't exceed the FW tilt angle
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-17 13:21:50 +01:00
Silvan Fuhrer c13726af66 Enable DO_SET_SPEED commands outside of missions in other AUTO modes (#18834)
* Navigator: enable DO_CHANGE_SPEED for outside of mission
- update _mission_cruising_speed_mc/_fw also if DO_CHANGE_SPEED command
is received outside of mission (e.g. while Loitering doing an Orbit)
- if vehicle is in AUTO_LOITER when receiving the change speed, then immediately
apply it by doing a reposition without updating any other field than cruising_speed
and cruising_throttle
-when RTL is activated reset the cruising speed and throttle

* Navigator: reset cruise speed and throttle to default when VTOL-transitioning

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-17 11:19:02 +01:00
Jaeyoung-Lim b0f9611eb9 NPFG: use cross product for matrix library
This removes the use of cross products from NPFG and takes advantage of the matrix library
2022-02-17 09:52:47 +01:00
Daniel Agar ca97b9ba5f drivers/gps: add new GPS_SAT_INFO parameter to enable satelitte_info
- this replaces the command line argument -s
2022-02-17 08:30:25 +01:00
Daniel Agar abfa3d23a5 boards: matek h743-slim fix STM32_SDMMC_SDXFR_CLKDIV typo 2022-02-16 10:28:01 -05:00
David Sidrane 1c66fb44aa holybro_kakutef7:fit in flash 2022-02-16 10:09:02 -05:00
David Sidrane 2e67b92b4d px4_fmu-v5_stackcheck:Fit in flash 2022-02-16 10:09:02 -05:00
David Sidrane 3593cf795d NuttX With DMA/FLASH Backports 2022-02-16 10:09:02 -05:00
David Sidrane d05d7f4154 bl:Clean up formatting 2022-02-16 10:09:02 -05:00
David Sidrane 92590155fc px4_fmu-v6x:Bootloader move to TELEM1 with DMA 2022-02-16 10:09:02 -05:00
David Sidrane c7bd7323ec serial_test:Fix infinte TX loop with H7/DMA 2022-02-16 10:09:02 -05:00
David Sidrane b5916ac712 px4_fmu-v6x:Document the DMA usage 2022-02-16 10:09:02 -05:00
David Sidrane 7eefdd1e3d px4_fmu-v6x:Enable DMA on TELEM{1|2} 2022-02-16 10:09:02 -05:00
Charles Cross f9feb04f8b Changes SDIO clock speed to 20MHz for the Matek H743 slim
Signed-off-by: Charles Cross <charles@missionrobotics.us>
2022-02-15 09:38:09 -08:00
Yannick Fuhrer 26ea70e729 Airspeed selector: fix condition for messaging (#19173)
Change warning message after airspeed failure on the ground, 
recommend RTL only if flying.
2022-02-15 17:23:36 +01:00
Roman Bapst 6de5d24e00 Added VTOL Takeoff navigation mode (#19027)
* Commander: added support for MAIN_STATE_AUTO_VTOL_TAKEOFF
* navigator: added support for vtol_takeoff navigation mode
2022-02-15 14:56:57 +01:00
Silvan Fuhrer 374bcb105a RTL: fill loiter radius in state Climb (#19165)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-15 14:50:14 +01:00
Daniel Agar 5370733d62 ekf2: publish flow vel only if compensated flow is available
- fix a few publication timestamp_samples
2022-02-14 10:55:10 -05:00
Daniel Agar b157afde6a ekf2: prefer airspeed_validated over raw airspeed if available (#19159)
* ekf2: prefer airspeed_validated over raw airspeed if available

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-14 15:37:29 +01:00
Silvan Fuhrer df0e402c44 CA: refactor logic for matrix updating
-pass flag EffectivenessUpdateReason into effectiveness, indicating if there was an external
update or not. Reasons for external updates are:
  -config changes (parameter)
  -motor failure detected or certain redundant motors are switched off to save energy

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-14 09:23:10 +01:00
Jukka Laitinen 36d440f895 Add IOCTL interface to uORBManager for nuttx protected/kernel build split
When building uORB for NuttX flat build, or for some other target, everything
works as before.

When building uORB for NuttX protected or kernel build, this does the following:
- The kernel side uORB library reigsters a boardctl handler for calls from userspace
  and services the boardctl_ioctls by calling the actual uORB functions
- For user mode binaries, the uORBManager acts as a proxy, making boardctl_ioctl calls to the
  kernel side

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-14 09:10:49 +01:00
Daniel Agar 8b9a856cf7 drivers/barometer: new ms5837 driver (#18213)
Co-authored-by: xn365 <xn_365@163.com>
2022-02-12 14:41:31 -05:00
PX4 BuildBot 41e48435c9 Update submodule mavlink to latest Sat Feb 12 12:38:48 UTC 2022
- mavlink in PX4/Firmware (9457e7b25c4fa51f5ccc0bd887760e910926ba8a): https://github.com/mavlink/mavlink/commit/311eee010bb82f5fb2e4e0f64f7961a83212b003
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/4b0558d0d10efbdd550cb5321d56f6a611d0ab14
    - Changes: https://github.com/mavlink/mavlink/compare/311eee010bb82f5fb2e4e0f64f7961a83212b003...4b0558d0d10efbdd550cb5321d56f6a611d0ab14

    4b0558d0 2022-02-11 Andrew Tridgell - added CANFD_FRAME and CAN_FILTER_MODIFY messages
7f032afe 2022-02-10 Daniel Agar - Apply suggestions from code review
9379a601 2022-02-06 Andrew Tridgell - common: added MAV_CMD_CAN_FORWARD and CAN_FRAME
2022-02-12 13:16:42 -05:00
Daniel Agar fca886e05a drivers/irlock: add SENS_EN_IRLOCK parameter to start driver 2022-02-11 22:57:56 -05:00
Silvan Fuhrer 2eba1847fd HTE: add new parameter HTE_THR_RANGE to define range of estimated thrust
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-11 17:04:14 +01:00
Silvan Fuhrer 34805e43fd HTE: remove unused method setMeasurementNoiseStdDev()
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-11 17:04:14 +01:00
bresch 493e35b72e ekf_terr: reset rng fault when on ground 2022-02-11 10:57:45 -05:00
bresch 502ec7ef46 ekf_terr: fix unit test
the flags were valid ony because they were based on timeouts and when
starting the unit test, it takes a couple of seconds to actually timeout
2022-02-11 10:57:45 -05:00
bresch 2fb7b35a8b ekf2_terr: refactor terrain estimator - flow aiding 2022-02-11 10:57:45 -05:00
bresch 33fd1849e0 ekf2_terr: refactor terrain estimator - rng aiding 2022-02-11 10:57:45 -05:00
bresch 5818974f0f ekf: add range finder "faulty" status
When delclared faulty, the range finder cannot be used anymore
2022-02-11 10:57:45 -05:00
bresch a3b2550f07 mc_auto: only check for offtrack, infront and behind in XY-plane
This fixes the issue when changing the altitude during a goto for
example, where the vehicle was going backwards and upwards to reach the
closest point to the line. Now the vehicle simply goes towards the
target waypoint.
2022-02-11 16:14:48 +01:00
alessandro 1febba315a mantis: disable optical flow fusion in EKF2
Above grass fields I can frequently observe position 
instabilities with the mantis due to the optical flow fusion.

Let's disable flow fusion for now.
2022-02-11 15:33:34 +01:00
Daniel Agar 0b9f60a037 drivers/rc_input: always provide RC_PORT_CONFIG parameter
- RC_PORT_CONFIG is disabled by default if the board doesn't have
CONFIG_BOARD_SERIAL_RC set
 - allows user facing custom RC configuration that overrides board
defaults
2022-02-10 09:41:32 -05:00
Daniel Agar 97a75fc388 sensors: skip selection and failover checks during parameter update cycles 2022-02-10 09:31:23 -05:00
Beat Küng b6607a7b78 battery_status: do not publish if no voltage channel is defined
This is the case for boards with digital readout, like v5x, but still
enable the battery_status module for external analog driver options.

An alternative would be to not run battery_status depending on config.
2022-02-09 16:54:45 -05:00
Nico van Duijn 10ad553f1d v5x: add battery_status module to enable analog bat sensing 2022-02-09 16:54:45 -05:00
Beat Küng 28c27f1b9a px4/fmu-v5x: add ADC_ADS1115_EN param to use external ADC 2022-02-09 16:54:45 -05:00
David Sidrane fd1aa3cfb9 matek_gnss-m9n-f4:Use CONFIG_BOARD_SERIAL_GPSn for serial_passthru 2022-02-09 13:11:52 -05:00
David Sidrane 0c936e4fd2 serial_passthru:Move CONFIG_xxx to serial_passthru 2022-02-09 13:11:52 -05:00
Silvan Fuhrer 81b08a0168 FW Pos C: set position_sp type to position during VTOL backtransition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-09 11:39:47 -05:00
Silvan Fuhrer 1d6396b418 Navigator: VTOL: track virtual WP 1m ahead of vehicle during backtransition in Land mode
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-09 11:39:47 -05:00
Jukka Laitinen dcde0d0559 src/drivers/sw_crypto: Late initialize tomcypt
This saves a lot of flash space, in case functions from libtomcrypt
are not used (currently only RSA related).

When RSA is not used, the linker can now drop all libtomcrypt related things.
This is especially relevant for bootloaders using the SW crypto.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-09 10:28:06 -05:00
Daniel Agar a95da715d5 Jenkins: HIL remove airframe 4018 test 2022-02-09 10:08:59 +01:00
Beat Küng 86860808e3 ROMFS: set CA_* geometry params for some of the generic airframes
Not enabled, makes it easier to switch.
2022-02-09 10:08:59 +01:00
Beat Küng a2ba613254 ROMFS: remove 4018 + 6003 ctrlalloc airframes 2022-02-09 10:08:59 +01:00
PX4 BuildBot 33ce1b9b64 Update submodule mavlink to latest Wed Feb 9 00:39:13 UTC 2022
- mavlink in PX4/Firmware (ed8c1dca2e792e95d9ab1ba72a22bc9658f10b79): https://github.com/mavlink/mavlink/commit/51abf3c82b3d7137406459dc9b337e57637711ae
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/311eee010bb82f5fb2e4e0f64f7961a83212b003
    - Changes: https://github.com/mavlink/mavlink/compare/51abf3c82b3d7137406459dc9b337e57637711ae...311eee010bb82f5fb2e4e0f64f7961a83212b003

    311eee01 2022-02-04 Peter Barker - common.xml: deprecate SET_HOME_POSITION message (#1791)
63d62522 2022-02-02 Julian Oes - minimal: add MAV_TYPE_WINCH (#1789)
2022-02-08 21:50:55 -05:00
PX4 BuildBot 421ca2fc48 Update submodule sitl_gazebo to latest Wed Feb 9 00:39:03 UTC 2022
- sitl_gazebo in PX4/Firmware (a088277fe866860272f1ef21773f5be1b6832b11): https://github.com/PX4/PX4-SITL_gazebo/commit/2750fe233c6a38dbe60e545ac0ec878d6ac20b1e
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/25138e803ee8525ee5fe4e6d511506e88e3f819c
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/2750fe233c6a38dbe60e545ac0ec878d6ac20b1e...25138e803ee8525ee5fe4e6d511506e88e3f819c

    25138e8 2021-07-16 Julian Oes - gimbal_controller: fix attitude status
2022-02-08 20:52:12 -05:00
Daniel Agar b24aa071b6 Jenkins: hardware always dump pyserial debug (silently) 2022-02-08 17:22:57 -05:00
Daniel Agar 6686736cff drv_pwm_output.h fix dshot cmd typo 2022-02-08 17:11:49 -05:00
Daniel Agar 86f81680fb sensors: check uORB::SubscriptionData validity before use 2022-02-08 13:19:01 -05:00
Oleg Kalachev 21b78f9d05 Enable mpu9250’s magnetometer on fmu-v4 2022-02-08 13:18:39 -05:00
Steve Nogar dce067df83 add configurable rtps rate parameter 2022-02-08 19:03:20 +01:00
Daniel Agar 133fe0cfb1 local_position_estimator: move to INS0 work queue (for significantly more stack) 2022-02-08 11:16:49 -05:00
Daniel Agar be3da5089c uORB: uORBDeviceNode use px4_cache_aligned_alloc 2022-02-08 10:20:50 -05:00
Viktor Vladic f4d02a2937 MatekH743 board_id, usb vid/pid changes, and MPU6000 delay before transfer - not after (#18733)
* Make board_id compatible with ardupilot
 * Initialize outputs for CAM1/CAM2 and Vsw pad
 * Correct board type 1013 in bootloader to match AP
 * Change usb vendor string to "Matek"
 * Change cdcacm pid to 1013
 * Comment out FLASH_BASED_PARAMS because of #15331
2022-02-07 19:55:49 -05:00
Julian Oes 490a0c473b Rename vmount to gimbal 2022-02-07 19:21:15 -05:00
Julian Oes 853047c643 Mantis: use gimbal auto input
This allows RC and mavlink gimbal v2 input.
2022-02-07 19:21:15 -05:00
Julian Oes 39f0e97245 vmount: refactor for v2 auto input, test command
This is a bigger refactor of vmount to clean it up and plug some holes
in functionality.

The changes include:
- Fixing/simplifying the test command.
- Changing the dependencies of the input and output classes to just the
  parameter list.
- Adding a separate topic to publish gimbal v1 commands to avoid
  polluting the vehicle_command topic.
- Removing outdated comments and author lists.
- Extracting the gimbal v2 "in control" notion outside into control_data
  rather than only the v2 input.
2022-02-07 19:21:15 -05:00
Julian Oes f2216dff55 mavlink: don't send gimbal_device_attitude_status
If we receive gimbal_device_attitude_status by mavlink we should not
re-send it as we are already supposed to be forwarding mavlink traffic
from the gimbal to the ground station.
2022-02-07 19:21:15 -05:00
Julian Oes 7e7a99b542 mavlink: handle for GIMBAL_DEVICE_ATTITUDE_STATUS
That way we can log it later.
2022-02-07 19:21:15 -05:00
Daniel Agar 5b07398b3e Tools/HIL/test_airframes.sh: only attempt setting first 3 MAV_x_CONFIG
- MAV_3_CONFIG doesn't exist
2022-02-07 16:31:27 -05:00
Daniel Agar f9d87fd97a sensors/vehicle_angular_velocity: improve error handling (especially during initial selection) 2022-02-07 12:47:02 -05:00
Daniel Agar 3a37fd92e6 Jenkins: HIL temporarily tolerate ERRORs during 'uorb top' (long running command)
- on older boards if the sensor auto cal completes while this is
running it causes a brief sensor timeout
2022-02-07 10:26:48 -05:00
Daniel Agar 052adfbfd9 borads: holybro_kakutef7 disable modules/events to save flash 2022-02-06 16:53:13 -05:00
Daniel Agar 3a741cb9c9 boards: bitcrazy_crazyflie disable gyro_fft to save flash 2022-02-06 16:53:13 -05:00
Thomas Debrunner b4087ebd2b mc_pos_control: increase the default crawl speed for three-stage-landing approach for a more robust landing detection 2022-02-04 21:56:20 -05:00
Matthias Grob 4ef8cead3d mc_pos_control_params: correct crawl speed reference 2022-02-04 21:56:20 -05:00
Matthias Grob 1df9d6fca6 MulticopterLandDetector: fix crawl speed parameter fetching 2022-02-04 21:56:20 -05:00
Thomas Debrunner fb8b9b647a land-detector: switch to crawl speed for intent detection 2022-02-04 21:56:20 -05:00
Thomas Debrunner 2a6d9bc1dd fligh-mode-manager: First implementation of a three-stage-landing for multirotos, in case LIDAR is available 2022-02-04 21:56:20 -05:00
Daniel Agar 893cdf8f38 ekf2: test external vision adjustments after lowering fake position fusion variance 2022-02-04 21:48:32 -05:00
Daniel Agar 6b1750d8be ekf2: lower fake position observation variance when at rest 2022-02-04 21:48:32 -05:00
Daniel Agar c028b964e2 bmm150: minor changes to match reference driver 2022-02-04 19:57:24 -05:00
Beat Küng 8b2016b4ed fix protocol_splitter: increment i properly in scan_for_packets
This also guarantees that i is increased in every loop iteration.
Before it was possible to enter a busy loop.
2022-02-04 09:42:52 -05:00
Daniel Agar cf3db0d313 mavlink: don't send_mission_current if mission invalid 2022-02-04 09:40:25 -05:00
Silvan Fuhrer 26dba1407b Commander: VTOL quadchuate also triggers a RTL in Loiter and VTOL_Takeoff modes, not just in Mission (#19123)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-03 14:18:28 +01:00
JaeyoungLim f82c722653 Publish correct orbit status with goto (#19102)
For fixedwings, the orbit status was publishing zero radius when a goto waypoint was being passed.

This commit corrects this by passing the default loiter radius as the guidance logic was using
2022-02-03 10:16:39 +01:00
bresch 917910f3e2 ekf: pass a float by copy instead of a constant ref 2022-02-02 17:43:25 -05:00
bresch 3077f27821 ekf: use float instead of Vector2f for innov gate in pos/vel fusion
We always use the same innovation gate for X and Y anyway
2022-02-02 17:43:25 -05:00
Daniel Agar 5fb0084524 ekf2: remove unused shared fields for last velocity observation and variance 2022-02-02 17:43:25 -05:00
Daniel Agar 8a0581516c ekf2: don't store _auxvel_sample_delayed 2022-02-02 17:43:25 -05:00
Daniel Agar 452b5e94b4 ekf2: don't store _drag_sample_delayed 2022-02-02 17:43:25 -05:00
Daniel Agar 138ff7a316 sensors: ensure that best accel/gyro is in bounds 2022-02-02 17:14:46 -05:00
Daniel Agar 07c273fc31 sensors/vehicle_angular_velocity: print full sensor_selection if device id not found 2022-02-02 17:14:46 -05:00
Daniel Agar 94604ff21a Jenkins: hardware pyserial cat shouldn't fail the build 2022-02-02 14:17:02 -05:00
Peter van der Perk 9f97793491 Generate C/C++ header to expose px4board kconfig symbols to the preprocessor 2022-02-02 13:23:21 -05:00
Jaeyoung Lim 2fc95bb369 Rebase fix
Use getnavspeed_2d for groundspeed
2022-02-02 17:16:19 +01:00
Jaeyoung Lim 3dd5c1fbaf Enable NPFG by default on the believer 2022-02-02 17:16:19 +01:00
Jaeyoung Lim 3a9c5c3178 Use acceleration to pass path curvature 2022-02-02 17:16:19 +01:00
Jaeyoung Lim e2741f988a Add interface for passing path tangent and closest point directly
This commit adds an interface to pass the path tangent and closest point directly to NPFG using the offboard interface
2022-02-02 17:16:19 +01:00
David Sidrane f460611098 Fix serial_test stack warning 2022-02-02 11:12:53 -05:00
Peter van der Perk efd3bc1794 Serial_test move g_cl and g_mod from heap to stack to save memory by not preallocating them 2022-02-02 07:21:43 -08:00
Daniel Agar 88ffc177f7 ekf2: utils add getEulerYaw() that uses the best rotation sequence 2022-02-02 08:54:03 -05:00
Daniel Agar c3e0b93fc8 ekf2: remove unnecessary inlines 2022-02-02 08:50:49 -05:00
Hamish Willee 26d5ac4f58 GPS_YAW_OFFSET param docs: use rover and moving base terminology 2022-02-02 07:39:01 +01:00
David Sidrane 3358712b92 UAVCAN Node Correct C to Kelvin conversion 2022-02-01 21:49:29 -05:00
David Sidrane ec441fdba6 gnss-m9n-f4:Add serial_passthru 2022-02-01 21:49:29 -05:00
David Sidrane 3fecf8a23c Added ability to launch passthru on u-center traffic 2022-02-01 21:49:29 -05:00
David Sidrane 48c32f7795 Added serial passthru
This addes the command serial_passthru which will pass data from one
   device to another. This can be used to use u-center connected to USB
   with a GPS on a serial port.

   Usage: serial_passthru [arguments...]
      -e <val>    External device path
                  values: <file:dev>
      -d <val>    Internal device path
                  values: <file:dev>
      [-b <val>]  Baudrate
                  default: 115200
      [-t]        Track the External devices baudrate on internal device

    With the -t option baudrate changes made on the PC connected to the USB
    will be set to the intrenal device.
2022-02-01 21:49:29 -05:00
David Sidrane 0c8a5b3da1 matek-gnss-m9n-f4:Enable IO compensation 2022-02-01 21:49:29 -05:00
David Sidrane 2761112466 NuttX with CDCACM/OTGID backports
disable otg id
   cdcacm:support c_cflag in the termios structure
   and speed
2022-02-01 21:49:29 -05:00
David Sidrane cb06f82f0f gnss-m9n-f4:Board support clean up
SD is on SPI3 - correct pin mapping
   Fix DMA Mapping for all SPI and RX DMA on U[S]ART RX
   Fix Memory MAP SRAM size
   Removed unused GPIO
   Used proper I2C definitions
   Ensure Watchdog is configured for debugging
   Fixed FLASH param definitions
   Removed unedded SPI init

matek_gnss-m9n-f4:Correct Board ID and Size

Build order SJF

Added Support for F40x
2022-02-01 21:49:29 -05:00
dirksavage88 d92244b664 Initial Matek m9nf4 can node support
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

Added uavcan board identity

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

Added usb.c, LED rework may be needed

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

PX4 dates added to all files

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

Matek M9NF4 CAN Node initial board support

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

Changed GPS to ttyS3 in board sensors, led board on/off definitions

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

Added app descriptor section to canbootloader linker script

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

Changed board naming convention to match vendor

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

Changed canbootloader and nsh menuconfig

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

Test defconfig changes, IRQ hardfault in bootloader

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

Working canbootloader, App firmware stil WIP

Working App firmware: changed romfsroot to 'cannode', TODO: verify GPS & IMU config

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

TODO: Debug GPS no sats/low sats issue, no magnetometer on some boards

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
2022-02-01 21:49:29 -05:00
Daniel Agar f3e2a197ad move vehicle at rest detection ekf2 -> land_detector
- move vehicle at reset detection ekf2 -> land_detector
 - ekf_unit: reduce init period
   - Fake fusion is when at rest is quite strong and makes the variance reduce rapidly. Reduce the amount of time we wait before checking if the variances are still large enough.
 - ekf_unit: reduce minimum vel/pos variance required after init
   - Fake pos fusion has a low observation noise, making the vel/pos variances reduce quickly.

Co-authored-by:: bresch <brescianimathieu@gmail.com>
2022-02-01 17:50:19 -05:00
Daniel Agar e387f302f9 mavlink: streams/COMMAND_LONG don't send internal vehicle_commands 2022-02-01 09:15:10 -05:00
Jukka Laitinen f8a090e85e Remove HYGROMETERS from fmu-v5 stackcheck build and rename to COMMON_HYGROMETERS
The stackcheck build flash space overflows after adding hygrometers.

Also follow the naming convention of other similar config flags, and rename the
config.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-01 08:56:25 -05:00
Beat Küng a4206ba553 logger: log excluded optional topics
Can be displayed with:
ulog_info <file> -m excluded_optional_topics
2022-02-01 08:40:02 +01:00
Roman Dvořák 2b1229786e Multi instance SHT3x driver support 2022-01-31 21:38:26 -05:00
Roman Dvořák ed475ca324 SHT3x driver
SHT3x driver, clean code
changes leading to merge TFHT with CUAV hygrometer
Delete humidity_temperature.msg
Update CMakeLists.txt
rename 'atmosphefir_quantities' to 'hygrometers'
fix logging
removed cmake files
fix PR issues
2022-01-31 21:38:26 -05:00
mcsauder e554f0174d Format whitespace and group checkall() methods together in geofence class. 2022-01-31 21:01:03 -05:00
Matthias Grob ae0bb8371d Commander: message planned battery action with warning together 2022-01-31 20:27:06 -05:00
Matthias Grob 973116c7a4 commander_params: clarify failsafe delay procedure description 2022-01-31 20:27:06 -05:00
Matthias Grob cd560da57c Commander: correct battery failsafe message severity level 2022-01-31 20:27:06 -05:00
Matthias Grob 405852b5c8 Commander: only disallow RC override during battery failsafe delay 2022-01-31 20:27:06 -05:00
Matthias Grob 5ec21835a4 Commander: ensure low battery failsafe flying unatended without GPS 2022-01-31 20:27:06 -05:00
Matthias Grob 1911ec0085 Commander: fix user messageing for low battery failsafe delay 2022-01-31 20:27:06 -05:00
Matthias Grob 52a9040c62 BatterySimulator: recharge battery upon disarming 2022-01-31 20:27:06 -05:00
Matthias Grob 955aad0dfb Commander: consistent hysteresis initialization 2022-01-31 20:27:06 -05:00
Matthias Grob d10f9030ad Commander: add delay before executing low battery failsafe action 2022-01-31 20:27:06 -05:00
Matthias Grob 3af315f2c3 Commander: change battery failsafe to return action instead of executing 2022-01-31 20:27:06 -05:00
Matthias Grob 8eed43b515 Commander: put battery warning and failsafe action in separate functions 2022-01-31 20:27:06 -05:00
Matthias Grob 367b6123e1 state_machine_helper: change main state directly also for low battery RTL 2022-01-31 20:27:06 -05:00
Matthias Grob f49bd9956b state_machine_helper: reuse battery action conditions 2022-01-31 20:27:06 -05:00
Matthias Grob 95b5bc0d84 state_machine_helper: separate low battery warning from action 2022-01-31 20:27:06 -05:00
Jukka Laitinen 70872d94c8 Split px4_layer into kernel and userspace parts for nuttx protected build
Split the px4_layer into user and kernel space libraries. Add some stubs for
user-space (e.g. version) where an interface to the kernel needs to be added

Use posix-versions for cpuload.cpp and print_load.cpp for userspace; these link to nuttx internals. This functinality could be built on top of posix (e.g. procfs) interfaces

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-31 20:26:08 -05:00
Jukka Laitinen 3a6ebe5fc1 NuttX Cmake changes to build combined kernel+userspace image in nuttx protected build
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-31 20:26:08 -05:00
Jukka Laitinen 1f9ace3901 boards/px4/fmu-v5: Add linker scripts for kernel-userspace split
These scripts are used in protected build configuration

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-31 20:26:08 -05:00
Daniel Agar 999737ddd5 ekf2: refactor mag control
- remove class _mag_sample_delayed
 - update mag fusion call graph to use mag sample delayed functionally
 - Ekf::resetMagHeading()
   - use low pass mag directly, but check if valid (magnitude)
   - MAG_FUSE_TYPE_INDOOR treat like auto if heading required
2022-01-31 11:47:10 -05:00
Daniel Agar ad447ab223 commander: respect control mode for prearm requirements
- preflight tolerate ekf2 warnings if not in an attitude/velocity/position mode (eg manual or acro)
2022-01-31 09:48:37 -05:00
Daniel Agar 90358f078f add odometry reset counter (ekf2, mavlink, etc) 2022-01-31 09:19:36 -05:00
mcsauder 463ac8e8a1 Standardize method name style in navigator_main.cpp and whitespace formatting in navigator.h 2022-01-29 21:36:11 -05:00
PX4 BuildBot 3862a24b8e Update submodule sitl_gazebo to latest Sat Jan 29 00:39:00 UTC 2022
- sitl_gazebo in PX4/Firmware (3b277667ff): https://github.com/PX4/PX4-SITL_gazebo/commit/831aa36fea6a1b53d083e0bbad2faf9b31807669
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/2750fe233c6a38dbe60e545ac0ec878d6ac20b1e
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/831aa36fea6a1b53d083e0bbad2faf9b31807669...2750fe233c6a38dbe60e545ac0ec878d6ac20b1e

    2750fe2 2022-01-24 Jaeyoung-Lim - Improve realtime factor for standard_vtol
2022-01-28 22:56:51 -05:00
murata 3b277667ff tfmini: If the distance is 0xFFFF, a negative value is returned 2022-01-28 17:31:12 -05:00
Daniel Agar 274d0d65c6 lib/cdev/posix: increase max FDs 256->512 2022-01-28 17:30:53 -05:00
Jukka Laitinen 058302ecdb Link px4iofirmware against nuttx_mm
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-28 17:30:13 -05:00
Jukka Laitinen 32c53ff2dd Link rc against nuttx_fs in nuttx builds
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-28 17:30:13 -05:00
Jukka Laitinen 9e999a39be Revert erroneous linking of drivers__device to px4_work_queue
This was a mistake in commit 91b812fc42

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-28 17:30:13 -05:00
Jukka Laitinen a2dc6e63cf Fix sdcard logging when crypto is used but algorithm is set to NONE
If the board supports encrypting logfiles, but the parameter SDCARD_ALGORITHM is set to NONE,
the log should be written to the sdcard in plaintext format. This fixes a bug which caused
logger to hang in mutex instead.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-28 17:29:51 -05:00
Daniel Agar 0104b84289 logger: PX4_SITL log all ekf2 publications at full rate for replay 2022-01-28 07:46:54 +01:00
Daniel Agar d2ce9a8560 ROMFS: rc.replay fix ulog_params argument 2022-01-28 07:46:54 +01:00
Jukka Laitinen 70704ff9d6 platforms/nuttx/src/px4/common/CMakeLists.txt: Link px4_layer to nuttx_mm for gran allocators
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 4c75f1d505 platforms/nuttx/CMakeLists.txt: fixes to accommodate other linker changes
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen e1f2bff9be Fix parameters building for nuttx protected/kernel builds
- Don't link to px4_layer
- Don't link to flashparams; flashparams would work only in kernel side
- Add missing link to px4_platform

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 705171eb53 Fix linking for posix targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 138f584e70 fw_pos_control_l1: Add a missing dependency to motion_planning
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 4c3234af38 mavlink: fix linking
- link to nuttx_apps if CONFIG_NET is defined for "netlib_get_ipv4netmask"
- link to tunes

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen e959fcf9d1 bootloader: link stm bootloaders to nuttx_arch for flash functions
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen fe5059b0e8 s32k1xx/led_pwm: link to arch_io_pins
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 1326c51a1c esc_battery: Link to battery library
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 03c0a2d56c Fix some cmake / linker depenencies for boards
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 91b812fc42 link drivers__device to nuttx_karch instead of nuttx_arch in protected build
On protected/kernel build the library would be karch.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 700c13cdff Remove linking of arch_io_pins into drivers_board
This goes the other way around; arch_io_pins is using the pin
definitions from drivers_board, so the drivers_board needs to be linked
into arch_io_pins

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 68729e8ec0 nuttx/rpi io_pins: link to drivers_board for timer_io_channels dependency
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen d181fe0cee nuttx/stm io_pins: link to drivers_board for timer_io_channels dependency
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 76d4b6c7d0 arch_board_reset: link to nuttx_arch / nuttx_karch for up_systemreset dependency
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 7bb33e65ae Remove px4_work_queue linking to px4_platform
Remove linking to px4_plaform in here; this breaks linking for nuttx protected build

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 98906c224b Don't link px4_platform directly to uORB
Since uORB is split into kernel and userspace parts, it is no longer possible to just
link uORB into px4_platform, which is used in both kernel and user side.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 54f1e12684 Link arch_spi with drivers_board
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 51ceb9a85e Add support for compiling modules into kernel side
Define __KERNEL__ macro during compilation and place the module in separate library

Remove default library linking to m or libc on NuttX. Add these in platform layer instead, since
they are different on kernel and user side

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 714df398eb lib/version: Don't link to drivers_board
The needed version specific things come from px4 layer. Since version
is used both in kernel an user sides in protected build, it can't directly
link to drivers_board

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen ff4eae2c9b Fix px4_impl_os for protected build
For NuttX protected or kernel build, the prebuilds can't contain libraries which are
different for kernel and user-space in protected/kerenl builds

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen d94cc1e114 Add kernel/userspace and nuttx_syscall libraries to build
Build NuttX proxies, stubs and separate user space and kernel space libraries

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Daniel Agar 49d9d1c987 ekf2: only set fault status bad_acc_clipping if clipping frequently 2022-01-27 09:59:50 -05:00
Daniel Agar f499749c23 ekf2: mag field strength check respect requirements
- requires valid mag data (_mag_data_ready)
 - respect mag_fusion_type (including MAG_FUSE_TYPE_INDOOR)
2022-01-27 09:05:13 -05:00
CUAVmengxiao 0ddf76ed7f uavcan: Add support for BatteryInfoAux message 2022-01-26 13:44:48 -05:00
CUAVmengxiao 425d03d909 msg: Add full_charge_capacity_wh 2022-01-26 13:44:48 -05:00
zhaoxiaowei 996b01acbc uavcannode need link conversion 2022-01-26 13:43:29 -05:00
Roman Dvořák c8349811d1 Enable logging of mavlink tunnel messages
Co-authored-by: Vit Hanousek <vithanousek@seznam.cz>
2022-01-26 11:10:43 -05:00
Daniel Agar ae3070bbf1 ekf2: make filter update period configurable
- introduces new parameter EKF2_PREDICT_US to configure the filter
update period in microseconds
 - actual filter update period will be an integer multiple of IMU
2022-01-26 10:57:09 -05:00
Daniel Agar 3f25349eb9 commander: don't reject VEHICLE_CMD_DO_SET_ACTUATOR 2022-01-25 18:44:58 -05:00
Oleg Kalachev 2945ce7c87 ekf2: fuse optical flow when magnetometer is disabled
Co-authored-by: bresch <brescianimathieu@gmail.com>
2022-01-25 15:42:10 +01:00
bresch 82e88a9547 [AUTO COMMIT] update change indication 2022-01-25 15:07:48 +01:00
bresch d20e46567e ekf2: improve flow for terrain unit test 2022-01-25 15:07:48 +01:00
bresch 1502d77df2 ekf: refactor fake position control logic 2022-01-25 15:07:48 +01:00
Matthias Grob 42404ade77 FlightTaskOrbit: Use cruise speed and manual acceleration for radius and velocity changes
instead of arbitrary fractions of the maximum radius and velocity.
2022-01-25 11:45:31 +01:00
Matthias Grob 7c55229db7 FlightTaskOrbit: Fix altitude adjustment by stick
This is done by inheriting from FlightTaskManualAltitudeSmoothVel again.
The altitude change by command is taken care of by switching
to the apporach when the altitude difference is big enough and
switching back once the altitude is close enough.

The altitude of the command is not perfectly reached but this can
only be done smoothly when the Orbit has full control over the
altitude smoothing. The independent altitude smoothing is not kept
because it was lacking stick handling like altitude lock and smooth
transitions when opening and closing the vertical position loop.
2022-01-25 11:45:31 +01:00
Matthias Grob d73d8f390b FlightTaskOrbit: Fix vertical speed limit 2022-01-25 11:45:31 +01:00
Matthias Grob 38de07186d FlightTaskOrbit: include acceleration and jerk in approach setpoint publishing
I think they were forgotten and it leads to side effects:
- The acceleration feed-forward does not get executed
- The acceleration setpoint is NAN when initializing the altitude
  smoothing when arriving at the circle
2022-01-25 11:45:31 +01:00
Matthias Grob b9fb8490ba FlightTaskOrbit: initialize position smoothing with previous setpoints instead of current state 2022-01-25 11:45:31 +01:00
Matthias Grob e0337a484b FlightTaskOrbit: remove unnecessary _sanitizeParams() in activation
the parameters are anyways sanitized on every update so even if activate()
sets unfeasible one's they get adjusted on the first update.
2022-01-25 11:45:31 +01:00
Matthias Grob 661496ab24 FlightTaskOrbit: improved naming in applyCommandParameters() 2022-01-25 11:45:31 +01:00
Matthias Grob 8525a8e520 FlightTaskAuto: fix typo pos(i)tion 2022-01-25 11:45:31 +01:00
Thomas Debrunner 4671a741dc FlightTaskOrbit: Do not switch out of circle orbit control logic on radius change. 2022-01-25 11:45:31 +01:00
Beat Küng bbc2b703c3 mavsdk_tests: update catch2 to 2.13.8
Fixes this issue on Fedora: https://github.com/catchorg/Catch2/issues/2178
2022-01-24 16:16:29 -05:00
Daniel Agar 8d03e71c16 drivers/magnetometer/bosch/bmm150: init and self test improvements
- if self test fails consistently proceed with startup, but report failure
2022-01-24 16:16:03 -05:00
Daniel Agar 8217e0f335 drivers/magnetometer/bosch/bmm150: add self test fail perf counter to status 2022-01-24 13:06:32 -05:00
Daniel Agar 5ded1aedcb sensors/vehicle_angular_velocity: add IMU_GYRO_DNF_HMC to configure number of ESC RPM notch filter harmonics 2022-01-24 09:23:03 -05:00
SungTae Moon 4c6e746360 uorb graph: fix the link problem for multi topics (#19062) 2022-01-24 09:18:21 +01:00
Jaeyoung-Lim ee98a3336d Spawn at different height for multivehicle simulation
This commit fixes the spawn location of the multivehicle gazebo sitl script
2022-01-23 17:59:42 -08:00
Daniel Agar 07e6c274d5 uavcan/uavcannode: bridge LogMessage and PX4 ORB_ID(log_message_s) 2022-01-23 20:21:39 -05:00
PX4 BuildBot ed28b216c7 Update submodule sitl_gazebo to latest Sat Jan 22 12:38:57 UTC 2022
- sitl_gazebo in PX4/Firmware (6203ad25c7): https://github.com/PX4/PX4-SITL_gazebo/commit/27298574ce33a79ba6cfc31ed4604974605e7257
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/831aa36fea6a1b53d083e0bbad2faf9b31807669
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/27298574ce33a79ba6cfc31ed4604974605e7257...831aa36fea6a1b53d083e0bbad2faf9b31807669

    831aa36 2021-10-09 Shaochang Tan - fix imu noise model.
2022-01-22 12:24:49 -05:00
PX4 BuildBot 6203ad25c7 Update submodule mavlink to latest Sat Jan 22 00:39:17 UTC 2022
- mavlink in PX4/Firmware (a16a8dceb1b2d234ae963c74621c147f521abce9): https://github.com/mavlink/mavlink/commit/3d8092006ec1b2321f74e84039dadb1ebd3d1f37
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/51abf3c82b3d7137406459dc9b337e57637711ae
    - Changes: https://github.com/mavlink/mavlink/compare/3d8092006ec1b2321f74e84039dadb1ebd3d1f37...51abf3c82b3d7137406459dc9b337e57637711ae

    51abf3c8 2022-01-21 Julian Oes - Component information: add note (#1785)
f5694b29 2022-01-19 Julian Oes - component_info: re-use protocol capabilities (#1786)
2022-01-21 23:10:05 -05:00
Beat Küng 92769bd2b2 dshot: remove BOARD_DSHOT_MOTOR_ASSIGNMENT & handle timer channel gaps 2022-01-21 20:41:15 -05:00
Daniel Agar 4de9c598fa bmm150: retry probe up to 3 times 2022-01-21 15:51:43 -05:00
David Sidrane a11fe60135 imxrt:ADC extend timeout 2022-01-21 13:07:44 -05:00
Daniel Agar 7cb8ed3a1f sensors/vehicle_gps_position: don't work with 64 time with 32 bit floats 2022-01-21 09:18:49 -05:00
JaeyoungLim 0607982b23 Publish orbit status also when the waypoint is a loiter waypoint (#19048)
* Publish orbit status also when the waypoint is a loiter waypoint

* Remove redundant orbit status publishing
2022-01-21 09:13:03 +01:00
Beat Küng bcd057ac3e uORB: fix copy-paste mistake in orb_print_message_internal
Could have led to invalid memory access.
2022-01-20 12:58:20 -05:00
bresch a2260e53da ekf2: replace yaw failure detection criteria
The existing logic using the angle between velocity vectors failed to
determine a yaw failure in practice because the state velocity is often
too small compared to its uncertainty to be used. In all the failures
reported, the yaw emergency estimator converged properly and yaw reset
would have fixed the issue.
A much simpler check using the yaw difference between the main EKF
and the emergency estimator is now used to tell if the vel/pos update
failure is most likely caused by a wrong heading.
2022-01-20 11:54:24 +01:00
Daniel Agar 446729566d platforms/nuttx: px4io_serial always cleanup DMA before next bus exchange
- this really shouldn't be necessary, but worst case it's harmless and
much better than potentially falling out of the sky
2022-01-19 18:00:18 -05:00
Jaeyoung Lim 0dea56f88b Use current_sp for publishing orbit status 2022-01-19 12:00:03 -05:00
Jaeyoung-Lim dec5e7e9c8 Publish orbit status whenever the vehicle is in loiter
This commit moves the publish orbit status to be published whenever the vehicle is considering a loiter setpoint
2022-01-19 12:00:03 -05:00
Thomas Stastny 19c98b8841 npfg: fix typo in Vector2f indexing 2022-01-19 11:17:44 -05:00
bresch e89e3c1b0c ekf2: extract logic to test yaw emergency estimate quality 2022-01-19 09:05:41 -05:00
bresch ea80c5027e ekf2: split yaw estimator state getter into several functions 2022-01-19 09:05:41 -05:00
dagar 476c1e5c09 [AUTO COMMIT] update change indication 2022-01-19 09:04:53 -05:00
bresch ffebd8e771 ekf2: initialize cos tilt variable assuming no tilt 2022-01-19 09:04:53 -05:00
Daniel Agar 92a5bbe97f ekf2: improve ring buffer sizing and dynamically allocate 2022-01-19 09:04:53 -05:00
Daniel Agar 36605bfff6 sensors: lower SENS_MAG_RATE default
- reduce estimator 3D mag fusion cpu load (-3% on Pixhawk4)
2022-01-19 08:51:57 -05:00
Matthias Grob c9f7c20d46 MulticoperPositionController: time failsafe messages together
The following output instead of printing the
action "stop and wait" just once:

WARN  [mc_pos_control] invalid setpoints
WARN  [mc_pos_control] invalid setpoints
WARN  [mc_pos_control] Failsafe: stop and wait
WARN  [mc_pos_control] invalid setpoints
WARN  [mc_pos_control] Failsafe: stop and wait
WARN  [mc_pos_control] invalid setpoints
WARN  [mc_pos_control] Failsafe: stop and wait
2022-01-19 14:31:19 +01:00
Matthias Grob d4e356a1ac PosititionControl: fix integrator windup with invalid setpoint 2022-01-19 14:31:19 +01:00
Matthias Grob 8811482f1d PositionControlTest: add integrator windup with invalid setpoint combination unit test
This bug was by chance found during simulation testing and debugging.
The unit test is to easily reproduce and cover this case.
2022-01-19 14:31:19 +01:00
Silvan Fuhrer 632dfa55e6 FW Pos C: add option to disable airspeed setpoint via stick input
-rename FW_POSCTL_INV_ST to FW_POS_STK_CONF and make bitmask out of it:
  - bit 0: alternative mapping (height rate on throttle stick, airspeed on pitch)
  - bit 1: enable/disable airspeed setpoints via stick

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-19 10:13:07 +01:00
Silvan Fuhrer cbb8c90245 ControlAllocation: fix calculation of roll/pitch normalization scale
Take into account the actual number of roll and pitch acutators,
instead of assuming that all actuators have a roll/pitch component.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-19 08:22:12 +01:00
Silvan Fuhrer 0950bb81ab ControlAllocation: update normalization scale only if matrix updated is forced
The forced flag is used to distinguish between updates due to a configuration
(parameter) change (only enabled when disarmed), and matrix updates due to motor
tilt change. Only update the normalization scale if the forced flag is true, and
use a tilt angle of vertical position for it to have the scales tilt-invariant.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-19 08:22:12 +01:00
CUAVmengxiao 258a563dd5 barometer: Add ICP10100 and ICP1011 2022-01-18 19:14:40 -05:00
FARHANG fe44e281e5 ROMFS: Holybro X500 v2 airframe addition 2022-01-18 15:11:41 -05:00
Daniel Agar dd6b7fa98f sensors: switch status PX4_INFO -> PX4_INFO_RAW 2022-01-18 15:00:18 -05:00
Daniel Agar b1d2a0cc4e sensors: simplify timestamp data validator handling 2022-01-18 14:57:18 -05:00
Daniel Agar 8067207ea6 px4_work_queue: rename serial port WQs 2022-01-18 14:56:15 -05:00
bresch 953c90d3a6 failure detector: change imbalanced propeller metric
Use standard deviations instead of variances to get a linear metric
2022-01-18 12:24:35 -05:00
bresch 408cf011b2 failure detector: fix dt computation 2022-01-18 12:24:35 -05:00
Daniel Agar 7eee949a81 Jenkins: hardware tolerate irrelevant uorb status failure 2022-01-18 12:23:05 -05:00
Daniel Agar 548b7d5ece sensors/vehicle_imu: on calibration change don't resume in flight calibration learning immediately 2022-01-18 11:22:41 -05:00
Daniel Agar ece09064c4 parameters: perform verification pass twice
- on NuttX with MTD storage this is to ensure we are verifying what's
actually stored on ramtron or eeprom, not just what's cached by bchlib
2022-01-18 09:47:28 -05:00
alexklimaj cdb6a437a0 Fix UAVCAN beep not started 2022-01-17 21:49:53 -05:00
PX4 BuildBot 0bb9cce1ce Update submodule mavlink to latest Tue Jan 18 00:39:07 UTC 2022
- mavlink in PX4/Firmware (37e04f56da3916dcb518eeba66b0888db1cd8c32): https://github.com/mavlink/mavlink/commit/75204adad281e017e58e0a68fdb0a478c2b74d6f
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/3d8092006ec1b2321f74e84039dadb1ebd3d1f37
    - Changes: https://github.com/mavlink/mavlink/compare/75204adad281e017e58e0a68fdb0a478c2b74d6f...3d8092006ec1b2321f74e84039dadb1ebd3d1f37

    3d809200 2022-01-14 Hamish Willee - MAV_PROTOCOL_CAPABILITY_FLIGHT_INFORMATION - mark as reserved capability (#1775)
68ff649f 2022-01-13 Hamish Willee - MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT - deprecate (#1768)
ae531d97 2022-01-13 Peter Barker - Move "external" dialects to be normal dialects (#1761)
00a3f8ed 2022-01-12 Julian Oes - Revert "Delete unused cmake tree (#1760)" (#1782)
aa0764bd 2022-01-12 Hamish Willee - MAV_PROTOCOL_CAPABILITY_PARAM_UNION - rename/reserved (#1771)
c3b46620 2022-01-12 Hamish Willee - Update mavlink_udp.c example readme to use mavlink 2 (#1780)
0449a5ec 2022-01-12 Tatsuya Yamaguchi - add extended sensor status bits to MAVLink UDP example (#1778)
fc3539e1 2022-01-10 Josh Henderson - ardupilotmega: Sync to ArduPilot downstream 10-JAN-2022 (#1777)
27395aa7 2022-01-06 Julian Oes - pymavlink: update submodule to latest master (#1776)
2180611b 2022-01-06 Hamish Willee - MAV_WINCH_STATUS_CLUTCH_ENGAGED: Winch clutch is engaged allowing motor to move freely
7c6f104f 2022-01-05 Jacob Dahl - Extend WINCH_STATUS_FLAG and WINCH_ACTION (#1766)
dcb44e75 2022-01-06 Hamish Willee - Delete unused cmake tree (#1760)
5b8bec5b 2022-01-05 Hamish Willee - common.xml: AUTOTUNE_AXIS_YAW - fix value to correct one for bitmask (#1767)
2022-01-17 21:36:02 -05:00
Julian Oes be9385ef06 cmake: use at least 1 core to build SITL
If we use -j 0, ninja fails with invalid argument.
2022-01-17 17:07:31 -05:00
Daniel Agar 2fb82789fe lib/wind_estimator: pass q_att as const reference 2022-01-17 16:59:28 -05:00
Beat Küng 4cbee44220 rc.mc_defaults: only set IMU_GYRO_RATEMAX if default
Allows boards to set a higher rate.
2022-01-17 10:41:33 -05:00
Beat Küng 425b268feb boards: add holybro/kakuteh7
known issues:
- flash-based params does not work on H7 (due to ECC), so params are on
  SD card. The last flash sector is still reserved however.
- output channel 6 does not support DShot (the implementation does not
  handle channel gaps)
- flashing of the 2. flash bank is much slower (around 3x), than the 1.
  bank for some unknown reason.
- after the BL jumps to the app, there's several seconds passing until
  stm32_boardinitialize() is called.
2022-01-17 10:41:33 -05:00
Beat Küng cd2bb14f9b stm32h7/micro_hal.h: add RCC_APB1ENR_TIM4EN 2022-01-17 10:41:33 -05:00
Berker Canatar 9249d3ae3d Update current year in LICENSE 2022-01-17 08:10:57 +01:00
Silvan Fuhrer 0ce44cebb7 WindEstimator: use vehicle heading instead of ground course for initialisation
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-14 17:42:01 -05:00
Silvan Fuhrer 1a4b2b37bb AirspeedValidator: remove unused variable _tas_gate
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-14 17:42:01 -05:00
Thomas Stastny 3b6c9448aa npfg: fix format CMakeLists 2022-01-14 22:05:53 +01:00
Thomas Stastny 13c36155ce fw_pos_ctrl: allow npfg to operate without wind estimate, dont switch controllers 2022-01-14 22:05:53 +01:00
Thomas Stastny 082e320191 integrate optional NPFG library for wind-aware fixed-wing guidance 2022-01-14 22:05:53 +01:00
Beat Küng 66cbbf9f2e control_allocator: use 'bidirectional' to clarify reversible motors 2022-01-14 12:18:29 -05:00
Beat Küng 9ca58f5e97 actuator outputs: always add reverse range param
and remove the possibility to set min > max to reverse.

Initially the idea was to add the checkbox on the UI side, to avoid adding
another param, but I don't think I'll go through the extra effort on the
QGC side.
2022-01-14 12:18:29 -05:00
Daniel Agar 98a9748bb8 drivers/dshot: use uORB::PublicationMulti for ORB_ID(esc_status)
- there can be multiple different outupt modules publishing esc_status (eg dshot & uavcan)
2022-01-14 12:17:49 -05:00
Daniel Agar 81ecd130fc uavcan: ESC publish esc_status in callback instead of timer
- this ensures every ESC status gets published with minimal latency
 - also prevents publishing ORB_ID(esc_status) when there's no actual
data (bug)
2022-01-14 12:17:49 -05:00
David Sidrane 25099ce11f fmurt1062-v1:Added GPS driver dropped in move to boardconfig 2022-01-14 07:04:06 -08:00
Julian Oes 651702c2c1 setup: don't install ccache
I don't think the PX4 setup script should decide whether a user is to
use ccache or not. Anecdotally, I've heard from some in the dev team
that they are not using it themselves, so I don't think there is a good
basis to push it onto others.

That being said, we can of course still use ccache as part of the CI
builds nevertheless.
2022-01-14 10:01:23 -05:00
Roman Bapst dc6067ed12 Update src/modules/fw_att_control/fw_att_control_params.c
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-14 16:34:44 +03:00
RomanBapst 34bb671a73 improve parameter descriptions for fw maximum/minimum roll/pitch angles
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-01-14 16:34:44 +03:00
RomanBapst 555ee371e8 FixedWingPositionControl: consistently use the same roll and pitch angle
limits for autonomous and semi-autonomous modes (altitude & position control)

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-01-14 16:34:44 +03:00
Thomas Stastny f8c2ee73db handle line segment termination in navigator
- if following line segment (fixed-wing position control) switch waypoint when in acceptance radius OR passed the second waypoint. this handles the case of being beyond the second waypoint but not within the acceptance radius without the need to fly back to the waypoint (e.g. after a loiter up to waypoint alt)
- sync navigator and fw pos ctrl waypoint acceptance altitude
2022-01-13 13:43:02 +01:00
Claudio Micheli 8a01135a93 Commander: more changes to use events with escs and battery failures
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2022-01-13 08:40:34 +01:00
Claudio Micheli d122513197 extend support for Battery status message
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2022-01-13 08:40:34 +01:00
Daniel Agar bb1177d504 sensor_calibration: refactor and centralize calibration slot logic
- centralize logic for selecting a preferred calibration slot
   - automatically use existing calibration slot if it exists, otherwise
find first available slot, with a preference for a requested index
 - existing commander calibration methods rewrite all calibration slots
to match current sensor ordering
2022-01-12 16:16:26 -05:00
alexklimaj d1304e1ceb Add CANNODE_GPS_RTCM 2022-01-12 15:30:38 -05:00
Silvan Fuhrer 3cd1e0ce19 MCLandDetector: clean up logic for ground effect
Before: in_ground_effect was always true with the default settings (LNDMC_ALT_GND =-1)
 and when a distance sensor was present with valid data.
Now: default of LNDMC_ALT_GND is set to 2m by default, and if set to a negative value
then in_ground_effect is never set to true

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-12 18:41:16 +01:00
Matthias Grob 443406ea2b FlightTaskAuto: use longerThan() when possible in vector calculations 2022-01-12 15:12:24 +01:00
bresch 4fc7348582 mpc: leave room for altitude error control during descent and descent
Since the same parameter is used to generate the trajectory and to
saturate the controller, there is no additional space for the output of
the position controller once it is filled with the feedforward, letting
the altitude grow uncontrolled.
2022-01-12 13:33:48 +01:00
bresch ea7d2334c9 mpc: add parameter for ascent/descent speed in auto modes 2022-01-12 13:33:48 +01:00
Daniel Agar 463513f31f Jenkins: hardware disable auto cal before on board tests 2022-01-11 11:47:02 -05:00
Daniel Agar 2eec7842ae sensors/vehicle_imu: fix SENS_IMU_AUTOCAL saving logic
- on cycles that don't check for updated calibraton (estimated bias) we
check if there's anything valid to save (when disarmed)
2022-01-11 11:47:02 -05:00
romain-chiap 4e06b40e2b sih: add tailsitter support, disable UAVCAN 2022-01-11 08:29:19 +01:00
Julian Oes 6ed48ad0c0 ROMFS: Remove now unused variable 2022-01-10 23:04:10 -05:00
Julian Oes b52972f3f8 ROMFS: remove duplicate startup tune
This must have come back in a rebase.
2022-01-10 23:04:10 -05:00
Julian Oes 1baecf07ad Mantis: remove startup tune volume
Let's just leave it at the default like the rest of the beeps.
2022-01-10 23:04:10 -05:00
Julian Oes 38439256e5 Mantis: move MIXER vars to airframe init
The two were actually conflicting and are now consolidated.
2022-01-10 23:04:10 -05:00
Julian Oes 14fb019821 Mantis: move SYS_DM_BACKEND to board_defaults
Otherwise it is set too late and not used during startup.
2022-01-10 23:04:10 -05:00
Julian Oes feb2987fa8 Mantis: remove unused transition script
When coming from the previous stack there are no params anywhere, so
this will not execute anyway.
2022-01-10 23:04:10 -05:00
Julian Oes a061d7a02a Mantis: use dataman in RAM 2022-01-10 23:04:10 -05:00
Julian Oes b3d830dd11 Mantis: move power off tune to commander
This way we don't allocate inside the interrupt context.
2022-01-10 23:04:10 -05:00
Julian Oes 372a0da987 Mantis: move upload.sh into boards/atl/mantis-edu 2022-01-10 23:04:10 -05:00
Julian Oes 73044c51f9 vmount: only send CONFIGURE cmd if type changes
We don't always have to send MOUNT_CONFIGURE but really only when the
control data type actually changes.
2022-01-10 23:04:10 -05:00
Julian Oes 22180a2639 mavlink: make range params optional
If there is no range sensor compiled in, these two params do not seem to
be available. Hence, we need to make them optional.
2022-01-10 23:04:10 -05:00
Julian Oes 0ffdccbd60 Mantis: Add MPC2520 again 2022-01-10 23:04:10 -05:00
Julian Oes b44f5b49ca Mantis: add tap_esc to Kconfig 2022-01-10 23:04:10 -05:00
Julian Oes 8331339927 atl_mantis: update bootloader binary again
This includes the fix which disables the UART overrun.
2022-01-10 23:04:10 -05:00
Julian Oes b1a1e4913b Mantis: rotate flow by 180 degrees
This seemed to be exactly inverted.
2022-01-10 23:04:10 -05:00
Julian Oes 28d69d3285 Mantis: fix throttle RC calibration 2022-01-10 23:04:10 -05:00
Julian Oes b92aa92bec Mantis: fix mixer loading
The ordering before did not work out, and without the sleep it fails.
2022-01-10 23:04:10 -05:00
Julian Oes 06b5b58b3b Mantis: increase Tx buffer to with gimbal->camera
This way log streaming works with much less drops.
2022-01-10 23:04:10 -05:00
Julian Oes 11b60904c3 Mantis: use lower log streaming rate 2022-01-10 23:04:10 -05:00
Julian Oes ca1fabf80a logger: add rate factor to slow logging down
This is required for the Mantis to reduce the log streaming rate.
2022-01-10 23:04:10 -05:00
Julian Oes f3a278dce5 Mantis: add comment about boot order.
The boot order is now:
1. The PX4 bootloader boots, and starts the camera.
2. The camera starts and sends the boot command to the PX4 bootloader.
3. PX4 starts.
2022-01-10 23:04:10 -05:00
Julian Oes ecfc7cc24f Mantis: set bootloader timeout to 180 seconds
The first byte 0xb4 is 180. This number is read by the bootloader.
2022-01-10 23:04:10 -05:00
Julian Oes e15cbc3a6b Mantis: move tap_esc to extras
This way we work around an issue where tap_esc got stuck during bootup
in a cold boot.
2022-01-10 23:04:10 -05:00
Julian Oes 24bdf79180 ROMFS: fix debug output 2022-01-10 23:04:10 -05:00
Julian Oes c2e0e09b2d commander: reduce PWM max again
This is no longer required now.
2022-01-10 23:04:10 -05:00
Julian Oes e4763f15f6 Mantis: add RC hacks
This changes the way RC is handled for the Mantis:
- The RC values are re-written when arriving over MAVLink. They are
  rescaled from 0..4095 to 1000..2000 and the channel bits added to
  separate channels. This makes the downstream handling easier.
- Gimbal pitch is moved from Aux1 to Aux2 as that should be the default.
- Aux3 and Aux4 are used for the photo and video trigger.
- The speed button is used as the FLTMODE channel and set to switch
  between POSCTL and ALTCTL.
2022-01-10 23:04:10 -05:00
Julian Oes 9fe7a40673 manual_control: enable sending camera commands 2022-01-10 23:04:10 -05:00
Julian Oes 1754e25920 vmount: add param to use RC input for angular rate
Until now RC input was translated to angles only. I added the param
MNT_RC_IN_MODE which allows the RC input to be used for angular rate.
2022-01-10 23:04:10 -05:00
Julian Oes f03990f015 Mantis: prevent output setup from running
This is not required as we start tap_esc directly and load the mixer.
2022-01-10 23:04:10 -05:00
Julian Oes cb15728536 Mantis: save mission in RAM
This is using a reduced number of mission items of 1000 instead of 2000
in order to fit in RAM.
2022-01-10 23:04:10 -05:00
Julian Oes 7d09635fb6 ROMFS: add option for dataman args
This is required for boards requiring dataman in RAM.
2022-01-10 23:04:10 -05:00
Julian Oes bb09646b41 ROMFS: allow the output config to be skipped
This is required for the ATL Mantis-EDU.
2022-01-10 23:04:10 -05:00
Julian Oes 0fbb03dee1 ROMFS: add option for startup tune volume
Otherwise the CBRK_BUZZER param does not work as it should.
2022-01-10 23:04:10 -05:00
Julian Oes a50f7af3b1 Mantis: update bootloader and SYS_AUTOSTART
This adds a check for the previous SYS_AUTOSTART id. If it is still the
old/previous SYS_AUTOSTART id, it will flash the new bootloader as well
as set the proper SYS_AUTOSTART id.
2022-01-10 23:04:10 -05:00
Julian Oes fa282cfe86 Mantis: make startup less loud 2022-01-10 23:04:10 -05:00
Julian Oes 880292f5d7 commander: relax RC min/max 2022-01-10 23:04:10 -05:00
Julian Oes 2b4b87571c Mantis: adapt RC calibration
This is with a newer RC firmware.
2022-01-10 23:04:10 -05:00
Julian Oes aa007dadee commander: fix emergency power off
From what I can see the CONFIG_BOARDCTL_POWEROFF is not really used
anywhere, however, the BOARD_HAS_POWER_CONTROL is something that is set,
e.g. for the Mantis, to allow power off.
2022-01-10 23:04:10 -05:00
Julian Oes 6301fa35c1 commander: add command to power off 2022-01-10 23:04:10 -05:00
Julian Oes 4a43155e69 Mantis: remove duplicate define 2022-01-10 23:04:10 -05:00
Julian Oes 7759ffb00e Mantis: reduce power button hold time
This is more intuitive and matches the tune.
Hopefully, it's still long enough to prevent any false positives.
2022-01-10 23:04:10 -05:00
Julian Oes 6960600c28 Mantis: play power off tune
To play a power off tune, I needed to convert the file to C++, so that I
could use the uORB::Publication.

The current implementation starts playing the power off sound but then
stops it as soon as the button is released.

The problem is mostly that we only get an interrupt when the button is
pressed or released but we don't seem to be able to poll it, at least
not in the current state.
2022-01-10 23:04:10 -05:00
Julian Oes 860b23dd17 tunes: add tune to power off
This is used by the ATL Mantis EDU to help the user realize when the
drone is powered off.
2022-01-10 23:04:10 -05:00
Julian Oes a21fefda48 tune_control: prevent segfault 2022-01-10 23:04:10 -05:00
Julian Oes 856e229482 ROMFS: reset the startup sound for Mantis 2022-01-10 23:04:10 -05:00
Julian Oes 1be4e35ed4 ROMFS: move startup sound further down
This way it works for the Mantis where the tap_esc driver needs to be
running before beeping is posssible.
2022-01-10 23:04:10 -05:00
Julian Oes 76920171c7 tap_esc: fix tunes
This removes the redundant _play_tone flag and instead just polls the
next_note() interface to check if there is something to play.
2022-01-10 23:04:10 -05:00
Julian Oes de1849167d Mantis: Add upload_wifi target to upload firmware 2022-01-10 23:04:10 -05:00
Julian Oes 185e4cfd48 Mantis: set range finder limits, and min quality
The limits might somewhat match the sensor, guessed based on the
original driver.

The quality is set so that spikes when sitting on the ground are not
used.
2022-01-10 23:04:10 -05:00
Julian Oes dd00e43ca3 mavlink: set signal_quality (and sane variance)
Otherwise this distance data is actually not used at all.
2022-01-10 23:04:10 -05:00
Julian Oes aefbd80b53 mavlink: use optical flow limits from params
This makes more sense than hard-coding arbitrary values.
2022-01-10 23:04:10 -05:00
Julian Oes f48c3a2cc6 mavlink: don't handle RC_CHANNELS
This is a status/output but should not be an input for the autopilot.
Instead RC_CHANNELS_OVERRIDE should be used.
2022-01-10 23:04:10 -05:00
Daniel Agar cc1fee525a lib/sensor_calibration: handle calibration slot change on parameter update 2022-01-10 17:16:50 -05:00
Daniel Agar ab547bb982 sensors/vehicle_angular_velocity: RPM notch don't fully disable if first harmonic frequency drops below minimum frequency
- keep higher frequency harmonics enabled per ESC
 - cleanup timestamp handling (timeouts, etc)
2022-01-10 14:51:29 -05:00
Daniel Agar b58922a5d7 sensors/vehicle_angular_velocity: notch filters automatically reset on sufficient parameter change 2022-01-10 14:51:29 -05:00
Daniel Agar 7d632254be NotchFilter push initialization/reset into filter
- this simplifies the reset by allowing a notch filter to reset as
needed
 - improves cascade initialization, on reset each filter will reset
properly from the previous
2022-01-10 14:51:29 -05:00
Daniel Agar 2e2ac36cab drivers/uavcan: make firmware server available on both CAN1/CAN2 always (if enabled)
- uavcan firmware server no longer shuts down when arming (nodes might restart in flight)
 - always handle UAVCAN parameters with or without the FW server active
 - remove legacy ESC enumeration in FW server
2022-01-10 11:13:02 -05:00
Daniel Agar d9e7315420 sensors: automatically set initial accel/gyro calibration if stable bias available 2022-01-10 10:46:37 -05:00
Daniel Agar e731fcdbc0 sensors (accel/gyro/mag) determine if external with device id 2022-01-10 10:31:07 -05:00
Daniel Agar 45040be669 ekf2: accel/gyro/mag sensor cal minor cleanup
- cleanup obsolete comments
 - remove debug helpers
 - add additional variance requirements to mag bias stable (matching accel & gyro)
2022-01-10 09:55:59 -05:00
Daniel Agar c3ca40a98f drivers/px4io: delete monitor command
- the px4io console isn't even connected on most flight controllers
2022-01-10 09:51:11 -05:00
Daniel Agar e5d49f6fff drivers/px4io: delete unused detect 2022-01-10 09:51:11 -05:00
Daniel Agar d077ca15fb delete PWM_SERVO_SET, PWM_SERVO_SET_MODE, systemcmds/motor_ramp, and pwm_out test 2022-01-10 09:51:11 -05:00
Daniel Agar df44df2df6 delete systemcmds/esc_calib
- this is redundant with commander esc_calibration
2022-01-10 09:51:11 -05:00
Daniel Agar 03bdc460d8 drivers/px4io: PWM_SERVO_GET_FAILSAFE_PWM don't get registers directly 2022-01-10 09:51:11 -05:00
Daniel Agar d3301ba826 delete PWM_SERVO_GET_TRIM_PWM 2022-01-10 09:51:11 -05:00
Daniel Agar 8de59dad32 delete PWM_SERVO_SET_TERMINATION_FAILSAFE 2022-01-10 09:51:11 -05:00
Daniel Agar 1739ecc981 delete PWM_SERVO_SET_FORCE_FAILSAFE 2022-01-10 09:51:11 -05:00
Daniel Agar 649d3e3f55 delete PWM_SERVO_SET_DISABLE_LOCKDOWN/PWM_SERVO_GET_DISABLE_LOCKDOWN 2022-01-10 09:51:11 -05:00
Daniel Agar b7ed4fd3e0 delete PWM_SERVO_SET_DISARMED_PWM 2022-01-10 09:51:11 -05:00
Daniel Agar 551a31ce2f delete PWM_SERVO_SET_FAILSAFE_PWM 2022-01-10 09:51:11 -05:00
Daniel Agar daa925137c boards: move default battery calibration defines to parameter defaults 2022-01-10 09:49:36 -05:00
Daniel Agar 78b3d22471 lib/mixer_module: consume output_limit library 2022-01-10 11:59:55 +01:00
Daniel Agar 71d8b15b73 commander: fix COM_HOME_EN missing case
- VEHICLE_CMD_COMPONENT_ARM_DISARM is yet another path that calls set_home_position()
2022-01-09 20:52:07 -05:00
Daniel Agar 0b1402afe2 Tools/HIL/test_airframes.sh enable all mavlink and GPS 2022-01-08 18:11:43 -05:00
bresch 57fa9c545a PosControl: fix hover update equation
The integrator now absorbs properly the change in hover thrust
2022-01-08 15:42:10 +01:00
Daniel Agar 6c97700eaa move sensor calibration parameters to yaml 2022-01-07 19:00:41 -05:00
Matthias Grob bbad4a5397 FlightTaskAuto: Respect altitude with offtrack state
To avoid weird cases where the altitude is different enough and
the offtrack state flies to the target altitude instead of the closest
point on the track between the waypoints.
2022-01-07 10:30:39 -05:00
Julian Oes be0a5b4b32 workflows: Set up batch fuzzing every 24 hours
So instead of fuzzing each and every PR for 10minutes, we just fuzz
30mins every 24 hours, at 6am UTC which should be a time when US and
Europe might be least active.
2022-01-07 10:17:12 -05:00
Julian Oes 2cbc993976 Add clusterfuzzlite to fuzz in CI 2022-01-07 10:17:12 -05:00
Julian Oes 9eda5b373c posix: add fuzz testing using MAVLink messages
This adds the env option PX4_FUZZ which runs the LLVM libFuzzer which
throws random bytes at mavlink_receiver using MAVLink messages over UDP.

The MAVLink messages that are being sent are valid, so the CRC is
calculated but the payload and msgid, etc. are generally garbage, unless
the fuzzing gets a msgid right by chance.

As I understand it, libFuzzer watches the test coverage and will try to
execute as much of the code as possible.
2022-01-07 10:17:12 -05:00
Daniel Agar c17a9e8003 sensors/vehicle_imu: refactor SensorCalibrationUpdate() to separate accel/gyro cal saving 2022-01-07 09:40:51 -05:00
Daniel Agar aec97e0020 sensors: minor IMU bias saving updates
- sensors/vehicle_imu: reset learned cal on any calibration change
during parameter update
 - sensors/vehicle_imu: cleanup logic estimated bias -> calibration offset
saving
   - don't invalidate saved calibration (the point is to keep the last valid)
   - remove old debug code, etc
 - sensors/vehicle_imu: notify parameter changes if accel or gyro
calibration has changed
 - lib/sensor_calibration: add calibrated() and calibration_index()
getters, keep Accelerometer/Gyroscope/Magnetometer in sync
2022-01-07 09:40:51 -05:00
Silvan Fuhrer 5d7ddf5734 FW Pos Control: use SlewRate library for airspeed setpoint
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-07 09:39:10 -05:00
Daniel Agar 30ccfdb2ed sensors/vehicle_magnetomeer: fix copyright year 2022-01-06 20:27:56 -05:00
Julian Oes 07d75d85cf mavsdk_tests: trigger flush to stdout every second 2022-01-06 09:24:32 -05:00
Julian Oes 2d8ebc6839 mavsdk_tests: add timestamp to log output
The timestamp is added when the output is queued up, rather than later
when the queue is emptied and some time might have passed.
2022-01-06 09:24:32 -05:00
Julian Oes dd6fb58f82 mavsdk_tests: don't stall mavsdk_tests binary
This is an attempt to fix the test failure where PX4 detects an RC
timeout presumably because the tester process mavsdk_tests is stalled
and does not send RC control messages in time.
2022-01-06 09:24:32 -05:00
Julian Oes 952cfe2fd7 ekf2: fix uninitalized memory warning
The imu and sensor_combined data should not be used when it has not been
updated yet, otherwise this triggers a memory sanitizer warning:

Conditional jump or move depends on uninitialised value(s)
   at 0x2DA7AA: __sanitizer_cov_trace_const_cmp1 (in build/px4_sitl_default-clang/bin/px4)
   by 0x3C4E79: EKF2::Run() (src/modules/ekf2/EKF2.cpp:401)
   by 0x6EB881: px4::WorkQueue::Run() (platforms/common/px4_work_queue/WorkQueue.cpp:187)
   by 0x6ECB9D: px4::WorkQueueRunner(void*) (platforms/common/px4_work_queue/WorkQueueManager.cpp:230)
   by 0x4C07258: start_thread (in /usr/lib/libpthread-2.33.so)
   by 0x4D415E2: clone (in /usr/lib/libc-2.33.so)

Conditional jump or move depends on uninitialised value(s)
   at 0x3C4E7C: EKF2::Run() (src/modules/ekf2/EKF2.cpp:401)
   by 0x6EB881: px4::WorkQueue::Run() (platforms/common/px4_work_queue/WorkQueue.cpp:187)
   by 0x6ECB9D: px4::WorkQueueRunner(void*) (platforms/common/px4_work_queue/WorkQueueManager.cpp:230)
   by 0x4C07258: start_thread (in /usr/lib/libpthread-2.33.so)
   by 0x4D415E2: clone (in /usr/lib/libc-2.33.so)
2022-01-05 16:20:06 -05:00
romain-chiap 4264ec992d Update 1101_rc_plane_sih.hil
This bugged me for a while, the sih FW would not takeoff from the ground. Now, I found it!
2022-01-05 16:18:53 -05:00
Silvan Fuhrer 0a82025faf FW Position Control: some airspeed setpoint handling adaptions
- introuce slew rate limiting of airspeed setpoint (with slew rate of 1 m/s/s)
- some refactoring and clean up

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-05 17:06:41 +01:00
Silvan Fuhrer 20a1e5f77c FW Position Control: simplify underspeed disabling logic for tecs
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-05 17:06:41 +01:00
Matthias Grob bbb04ab4b8 Remove relaying of maximum altitude through land detector 2022-01-05 14:54:59 +01:00
Julian Oes 2445fa8b4c commander: prevent uninitialized warning
This prevents a memory sanitizer/valgrind warning:

Conditional jump or move depends on uninitialised value(s)
   at 0x2DA536: __sanitizer_cov_trace_cmp4 (in build/px4_sitl_default-clang/bin/px4)
   by 0x6590D8: FailureDetector::update(vehicle_status_s const&, vehicle_control_mode_s const&) (src/modules/commander/failure_detector/FailureDetector.cpp:76) by 0x3817DF: Commander::run() (src/modules/commander/Commander.cpp:2605)
   by 0x38B10B: ModuleBase<Commander>::run_trampoline(int, char**) (platforms/common/include/px4_platform_common/module.h:180)
2022-01-05 10:53:51 +01:00
Daniel Agar 170849c8f8 ekf2: expand accel bias stability criteria 2022-01-04 13:57:49 -05:00
PX4 BuildBot 846f807eff Update submodule mavlink to latest Tue Jan 4 12:39:05 UTC 2022
- mavlink in PX4/Firmware (a8c88f1c98212e72a266fec8a9e7c0da2a14f3af): https://github.com/mavlink/mavlink/commit/4bc0de9c38626fe3640de266118af5fd64fe6a18
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/75204adad281e017e58e0a68fdb0a478c2b74d6f
    - Changes: https://github.com/mavlink/mavlink/compare/4bc0de9c38626fe3640de266118af5fd64fe6a18...75204adad281e017e58e0a68fdb0a478c2b74d6f

    75204ada 2022-01-04 Hamish Willee - Add ability to specify axis to autotune (#1759)
2022-01-04 09:32:43 -05:00
bresch d094fbbd70 ekf2: fix delta angle coning metric 2022-01-04 09:28:48 -05:00
PX4BuildBot 6fbc0e95d0 [AUTO COMMIT] update change indication 2022-01-04 09:12:45 -05:00
PX4 BuildBot a89f21d566 Update world_magnetic_model to latest Tue Jan 4 11:14:11 UTC 2022 2022-01-04 09:12:45 -05:00
Daniel Agar e835a7c4ea boards: enable readline history and tab completion on newer boards 2022-01-03 10:44:32 -05:00
Daniel Agar 9d1558af25 ekf2: selector use status timestamp for timeout rather than timestamp_sample (delayed time horizon)
- update stale checks for publication to use hrt elapsed time from
timestamp sample
2022-01-03 09:20:44 -05:00
Daniel Agar 333edfe12f ekf2: use delayed IMU timestamp for publication's timestamp_sample 2022-01-03 09:20:44 -05:00
Daniel Agar 35502c249d ekf2: don't use Vectors for height innovations (baro, rng, etc) 2022-01-03 09:20:20 -05:00
David Sidrane eac92ec671 imxrt:ADC fix timeouts 2022-01-03 06:02:19 -08:00
Jaeyoung-Lim bdec85fdd0 Disable local vehicle setpoints while in transition
This commit adds disabling vehicle setpoints while in transition
2022-01-03 11:09:06 +01:00
Jaeyoung-Lim 4127dfa791 Log vehicle local position setpoints
This commit enables the local position setpoints to be logged by publishing vehicle_local_position_setpoint
2022-01-03 11:09:06 +01:00
Jaeyoung Lim 52418f13b0 Use groundspeed for navigate heading 2022-01-03 10:52:34 +01:00
Jaeyoung-Lim e66e82228f Add support for offboard velocity setpoints for fixedwing vehicles
This commit adds a velocity controller which the setpoint can be passed using offboard setpoints
2022-01-03 10:52:34 +01:00
Daniel Agar 75bb2f8dd2 Jenkins: hardware temporarily tolerate sd_bench failures on px4_fmu-v5_debug 2022-01-02 14:47:52 -05:00
Daniel Agar 673d4544d1 parameters: verify param backup after export 2022-01-02 10:46:34 -05:00
Daniel Agar 8e26b33009 tinybson: file write error add more detail 2022-01-02 10:46:34 -05:00
Daniel Agar 80ef6e19df tinybson: explicitly append int32 or int64 2022-01-02 10:46:34 -05:00
Daniel Agar 9cbb5c9920 parameters: fix export shutdown locking
- in NuttX bchlib keeps a sector sized buffer that might not be written
out to RAMTRON until the file is closed
2022-01-02 10:46:34 -05:00
Daniel Agar 2153710917 Tools/HIL/monitor_firmware_upload.py don't fail on any ERROR
- on first boot we only care that it completes (gets to nsh prompt)
2022-01-02 10:05:30 -05:00
Daniel Agar c421bff73c Tools/HIL: use pyserial spy:// to log all serial traffic and dump on failure 2022-01-01 22:25:29 -05:00
Daniel Agar 7df1721d32 ROMFS: rcS disable simplistic SD I/O test
- this was added when trying to identify SD card issues at boot and
trigger a format, but didn't provide any value
2022-01-01 18:43:27 -05:00
Daniel Agar f76aa0e772 cmake: NuttX ARMV7M_STACKCHECK skip ekf2
- px4_fmu-v5_stackcheck switch from icm20689 -> bmi055 (lower rate)
 - this is to make performance tolerable
2022-01-01 18:43:27 -05:00
Daniel Agar e9283d90cc systemcmds/netman: fix code style 2022-01-01 18:40:47 -05:00
Daniel Agar 0029317e55 Jenkins: hardware additional reboots no longer required 2022-01-01 14:06:05 -05:00
Daniel Agar 439ad7daea Jenkins: hardware disable calib_delay (too slow) and manual SD format 2022-01-01 12:10:28 -05:00
Daniel Agar 501474993e Tools/HIL: default to USB UART if available 2022-01-01 10:49:30 -05:00
Daniel Agar 77b65ee564 boards: px4_fmu-v5_debug disable stack check
- this is redundant with px4_fmu-v5_stackcheck
2021-12-31 19:34:18 -05:00
Daniel Agar 247b975675 Tools/HIL: disable XON/XOFF, consistent timeouts, proper input buffer clear 2021-12-31 19:28:40 -05:00
Daniel Agar 03371f8522 NuttX with bch flush backport 2021-12-31 10:59:56 -08:00
David Sidrane db159a43cc test_dataman:Set SEM_PRIO_NONE on all semaphores 2021-12-31 10:27:24 -05:00
Daniel Agar 1b6700592b parameters: require valid BSON document size 2021-12-30 16:36:23 -05:00
Daniel Agar 3514458f42 Tools/HIL/test_airframes.sh: dump all parameter storage after bootup to verify contents 2021-12-30 12:43:00 -05:00
Daniel Agar b06215d038 Tools/HIL/test_airframes.sh: run param dump after save to verify BSON 2021-12-30 11:11:14 -05:00
PX4 BuildBot 5fc7e551ab Update submodule mavlink to latest Wed Dec 29 12:38:13 UTC 2021
- mavlink in PX4/Firmware (395eeb440a2ca7503591f872d4f733fcd9867218): https://github.com/mavlink/mavlink/commit/bfaf605bd6f25c8c4843d67e455fe02acb5a9452
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/4bc0de9c38626fe3640de266118af5fd64fe6a18
    - Changes: https://github.com/mavlink/mavlink/compare/bfaf605bd6f25c8c4843d67e455fe02acb5a9452...4bc0de9c38626fe3640de266118af5fd64fe6a18

    4bc0de9c 2021-12-27 olliw42 - Component Information Basics: add camera cap flag (#1752)
8035ad4d 2021-12-27 Hamish Willee - GIMBAL_DEVICE_FLAGS_NEUTRAL - note that this can be any angle (#1758)
2021-12-29 17:16:49 -05:00
Daniel Agar 6706d9b434 Jenkins: always fully clean git workspace 2021-12-29 17:14:11 -05:00
Daniel Agar 6d0339ba0c I2CSPIDriverBase: sensor start failure ERROR if internal, WARN if external 2021-12-28 11:05:35 -05:00
Daniel Agar 990d7c159d pwm_out: cleanup and prep for linux compatibility 2021-12-28 11:04:00 -05:00
Daniel Agar 10f4a2e91f boards: omnibus_f4sd_default disable systemcmds to save flash 2021-12-27 12:19:55 -05:00
Daniel Agar 3ef9c2d16c boards: holybro_kakutef7_default disable modules/gyro_calibration to save flash 2021-12-27 12:19:55 -05:00
FengShun 8f8719d33b cmake: use add_definitions instead of add_compile_definitions
Using make tests in docker will fail, because the current basic image used by px4io/px4-dev-simulation-bionic is ubuntu18.04, the default version of cmake is 3.10, and the add_compile_definitions command is only available in cmake 3.12+(ubuntu 20.04).
2021-12-27 12:19:31 -05:00
FengShun 65e976bbc2 docker: update px4-dev-simulation-bionic container versions to 2021-12-11
The current docker image will cause "make tests" to fail: "kconfiglib is not installed or not in PATH"
2021-12-27 12:19:31 -05:00
Daniel Agar d94767ef88 cmake: NuttX use cygwin friendly path for linker script 2021-12-27 12:19:12 -05:00
honglang 17a99bc827 mavlink: add HYGROMETER_SENSOR stream 2021-12-27 12:13:09 -05:00
honglang 983867f9af uavcan: support uavcan hygrometer 2021-12-27 12:13:09 -05:00
honglang b60e59d9be msg: new sensor_hygrometer msg 2021-12-27 12:13:09 -05:00
Daniel Agar 3f17acdcc9 boards: mro_ctrl-zerl-h7-oem pin fixes (sync with mro_ctrl-zero-h7) 2021-12-27 09:25:21 -05:00
Daniel Agar 0f4e1dd9f9 boards: mro ctrl-zero-h7 pin fixes 2021-12-27 09:25:21 -05:00
Daniel Agar 236794235a parameters: export empty BSON document even if there are no parameters to save
- otherwise a 'param reset_all' won't be saved until a parameter is changed
2021-12-27 09:17:00 -05:00
Daniel Agar 33d7b42040 parameters: import quietly retry if there's no data (as a precuation) 2021-12-27 09:17:00 -05:00
Daniel Agar 20d3e6f4e1 parameters: add simple BSON verification pass after export 2021-12-27 09:17:00 -05:00
Beat Küng 72065c3d71 fix protocol_splitter: remove timeout, drop buffer if too full instead
The existing implementation had a flaw: when the buffer was getting full,
mavlink started to busy-loop, as the uart has data (poll returns immediately)
but no new data was read from the uart due to the buffer being full.
As rtps is running at lower prio, it never got the chance to read again,
making the problem even worse.
After 1s the timeout triggered and the buffer was cleared, so it recovered.

Instead of allowing for CPU spikes, we now immediately clear the buffer
(only as much as we have to), ensuring that new data is read from the uart.
2021-12-24 20:28:43 -05:00
Rui Miguel Carvalho 542ee86bc9 landing_target_estimator: custom irlock frame params (#18884)
Signed-off-by: ruimscarvalho98 <ruimsc98@gmail.com>
2021-12-24 20:20:35 -05:00
Silvan Fuhrer 28e01c3510 FW Position controller: make loiter switching logic robust against pos_sp with loiter_rad=0
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:17:15 -05:00
Daniel Agar 98d706772e boards: px4_fmu-v2_rover disable events module to save flash 2021-12-24 20:06:13 -05:00
Beat Küng d202bf9631 control_allocator: add scope to reduce stack usage by 256B 2021-12-24 20:06:13 -05:00
Silvan Fuhrer 48be55dec8 Tiltrotor: disable tilt/thrust compensation when dynamic allocation is enabled
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Silvan Fuhrer 31d7328f4d Tailsitter: invert roll (make it NED-correct) for filling vehicle_torque_setpoint
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Silvan Fuhrer 1ad66e606b ControlAllocation: introduce convention for control surface deflection sign
- horizontal control surfaces: up=positive deflection
- vertical control surfaces (rudder): right=positive deflection
- mixed (V-Tail): up=positive deflection

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Beat Küng 5259877b1b control_allocator: update matrix normalization
- only normalize rpy for MC matrices
- for thrust use the 3D vector, so it works for FW and tilt rotors as well

This keeps MC unchanged.
2021-12-24 20:06:13 -05:00
Silvan Fuhrer 460a0df850 tiltrotor: fill out thrust_setpoint[0] also in hover, based on tilt and hover thrust
In the tiltrotor case, beside an F_z thrust setpoint also a F_x setpoint must be passed
to the allocator as the matrix has non-zero thrust-x effectiveness when tilts are applied.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Beat Küng 2333bef670 px4airframes doc: handle common outputs individually
preparation for dynamic control allocation, where we won't have MAIN vs
AUX anymore (at least for the generic frames).
2021-12-24 20:06:13 -05:00
Beat Küng 203e253dfe airframes: sitl boat: switch to dynamic control allocation 2021-12-24 20:06:13 -05:00
Beat Küng 8486ca5766 airframes: sitl cloudship: switch to dynamic control allocation 2021-12-24 20:06:13 -05:00
Beat Küng 9bc9169b77 px4/fmu-v5x: add missing board variants to rc.board_mavlink 2021-12-24 20:06:13 -05:00
Beat Küng 09200b994d airship_att_control: publish thrust + torque setpoint 2021-12-24 20:06:13 -05:00
Silvan Fuhrer 478724c9fe EffectivenessTiltrotor: fix logic for matrix update
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Beat Küng 6c8f322dfe px4/fmu-v2/test: disable modules to reduce flash 2021-12-24 20:06:13 -05:00
Beat Küng 082cd74cab holybro/kakutef7: disable IST8310 to reduce flash 2021-12-24 20:06:13 -05:00
Beat Küng 8e04934eab commander: consider COM_MOT_TEST_EN for COMMAND_ACTUATOR_TEST as well 2021-12-24 20:06:13 -05:00
Silvan Fuhrer 39d441317a ActuatorEffectivenssTailsitterVTOL: only enable MC yaw control if more than 3 rotors
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Silvan Fuhrer 426aa76a59 CA/VTOL: change description of VT_ELEV_MC_LOCK as it applies to not just elevons
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Silvan Fuhrer 18008b2de7 CA module.yaml: add motor direction function also to UI for Tailsitter an Tiltrotor
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Beat Küng 8743b78474 px4/fmu-v2/rover: disable modules to reduce flash 2021-12-24 20:06:13 -05:00
Beat Küng 8c782b7cd9 control_allocator: add Custom + MC with tilts effectiveness
The param group is changed to Geometry, as this reflects the naming in the
QGC UI.
2021-12-24 20:06:13 -05:00
Beat Küng 0818bb4be0 bitcraze/crazyflie{,21}: disable modules to reduce flash 2021-12-24 20:06:13 -05:00
Beat Küng 751539304e omnibus/f4sd: disable modules to reduce flash 2021-12-24 20:06:13 -05:00
Beat Küng 627ec0df5d control_allocator: increase STACK_MAIN to 3000
It was exceeding 2000
2021-12-24 20:06:13 -05:00
Beat Küng 4d38742371 control_allocator: show VT_ELEV_MC_LOCK for vtol mixers in config ui 2021-12-24 20:06:13 -05:00
Beat Küng 28c4d0b7df mixer_module: add unit tests 2021-12-24 20:06:13 -05:00
Beat Küng fe1b726b62 ScheduledWorkItem: do not call ScheduleClear() if not init in destructor
This avoids that unit tests trying to access a wq hang.
It still fails with an error currently.
2021-12-24 20:06:13 -05:00
Silvan Fuhrer 07306c4be3 control_allocator: add support for Tailsitter VTOL
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Silvan Fuhrer 0568cff299 control_allocator: handle thrust allocation for VTOL's properly
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Silvan Fuhrer 936f2dff52 logger: log both instances of vehicle_thrust/torque_setpoint
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Beat Küng d688e5dee4 sitl airframes: add control allocation config to some airframes (not enabled)
To use them, manually set SYS_CTRL_ALLOC
2021-12-24 20:06:13 -05:00
Beat Küng 2362feddac airframes/uuv_bluerov2_heavy: switch over to control allocation 2021-12-24 20:06:13 -05:00
Beat Küng 4f8e6a9548 control_allocator: do not update params while armed
As a precaution
2021-12-24 20:06:13 -05:00
Beat Küng e04b4a8dbf control_allocator: add 6DOF configuration 2021-12-24 20:06:13 -05:00
Beat Küng 4c80adfaf1 control_allocator: implement trim + slew rate limits configuration 2021-12-24 20:06:13 -05:00
Beat Küng 301100ce0e uuv_att_control: publish vehicle_thrust_setpoint & vehicle_torque_setpoint 2021-12-24 20:06:13 -05:00
Beat Küng 590239dedb work_queue: increase rate_ctrl stack size by 150 B
WARN  [load_mon] wq:rate_ctrl low on stack! (172 bytes left)
2021-12-24 20:06:13 -05:00
Beat Küng b5c2cdf6c4 vtol_att_control: do not manipulate PWM outputs if SYS_CTRL_ALLOC == 1
Not required anymore
2021-12-24 20:06:13 -05:00
Beat Küng 43e15148f6 rover: switch sitl configs to control allocation 2021-12-24 20:06:13 -05:00
Beat Küng 8d9e2a28c4 control_allocator: add fixed-wing actuator effectiveness 2021-12-24 20:06:13 -05:00
Beat Küng 4d2a403afa control_allocator: add rover actuator effectiveness
This can be generalized later
2021-12-24 20:06:13 -05:00
Beat Küng ed3a115c8f control_allocator: add status publication rate limitation comment 2021-12-24 20:06:13 -05:00
Beat Küng 70e46a194f control_allocator: major refactoring & additions
- allow effectiveness matrix to select control allocator method
  (desaturation algorithm)
- add actuator_servos publication
- add support for multiple matrices (for vtol)
- add updateSetpoint callback method to actuator effectiveness to allow it
  to manipulate the actuator setpoint after allocation
- handle motor stopping & reversal
- add control surfaces & tilt servos
- handle standard vtol + tiltrotor
- rename MC rotors params & class to be more generically usable
- fixes and enables ActuatorEffectivenessRotorsTest
2021-12-24 20:06:13 -05:00
Beat Küng a81f11acdd mc_rate_control: don't publish thrust + torque sp if vtol 2021-12-24 20:06:13 -05:00
Beat Küng 28e995ede2 fw_att_control: publish vehicle_thrust_setpoint & vehicle_torque_setpoint 2021-12-24 20:06:13 -05:00
Beat Küng 4becd6e4c7 rover: publish vehicle_thrust_setpoint & vehicle_torque_setpoint 2021-12-24 20:06:13 -05:00
Beat Küng 5da67e2e28 vtol_att_control: publish vehicle_thrust_setpoint & vehicle_torque_setpoint 2021-12-24 20:06:13 -05:00
Beat Küng d1abdd0f8d output drivers: add option to generate a separate output range reversing param
Makes it a bit easier to configure. Reversing by setting MIN > MAX is still
supported.
2021-12-24 20:06:13 -05:00
Beat Küng 1901edf13c actuator_motors.msg: add reversible flags & implement in mixer_module 2021-12-24 20:06:13 -05:00
Beat Küng ccc1f0e8fa generate_actuators_metadata: minor additions (index_offset, item_label_prefix) 2021-12-24 20:06:13 -05:00
Beat Küng 81cef522fd generate_params.py: fix bitmask param type 2021-12-24 20:06:13 -05:00
Beat Küng 5bcc5d3a13 generate_actuators_metadata.py: add mixer rules support 2021-12-24 20:06:13 -05:00
Beat Küng 230aae580f ROMFS: add control_allocator to all types 2021-12-24 20:06:13 -05:00
Beat Küng 86aa9f9336 Makefile: exclude src/lib/crypto/libtommath from validate_module_configs 2021-12-24 20:06:13 -05:00
Beat Küng 9c767ff1ee control_allocator: make effective source name a class member 2021-12-24 20:06:13 -05:00
Beat Küng 20d96f3bd9 metadata: fix BOARD_WITH_IO detection
Wasn't correctly updated during a rebase.
2021-12-24 20:06:13 -05:00
Daniel Agar 712353ea56 gyro_calibration: increase required samples (to be more conservative)
- make sure variance is checked across all available sensors
2021-12-24 19:53:44 -05:00
Daniel Agar 3f3836afa8 parameters: simplify import mark_unsaved and don't fail bson decode unnecessarily 2021-12-24 14:32:40 -05:00
Daniel Agar d1cd4904dc parameters: param_value_is_default avoid locking if value unchanged 2021-12-24 14:32:40 -05:00
Daniel Agar c0b8f2952c parameters: param_get_default_value avoid locking if value is static default 2021-12-24 14:32:40 -05:00
Daniel Agar 27a113ecab parameters: param_get avoid locking if value is static default 2021-12-24 14:32:40 -05:00
Daniel Agar cd8ce4d01e parameters: remove obsolete perf_end 2021-12-24 14:32:40 -05:00
Daniel Agar 38731662c6 parameters use bitset for mark_unsaved 2021-12-24 14:32:40 -05:00
Daniel Agar 0e0639a5bf Jenkins: hardware don't tolerate logger failures 2021-12-24 14:31:21 -05:00
Daniel Agar b054fc7b8b navigator: trivial code style fix 2021-12-24 10:55:20 -05:00
seungjo0109 0f7c850080 Fix typo(at modules/navigator_main) 2021-12-24 08:54:43 -05:00
PX4 BuildBot 7e9cdef57b Update submodule jMAVSim to latest Thu Dec 23 18:11:33 UTC 2021
- jMAVSim in PX4/Firmware (a4040f7afd): https://github.com/PX4/jMAVSim/commit/b23dc53d558e801b214fbcb605a061c9773105e0
    - jMAVSim current upstream: https://github.com/PX4/jMAVSim/commit/66b764ada522893c05224950aa6268c809f8e48a
    - Changes: https://github.com/PX4/jMAVSim/compare/b23dc53d558e801b214fbcb605a061c9773105e0...66b764ada522893c05224950aa6268c809f8e48a

    66b764a 2021-12-17 romain-chiap - Merge pull request #129 from romain-chiap/tailsitter
71444c6 2021-10-04 romain-chiap - Update x_vert.mtl
4cc100e 2021-08-27 Romain Chiappinelli - tailsitter .mtl updated
561a5c4 2021-08-27 Romain Chiappinelli - tailsitter selection and docs
57fbdb8 2021-08-25 Romain Chiappinelli - tailsitter
2021-12-23 17:50:10 -05:00
Daniel Agar 00eae055ac lib/sensor_calibration: don't save uninitialized priority parameter immediately 2021-12-23 17:49:11 -05:00
Daniel Agar e694fa906b tinybson: add more error output on node name overflow 2021-12-23 17:45:50 -05:00
Daniel Agar 47d6a6c63d Tools/HIL/test_airframes.sh dump parameters before reboot (for verification) 2021-12-23 17:45:50 -05:00
Daniel Agar 14c2225b1c ROMFS: rcS dump parameter backup contents before using
- this is mainly for debug comparion
2021-12-23 17:45:50 -05:00
Daniel Agar 38af93085b linux_pwm_out: use PWM_MAIN parameter prefix
- this keeps things simpler for now across the old and new output
configuration
2021-12-23 15:57:11 -05:00
Daniel Agar 64e00c41d4 posix-configs: fix bbblue and rpi param import 2021-12-23 15:57:11 -05:00
Daniel Agar c8f2a29d67 boards: beaglebone_blue_default fix missing linux_pwm_out driver 2021-12-23 15:57:11 -05:00
Daniel Agar a5f58d321e boards: emlid_navio_default fix missing drivers/modules 2021-12-23 15:57:11 -05:00
Daniel Agar 7d7d707db9 commander: add COM_HOME_EN parameter to enable/disable home position 2021-12-23 15:46:31 -05:00
Daniel Agar 28c34a0484 Jenkins: hardware don't force tests dataman to pass and add to stackcheck build 2021-12-23 14:50:47 -05:00
PX4 BuildBot a069a47d50 Update submodule nuttx to latest Thu Dec 23 18:11:37 UTC 2021
- nuttx in PX4/Firmware (d0ce5705359f8beeb9faf7fa0d12279e03bb7ac7): https://github.com/PX4/NuttX/commit/d4c06e9dfb7bb14d0f19ef47b94d838b1caf50f3
    - nuttx current upstream: https://github.com/PX4/NuttX/commit/378032a44ba1ec0e7e3df16a23d21a6e77a2d816
    - Changes: https://github.com/PX4/NuttX/compare/d4c06e9dfb7bb14d0f19ef47b94d838b1caf50f3...378032a44ba1ec0e7e3df16a23d21a6e77a2d816

    378032a44b 2021-12-15 David Sidrane - [BACKPORT] stm32f7:sdmmc invalidate before DMA to avoid eviction overwrite
2021-12-23 14:50:47 -05:00
Daniel Agar a4040f7afd px4io_serial: always perform full abort DMA on error
- enable DMA error perf count
2021-12-23 12:48:42 -05:00
Matthias Grob f68ae39840 Commander: avoid RC actions during calibration 2021-12-22 09:08:23 -05:00
Beat Küng 89974c46b9 mavlink streams: add return in all cases
Generally not needed here, but GCC produced an error when compiling with
-finstrument-functions.
2021-12-22 08:47:33 -05:00
Beat Küng e29759d877 WorkQueueManager: explicitly convert PTHREAD_STACK_MIN to int
fixes a compiler error on GCC 11.2.1:
error: no matching function for call to ‘max(long int, int)’
2021-12-22 08:47:33 -05:00
alessandro 2c8a92c628 sitl config: put model name first
Github constructs the workflow names from the 
matrix configurations. Having latitude and longitude
in the fist columns makes these names rather cryptic.
2021-12-22 12:48:54 +01:00
Daniel Agar 47fcdb1fdb sensors/vehicle_angular_velocity: replace ESC/FFT elapsed perf counters with single cycle perf counter
- non-trivial perf counters (elapsed & interval) are relatively expensive
 - if ESC and FFT notch filtering are enabled this reduces 6 updates (2 per axis) to 1
2021-12-21 14:21:10 -05:00
Julian Oes 5894f302b5 mavlink: add test for zero padding
We want to avoid publishing garbage leftover from earlier publications.
2021-12-21 09:40:36 -05:00
Julian Oes 5cfe30fa2e mavlink: fix include for unit tests
This is required to find the include directory for the unit test of the
MavlinkStatustextHandler.
2021-12-21 09:40:36 -05:00
Julian Oes 2e0286e6bb mavlink: support receiving multi-chunk statustexts
This adds support for mavlink statustext messages arriving in multiple
chunks.
2021-12-21 09:40:36 -05:00
Daniel Agar 0029a75ab0 systemcmds: convert c -> c++ 2021-12-21 09:22:49 -05:00
Julian Oes d2e931858d px4io: remove unused cmake_policy
This should fix the build with older cmake versions.
2021-12-21 09:21:25 -05:00
Julian Oes 9686c81f7d boards: enable flow control on CDCACM
This enables flow control on CDCACM for the NuttX boards which fixes a
problem where HITL would stall.

The stall could happen if the hardware would be a bit too slow in
keeping up with the incoming messages. Often, this happened on arming
because the logger would take some time to log all parameters right at
the beginning.

The stall would then not recover due to NuttX bug where the rx interrupt
would not be restored correctly and instead only a slower watchdog would
release the next read. This watchdog takes 200ms which means it's hard
to impossible to get out of the situation without restarting sim and/or
PX4.  For more information about the issue, see:
apache/incubator-nuttx#3633

As a workaround, until that bug is fixed, and because it makes sense
anyway, I propose to enable FLOWCONTROL for the serial via USB.
2021-12-21 08:01:38 +01:00
DanielePettenuzzo 88521b0145 print error only if the mavlink command fails
In some cases we printed also the mavlink commands that replied
to be unsupported. This is not an error to show in the log.
2021-12-21 07:37:23 +01:00
Julian Oes 199b5e7d48 Revert "mavsdk_tests: retry gz model spawn command"
This reverts commit c15d3f7cfa.
2021-12-20 13:05:46 -05:00
Julian Oes 9184038359 mavsdk_tests: try to restart gzserver
Sometimes gzserver seems to just not start correctly. With this commit
we try to just restart.
2021-12-20 13:05:46 -05:00
TSC21 9894598b63 mavsdk_tests: update to be able to fetch rtps builds as well 2021-12-20 13:05:46 -05:00
Thomas Debrunner 9312c772f1 mavsdk-tests: Re-try to launch a mission for some time before failing. This mitigates an issue where the flight controller has an uploaded mission, but has not finished the mission feasibility checks yet. 2021-12-20 13:05:46 -05:00
Julian Oes 764af19da4 mavsdk_tests: bump MAVSDK version to v0.48.0
This might help with CI tests where we get RC loss because, presumably,
MAVSDK is not sending them in time.
2021-12-20 13:05:46 -05:00
Claudio Micheli 9d02851893 vmount: increase stack size to 2100
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-12-20 13:05:15 -05:00
Julian Oes 90fe4b7a54 vmount: publish gimbal v2 protocol for v1 gimbals
This enables the use case where the gimbal v2 protocol is used
between the ground station and the drone, and the gimbal v1 protocol is
used between the drone and the gimbal.
2021-12-20 13:05:15 -05:00
Julian Oes 6d74b390d9 vmount: use absolute angle for location tracking
I'm pretty sure it makes more sense to use an absolute angle to track a
lat/lon location.
2021-12-20 13:05:15 -05:00
Julian Oes d88f9353e8 vmount: improve debug message
This should help to figure out when gimbal commands don't work.
2021-12-20 13:05:15 -05:00
Julian Oes f7c4034f3c vmount: fix v1 frames with v2 input
It looks like the frames for pitch and roll were not set correctly when
v1 is used in v2 input.
2021-12-20 13:05:15 -05:00
Julian Oes 0ce4eae314 vmount: fix v1 frames for v1 input
This basically means that we want roll and pitch to be absolute, so
relative to the horizon.
2021-12-20 13:05:15 -05:00
Julian Oes 3c5bf497a3 esc_calib: remove unused variable 2021-12-20 10:56:24 -05:00
Julian Oes a6431ab8f0 simulator: fix implicit-const-int-float-conversion 2021-12-20 10:56:24 -05:00
Daniel Agar 019eaf7038 multicopter: minimize dt jitter by using estimate timestamp_sample 2021-12-17 17:52:28 -05:00
Julian Oes dcf69144cb mavsdk_tests: fix type for mypy check
This was probably triggered due to a mypy update.
2021-12-17 17:28:54 +01:00
marcojob 2cfe08b3b1 small typo in vehicle_local_position msg 2021-12-17 15:45:07 +01:00
Igor Mišić 2d680dfd1a pps_capture: fix PARAM_PREFIX for boards with px4io (CONFIG_BOARD_IO) 2021-12-17 07:56:08 +01:00
Igor Mišić 89f828fba7 pps_capture: advertise for logging 2021-12-17 07:56:08 +01:00
Igor Mišić 17f5df2d3e pps_capture: add argument guard 2021-12-17 07:56:08 +01:00
Beat Küng f6ced71d26 pps_capture: make it configurable via output functions 2021-12-17 07:56:08 +01:00
Igor Mišić 0f60e7debf pps_capture: add kconfig 2021-12-17 07:56:08 +01:00
Michael Schaeuble 064a602962 Add PPS capture message to logged topics, simplify timestamp logic and small cleanup 2021-12-17 07:56:08 +01:00
Michael Schaeuble 5ad8b84dec Fix PPS based UTC timestamp in camera trigger and capture messages
The existing implementation has about 100ms difference to a reference clock. With the changes this error less than 25us.
- Use sensor_gps messages with hrt timestamps as RTC reference and not the system realtime clock. The PPS interrupt can then be aligned with the GPS clock system.
- Keep fallback based on system RTC when no PPS pulse was captured
2021-12-17 07:56:08 +01:00
Michael Schaeuble ebb657bcf4 Fix camera trigger via MAVLink when camera capture feedback is enabled
- camera_trigger module always publishes the camera_trigger msg (independent of the camera feedback)
- Use camera_trigger msg and set the feedback flag
- Subscribing modules determine if the message is relevant based on the feedback message
2021-12-17 07:56:08 +01:00
Michael Schaeuble 3e4031cf0f Set rtc_edge_time also in capture_callback
When using an FMU channel as PPS capture GPIO, the rtc_edge_time is now set as well. The delay between actual capture and callback is compensated with the elapsed time of the rtc clock.
2021-12-17 07:56:08 +01:00
Thomas Debrunner 43bc6db99e PPS capture: Add a param to enable / disable PPS capture module. This is important, since it takes over an FMU pin which can no longer be used for actuator output. 2021-12-17 07:56:08 +01:00
Igor Mišić 298a8c4637 boards/fmu-v5x: allocating PPS pin
- start pps_capture before pwm_out
2021-12-17 07:56:08 +01:00
Igor Mišić 60a212f717 px4_arch: add PX4_MAKE_GPIO_EXTI 2021-12-17 07:56:08 +01:00
Igor Mišić c6098ef3dd camera_capture: update to use PPS correction for UTC time 2021-12-17 07:56:08 +01:00
Igor Mišić 8eca35111e camera_trigger: update to use PPS correction for UTC time 2021-12-17 07:56:08 +01:00
Igor Mišić 72b1db4a63 pps_capture: implementation of pulse per second capture driver 2021-12-17 07:56:08 +01:00
Daniel Agar 43a04c9bca fix PARAM_PREFIX for boards with px4io (CONFIG_BOARD_IO) 2021-12-16 07:20:12 +01:00
Daniel Agar ecc2ca7f98 mathlib: int16_t negate explicitly handle both INT16_MIN and INT16_MAX
- technically negating INT16_MAX doesn't need special handling, but
this ensures any simple saturation logic downstream works by default
2021-12-15 12:45:58 -05:00
Daniel Agar d59d16a6cd drivers/accelerometer: adjust int16_t clipping threshold slightly
- consider data clipped/saturated if it's INT16_MIN/INT16_MAX or within 1
 - this accommodates rotated data (|INT16_MIN| = INT16_MAX + 1) and sensors that may re-use the lowest bit for other purposes (sync indicator, etc)
2021-12-15 12:45:58 -05:00
Daniel Agar ea29b45282 ekf2: enable mag check by default, but commander only warn 2021-12-15 09:43:46 -05:00
Daniel Agar 3fba7288af ekf2: selector use hysteresis for healthy flag
- require that an instance is healthy continuously for >= 1s before
allowing it to be used
2021-12-14 09:52:36 -05:00
Thomas Debrunner eb69f15d3a health-flags: Increase health flags to 64 bit bit field to support extended sys status mavlink message
Add SYS_STATUS flag for parachute
2021-12-14 09:41:12 -05:00
Thomas Debrunner 37099f85b9 mavlink: Update to newest mavlink master 2021-12-14 09:41:12 -05:00
Silvan Fuhrer e9b9176ce2 param translation: fix for FW_GPSF_LT and FW_GPSF_R
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-14 08:27:04 +01:00
Jukka Laitinen ce6147f570 uORB: Remove transfer of memory allocation ownership to CDev
- Allocate and free the node name in uORBDeviceNode.
- Add protected build support by de-allocating the name with kmm_free, when
  running in kernel side. strdup allocates from the kernel heap in NuttX kernel
  space.
- Remove the CDev::unregister_driver_and_memory(), it is no longer used

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-12-13 22:52:36 -05:00
Jukka Laitinen 25c10eb124 cdev: build & link fixes for NuttX protected build
- Always link to nuttx_fs for register/unregister_driver calls

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-12-13 22:52:36 -05:00
Daniel Agar acdcc35392 tests: dataman fix ssize_t printf 2021-12-13 22:51:23 -05:00
alexklimaj 6133ef0d63 Dronecan fix beep driver 2021-12-13 14:52:46 -05:00
bresch 67a893ac6d WelfordMean: remove unnecessary case for first sample
setting the mean to the sample value and then adding 0 is the same as
setting the mean to zero and then add the sample value divided by 1
2021-12-13 11:42:48 -05:00
bresch 5468841aa5 WelfordMean: add unit test 2021-12-13 11:42:48 -05:00
Daniel Agar fc17797548 ekf2: delete obsolete _bad_vert_accel_detected 2021-12-13 09:13:39 -05:00
Daniel Agar 986cf288da dataman: remove obsolete persistence and reset reason 2021-12-12 12:06:35 -05:00
Daniel Agar ad1bfb5410 Tools/HIL/reboot.py retry every 90 seconds for up to 5 minutes 2021-12-12 11:53:01 -05:00
96moustafa 63189067f6 set the transponder_report message of uavs with no icao address to be their mav id 2021-12-11 15:29:43 -05:00
Daniel Agar 167edcc77b simulator: add standalone sensor_gps_sim module 2021-12-11 15:03:15 -05:00
Daniel Agar 95b961c622 simulator: add standalone sensor_baro_sim module 2021-12-11 15:03:15 -05:00
Daniel Agar 4edfb4799f simulator: add standalone sensor_mag_sim module 2021-12-11 15:03:15 -05:00
Daniel Agar b71b908ac7 Tools/HIL: explain cmd, use monotonic time 2021-12-11 15:02:49 -05:00
Daniel Agar 0f6e30599c Jenkins: hardware tolerate px4_fmu-v5_debug dataman failures for now 2021-12-10 10:28:19 -05:00
bresch 66290de745 ekf: improve range primary height source
allow range fusion to start with fake measurements if the sensor is
providing bad measurements because too close to the ground
2021-12-10 15:18:10 +01:00
bresch 9147d5ea5c ekf2: use ground as ekf altitude datum when in range primary hgt mode 2021-12-10 15:18:10 +01:00
bresch 5e790da634 ekf2: reset the timeout timer in the reset function directly 2021-12-10 15:18:10 +01:00
bresch 0d874cf00a ekf2: move aiding start details in dedicated function
When an aiding source needs to be started, simply call the corresponding
starting function and any required reset is handled in there.
2021-12-10 15:18:10 +01:00
Matthias Grob 897775f38d ManualControlSelector: Allow disabling stick input 2021-12-10 09:11:08 -05:00
Matthias Grob 300e439144 ManualControlSelector: Enable original PX4 default behavior until QGC catches up 2021-12-10 09:11:08 -05:00
Daniel Agar d961a067b9 navigator: reduce NUM_MISSIONS_SUPPORTED 2000->500 for dataman RAM usability 2021-12-10 09:10:02 -05:00
Daniel Agar ca3f6f59f9 dataman: add SYS_DM_BACKEND parameter 2021-12-10 09:10:02 -05:00
Beat Küng f76086ffa1 microRTPS_agent_CMakeLists.txt.em: add install section 2021-12-10 09:03:08 -05:00
Beat Küng a9e918c7b2 fix ina226: use shunt param value 2021-12-10 09:03:08 -05:00
Beat Küng a4ca298ee9 simulator_mavlink: handle MAV_TYPE_VTOL_RESERVED3 2021-12-10 09:03:08 -05:00
Beat Küng 7aed8c4f47 sd_bench: print errno on write failure 2021-12-10 09:03:08 -05:00
Beat Küng 80300c36b4 parameter units: add 'A' (Ampere) 2021-12-10 09:03:08 -05:00
Beat Küng 10f49c99ef px4_add_gtest.cmake: add optional COMPILE_FLAGS, INCLUDES, EXTRA_SRCS and LINKLIBS 2021-12-10 09:03:08 -05:00
Beat Küng 87ec8839c4 px4/fmu-v5x: remove unused base_phy_DP83848C build variant 2021-12-10 09:03:08 -05:00
Igor Mišić d1aec01b86 uavcan/actuators: stop update esc status if there is no UAVCAN ESCs 2021-12-10 09:03:08 -05:00
Beat Küng aa96e39306 kconfig: do not inherit for recovery.px4board from default.px4board 2021-12-10 09:03:08 -05:00
Beat Küng ca6df035b4 px4/fmu-v5x: add arch_io_pins dependency (required in init.cpp) 2021-12-10 09:03:08 -05:00
Beat Küng 0d1d454a4c mavlink: add missing 'sensor_calibration' lib dependency 2021-12-10 09:03:08 -05:00
alexklimaj 31af09f8e7 Fix uavcan distance sensor not being logged 2021-12-10 07:19:34 +01:00
Silvan Fuhrer 24d871f792 FW land detector: tighten thresholds in airspeed-less case
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-09 20:55:09 -05:00
PX4 BuildBot 16621b19b3 Update submodule sitl_gazebo to latest Fri Dec 10 00:38:56 UTC 2021
- sitl_gazebo in PX4/Firmware (95222baa33): https://github.com/PX4/PX4-SITL_gazebo/commit/ffb87ef4a312564cf91791bd5a9d683aacd085a6
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/27298574ce33a79ba6cfc31ed4604974605e7257
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/ffb87ef4a312564cf91791bd5a9d683aacd085a6...27298574ce33a79ba6cfc31ed4604974605e7257

    2729857 2021-12-06 Silvan Fuhrer - Plane.sdf: reduce flaps and aileron effectiveness by reducing the angle-to-lift ratio
2021-12-09 20:52:31 -05:00
Thomas Debrunner ade4a1930c trajectory-planning: Added option for PositionSmoothing library with single target waypoint that disables L1 guidance 2021-12-09 20:51:39 -05:00
Jukka Laitinen 77af102cab px4_work_queue: Use px4_task_spawn_cmd for WorkQueueRunner in NuttX protected
In NuttX protected build there are separate work queues in kernel and user sides.

pthreads are only available in user side, so use tasks and kthreads for
memory protected builds.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-12-09 20:42:28 -05:00
Jukka Laitinen 3aab4d2daf px4_task_spawn_cmd: launch kernel thread in protected/kernel build on kernel side
Also task name is accessible only in kernel side for protected/kernel build

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-12-09 20:42:28 -05:00
Daniel Agar 8185e2a384 boards: board_app_initialize() don't return early on failure
- depending on the situation we're more likely to get actionable user
feedback by allowing boot to complete rather than silently failing
2021-12-09 20:41:54 -05:00
Daniel Agar 08ee3208b2 mavlink: stop_command fix potential dead lock 2021-12-09 20:40:55 -05:00
Cindy Hsieh ca90c785e9 correct pin in the comment, no code changed 2021-12-09 20:40:34 -05:00
Thomas Stastny 95222baa33 fix incorrect L1 period param documentation (#18811)
* fix incorrect L1 period param documentation

* reduce minimum L1 period
2021-12-08 16:42:50 +01:00
Daniel Agar 8b1543e3b0 mavlink: destroy all instances fix potential dead lock 2021-12-08 09:30:39 -05:00
Silvan Fuhrer b00ebe53bb FlightTaskAuto: use MPC_VEL_MAX instead of MPC_XY_CRUISE for emergency braking thresholds
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-08 09:13:01 +01:00
Julian Oes 94884594bb mavsdk_tests: check gzserver and gz model calls
This adds two checks to make sure gzserver has actually started before
continuing, and also whether the gz model call was successful.
2021-12-08 07:26:32 +01:00
Daniel Agar 51c0e5553e vmount: adjust MNT_RANGE_PITCH and MNT_RANGE_ROLL defaults
- this seems like a much more reasonable default
2021-12-08 01:02:46 -05:00
Daniel Agar 3b94742117 vmount: adjust timeout 50 -> 20 ms (50 Hz) 2021-12-08 01:02:46 -05:00
Julian Oes 9cb2bf389c vmount: add param to use RC input for angular rate
Until now RC input was translated to angles only. I added the param
MNT_RC_IN_MODE which allows the RC input to be used for angular rate.
2021-12-08 01:02:46 -05:00
Daniel Agar 08b0ac9654 dataman: retry file read/write failures and report seek errors 2021-12-07 17:03:07 -05:00
Matthias Grob 495f1c9165 battery: don't initialize _source without constructor 2021-12-07 21:06:51 +01:00
Matthias Grob 68e2940f58 math: support max of three values additional to min and use it everywhere 2021-12-07 21:06:51 +01:00
Matthias Grob e8676fe87a BATTERY_STATUS: improve filling cell voltage
according to review comment
2021-12-07 21:06:51 +01:00
Matthias Grob b41e345a5b battery: correct updateBatteryStatus() description 2021-12-07 21:06:51 +01:00
Matthias Grob ee3bc6673a AnalogBattery: make update variables const 2021-12-07 21:06:51 +01:00
Matthias Grob fdc40880d0 battery: separate out publishing from updating
to allow smart battery drivers to use the battery class and
filling in additional information in case it makes sense.
2021-12-07 21:06:51 +01:00
Matthias Grob e70d70468a battery: pass voltage and current by setter 2021-12-07 21:06:51 +01:00
Matthias Grob 39641494da battery: pass connected flag in by setter 2021-12-07 21:06:51 +01:00
Matthias Grob 38d23f5345 battery: pass priority in by setter 2021-12-07 21:06:51 +01:00
Matthias Grob f9fc9a9af6 battery: pass source in by constructor 2021-12-07 21:06:51 +01:00
Matthias Grob b965923c08 battery: fetch throttle value inside of class 2021-12-07 21:06:51 +01:00
Matthias Grob ddc6b6bc9c battery: move MAVLink specific handling out of battery class 2021-12-07 21:06:51 +01:00
Matthias Grob da2fdf923e battery parameters: allow usage of 1S battery 2021-12-07 21:06:51 +01:00
Jukka Laitinen d0d7f29422 platforms/common/shutdown.cpp: Enable boardctl functions for shutdown and poweroff
Shutdown and poweroff must go through boardctl in NuttX protected build

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-12-07 09:24:53 -05:00
Daniel Agar 7185bb3243 vmount: output rc simple protections 2021-12-07 13:11:22 +01:00
bresch c947562183 ekf: get rid of intermediate variable "fuse_height" 2021-12-07 09:16:21 +01:00
bresch 9651f78b0a ekf: centralize the height fusion decision 2021-12-07 09:16:21 +01:00
bresch d583ef6b79 ekf2: move height fusion code to separate source file 2021-12-07 09:16:21 +01:00
Daniel Agar 452a7199a6 Jenkins: HIL stop modules before running certain tests 2021-12-06 23:31:49 -05:00
Daniel Agar f9faa97d85 Tools/HIL/run_nsh_cmd.py increase timeout 3->4 minutes 2021-12-06 17:51:03 -05:00
Daniel Agar 01e60e853e navigator: increase stack slightly 2021-12-06 15:10:50 -05:00
Daniel Agar 41378fcef9 ms5611: lower SPI clock 20 MHz -> 16 MHz
- this was necessary to get the secondary ms5611 working reliably on a
particular CubeOrange
 - the sensor is transferring very little data, so lowering the speed by
default everywhere is harmless
2021-12-06 12:51:52 -05:00
Daniel Agar 8cd517f533 dataman: PX4_ERR on create_work_item failure 2021-12-06 10:23:42 -05:00
Daniel Agar 9ab633c18f drivers/imu/invensense: check register bank during probe if necessary
- the WHO_AM_I is only accessible in register bank 0, which might not
be currently selected if the sensor didn't have a clean reset
2021-12-06 10:22:54 -05:00
Daniel Agar 4bf1b46e47 boards: free up flash on crazyflie and omnibus 2021-12-06 09:37:08 -05:00
Daniel Agar 2256def180 Jenkins: hardware run param dump 2021-12-06 09:37:08 -05:00
Daniel Agar 1f6acd0171 parameters: add simple backup and restore mechanism 2021-12-06 09:37:08 -05:00
Daniel Agar e692f4ca01 ROMFS: rcS param import fail try to gather data
- startup tune and console message to notify user
 - save dmesg and param bson copy to microsd
 - run param dump to show full contents of bson
2021-12-06 09:37:08 -05:00
Daniel Agar 674b92df18 parameters: sleep 10 ms before retrying a failed import/export 2021-12-06 09:37:08 -05:00
Daniel Agar 7bfebf5289 parameters: add param dump to read and decode bson to console 2021-12-06 09:37:08 -05:00
Daniel Agar 7560d45c61 parameters: import tolerate unhanlded BSON types 2021-12-06 09:37:08 -05:00
Daniel Agar 9db5bc0755 px4_mtd: increase retries, wait inbetween, try decreasing frequency 2021-12-06 09:37:08 -05:00
Daniel Agar 1af068179e parameters: tinybson print errors and count imported types 2021-12-06 09:37:08 -05:00
Silvan Fuhrer ba1526896d Navigator: VTOL: remove generate_waypoint_from_heading()
The FW Position controller sets the wp to be tracked during a
VTOL front transition, the coordinates sp set here weren't used.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-06 16:30:59 +03:00
Matthias Grob 10ceea2fe6 geo: refactoring on comments and usage 2021-12-06 14:30:14 +01:00
Thomas Debrunner 8db7a6225b geo: Moved the map_projection_* functions and state into a self-contained C++ class 2021-12-06 14:30:14 +01:00
Daniel Agar fe23718e2c drivers/gps: require valid device to start 2021-12-06 08:44:50 +01:00
Daniel Agar 3160e7a3cd Jenkins: run calib_udelay on test rack 2021-12-05 19:42:10 -05:00
PX4 BuildBot 01192e3c37 Update submodule simulation-ignition to latest Sun Dec 5 12:38:56 UTC 2021
- simulation-ignition in PX4/Firmware (4e3d944f58): https://github.com/PX4/px4-simulation-ignition/commit/0ea4dbe2c3dac84f5927a59b1caf5e5561cf942e
    - simulation-ignition current upstream: https://github.com/PX4/px4-simulation-ignition/commit/483193d9b8b89211c3b970c735b4fbb5f724b63a
    - Changes: https://github.com/PX4/px4-simulation-ignition/compare/0ea4dbe2c3dac84f5927a59b1caf5e5561cf942e...483193d9b8b89211c3b970c735b4fbb5f724b63a

    483193d 2021-11-27 JaeyoungLim - Merge pull request #2 from PX4/pr-upstream-merge
4f3fd67 2021-11-27 Jaeyoung-Lim - Merge remote-tracking branch 'origin/master' into pr-upstream-merge
bd96d89 2021-11-27 Jaeyoung-Lim - Use mavlink develop dialect
bba86d6 2021-11-27 Jaeyoung-Lim - Fix firmware build test on github actions
e78ad94 2021-09-04 Jaeyoung-Lim - Update Readme
63ac33c 2021-09-03 Jaeyoung-Lim - Rename world path to accomodate different models
794a8dc 2021-07-12 Jaeyoung-Lim - Add ignition gazebo firmware build test
2021-12-05 19:23:55 -05:00
Daniel Agar 58421f2edc Update submodule GPS drivers to latest Fri Dec 3 12:38:58 UTC 2021
- GPSDrivers in PX4/Firmware (3e0d06c65167c0bd79c193ea75ca5c7959053ff7): https://github.com/PX4/PX4-GPSDrivers/commit/bd72eb6794e8fb4f2ed3e47311a14c2cec69f60b
    - GPSDrivers current upstream: https://github.com/PX4/PX4-GPSDrivers/commit/d6940d9c8ccb8ab3273c677097a29d46903021ff
    - Changes: https://github.com/PX4/PX4-GPSDrivers/compare/bd72eb6794e8fb4f2ed3e47311a14c2cec69f60b...d6940d9c8ccb8ab3273c677097a29d46903021ff

    d6940d9 2021-12-02 alexklimaj - Update F9P moving base with direct UART2 connection
    eb0cb58 2021-11-25 sebastian - always using groundspeed for vel_m_s in ubx driver
    0408160 2021-11-18 alexklimaj - Remove extra UART1 baudrate set
2021-12-05 19:23:07 -05:00
Daniel Agar f63a7642d6 NuttX debug helper improvements
- use NuttX gdb script for nxthreads and thread backtrace
 - update jlink_gdb_backtrace and jlink_debug_gdb helper targets to use
NuttX gdb script
 - Debug/PX4 fix "perf" divide by zero
 - Debug/PX4 add "dmesg"
2021-12-05 19:18:56 -05:00
Daniel Agar 10f2564ae8 systemcmds/tests: dataman test use proper signed type for dm_read() return 2021-12-05 18:08:54 -05:00
Daniel Agar 713350930d boards: px4_fmu-v5 add test variant 2021-12-05 18:08:54 -05:00
Daniel Agar 37c1598f38 boards: cubepilot_cubeorange enable calib_udelay and run on test rack 2021-12-05 14:50:03 -05:00
Daniel Agar 7d515e3d58 boards: cubepilot_cubeorange lower cpu clock 480 -> 400 MHz to reduce temperature 2021-12-05 14:50:03 -05:00
PX4BuildBot aae794965a [AUTO COMMIT] update change indication 2021-12-05 11:03:58 -05:00
PX4 BuildBot 4478877820 Update world_magnetic_model to latest Sun Dec 5 11:14:12 UTC 2021 2021-12-05 11:03:58 -05:00
Matthias Grob 4e3d944f58 mixer_module: typo con(s)tructor 2021-12-03 07:40:23 +01:00
Julian Oes accbdbf129 DEBUG: get some mavsdk_test_runner.py output 2021-12-02 11:40:26 -05:00
Julian Oes 7c0165ea0c ROMFS: avoid setting none params 2021-12-02 11:40:26 -05:00
Julian Oes f537b30c86 init.d-posix: exit on error
This fixes a case where the px4 startup is not stopped when the
px4 process is killled using -SIGKILL against the px4 deamon.
In that case, the currently executing command/client is killed
and properly shutting down with result -1, however, the next command
is started anyway.

This means that the next time we try to run the simulation we get a
"PX4 daemon already running for instance 0" error and PX4 doesn't start
properly.

By adding exit on error, we properly exit in the case where the startup
script gets stopped/killed.
2021-12-02 11:40:26 -05:00
Julian Oes c15d3f7cfa mavsdk_tests: retry gz model spawn command
This should help when gzserver does not respond yet and we end up
without a model and hence can't connect later and time out.

This change also required a fix to prevent the tester to hang on
terminating all runners. By using poll instead of only read we can
prevent that and actually properly join the logger thread.
2021-12-02 11:40:26 -05:00
Daniel Agar 2190f66096 sensors/vehicle_magnetometer: add SENS_MAG_AUTOCAL to enable initial auto cal 2021-12-01 20:24:56 -05:00
Daniel Agar 8fbf79527f magnetometer allow setting initial calibration from bias if available and stable 2021-12-01 20:24:56 -05:00
Daniel Agar b7efd4f947 ekf2: selector treat combined test ratio > 1 as a warning
* ekf2: selector treat combined test ratio > 1 as a warning
* ekf2: wait for 1s of constant warning to trigger an instance switch

Co-authored-by: bresch <brescianimathieu@gmail.com>
2021-12-01 20:22:34 -05:00
Matthias Grob 89892d0d17 px4io: discover PWM_MAIN_TRIMx parameters right away 2021-12-01 20:21:26 -05:00
Julian Oes a9b9362fea commander: handle system broadcast commands
This changes the command handling logic to accept commands which are
targeted at any system, signaled by target_system set to 0.
2021-12-01 20:17:35 -05:00
Daniel Agar a2064cceff boards: enable early MPU reset on any board potentially not using the PX4 bootloader 2021-12-01 20:13:41 -05:00
Peter van der Perk 36ba8cc6dd UAVCANv1 update FMU-V5 config 2021-12-01 09:29:15 -05:00
Peter van der Perk ce10dd90e7 Remove ucannode_gps_demo since it's superseded by uavcan_v1 2021-12-01 09:29:15 -05:00
Peter van der Perk ce909b23b1 UAVCANv1 Node implementation work, PNP, Registers and uORB publisher 2021-12-01 09:29:15 -05:00
Jukka Laitinen 79aa8ee587 src/drivers/sw_crypto: Fix a function call argument type mismatch
Fix one function call argument from unsigned -> size_t

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-12-01 09:28:02 -05:00
Jukka Laitinen 9c94e4c5ef crypto: define XMALLOC & XFREE for sw_crypto
Use the same memory allocation in sw_crypto driver as what is used in
src/lib/crypto libraries

In addition, in nuttx protected build, allocate all memory from kernel heap

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-12-01 09:28:02 -05:00
Jukka Laitinen a537925c3c Fix a build error with crypto variants
There was an error that PX4_CRYPTO was cached accross variants, if it was
defined just for one variant.

This synchronizes the caching of BOARD_CRYPTO with other similar BOARD_ flags;
it is set as INTERNAL and "1" when enabled.

Also remove handling of BOARD_KEYSTORE; it is not used anywhere after
changing the crypto under src/drivers. If a separate keystore driver
is required, it is just selected as any other driver in px4board

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-12-01 09:28:02 -05:00
alexklimaj 2571860ff8 Prevent uavcannode from republishing RTCM data received over uavcan 2021-12-01 09:27:11 -05:00
David Lechner a29820bdf8 gps: fix compiling on mac
This fixes the following compile error on Mac:

    src/drivers/gps/gps.cpp:562:23: fatal error: use of undeclared identifier 'B921600'
            case 921600: speed = B921600; break;
                                ^
2021-12-01 09:25:40 -05:00
alexklimaj bfd5a90a5d UAVCAN Moving Baseline Working
Set uavcan publisher priorities

Switch to ardupilot rtcm message and add heading accuracy
2021-11-30 15:59:08 -05:00
Matthias Grob b59db7dac2 rtl_params: change default and max rtl time margin 2021-11-30 19:46:22 +01:00
Matthias Grob 55dfbdc6a6 Commander: fix remaining flight time user messaging 2021-11-30 19:46:22 +01:00
David Jablonski 4f88c200ec vmount: fix gimbal_manager_status 2021-11-30 19:35:22 +01:00
Thomas 9345f68a93 reapply PR 18614 to refactored FlightTaskAuto 2021-11-30 14:52:16 +01:00
Beat Küng cbd6e735ad fix console_buffer: avoid potential deadlock when using dmesg over MAVLink shell
dmesg was locking the console buffer, then writing to stdout (a pipe in
the case of the MAVLink shell).
This might block, waiting for mavlink to read from the pipe. If however
mavlink tries to write to the console at that time, the lock is already
taken.
This patch avoids nested locking by using a separate buffer.
2021-11-30 08:49:52 -05:00
Julian Oes 01db98fccf vmount: fix RC pitch input scale
When scaling manual input, we should only use pitch -90 to +90 instead
of -180 to 180 degrees which leads to weird behavior as it gets passed
on by a quaternion.
2021-11-30 07:50:20 +01:00
David Sidrane 76585409fa durandal rev 1 has bmi088->icm20602 2021-11-29 21:59:30 -05:00
benjinne 38e7f814d5 mro h7 boards add rtps px4board files 2021-11-29 21:50:32 -05:00
Daniel Agar e348425279 Jenkins: hardware perform board reset immediately after flashing 2021-11-29 21:49:35 -05:00
Daniel Agar bc7001ba49 NuttX apps with [REJECTED] mkfatfs DMA memory change 2021-11-29 21:49:35 -05:00
David Sidrane df1c94dd4e px4_fmu-v5_debug:Increase stack size 2021-11-29 16:01:08 -05:00
David Sidrane ade7315e9b sd_bench:Missing free 2021-11-29 16:01:08 -05:00
Jukka Laitinen c2cbab1e98 Improve stub_keystore configuration
It is possible to either set the keyfile locations in board configuration or
with the same environment variables as before.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-29 11:09:51 -05:00
Jukka Laitinen 929820136a Move sw_crypto and stub_keystore under src/drivers
This is more logical place for the "backend" implementation than
directly under platform.

This also allows making other implementations as "real" drivers, as well as proper configuration via Kconfigs

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-29 11:09:51 -05:00
Daniel Agar 9b7c8c8a8b boards: px4_fmu-v6x_default enable ethernet by default with NuttX optimizations 2021-11-29 09:08:42 -05:00
Daniel Agar b9152dc4d0 boards: px4_fmu-v5x_default increase ETH pktsize to max and enable tcp delayed ack 2021-11-29 09:08:42 -05:00
Daniel Agar bb562a6d10 mavlink: unify find_broadcast_address logic
- remove NuttX special handling
2021-11-29 09:08:42 -05:00
Daniel Agar 0459b73520 boards: px4_fmu-v5x enable mavlink ethernet by default 2021-11-29 09:08:42 -05:00
PX4 BuildBot 2870b5bbb1 Update submodule sitl_gazebo to latest Sat Nov 27 12:38:16 UTC 2021
- sitl_gazebo in PX4/Firmware (d0c931353b047cfe6340b11866c814aa0d43fd34): https://github.com/PX4/PX4-SITL_gazebo/commit/60d6844e17919e8d57aafb3a0c25064df920cfc3
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/ffb87ef4a312564cf91791bd5a9d683aacd085a6
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/60d6844e17919e8d57aafb3a0c25064df920cfc3...ffb87ef4a312564cf91791bd5a9d683aacd085a6

    ffb87ef 2021-11-24 Thomas Stastny - sync baro and diff pres calculations in airspeed and baro plugins
a1d9dfa 2021-11-23 Bearixal - Windy World: Fixed Naming of Parameter according to wind_plugin.cpp and added missing ones. (#830)
71d8a41 2021-11-17 Jaeyoung-Lim - Remove unused configs in windyworld
2021-11-27 11:14:32 -05:00
PX4 BuildBot 5440802aae Update submodule libcanard to latest Sat Nov 27 12:38:19 UTC 2021
- libcanard in PX4/Firmware (748cbbe79a4f91f472207b8d12e1d01e486a82ab): https://github.com/UAVCAN/libcanard/commit/2a116170285fb47fcaae150ad21c2ccde0756a5f
    - libcanard current upstream: https://github.com/UAVCAN/libcanard/commit/2d449453fc8c4060f276c6dc585d4e1e5bf4fd52
    - Changes: https://github.com/UAVCAN/libcanard/compare/2a116170285fb47fcaae150ad21c2ccde0756a5f...2d449453fc8c4060f276c6dc585d4e1e5bf4fd52

    2d44945 2021-09-18 Kalyan Sriram - Fix sonarcloud issues (#181)
d64f82f 2021-09-13 Kalyan Sriram - WIP: Migrate to Github Actions (#174)
2021-11-27 11:11:29 -05:00
David Sidrane e507563911 uvify_core nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 23c73d4e0b px4_fmu-v6x nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 51b55533af px4_fmu-v6u nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane b8bdf7e1c4 px4_fmu-v5x nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 3504541ebd px4_fmu-v5x base_phy_DP83848C:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 60229c28a8 px4_fmu-v5 uavcanv1:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 01681d6b47 px4_fmu-v5 stackcheck:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 32c2160137 px4_fmu-v5 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane cf36435ed3 px4_fmu-v5 debug:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane a6bc41ef75 px4_fmu-v5 cryptotest:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 0951b9b1e7 px4_fmu-v4pro nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane e957ebac56 px4_fmu-v4 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane c3ae713ec1 px4_fmu-v3 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 394b431364 px4_fmu-v2 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane bddee78412 nxp_fmurt1062-v1 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane fa3027537c nxp_fmuk66-v3 socketcan:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 38f017b12f nxp_fmuk66-v3 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 3b6a5dbac3 nxp_fmuk66-e socketcan:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 661512cefe nxp_fmuk66-e nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane afeb0db666 mro_x21 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 8294b9431a mro_x21-777 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 55dceae672 mro_pixracerpro nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 861145fcdc mro_ctrl-zero-h7 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 4f4ada90b1 mro_ctrl-zero-h7-oem nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 1999003cf4 mro_ctrl-zero-f7 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 1179603437 mro_ctrl-zero-f7-oem nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 5fd321ec43 modalai_fc-v2 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 9a9eb35ea8 modalai_fc-v1 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane b7c3d560d3 holybro_pix32v5 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 0bc377ecd3 holybro_kakutef7 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane ddc73b4647 holybro_durandal-v1 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 6921b04600 holybro_can-gps-v1 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 84175eacff freefly_can-rtk-gps nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane ed473a5ebe cubepilot_cubeyellow nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane c82e0e0531 cubepilot_cubeorange test:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 6e1500a7de cubepilot_cubeorange nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 8172a561ca cuav_x7pro nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 947162f998 cuav_nora nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 63bedd8e4a cuav_can-gps-v1 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane d30431527c atl_mantis-edu nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane f59a517be2 ark_can-rtk-gps nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane a3832d3981 ark_can-gps nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane c06e6ffaf7 ark_can-flow nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 8ae0c9aadd airmind_mindpx-v2 nsh:Remove CONFIG_RAMTRON_WRITEWAIT 2021-11-26 19:27:29 -05:00
David Sidrane 7393a68e28 NuttX with ramtron and BCH backports 2021-11-26 19:27:29 -05:00
Julian Oes 7ddf43b443 mavlink_ftp: fix tests on Nuttx
On Nuttx we have an additional check whether the directory is accessible
to check if we are trying to write to storage that is not on the SD
card. This returns the FileProtected error whereas on Linux this just
ends up being a FileNotFound.

The ifdefs around this issue are not pretty but the alternatives of
either removing the tests for /bogus folders, or removing the additional
check on the NuttX side don't seem better either.
2021-11-26 15:50:28 -05:00
Julian Oes 7c90b06628 mavlink_ftp: fix tests after implementation fix
In commit 462b572172 the reading operation
on the PX4 side was changed to only read as many bytes as requested
rather than however many fit in the payload data.

This caused the unit tests to fail which this commit here aims to fix.

What is confusing about MAVLink FTP is that there is a size field which
generally signals how many bytes of the payload data are used/set.

However, in the case of a read requst, the size field is used to
indicate how many bytes should be read. The payload data is empty in
that case though.

This case was, from how I understand it, not implemented/tested in the
unit tests and now failed. In order to implement it I had to change a
few things:
- Change _setup_ftp_msg and _send_receive_msg so that the params contain
  a data length rather than the size field. The size field itself needs
  to be set outside of these methods using payload->size.
- Since we test files smaller, equal, and bigger than one payload data
  length, I implemented that we send multiple read requests until we
  have the whole file and not just the first part.
- Additionally, I saw a lot of uninitialized warnings in valgrind, and
  got rid of them by adding a few zero initializations.
2021-11-26 15:50:28 -05:00
Silvan Fuhrer 42845d6c6e SITL configs VTOL/plane: improve SITL tuning a bit
remvoe some tecs params from configs that acutally lead to worse performance than defaults

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-26 09:24:23 -05:00
Silvan Fuhrer 3a9eef658c Commander: remove preflight check for transition switch
This check enforced setting a VTOL transition switch if an RC as used on a VTOL.
It comes from a time when the only way to transtion was through the RC switch,
whereas now we have also a mavlink message in place for it, so enforcing it is
no longer needed.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-26 11:37:40 +01:00
Daniel Agar fc1aaa58b2 sensors/vehicle_angular_velocity: fallback sensor selection improvements
- avoid unnecessary filter reset on parameter update
 - additional minor optimizations (precomputing dt inverse, etc)
 - moving filter reset check and dynamic notch filter update checks out of the update loops
     - this were necessary previously when the scale factor wasn't applied prior to filtering the otherwise raw data
2021-11-25 22:44:05 -05:00
PX4 BuildBot 2dffb04d61 Update submodule libevents to latest Fri Nov 26 00:39:17 UTC 2021
- libevents in PX4/Firmware (239f1c4eadc57f12b43b57d704bb80bc07a07841): https://github.com/mavlink/libevents/commit/5fd19be22dcbeaccb8afeba146f3a7c931a9b5fb
    - libevents current upstream: https://github.com/mavlink/libevents/commit/6329c909a7b16bb6f97c94cbb598815635b94982
    - Changes: https://github.com/mavlink/libevents/compare/5fd19be22dcbeaccb8afeba146f3a7c931a9b5fb...6329c909a7b16bb6f97c94cbb598815635b94982

    6329c90 2021-11-16 Beat Küng - python: pylint fixes
6251f65 2021-11-16 Beat Küng - events_generated.h.jinja: add '_max' field to generated enums
2021-11-25 21:37:59 -05:00
PX4 BuildBot ffc52cc2fc Update submodule mavlink to latest Fri Nov 26 00:39:19 UTC 2021
- mavlink in PX4/Firmware (2328402f99b8f8931e4148d033e0b9361407d485): https://github.com/mavlink/mavlink/commit/5309ba449a3dc6d7ad84fa7ebeb6deee040e4a04
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/28163a3b39ae6787e7f1fae9e23feef32506a1c4
    - Changes: https://github.com/mavlink/mavlink/compare/5309ba449a3dc6d7ad84fa7ebeb6deee040e4a04...28163a3b39ae6787e7f1fae9e23feef32506a1c4

    28163a3b 2021-11-25 Julian Oes - dev: add new message for component capability (#1724)
5534f76b 2021-11-24 olliw42 - adding some missing MAV_TYPEs (#1679)
2021-11-25 21:37:14 -05:00
Daniel Agar 51da169ccb cmake: nuttx apps build depend .c and .h files 2021-11-25 17:24:23 -05:00
Daniel Agar bf3f7da0a2 Jenkins: hardware restore tests file 2021-11-25 13:11:45 -05:00
Daniel Agar 7d985ec7c5 NuttX with Backports for SD fixes 2021-11-25 13:11:45 -05:00
Daniel Agar c049c26ac5 ROMFS: rcS attempt to format SD if .format file exists 2021-11-25 13:11:45 -05:00
Daniel Agar 585fa12209 Jenkins HIL improve SD testing 2021-11-25 13:11:45 -05:00
David Sidrane 58a9bf0b2e sd_bench:Add verify and keep options 2021-11-25 13:11:45 -05:00
Thomas Stastny 8defbc8829 update correct airsp scale param string in ekf2 2021-11-25 11:01:04 -05:00
Matthias Grob c5fb68b7a1 Commander: force disabling the arm stick gesture when arm switch is in use 2021-11-25 07:56:35 +01:00
David Sidrane e76dda545c hardfault_log:Fix formatting 2021-11-24 15:00:38 -05:00
Sander Swart 462b572172 Fixed mavlink_ftp read
Instead of always reading the max data length, it now properly respects the requested amount of bytes (as per documentation)
2021-11-24 17:51:29 +01:00
David Sidrane 8e3ee9f6cd omnibus_f4sd:Fit in Flash added No Help 2021-11-24 09:46:23 -05:00
David Sidrane b1b948f4bc modalai_fc-v2:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 6327953fe9 modalai_fc-v1:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 83885b0304 cuav_x7pro:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 48b617ee5e cuav_nora:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 2fb615d7e2 holybro_kakutef7:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 04df95436d holybro_pix32v5:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane c4ccde51df holybro_durandal-v1:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane daa1d76909 spracing_h7extreme:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 1922310404 matek_h743-slim:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 5b30d1cd41 av_x-v1:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane d30ef0cac8 atl_mantis-edu:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 511e87f966 mro_ctrl-zero-f7-oem:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 2799a7f436 mro_x21-777:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 5ff96fc77e mro_ctrl-zero-h7-oem:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane a097cb11cd mro_pixracerpro:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 0d203deb34 mro_ctrl-zero-f7:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 376e78b801 mro_ctrl-zero-h7:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane bbe0ed8646 cubepilot_cubeyellow:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane e34aacd520 cubepilot_cubeorange:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 228a0ac5ed px4_fmu-v6u:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 3f67ece322 px4_fmu-v5:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 53b579a79d px4_fmu-v5x:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane c391d6793c px4_fmu-v6x:Set CONFIG_MKFATFS_BUFFER_ALIGMENT=32 2021-11-24 09:46:23 -05:00
David Sidrane 3cf901b29c NuttX Apps with backport CONFIG_MKFATFS_BUFFER_ALIGMENT 2021-11-24 09:46:23 -05:00
Matthias Grob ea3b99e964 navigator: Remove deprecated RangeRTL unit tests 2021-11-24 14:10:24 +01:00
Matthias Grob c522a8b15a Compute RTL time and react if lower than flight time
- Compute RTL time also during RTL
- Calculate correct altitude when finding destination
2021-11-24 14:10:24 +01:00
Matthias Grob 5489005e0b Commander: call battery_status_check on update instead of early return 2021-11-24 14:10:24 +01:00
Beat Küng 5bec3004c3 omnibus/f4sd: disable RGBLED to reduce flash 2021-11-24 11:41:33 +01:00
Jukka Laitinen 5dbbddb13f EKF2: Use _distance_sensor_subs vector directly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
Jukka Laitinen b66270f8a8 Inline uORBDeviceNode::copy for performance improvement
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
Jukka Laitinen 3f884c5d24 Inline deviceNodeExists and getDeviceNode in uORB DeviceMaster
This gives a small performance improvement

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
Jukka Laitinen d9498ade32 EKF2: Allocate distance sensor subscriptions as member variables
Just create the subscriptions and keep them, instead of
re-creating them continuously

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
Jukka Laitinen bb307cd462 Fix comparing orb_metadata in uORB::DeviceNode::publish
Don't compare pointers to metadata, but the metadata contents.

In protected/kernel build there are two sets of metadata, on on kernel
side and another in user side. Thus the comparison of pointers would just
always fail. Compare orb_id instead

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
Jukka Laitinen 0b9505453d Clean up interfaces towards uORB
Proxy all calls to the DeviceNode through Manager;
- This hides the DeviceNode from publishers and subscribers
- Manager can be made an interface class between user and kernel spaces in protected build
- This doesn't increase code size or harm the performance on flat build

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
Beat Küng 99d3b2a4e4 omnibus/f4sd: disable modules to reduce flash 2021-11-23 12:40:22 -05:00
Beat Küng db2a1e5fee px4/fmu-v2: disable modules to reduce flash 2021-11-23 12:40:22 -05:00
Beat Küng 950767f1af holybro/kakutefy: disable modules to reduce flash 2021-11-23 12:40:22 -05:00
Beat Küng 4c03def6e9 boards: add CONTROL_ALLOCATOR + ACTUATOR_TEST 2021-11-23 12:40:22 -05:00
Beat Küng 312d84ca23 metadata: run json schema validation for actuators + parameter metadata 2021-11-23 12:40:22 -05:00
Beat Küng 2809dd8944 control_allocator: remove min/max/scale params 2021-11-23 12:40:22 -05:00
Beat Küng b29d9db7f1 control_allocator: limit status publication rate to 200Hz
Reduces CPU load by ~3.5% on F4 @2khz.
And compute getAllocatedControl as needed (~1.5% CPU reduction)
2021-11-23 12:40:22 -05:00
Beat Küng 93a54ee63d metadata: fix generic param metadata generation
Adds the module.yaml params that was previously split into a separate file.
2021-11-23 12:40:22 -05:00
Beat Küng bcba3dfe52 control_allocator,angular_velocity_controller: run on rate_ctrl wq 2021-11-23 12:40:22 -05:00
Beat Küng a0e43bca96 msg: remove unused vehicle_actuator_setpoint topic 2021-11-23 12:40:22 -05:00
Beat Küng 52a2ef34fd mixer_module: add THR_MDL_FAC for SYS_CTRL_ALLOC=1 2021-11-23 12:40:22 -05:00
Beat Küng 357a16aca6 pwm_out_sim: split module.yaml into HIL+SIM files 2021-11-23 12:40:22 -05:00
Beat Küng b94c5db55d component_information: add actuators json generation & CI deployment 2021-11-23 12:40:22 -05:00
Beat Küng 70b1b19902 uavcan: add configuration parameter to actuator metadata 2021-11-23 12:40:22 -05:00
Beat Küng 19b89e1d35 output_functions: add notes to camera trigger + capture & exclude from testing 2021-11-23 12:40:22 -05:00
Beat Küng 4346ac4a37 control_allocator: add mixer metadata 2021-11-23 12:40:22 -05:00
Beat Küng 282d35bbf0 esc_calibration: handle SYS_CTRL_ALLOC==1 2021-11-23 12:40:22 -05:00
Beat Küng 490a2cd7ae dshot: handle VEHICLE_CMD_CONFIGURE_ACTUATOR 2021-11-23 12:40:22 -05:00
Beat Küng 21699935e8 vehicle_command: add VEHICLE_CMD_ACTUATOR_TEST and VEHICLE_CMD_CONFIGURE_ACTUATOR 2021-11-23 12:40:22 -05:00
Beat Küng 6fdcc43ea8 mixer_module: add testing for SYS_CTRL_ALLOC=1 with actuator_test cmd+uorb msg 2021-11-23 12:40:22 -05:00
Beat Küng 36296794c8 module config: add generate_actuators_metadata.py script 2021-11-23 12:40:22 -05:00
Beat Küng 36d9635518 output_functions.yaml: allow single-instance entry with 'start' but no 'count'
for other additional data
2021-11-23 12:40:22 -05:00
Beat Küng 5d6e785a4b mixer_module: remove unneeded test_motor_s force init 2021-11-23 12:40:22 -05:00
Beat Küng f99c2617ad control_allocator: add module.yaml, add CA_MC_R_COUNT param & update defaults 2021-11-23 12:40:22 -05:00
Beat Küng dbc889a2ae rc.mc_apps: remove 'param set MPC_USE_HTE 0' for control allocation
this is working now
2021-11-23 12:40:22 -05:00
Beat Küng 2ff6baa250 actuator params: use module_name as prefix to channel label 2021-11-23 12:40:22 -05:00
Beat Küng 6537f480b1 module.yaml: make long param description optional
Some params are very simple and don't need more.
2021-11-23 12:40:22 -05:00
Daniel Agar 1b7f4b6003 Jenkins HIL test loading all airframes 2021-11-23 12:38:41 -05:00
Matthias Grob 0153c870d2 Commander: make sure yaw airmode is not possible while arm gesture is enabled
It's unsafe to arm with the gesture when yaw airmode is enabled
because e.g. in Stabilized mode that results in a high yawrate setpoint
that the drone tries to follow even with zero thrust
because of the airmode.

It was handled before by checking the arm switch parameter because that
used to disable the stick arm gesture.
See 24dc316973
2021-11-23 16:03:46 +01:00
Matthias Grob 572890f8c0 ManualControl: add parameter to disable arm/disarm stick gesture 2021-11-23 16:03:46 +01:00
Matthias Grob 468022abba ManualControl: correct arm hysteresis parameter name 2021-11-23 16:03:46 +01:00
Matthias Grob c84b1c6566 ManualControl: ignore unassigned mode slots
They were resulting in a message
"Switching to Unkown is currently not available".
2021-11-23 16:03:46 +01:00
Jaeyoung-Lim af7fa63480 Remove kconfig-frontends installation from setup.sh 2021-11-23 15:17:00 +01:00
Silvan Fuhrer e596607e2e minor comments update
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-23 14:48:51 +01:00
Daniel Agar 7ff72304b4 sensors/vehicle_imu: improve disabled sensor handling
- remove regular callback scheduling when sensor is disabled, register if re-enabled
2021-11-22 21:10:35 -05:00
Daniel Agar 3140bf167c NuttX submodule update with work_usrthread.c fixes 2021-11-22 17:41:49 -05:00
Daniel Agar 1c6b1f7554 pwm_out: parameter failure error messages 2021-11-22 11:27:45 -05:00
Daniel Agar c95dbfd7ac boards: px4_fmu-v5_debug disable debug fs errors 2021-11-22 11:27:45 -05:00
Daniel Agar c2cbf74351 vscode: cmake variants add px4_fmu-v5_debug for convenient debugging 2021-11-22 11:27:45 -05:00
Daniel Agar 577d926639 commander: improve angular velocity validity and message 2021-11-22 11:27:45 -05:00
Daniel Agar f058cbd0e0 boards: px4_fmu-v5_debug disable CONFIG_DEBUG_I2C 2021-11-22 11:27:45 -05:00
Daniel Agar 25846f48c4 boards: px4_fmu-v2/v3 use SPI bus power off rather than full reset 2021-11-22 11:27:45 -05:00
Daniel Agar c4de9f67a1 Jenkins: HIL add simple reboot script that fails on any ERROR 2021-11-22 11:27:45 -05:00
PX4 BuildBot 643002bd86 Update submodule sitl_gazebo to latest Mon Nov 22 12:39:01 UTC 2021
- sitl_gazebo in PX4/Firmware (c73028bb1b): https://github.com/PX4/PX4-SITL_gazebo/commit/607aa4d990ff20b4f8a3a714043d116cf191f8b6
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/60d6844e17919e8d57aafb3a0c25064df920cfc3
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/607aa4d990ff20b4f8a3a714043d116cf191f8b6...60d6844e17919e8d57aafb3a0c25064df920cfc3

    60d6844 2021-11-16 wangwwno1 - Format: Remove extra spaces
e233c6d 2021-11-16 wangwwno1 - Enhance: fuse accel rotation
e8a7f89 2021-11-16 wangwwno1 - Fix: convert accel frame to local NED
2021-11-22 09:12:23 -05:00
PX4 BuildBot 88d9ade4d7 Update submodule mavlink to latest Mon Nov 22 12:39:21 UTC 2021
- mavlink in PX4/Firmware (0e4e8162407a12dc09c8d17635c60d4036b81bc7): https://github.com/mavlink/mavlink/commit/c3a4b52eb1ac6e8053d64a6a8b6ade887d4fa2d2
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/5309ba449a3dc6d7ad84fa7ebeb6deee040e4a04
    - Changes: https://github.com/mavlink/mavlink/compare/c3a4b52eb1ac6e8053d64a6a8b6ade887d4fa2d2...5309ba449a3dc6d7ad84fa7ebeb6deee040e4a04

    5309ba44 2021-11-18 Hamish Willee - Remove backticks - these do not render as a style so not helpful (#1745)
9cac0e5a 2021-11-17 David Jablonski - docs: catch more hyperlinks (#1744)
ea9349b5 2021-11-16 David Jablonski - common: add SET_FOCUS_TYPE_AUTO (#1741)
2021-11-22 09:08:50 -05:00
Daniel Agar 8fc3b05491 mavlink: param_get proper type to silence errors 2021-11-22 09:08:38 -05:00
Daniel Agar cbb743c64d parameters: param type checking use PX4_ERR and enable in PX4_SITL 2021-11-22 09:08:25 -05:00
Beat Küng 7faaad79d0 generate_params.py: add PWM_AUX_* for boards w/o IO and >8 channels 2021-11-22 09:07:23 -05:00
Igor Mišić c73028bb1b iridiumsbd: discard all pending data for flow control enabled 2021-11-22 11:46:15 +01:00
Daniel Agar 7653bd1757 cmake fix NuttX config import for 0 values 2021-11-21 12:33:29 -05:00
wangwwno1 7a1a4ea7a6 Format fix & Remove redundant lines 2021-11-20 16:13:46 +01:00
wangwwno1 51ce8306ee Remove redundant code out of hil_lpos 2021-11-20 16:13:46 +01:00
wangwwno1 b2c5919d29 Update src/modules/simulator/simulator_mavlink.cpp
Co-authored-by: JaeyoungLim <jalim@ethz.ch>
2021-11-20 16:13:46 +01:00
wangwwno1 160fec5f25 Update simulator_mavlink.cpp 2021-11-20 16:13:46 +01:00
wangwwno1 6e2060ddb6 Add accel to vehicle_local_position_groundtruth
Related Issue: #18527 
According to [this doc](https://github.com/mavlink/c_library_v2/blob/92b1a43468e8737da2d4cc1e72304e6443dcfdd3/common/mavlink_msg_hil_state_quaternion.h#L102), the *acc value are mili-Gee, so multiply the value with `CONSTANT_ONE_G/1000.0f` would get the acceleration in `m/s`.
2021-11-20 16:13:46 +01:00
Daniel Agar 505f963dd0 mavlink: receiver fix SENS_FLOW_ROT type 2021-11-19 21:08:04 -05:00
Max Elfgen 7f5fa3d1f7 Using RTPS as a label resulted in the PX4 instance crashing. Removing the label fixed the problem. 2021-11-19 20:30:46 +01:00
Matthias Grob f912ee2c8b Commander: send out parachute MAVLink command when kill switch engaged 2021-11-19 17:15:04 +01:00
Matthias Grob 3193b554ca Add optional preflight check for healthy MAVLink parachute system 2021-11-19 17:15:04 +01:00
Matthias Grob 43c529f294 Add MAVLink parachute system heartbeat detection 2021-11-19 17:15:04 +01:00
Thomas Debrunner fb54324f56 gyro-fft: Disable asm-operand-widths warning on apple silicon. The warning is caused by unused functions only. As with compiling for x86, the functions containing assembly never get used, but since the apple silicon is also an ARM target, they trigger a warning. 2021-11-19 09:14:11 -05:00
Daniel Agar 24090b724c cmake: px4_add_module improve unity build dependencies to avoid unnecessary work 2021-11-19 09:13:07 -05:00
Matthias Grob 4c6621f6cf Commander: Allow arming a rover with the throttle stick in the middle 2021-11-19 10:10:32 +01:00
Jani Paalijarvi 02336acd61 Improve SPI bus implementation
Make possible to define chip-select pin for internal SPI.
By defining chip-select pin, it's possible to start specific SPI device only.
This allows to have several same type of sensors on the same bus with different orientation.
2021-11-19 07:47:18 +01:00
Matthias Grob 35d4986ea7 FlightTasks: remove updateFinalize() concept because it got obsolete 2021-11-18 19:12:44 -05:00
Matthias Grob 9eac0edbc0 FlightTaskAuto: remove generateSetpoints function, replace by implementation 2021-11-18 19:12:44 -05:00
Matthias Grob ece8fdddec FlightTaskAuto: simplify early setpoint preparation based on triplet type 2021-11-18 19:12:44 -05:00
dagar 9646b49b60 [AUTO COMMIT] update change indication 2021-11-18 13:58:53 -05:00
Daniel Agar bffd88ad81 ekf2: don't inhibit accel bias when not in air 2021-11-18 13:58:53 -05:00
Daniel Agar f3472385da sensors/vehicle_imu: fix accel/gyro learned bias calibration updates
- fix confusion between estimated bias and calibration offset when
saving after each flight
 - when the stable bias estiamte is retrieved during flight it's
immediately converted to a sensor offset and saved
 - fixes https://github.com/PX4/PX4-Autopilot/issues/18658
2021-11-18 10:00:26 -05:00
bresch fc155bc57e Ekf2Selector: declare filter unhealthy when high test ratio
Request a switch to another instance when the combined test ratio is too high.
2021-11-18 13:29:01 +01:00
bresch 43fb076828 AngularAcceleration: explicitly disable filter when cutoff <= 0 2021-11-18 09:25:47 +01:00
bresch 4a14a8bc7f AutoLineSV: Always publish a valid yaw setpoint
In MPC_YAW_MODE 3 (along trajectory), the flight task is asked to
produce a yaw setpoint. If the previous yaw value was NAN (e.g.: during
early takeoff), the setpoint should then be reset to the current
estimate.
2021-11-16 18:09:37 -05:00
bresch f751dd2242 FlightTask: set yaw_setpoint to NAN when yaw should not be controlled 2021-11-16 18:09:37 -05:00
bresch 2213343240 ft altitude: use longerThan to save a sqrt operation 2021-11-16 18:09:37 -05:00
bresch 394fa953b8 EKF: get status on yaw alignement in flight
1s after the in air mag reset is performed, the final yaw alignment is
complete and the yaw estimate can be used for yaw control.
2021-11-16 18:09:37 -05:00
Matthias Grob 2a5751233a FlightTasks: remove unused StraightLine library
It was meant as an example for an easy to use interface of a
motion primitive with a minimal implementation. But the implementation
is much worse than the jerk optimized trajectory. We rather
work on making it easier to use. #18390 was a first step towards that.
2021-11-16 18:08:27 -05:00
Daniel Agar e062f4fcf0 mavlink: ORBIT_EXECUTION_STATUS stream limit to 2 instances 2021-11-16 17:10:13 -05:00
Alessandro Simovic 7090e634cc mission_block: always accept yaw in MC takeoff 2021-11-16 12:35:16 -05:00
Beat Küng 0622cb8857 mavlink_ftp: disallow writes outside of /fs/microsd under NuttX
As these files are kept in RAM, it could just fill up the RAM.
2021-11-16 12:34:16 -05:00
Daniel Agar 4e8c234a55 ekf2: only save mag declination if changed 2021-11-16 12:33:48 -05:00
Daniel Agar 96bf3aa5d0 matrix: apply PX4 astyle 2021-11-16 12:30:51 -05:00
Daniel Agar ab07f5300b lib/matrix: delete unused and add testing to PX4 2021-11-16 12:27:14 -05:00
Daniel Agar 4a3d64f1d7 consume PX4/Matrix repository and preserve history 2021-11-16 12:24:19 -05:00
Daniel Agar 38516f7e9c delete matrix submodule 2021-11-16 12:20:57 -05:00
Matthias Grob b36dbf8de4 Remove AutoLineSmoothVel, merged into Auto 2021-11-16 10:08:47 +01:00
Matthias Grob 179b1cdf56 FlightTaskAuto: merge activate(), reActivate() and update() from FlightTaskAutoLineSmoothVel 2021-11-16 10:08:47 +01:00
Matthias Grob 51ebb0f294 FlightTaskAuto: move in helper methods from FlightTaskAutoLineSmoothVel 2021-11-16 10:08:47 +01:00
Matthias Grob aa376c5824 FlightTaskAuto: move in parameters from FlightTaskAutoLineSmoothVel 2021-11-16 10:08:47 +01:00
Matthias Grob 50e13f132f FlightTaskAuto: move in members from FlightTaskAutoLineSmoothVel 2021-11-16 10:08:47 +01:00
Matthias Grob 33e349d71e FlightTask: remove unused _time 2021-11-16 10:08:47 +01:00
PX4 BuildBot 4a66c8c4c4 Update submodule sitl_gazebo to latest Tue Nov 16 00:39:15 UTC 2021
- sitl_gazebo in PX4/Firmware (f5d9b01f5c): https://github.com/PX4/PX4-SITL_gazebo/commit/1c8c9197103e746a21f2d2d2c844dd2f7e2b036b
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/607aa4d990ff20b4f8a3a714043d116cf191f8b6
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/1c8c9197103e746a21f2d2d2c844dd2f7e2b036b...607aa4d990ff20b4f8a3a714043d116cf191f8b6

    607aa4d 2021-11-15 Alexander Funke - Wind Plugin: Fixed typo in windGustVelocityMean. Closes #825, fixes #812 Fixed the typo in windGustVeloctiyMean to windGustVelocityMean, so that the parameter in the world file can be correctly read and the mean gust velocity properly set to the parameter's value.
2021-11-15 23:13:43 -05:00
PX4 BuildBot bfcd251a54 Update submodule mavlink to latest Tue Nov 16 00:39:28 UTC 2021
- mavlink in PX4/Firmware (2615146a0770ea416aa24dce70bd61845e45b939): https://github.com/mavlink/mavlink/commit/0a728aa8dcea5023b26d0df9f25ba5b2a14a71cd
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/c3a4b52eb1ac6e8053d64a6a8b6ade887d4fa2d2
    - Changes: https://github.com/mavlink/mavlink/compare/0a728aa8dcea5023b26d0df9f25ba5b2a14a71cd...c3a4b52eb1ac6e8053d64a6a8b6ade887d4fa2d2

    c3a4b52e 2021-11-14 olliw42 - use [value:] invalid attribute style (#1742)
5f353d79 2021-11-15 Hamish Willee - fix invalid attribute for arrays where first element sets as invalid (#1740)
b354af1c 2021-11-11 Beat Küng - add actuator test and configuration commands (#1738)
a8401492 2021-11-11 Beat Küng - Component information: add actuators (#1729)
2021-11-15 23:13:02 -05:00
Daniel Agar f5d9b01f5c NuttX build in place
- cmake NuttX build wrapper compile in place instead of copying source tree to build directory
    - slightly faster skipping necessary copying (depending on system)
    - allows debugging in place
    - easier to work directly in NuttX following official documentation
    - simplifies overall build which should make it easier to resolve any remaining NuttX dependency issues in the build system
 - the downside is switching back and forth between different builds always require rebuilding NuttX, but I think this is worth the improved developer experience
 - also no longer builds px4io and bootloader in every single build, for most users these rarely change and we're wasting a lot of build time
2021-11-15 18:47:38 -05:00
Daniel Agar 7b7b7acd36 i2c_spi_buses: respect CONFIG_I2C and CONFIG_SPI
- bmp280, dps310, and ms5611 barometers support boards without I2C
2021-11-15 15:57:33 -05:00
Daniel Agar eade2915c1 cleanup old parameter translation 2021-11-15 10:01:22 -05:00
Matthias Grob 91c48606ee battery_status: clearly define and handle zero remaining flight time 2021-11-15 15:44:02 +01:00
Matthias Grob 73287e8e8c battery: compute remaining flight time 2021-11-15 15:44:02 +01:00
Matthias Grob 54f2e91775 battery_status: report remaining flight time in seconds
This allows more accurate reporting and is compliant with the
MAVLink interface.
2021-11-15 15:44:02 +01:00
Beat Küng 4ba84d56c9 logger: introduce optional topics
The current practice of adding topics to the default set isn't scalable,
as it affects all setups.
By making sure topics are advertised on init, logger can just discard
topics that don't exist. This does not work for all topics, so topics are
specifically marked as optional. It can be extended to more topics later
on though.

This reduces the list of topics by ~35 on a pixracer configured as quad,
and reduces RAM usage by ~1KB.
2021-11-15 09:02:03 -05:00
Daniel Agar 177fe4bade logger: log write file allow single retry on write failure 2021-11-13 20:32:29 +01:00
alexklimaj 333629ce37 Update Broadcom AFBR to v1.3.5 API 2021-11-13 12:05:08 -05:00
RomanBapst 439400f76e commander: don't ack gimbal commands
- this leads to an unnecessary amount of acks which can in turn overflow
the orb queue

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-13 11:59:28 -05:00
Daniel Agar 3cb286abc8 gyro_calibration: reset on any sensor timeout 2021-11-13 10:15:25 -05:00
Daniel Agar 29b9e46664 mavlink_tests: add correct mavlink_c_generate dependency 2021-11-12 13:43:32 -05:00
kevindsp 17ad7071c3 fix the quaternion normalization issue
Be course of the numerical computing error . The normalization of the quaternion can't always equal to 1 precisely. It could occasionally trigger the error"attitude estimate no longer valid". So enlarge the threshold to 1e-6f. That keeps it silence.
2021-11-12 16:31:40 +01:00
Daniel Agar 6a60fba96d boards: holybro_kakutef7_default remove systemcmds/ver to save flash 2021-11-11 11:17:15 -05:00
Daniel Agar 0ec3f0d2cb mathlib: LowPassFilter2p update cutoff freq min to match NotchFilter
- numerically the cutoff frequency not being smaller than 1% of the
sample frequency is probably a better choice, but we're mostly filtering
16 bit data now stored in 32 bit float
2021-11-11 11:17:15 -05:00
Daniel Agar 0d171384b3 update IMU_GYRO_DNF_BW default 8->15 Hz
- dshot telemetry feedback can be quite slow (~2 Hz), so I think a
larger default value here makes sense
2021-11-11 11:17:15 -05:00
Daniel Agar 452f15e985 IMU_GYRO_DNF_EN remove from developer category 2021-11-11 11:17:15 -05:00
Daniel Agar 0e2ecdc59a sensors/vehicle_angular_velocity: perf counter naming consistentcy 2021-11-11 11:17:15 -05:00
Daniel Agar c60a9e2981 sensors/vehicle_angular_velocity: avoid unnecessary ESC notch filter resets 2021-11-11 11:17:15 -05:00
Daniel Agar 78436e706c mathlib: NotchFilter add optimized parameter update if only notch frequency changes 2021-11-11 11:17:15 -05:00
Daniel Agar edce30c6de sensors/vehicle_angular_velocity: fix ESC RPM notch filter update 2021-11-11 11:17:15 -05:00
Daniel Agar 376b72fb2f sensors/vehicle_angular_velocity: add new parameter for ESC RPM notch filter BW 2021-11-11 11:17:15 -05:00
Viktor Vladic 02709fcfab Fixes for MPU6000 and MatekH743-slim board
- MPU6000: Added 10us delay for R/W of slow registers
 - Board: Fixed DRDY pin from PB1 to PB2
2021-11-11 08:40:41 -05:00
Beat Küng fdf8461452 ver: print PX4_BOARD_LABEL for 'ver all' 2021-11-11 08:38:42 -05:00
Matthias Grob dbacdedad1 Remove FlightTaskAutoMapper, merged into AutoLineSmoothVel 2021-11-11 09:14:49 +01:00
Matthias Grob a94c61b896 FlightTaskAutoMapper: move parameters into FlightTaskAutoLineSmooth 2021-11-11 09:14:49 +01:00
Matthias Grob 59a395f6a0 FlightTaskAutoMapper: move remaining members into FlightTaskAutoLineSmooth 2021-11-11 09:14:49 +01:00
Matthias Grob f5183348a6 FlightTaskAutoMapper: move remaining methods into FlightTaskAutoLineSmooth 2021-11-11 09:14:49 +01:00
Matthias Grob 0211ef3ba1 FlightTaskAutoMapper: move update() into FlightTaskAutoLineSmooth 2021-11-11 09:14:49 +01:00
Matthias Grob 1cef2ad196 FlightTaskAutoMapper: merge activate() into FlightTaskAutoLineSmooth 2021-11-11 09:14:49 +01:00
wsolichin e9d50b853a Adding MAVLink message stream of GPS_RTCM_DATA 2021-11-10 21:15:01 -05:00
David Lechner d61f5d3d7b mavlink: fix forwarding to target id >= 128
The _MAV_PAYLOAD macro casts the value to a char*. Some compilers treat
char as signed, so we were getting negative system and component ids
if the id was >= 128. This caused later comparisons to fail which
resulted in messages not being forwarded.
2021-11-10 21:14:21 -05:00
Daniel Agar 374d44f38f mavlink: tests add git_mavlink_v2 dependency to avoid build race 2021-11-10 14:06:40 -05:00
PX4 BuildBot e0a9ceb2cb Update submodule mavlink to latest Wed Nov 10 12:39:06 UTC 2021
- mavlink in PX4/Firmware (74a33bad350857b6a7dcfe2a6745e8283baa2ce4): https://github.com/mavlink/mavlink/commit/3718ee300bef7a8e7a25314e25e03c11d9f0b180
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/0a728aa8dcea5023b26d0df9f25ba5b2a14a71cd
    - Changes: https://github.com/mavlink/mavlink/compare/3718ee300bef7a8e7a25314e25e03c11d9f0b180...0a728aa8dcea5023b26d0df9f25ba5b2a14a71cd

    0a728aa8 2021-11-10 Julian Oes - common: request multiple CAMERA_IMAGE_CAPTURED (#1735)
2021-11-10 14:00:28 -05:00
Daniel Agar 5e3701a365 Tools/check_submodules.sh: perform submodule sync again after first update to reach nested submodules 2021-11-10 13:52:51 -05:00
Jukka Laitinen be1023f5e9 smbus_sbs: Define linker language for a header-only library
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-10 09:27:21 -05:00
Jukka Laitinen d02a10b20f Remove src/lib/drivers/accelerometer and gyroscope linking to drivers__device
These are pure uORB publishers, they don't link to drivers__device.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-10 09:26:36 -05:00
Matthias Grob dd05cb3496 FlightTaskManualPosition: simplify optical flow limiting logic 2021-11-09 21:47:06 -05:00
Claudio Micheli 10e329ce9e mc_pos_control: correct MPC_XY_CRUISE description
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-11-09 21:47:06 -05:00
Matthias Grob 7ec8dd9d23 vehicle_constraints: remove deprecated speed_xy constraint 2021-11-09 21:47:06 -05:00
Jukka Laitinen 356de6ccf1 Factor cdc_acm_init away from px4_init
In protected build, this needs to go to user-space initialization as it
calls apps (sercon) and launches mavlink.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-09 21:28:28 -05:00
Jukka Laitinen 39c0c68167 print_load: Remove reference to CONFIG_MAX_TASKS
This is already removed from nuttx, and in posix the size of s->last_times
can be just checked with sizeof()

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-09 21:25:10 -05:00
Jukka Laitinen 9299a5c3f6 hrt: Add interface functions for latency counters
Add interface functions for fetching latency buckets and counters and use
those in perf_counter.cpp. This cleans up the usage of perf counters, when variables defined in hrt_drv are not referenced directly from perf.

This also enables implementing kernel-userspace interface for those for
nuttx protected/kernel build.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-09 21:24:25 -05:00
Jukka Laitinen da51177382 Don't link sensors module to drivers__device
sensors module only works on uORB, it doesn't link to drivers__device

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-09 12:18:49 -05:00
Matthias Grob ab9b9b1eac boards: Add manual_control module to newly added boards 2021-11-09 16:36:42 +01:00
bresch d47f9f155a MC mixer: replace multirotor_motor_limits by control_allocator_status
CA: fix saturation computation
Since the CA matrix is normalized, the same scale applied to be used when using the effectiveness matrix

MCRateControl: use control_allocator_status to get saturation info
2021-11-09 10:35:10 -05:00
Jaeyoung-Lim dd83ef1813 Fix fw position controller takeoff
This was introduced by a rebase
2021-11-09 10:30:28 -05:00
Matthias Grob 00905973c7 boards/kakutef7: remove dmesg to save flash 2021-11-09 16:05:25 +01:00
Matthias Grob 4aa0756d08 ManualControlSelector: correct parameter for any source according to documentation 2021-11-09 16:05:25 +01:00
Matthias Grob fabf865411 Use backwards compatible manual_control_setpoint instead of manual_control_input 2021-11-09 16:05:25 +01:00
Matthias Grob 423aadcc4f ManualControl: fix RC override 2021-11-09 16:05:25 +01:00
Matthias Grob 7e4a079e09 Commander: report when RC selected mode is not available 2021-11-09 16:05:25 +01:00
Matthias Grob a593a51f05 Commander: fix mode initialization with RC 2021-11-09 16:05:25 +01:00
Matthias Grob 9f17f3b0f3 ManualControl: correct source for RC mode switches without mode slot 2021-11-09 16:05:25 +01:00
Matthias Grob 21739c6937 MulticopterRateControl: Add event for landing gear retraction when landed 2021-11-09 16:05:25 +01:00
Matthias Grob 2b29df06fd ManualControl: avoid scheduling based on unchosen input 2021-11-09 16:05:25 +01:00
Matthias Grob 48869ed03e ManualControl: Simplify check if switches updated 2021-11-09 16:05:25 +01:00
Matthias Grob 38ab7e6ab9 Commander: separate function for action request execution 2021-11-09 16:05:25 +01:00
Matthias Grob 820ba07d4b Fix landing gear processing 2021-11-09 16:05:25 +01:00
Matthias Grob 0a02d8e774 Commander: handle denying disarm when not landed centrally 2021-11-09 16:05:25 +01:00
Matthias Grob af54ac7cdb ManualControl: remove unused variables and renaming 2021-11-09 16:05:25 +01:00
Matthias Grob e73e6a490d ManualControl: separate function for stick arming 2021-11-09 16:05:25 +01:00
Matthias Grob a349dae760 Use action_request to command RC VTOL transitions 2021-11-09 16:05:25 +01:00
Matthias Grob dcd26bd2b8 Commander: fix "Manual control lost" showing double in QGC
because of the missing tab in the deprecated message.
2021-11-09 16:05:25 +01:00
Matthias Grob 956997eb1e Replace arm_request and mode_request with combined action_request
Which saves flash space, log size and is extensible to handle e.g.
the VTOL transition and future actions.
2021-11-09 16:05:25 +01:00
Matthias Grob 052e29267d Use mode_request for RC mode switching 2021-11-09 16:05:25 +01:00
Matthias Grob f8e4846851 Use arm_request for manual killing 2021-11-09 16:05:25 +01:00
Matthias Grob af607e3040 Use separate arm_request instead of vehicle_command for RC arming 2021-11-09 16:05:25 +01:00
Matthias Grob c4473bdab7 ManualControl: clean up arm/disarm gesture 2021-11-09 16:05:25 +01:00
Matthias Grob 48ed350b25 ManualControlSelector: simplification refactoring
- clang tidy did't like {bool} == true in a condition
- setpoint_from_input() got small enough ot just put in line
2021-11-09 16:05:25 +01:00
Matthias Grob cc2ec09659 ManualControl: fix arm button logic during testing
The latching logic has to be different than for the arm switch
this difference got lost in the rewrite of the old obfuscated
arming trigger logic.
2021-11-09 16:05:25 +01:00
Matthias Grob 0901b73f50 ManualControlSelector: rename functions and validate chosen inputs all the time 2021-11-09 16:05:25 +01:00
Matthias Grob 28a29ad050 ManualControlSelector: revamp logic to switch when configuration is changed 2021-11-09 16:05:25 +01:00
Matthias Grob 05946ff0c6 mavlink_receiver: remove unused start_helper declaration 2021-11-09 16:05:25 +01:00
Matthias Grob 7a2ef4a917 Commander: don't publish RC_IN_MODE to vehicle_status
This just contains the content of the parameter which
is redundant and results in multiple sources of truth.
2021-11-09 16:05:25 +01:00
Matthias Grob fff2de43a5 commander_params: update description based on ManualControlSelector 2021-11-09 16:05:25 +01:00
Matthias Grob 396bab52ad ManualControlSelector: refactor selection to chose based on a single condition 2021-11-09 16:05:25 +01:00
Matthias Grob 1bd786c71a ManualControlSelector: don't invalidate existing setpoint with other invalid input 2021-11-09 16:05:25 +01:00
Matthias Grob e15f6b27f2 ManualControlSelector: copy manual_control_input struct instead of each individual field 2021-11-09 16:05:25 +01:00
Matthias Grob 63ddb050ef ManualControlSelector: refactor timeout calculation to be consistent 2021-11-09 16:05:25 +01:00
Matthias Grob 2528e8c572 ManualControl: correct calculation of dt in seconds 2021-11-09 16:05:25 +01:00
Matthias Grob 12bb2de175 state_machine_helper: rever explicitly handling unavaialble mission
It was already handled by the existing condition.
2021-11-09 16:05:25 +01:00
Matthias Grob 4dc165efd0 Commander: don't retry to reach the desired_main_state if we reached it 2021-11-09 16:05:25 +01:00
Matthias Grob d48302c841 Commander: send out manual control lost event 2021-11-09 16:05:25 +01:00
Matthias Grob 93bed7f670 vehicle_command: shorten arming action/origin enum names 2021-11-09 16:05:25 +01:00
Matthias Grob 709c909929 commander_params: correct RC override description 2021-11-09 16:05:25 +01:00
Julian Oes b3a5072de5 commander/manual_control: use msg enum for params
Instead of using a private enum class we should define the enum in the
vehicle_command message and then use it consistently.
2021-11-09 16:05:25 +01:00
Julian Oes f1b1068824 commander: remove unused mode/main_state methods
With the previous changes these seem no longer required.
2021-11-09 16:05:25 +01:00
Julian Oes 42af44700b mc_rate_control: always allow landing gear control
Except of course when landed and we try to put it up.
2021-11-09 16:05:25 +01:00
Julian Oes 486a4b0118 mavlink: reduce calls to hrt_absolute_time 2021-11-09 16:05:25 +01:00
Julian Oes 454aa611ae manual_control: add missing 7 2021-11-09 16:05:25 +01:00
Julian Oes 2c0fc686a7 manual_control: don't accept outdated input 2021-11-09 16:05:25 +01:00
Julian Oes 4d00a56230 manual_control: method can be static 2021-11-09 16:05:25 +01:00
Julian Oes 6027398459 manual_control: handle invalid rc_in_mode 2021-11-09 16:05:25 +01:00
Julian Oes 50cca204d8 manual_control: add check for instance 2021-11-09 16:05:25 +01:00
Julian Oes 963d15eacc manual_control: use correct sysid/compid 2021-11-09 16:05:25 +01:00
Julian Oes cfdb53a4d8 manual_control: don't switch gear on first init
This will ignore the first transition from NONE to something.
This matches the behaviour that existed before.
2021-11-09 16:05:25 +01:00
Julian Oes 60de330f18 manual_control: add hysteresis for arm button back 2021-11-09 16:05:25 +01:00
Julian Oes 75209a7552 manual_control: address review comments 2021-11-09 16:05:25 +01:00
Matthias Grob 942eb23248 ManualControlSelector: remove commented stick difference filter draft 2021-11-09 16:05:25 +01:00
Matthias Grob 11a46d3d27 ManualControlSelectorTest: add constantly outdated samples case
Reviewing the code I saw this case arising from the order things
get checked.
2021-11-09 16:05:25 +01:00
Julian Oes 39282a795f manual_control: fix tests 2021-11-09 16:05:25 +01:00
Julian Oes 53bd254502 commander: add valid check
Better checking once too much than once too little.
2021-11-09 16:05:25 +01:00
Julian Oes efd8757fda manual_control: handle NAN 2021-11-09 16:05:25 +01:00
Julian Oes 374c9f38a7 manual_control: use constrain() instead 2021-11-09 16:05:25 +01:00
Julian Oes 2a41ade223 manual_control: update first, get diff after
Not sure why I had this the wrong way round.
2021-11-09 16:05:25 +01:00
Julian Oes d0fea93d72 manual_control: add reset to diff
This should prevent triggering user override right after RC re-appears.
2021-11-09 16:05:25 +01:00
Julian Oes 93c505b163 commander: force arming is not an option from RC 2021-11-09 16:05:25 +01:00
Julian Oes 4a5ef1c81e ROMFS: whitespace 2021-11-09 16:05:25 +01:00
Julian Oes 6a6b8d49fc msg: re-use manual_control_input in setpoint
This way we avoid duplication between manual_control_input and
manual_control_setpoint.
2021-11-09 16:05:25 +01:00
Julian Oes baf81abbab msg: whitespace only 2021-11-09 16:05:25 +01:00
Julian Oes 14cfad74bf manual_control: remove leftover debug statements 2021-11-09 16:05:25 +01:00
Julian Oes 5ae76bdc17 commander: fix potentially wrong user message 2021-11-09 16:05:25 +01:00
Julian Oes bd0c1014d9 manual_control: support arming button
The arming button required some refactoring in order to support to
toggle arm/disarm using the vehicle_command. Otherwise manual_control
would have to subscribe to the arming topic and we would spread out the
logic again, and risk race conditions.
2021-11-09 16:05:25 +01:00
Julian Oes 9cbfa2ca95 manual_control: ORBIT and PRECLAND not supported
ORBIT and PRECLAND are not actually possible on the flight mode switch.
2021-11-09 16:05:25 +01:00
Julian Oes 2e9edfcd89 commander: only override according to param
This got lost in the refactor earlier.
2021-11-09 16:05:25 +01:00
Julian Oes 56b2b81600 manual_control: use filter to check user override
Instead of only looking at the diff between two RC samples to decide
whether a user wants to override, we now look at the filtered diff over
one second. This should be more robust to RC sent at various or varying
rates.
2021-11-09 16:05:25 +01:00
Julian Oes 97d01f200e commander: move manual_control and switches out
This moves the remaining handling of the manual control stuff out
of commander. All communication between manual control now goes through
vehicle commands, and the landing gear topic.
2021-11-09 16:05:25 +01:00
Julian Oes e49b596edc commander: add desired main state
This is an intermediate solution to carry forward the initial state of
the mode slot. Basically, it allows that we start up in Stabilized but
switch to POSCTL as soon we have the required GPS.
2021-11-09 16:05:25 +01:00
Julian Oes b6af068f25 commander: always reset posvel validity
I assume reseting posvel validity is ok for any case, not just all cases
except manual, acro, stabilized.
2021-11-09 16:05:25 +01:00
Julian Oes 52563264e6 commander: move valid mission check inside
I think it makes more sense to move this check inside of
main_state_transition.
2021-11-09 16:05:25 +01:00
Julian Oes 916ffef04c manual_control: send initial mode in the beginning
In order for commander to know the desired mode we need to send the
initial position of the mode slot.
2021-11-09 16:05:25 +01:00
Julian Oes a91fa7f3c1 commander: only move to POSCTL when armed
I don't think we want to switch to POSCTL when the sticks are moved when
armed.
2021-11-09 16:05:25 +01:00
Julian Oes 66b069e788 commander: move main_state_transition out
This is a first step to having a desired main state.
2021-11-09 16:05:25 +01:00
Julian Oes e2e908d0fc mavlink: remove unused methods 2021-11-09 16:05:25 +01:00
Julian Oes 97aa06cc19 commander: move switch handling to manual_control 2021-11-09 16:05:25 +01:00
Julian Oes 08e58a44e9 Fix style 2021-11-09 16:05:25 +01:00
Julian Oes 71d6aa913d manual_control: starting to implement switches 2021-11-09 16:05:25 +01:00
Julian Oes ac121c676a commander: check for valid flag for manual_control 2021-11-09 16:05:25 +01:00
Julian Oes cda6524421 manual_control: move override detection
This also removes the option to ignore throttle for the override
detection as it's not really required anymore.
2021-11-09 16:05:25 +01:00
Julian Oes 1c15cc11d8 manual_control: implement (dis)arming via command 2021-11-09 16:05:25 +01:00
Julian Oes 8876af9150 manual_control: add instance to selector
This instance is then used to schedule the callback for the
subscription.
2021-11-09 16:05:25 +01:00
Julian Oes 14eb656a59 rc_update: use snake_case for namespace name 2021-11-09 16:05:25 +01:00
Julian Oes 6e8ccf6a45 rc_update: rename update method
This reflects better what it actually does.
2021-11-09 16:05:25 +01:00
Julian Oes 723db8bf2a manual_control: add selector class [WIP]
This adds a selector class with unit tests.
The idea is to have a valid flag in manual_control_septoint and set that
according to the selection and/or timeout of manual_control_inputs.
2021-11-09 16:05:25 +01:00
Julian Oes eeb7682fd9 ROMFS: start manual_control for SITL 2021-11-09 16:05:25 +01:00
Daniel Agar 2d816e0b3e [WIP] manual_control selector hacks 2021-11-09 16:05:25 +01:00
Daniel Agar e18cf3da3e sensors/vehicle_imu: use WelfordMean for online mean and variance 2021-11-09 15:19:35 +01:00
Daniel Agar a8c3bcca32 boards: disable CONFIG_STM32H7_SPI_DMATHRESHOLD 2021-11-08 19:20:47 -05:00
Daniel Agar cb34ff1292 posix-configs/SITL/init/test/test_imu_filtering enable gyro dynamic notch filtering by default 2021-11-08 19:14:32 -05:00
Daniel Agar e0d9ccdc18 sensors/vehicle_angular_velocity: small FFT notch update simplification 2021-11-08 19:14:32 -05:00
Daniel Agar 47afab62e7 gyro_fft: limit noise floor to configured range (IMU_GYRO_FFT_MIN/MAX) 2021-11-08 19:14:32 -05:00
Daniel Agar dd3e0b723a gyro_fft: add IMU_GYRO_FFT_SNR parameter 2021-11-08 19:14:32 -05:00
Matthias Grob 6fab6242db setup/python requirements: add future module
which is a requirement for MAVLink header generation.
Found on Ubuntu 20.04 Python 3.
2021-11-08 17:05:30 +01:00
Silvan Fuhrer b216cddf49 state_machine_helper: add place holder in array nav_state_names for removed LANDGPSFAIL mode
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-08 13:42:55 +01:00
JaeyoungLim 031f7f831b Fixedwing Pos Control: Handle vehicle transition waypoints outside controllers (#18503)
* Handle VTOL transition waypoints outside FW auto control modes
2021-11-08 11:21:08 +01:00
Daniel Agar 66ab7e50df github actions increase NuttX compile ccache limit slightly 2021-11-07 20:37:58 -05:00
Daniel Agar 3b68f8e510 Tools/check_submodules.sh revert attempted submodule improvements
- this wasn't helping break out of submodule issues
2021-11-07 20:36:47 -05:00
Daniel Agar 4627f5514e boards: holybro_kakutef7_default disable load_mon to save flash 2021-11-07 20:36:47 -05:00
Jaeyoung-Lim 6a2ebfc0cc Handle setpoint types properly for fixedwing position control
Handle setpoint types properly for fixedwing position control
2021-11-07 19:21:00 -05:00
Daniel Agar f43adaeeb5 Tools/check_submodules.sh disable parallel jobs
- this is already run separately for each submodule (potentially in parallel)
2021-11-07 18:12:30 -05:00
Silvan Fuhrer dbd9b88bea FW position controller: only allow switching to AUTO_ALTITDUE or AUTO_CLIMBRATE if pos_sp_curr_valid
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-07 23:31:21 +01:00
Daniel Agar 2f8cb5a1c2 mavlink: initial support for MAG_CAL_REPORT stream 2021-11-07 16:03:34 -05:00
Daniel Agar 24b00317b5 Tools/check_submodules.sh attempt update before sync to handle changes 2021-11-07 16:00:13 -05:00
Viktor Vladic 5b3e1a2347 boards: add MatekH743-slim support 2021-11-07 15:39:50 -05:00
JaeyoungLim cda7c6ceaa Enable offboard actuator setpoints 2021-11-07 15:38:42 -05:00
Guilherme Lawless 47a191489e cmake: sitl_gazebo build use memory information from the system to estimate the parallel jobs
Using cmake_host_system_information, grabs AVAILABLE_PHYSICAL_MEMORY and adds another job for every 1.5GB of available memory.

This is tested on a single system with 16 logical cores and 16GB RAM (~11.5GB available, reported correctly by cmake).
2021-11-07 15:37:48 -05:00
Daniel Agar 68026eadeb save significant IMU bias changes learned by the EKF
* ekf2: make publishing of learned accel biases more robust
* ekf2: reset accel bias if calibration updated
* msg: add separate accel and gyro calibration counters
* ekf2: use separate accel and gyro calibration counters
* ekf2: rework logic to reset biases when calibration counters increment
* sensors: add saving of learned accel biases
* ekf2: generalized saving accel/gyro/mag in flight sensor calibration
* boards: holybro kakutef7 disable systemcmds/perf and systemcmds/top to save flash

Co-authored-by: Paul Riseborough <gncsolns@gmail.com>
2021-11-07 15:34:27 -05:00
Jacob Crabill 5969508fa7 mavlink: cmake generate mavlink headers at build time
- mavlink/mavlink is now directly included as a submodule instead of the generated mavlink/c_library_v2
 - this also switches to mavlink development.xml by default
2021-11-05 23:01:38 -04:00
Julian Oes 88489ae8bd mavlink: Check target for mavlink shell
The SERIAL_CONTROL MAVLink message now contains a target_system and
target_component field that we should check.

Without this we might be answering to a command on the network that is
meant for another system.
2021-11-05 23:48:44 +01:00
David Sidrane 96101a9c11 NuttX backports of imxrt dcache fixes to support WB & USB 2021-11-05 13:50:02 -04:00
David Sidrane af6bedaded nxp_fmurt1062:Needs pwm_out 2021-11-05 13:50:02 -04:00
David Sidrane ff43923567 nxp_fmurt1062-v1:Use Write Back Dcache 2021-11-05 13:50:02 -04:00
David Sidrane dedad87e82 nxp_fmurt1062-v1:Force no no-unaligned-access
This results in a load saving (no dcache) of 16.82% at a cost
  of 0.03% Flash, .07% XIP Flash and .45% SRAM

Forced Alighment

With: -mno-unaligned-access

Memory region         Used Size  Region Size  %age Used
           flash:      606568 B         7 MB      8.26%
        flashxip:      622920 B         1 MB     59.41%
            sram:      640848 B       856 KB     73.11%
            itcm:          0 GB         0 GB
            dtcm:          0 GB       128 KB      0.00%

 PID COMMAND                   CP
   0 Idle Task                   87640 20.047   204/  748   0 (  0)  READY  3
   1 hpwork                          0  0.000   332/ 1784 249 (249)  w:sig  3
   2 lpwork                         26  0.008   780/ 1616  50 ( 50)  w:sig  4
   3 init                            0  0.000  1980/ 2928 100 (100)  w:sem  3
   4 wq:manager                      0  0.000   508/ 1256 255 (255)  w:sem  4
 327 navigator                     910  0.204  1124/ 1832 105 (105)  READY  6
  23 wq:lp_default                3479  0.795  1252/ 1920 205 (205)  READY  4
  30 wq:hp_default               23554  5.415  1332/ 1904 237 (237)  READY  4
  47 dataman                         0  0.000   820/ 1208  90 ( 90)  w:sem  4
  57 wq:I2C1                     26849  6.190  1060/ 2336 246 (246)  w:sem  4
  60 wq:I2C2                     24045  5.440   732/ 2336 245 (245)  w:sem  4
  86 wq:SPI1                     47127 10.804  1352/ 2336 253 (253)  w:sem  4
  91 wq:I2C3                      1935  0.436   980/ 2336 244 (244)  w:sem  4
 101 wq:SPI3                      6932  1.585  1028/ 2336 251 (251)  w:sem  4
 237 wq:nav_and_controllers      16743  3.832  1236/ 2240 242 (242)  w:sem  4
 248 wq:rate_ctrl                 9008  2.074  1572/ 1952 255 (255)  w:sem  4
 250 wq:INS0                     37182  8.450  4372/ 6000 241 (241)  w:sem  4
 264 commander                   29395  6.732  1260/ 3224 140 (140)  READY  5
 287 mavlink_if0                 60513 13.828  1876/ 2728 100 (100)  READY  4
 294 mavlink_rcv_if0              5946  1.387  1292/ 4560 175 (175)  READY  4
 307 wq:UART5                     3345  0.770   844/ 1632 229 (229)  READY  4
 370 log_writer_file                 0  0.000   372/ 1176  60 ( 60)  w:sem  3
 369 logger                       2121  0.484  2468/ 3648 230 (230)  READY  3
 393 top                         37523  8.641  3060/ 4080 237 (237)  RUN    3

Processes: 24 total, 10 running, 14 sleeping
CPU usage: 77.08% tasks, 2.87% sched, 20.05% idle
DMA Memory: 5120 total, 1024 used 1024 peak
Uptime: 441.946s total, 87.640s idle

Allow Un-Alighment
With Out: -mno-unaligned-access
Memory region         Used Size  Region Size  %age Used
           flash:      604008 B         7 MB      8.23%   8.26%    +0.03

        flashxip:      622240 B         1 MB     59.34%  59.41%    +0.07
            sram:      636752 B       856 KB     72.64%  73.11%    +0.45
            itcm:          0 GB         0 GB
            dtcm:          0 GB       128 KB      0.00%  0.00%

 PID COMMAND                   CPU(ms) CPU(%)  USED/STACK PRIO(BASE) STATE FD
   0 Idle Task                    2418  3.190   264/  748   0 (  0)  READY  3
   1 hpwork                          0  0.000   332/ 1784 249 (249)  w:sig  3
   2 lpwork                         12  0.004   852/ 1616  50 ( 50)  w:sig  3
   3 init                            0  0.000  1932/ 2928 100 (100)  w:sem  3
   4 wq:manager                      0  0.000   548/ 1256 255 (255)  w:sem  4
 327 navigator                      22  0.203  1052/ 1832 105 (105)  READY  6
  23 wq:lp_default                  83  0.743  1252/ 1920 205 (205)  READY  4
  30 wq:hp_default                 637  5.886  1332/ 1904 237 (237)  READY  4
  47 dataman                         0  0.000   820/ 1208  90 ( 90)  w:sem  4
  57 wq:I2C1                       162  1.063  1060/ 2336 246 (246)  w:sem  4
  60 wq:I2C2                        98  0.500   732/ 2336 245 (245)  w:sem  4
  86 wq:SPI1                      1166 10.771  1352/ 2336 253 (253)  w:sem  4
  91 wq:I2C3                        48  0.437  1060/ 2336 244 (244)  w:sem  4
 101 wq:SPI3                       178  1.653  1028/ 2336 251 (251)  w:sem  4
 237 wq:nav_and_controllers        410  3.781  1324/ 2240 242 (242)  w:sem  4
 248 wq:rate_ctrl                  222  2.050  1572/ 1952 255 (255)  w:sem  4
 250 wq:INS0                       940  8.691  4372/ 6000 241 (241)  w:sem  4
 264 commander                     753  6.475  1472/ 3224 140 (140)  READY  5.03
 287 mavlink_if0                  1440 13.973  1780/ 2728 100 (100)  READY  4
 294 mavlink_rcv_if0               139  1.304  1276/ 4560 175 (175)  READY  4
 307 wq:UART5                       83  0.785   828/ 1632 229 (229)  READY  4
 370 log_writer_file                 0  0.000   372/ 1176  60 ( 60)  w:sem  3
 369 logger                         54  0.493  2468/ 3648 230 (230)  READY  3
 393 top                          1053 10.015  3060/ 4080 237 (237)  RUN    3
 396 mavlink_rcv_if1               166  1.608  1380/ 4560 175 (175)  READY  4
 395 mavlink_if1                  2167 23.459  1812/ 2824 100 (100)  READY  4

Processes: 26 total, 12 running, 14 sleeping
CPU usage: 93.90% tasks, 2.91% sched, 3.19% idle     77.08% tasks, 2.87% sched, 20.05% idle -16.82%
DMA Memory: 5120 total, 1024 used 1024 peak
Uptime: 18.242s total, 2.419s idle
2021-11-05 13:50:02 -04:00
David Sidrane 4225193456 nxp_fmurt1062-v1:Proper USB HS config 2021-11-05 13:50:02 -04:00
David Sidrane e2b4e435a9 Build system:Board level control of no-unaligned-access 2021-11-05 13:50:02 -04:00
David Sidrane af9f8f08c6 NuttX PX4 build - capture log in VERBOSE=True|1 2021-11-05 13:50:02 -04:00
David Sidrane d4c2476699 nxp_fmurt1062-v1:init Fix Spelling 2021-11-05 13:50:02 -04:00
David Sidrane 46b208ba21 nxp_fmurt1062-v1:init Define ret indepenent of enabled IP Blocks 2021-11-05 13:50:02 -04:00
David Sidrane 29eb27632a nxpfmurt1062-v1:Add USB dev 2021-11-05 13:50:02 -04:00
RomanBapst 56cf77a74c addressed review comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-05 18:04:33 +01:00
RomanBapst e36e527488 fixed wrong path
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-05 18:04:33 +01:00
Roman Bapst d58d13b2e8 APX4-1617: Fix manual climb rate in TECS (#1463)
* tecs: workaround for the fact that vel smoothing lib uses a DOWN coordinate system

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-05 18:04:33 +01:00
RomanBapst 7cb99f521c moved ManualVelocitySmoothing to motion_planning lib
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-05 18:04:33 +01:00
RomanBapst 924298e9c3 addressed review comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-05 18:04:33 +01:00
RomanBapst 0ac3077bdc tecs: use trajectory generation library to compute height rate setpoint
- added ability to specify maximum acceleration constraint for height rate setpoint
- added support for locking altitude setpoint when in height rate control
mode and height rate input is zero

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-05 18:04:33 +01:00
RomanBapst 6e75b7cffd FixedWingPositionControl: push altitude setpoint locking into TECS
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-05 18:04:33 +01:00
Beat Küng 296db60a58 camera_capture: use output functions for pin configuration if SYS_CTRL_ALLOC==1 2021-11-05 12:36:04 -04:00
Beat Küng 6d993a9301 camera_trigger: use output functions for pin configuration if SYS_CTRL_ALLOC==1 2021-11-05 12:36:04 -04:00
Silvan Fuhrer f492fa9d3a fix typo
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 17:58:21 +03:00
RomanBapst 514cf12c57 addressed review comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-11-05 17:58:21 +03:00
Silvan Fuhrer 3bd114bf9f RTL: if vehicle is a VTOL in hover, always consider all safe landing points
Unless there is already a mission landing in progress,
in that case stay on the mission landing if RTL_TYPE
isn't set to closest.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 17:58:21 +03:00
Silvan Fuhrer 1163a52c17 Navigator: remove unnecessary (duplicated) info messages for RTL
There is already (a more precise) info message on RTL activation.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 17:58:21 +03:00
Silvan Fuhrer f4f9b8ebf2 RTL: replace deny_mission_landing logic by getDestinationTypeMissionLanding()
The rtl instance decides on destination of RTL, and Navigator then switches to
mission mode if required.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 17:58:21 +03:00
Silvan Fuhrer ab08bbdb58 RTL: improve RTL info message
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 17:58:21 +03:00
Silvan Fuhrer 775a1eb4b6 RTL: remove unused function and non-informative comments
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 17:58:21 +03:00
Silvan Fuhrer dd987c08a5 RTL: rename enum names for RTLType
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 17:58:21 +03:00
Silvan Fuhrer a012f01dbc Navigator: clean up get_rtl_type()
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 17:58:21 +03:00
Silvan Fuhrer 8dc6d5f208 RTL: set destination type to mission landing also in MC
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 17:58:21 +03:00
Daniel Agar 9c15be22d6 mc_autotune_attitude_control: add new MC_AT_EN parameter to enable
- only enabled by default on boards that aren't memory constrained
2021-11-05 09:52:07 -04:00
bresch 1e94512719 FD: use flags union instead of bitmask 2021-11-05 09:45:52 -04:00
bresch 3f1025fb1e FD: add dedicated topic to log more internal states
log imbalanced propeller check metric

add failure_detector_status message
2021-11-05 09:45:52 -04:00
bresch b8ed457371 Commander: trigger failsafe action if imbalanced propeller detected 2021-11-05 09:45:52 -04:00
bresch 5dfb8e594a FD: add imbalanced propeller check 2021-11-05 09:45:52 -04:00
bresch bf2fb70d67 vehicleIMU: compute and log accel variance 2021-11-05 09:45:52 -04:00
Silvan Fuhrer f02786d112 Navigator/Commander: make GPS failsafe consitent: switch to Descend also for FW and VTOL
- remove GPS failsafe mode
- for VTOL: transition to hover in Descend (unless NAV_FORCE_VT is not set)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 12:09:39 +03:00
Silvan Fuhrer b77487d69c Fixed-wing Position controller: add modes for auto altitude and auto descend
- bit of clean up
- add GPS failsafe mode auto_altitude, that will keep current altitude with a fixed-bank angle
for some time, then switches to auto_descend that will descend with constant sink rate
of 0.5m/s
- params controlling GPS failsafe are not FW params: NAV_GPSF_R --> FW_GPSF_R and
NAV_GPSF_LT --> FW_GPSF_LT

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 12:09:39 +03:00
Daniel Agar c73a1b4c68 update UAVCAN-v0 dsdl to DroneCAN 2021-11-04 21:36:13 -04:00
Daniel Agar 67437396f1 mpu6000: add USER_CTRL I2C_MST_EN bit to checked registers 2021-11-04 21:22:14 -04:00
Daniel Agar 8fbb241c2e mpu6000: add gyro/accel self test bits to checked registers 2021-11-04 21:22:14 -04:00
Daniel Agar bffcdd6fad boards: modalai_fc-v2 fix bootloader board type 2021-11-04 15:43:29 -04:00
Matthias Grob f55590ce78 FlightTaskOrbit: remove duplicate newlines 2021-11-03 17:37:52 +01:00
Matthias Grob 6cea707330 FlightTaskOrbit: increase acceptance radius from 1 to 2m
to avoid reaproaching when tracking is not perfect while
acc/deccelerating by stick.
2021-11-03 17:37:52 +01:00
Matthias Grob eda9dce033 FlightTaskOrbit: fix direction change via MAVLink command 2021-11-03 17:37:52 +01:00
Thomas Debrunner d450afead6 FlightTaskOrbit: Direct orbit approach with slowdown at intersection point 2021-11-03 17:37:52 +01:00
Thomas Debrunner 0d0b87e193 Update src/modules/flight_mode_manager/tasks/Orbit/FlightTaskOrbit.cpp
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2021-11-03 17:37:52 +01:00
Thomas Debrunner 9bd46be124 Orbit: Switch to PositionSmoothing library.
This also fixes the bug with altitude not follows and smoothes orbit approach trajectory
2021-11-03 17:37:52 +01:00
Vatsal Asitkumar Joshi ea1ae73526 Support for Raspberry PI RP2040 MCU (#18083) 2021-11-03 12:14:30 -04:00
Daniel Agar 8f6fd5f37b sensors/vehicle_angular_velocity: gyro RPM dynamic notch filter handle negative RPM
- some UAVCAN ESCs report negative RPM for reverse rotation
 - lower hard coded safety limit RPM limit to 10 Hz (600 RPM)
 - avoid disabling notch filters that weren't configured
2021-11-02 09:36:02 -04:00
Peter van der Perk c6f249f7f1 Kconfig merge_config only set to 'n' when BOOL
Run make updateconfig to fix delta's of derived configs
2021-11-02 09:34:21 -04:00
Daniel Agar fec0d6c5ed ekf2: change indication further reduce data precision 2021-11-02 10:21:54 +01:00
bresch 1317b1a6e1 [AUTO COMMIT] update change indication 2021-11-01 13:59:34 +01:00
bresch 9e54c6d1aa ekf2: move generic functions to control.cpp
these functions aren't specific to GPS fusion
2021-11-01 13:59:34 +01:00
bresch e90734881b ekf2_test: add more GPS fusion control tests 2021-11-01 13:59:34 +01:00
bresch 8aae39e82a ekf2: move GPS control logic to separate source file 2021-11-01 13:59:34 +01:00
bresch 689ab12845 ekf2: refactor gps vel/pos fusion control logic 2021-11-01 13:59:34 +01:00
bresch 9afc390552 ekf2: move gps yaw reset in starting function 2021-11-01 13:59:34 +01:00
Daniel Agar 1461eb0e32 logger: increase optimization to ${MAX_CUSTOM_OPT_LEVEL}
- ${MAX_CUSTOM_OPT_LEVEL} is -O2 on boards that aren't flash constrained
2021-11-01 09:13:12 +01:00
Thomas Debrunner 32be88404a commander: Only run estimator navigation checks when armed 2021-10-28 12:06:31 -04:00
PX4 BuildBot 7006b0aee9 Update submodule jMAVSim to latest Thu Oct 28 12:38:55 UTC 2021
- jMAVSim in PX4/Firmware (c9b89ee869): https://github.com/PX4/jMAVSim/commit/0a5a8c6d9da05bee5f82faa25430213d97d396b0
    - jMAVSim current upstream: https://github.com/PX4/jMAVSim/commit/b23dc53d558e801b214fbcb605a061c9773105e0
    - Changes: https://github.com/PX4/jMAVSim/compare/0a5a8c6d9da05bee5f82faa25430213d97d396b0...b23dc53d558e801b214fbcb605a061c9773105e0

    b23dc53 2021-10-08 Ilya Petrov - Use low resolution texture also on Windows
2021-10-28 11:41:02 -04:00
Harrison MG c9b89ee869 fixed ulanding_radar autostart command 2021-10-28 00:01:37 -04:00
Daniel Agar be5c5856e7 cmake: px4_add_module always add module to PX4_MODULE_PATHS so that parameters aren't pruned 2021-10-27 23:00:40 -04:00
Peter van der Perk 51abb804ac UAVCANv1 Fix NodeClient header and Kconfig merge logic 2021-10-27 10:07:01 -04:00
Beat Küng 0decdb1c7b github action: run ./Tools/generate_board_targets_json.py in container
As it requires kconfiglib
2021-10-27 15:23:23 +02:00
Silvan Fuhrer e715e6c245 Fixed-wing position control: set yaw_sp to yaw_current instead of nav_bearing when not controlled
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-27 14:35:00 +03:00
Silvan Fuhrer b53808d11b fixed-wing: set yaw_sp to yaw_current instead of 0 when not controlled
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-27 14:35:00 +03:00
Silvan Fuhrer da4d6dc657 L1: increase the max allowed tangential velocity in the opposite direction to 2m/s
There is logic in L1 that prevents the vehicle from trying to achieve
an impossible loiter entry (e.g. due to wind). That check makes the
vehicle track the loiter center if the tangential velocity is in the wrong
direction while loitering. After the vehicle flies through the center, it can
then turn the other way around to join the loiter.
This check is though too sensitive if it purely checks for the wrong direction,
and it can end in delayed loiter entry for no reason.
This commit increases the threshold to 2m/s of tangential velocity
in the wrong direction to trigger the check.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-27 12:32:58 +03:00
RomanBapst eee5f501cd navigator: fix flyaway when altitude change is commanded without a valid
triplet

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-27 11:01:13 +03:00
RomanBapst bf6a47ba6a navigator: cleanup of set_loiter_item
Unwraps the set_loiter_item() to solve the issue where the altitdue setpoint
in a MC takeoff wasn't correctly used.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-27 11:01:13 +03:00
Silvan Fuhrer cb78ba34d7 Mission: for tangential loiter exit, set current position setpoint typ to position
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-27 11:01:13 +03:00
Silvan Fuhrer 4b21c0c49e Fw Pos C: always reset pos_sp type from LOITER to POSITION if far away
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-27 11:01:13 +03:00
RomanBapst d678e792cc mission_block: don't require an exiting heading when loitering if the next
waypoint is within the loiter radius of the current waypoint

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-27 11:01:13 +03:00
Michael Schaeuble 5e1f62e9d0 Add option to warn the pilot in case of strong magnetic interference but still allow arming.
This PR changes the COM_ARM_MAG_STR parameter to accept values. If the parameter is set to 2, the check is performed and a warning is logged but the vehicle can still arm.
2021-10-27 09:59:18 +02:00
ponomarevda 2b6bd452df fix hardpoint hardfault by checking argc before std::strcmp 2021-10-27 08:11:23 +02:00
Beat Küng de488f0f40 omnibus/f4sd: add topic listener & change timer order
So it matches the usage in the channel definition order
2021-10-27 08:03:55 +02:00
Beat Küng 8476875b4d Kconfig: add missing serial ports 2021-10-27 08:03:55 +02:00
Beat Küng 48344c6e2a state_machine_helper: add missing 'break' (no behavior change) 2021-10-27 08:03:55 +02:00
Daniel Agar 6d0c6bb6ce lib/world_magnetic_model: cmake remove helper target BYPRODUCTS
- otherwise ninja will try to rebuild these
2021-10-26 18:52:12 -04:00
dagar a2801bab80 [AUTO COMMIT] update change indication 2021-10-26 14:39:58 -04:00
Daniel Agar 88a979cf1d lib/world_magnetic_model: add cmake helpers for updating tables
- `world_magnetic_model_update` to fetch latest geo_magnetic_tables.hpp
 - `world_magnetic_model_tests_update` to fetch latest test_geo_lookup.cpp
2021-10-26 14:39:58 -04:00
Peter van der Perk 24ab430466 Tools/generate_board_targets_json.py: fix json board targets regression from #17100 2021-10-26 16:15:39 +02:00
bresch d0f89f7fff ekf2: refactor wind reset functions 2021-10-26 10:18:56 +02:00
bresch 456dfcb4b9 ekf2: update getter for true airspeed 2021-10-26 10:18:56 +02:00
bresch 3927c183de ekf2_test: adjust airspeed unit test
an airpseed of > 2m/s is required to start the fusion (set by param)
fw mode is also required

Given the larger estimated windspeed after those changes, the change of
static pressure is larger and the height estimate takes more time to
reach the final value
2021-10-26 10:18:56 +02:00
bresch 6e8f0e92ff ekf2: refactor airspeed fusion control logic 2021-10-26 10:18:56 +02:00
bresch 8873e92c7c ekf: force fallback to baro if GPS is stopped while in GPS height mode
Otherwise, no height aiding source is used
2021-10-26 10:05:28 +02:00
bresch 0a140ec59a ekf2_test: add GPS height to baro fallback 2021-10-26 10:05:28 +02:00
bresch f4c21cedd9 ekf2_test: use motion_planning for dynamic yaw emergency test 2021-10-25 18:06:38 -04:00
bresch 340a2caa8e ekf2_test: use motion_planning library
The VelocitySmoothing class from the motion_planning library is used to
generate trajectories in order to test the EKF convergence during motion
2021-10-25 18:06:38 -04:00
David Sidrane 38e2e6a01f Use NuttX MPU Reset (#18283)
* NuttX with MPU reset backports

* Use NuttX MPU reset
2021-10-25 18:05:31 -04:00
alexklimaj 8088c82b6a Add CANNODE_FLOW_ROT 2021-10-25 16:31:00 -04:00
Jaeyoung-Lim 5dcaadf492 Fix px4vision defaults 2021-10-25 16:29:52 -04:00
Landon Haugh 24cd0c6fa3 Enablement of PX4 SPI driver for UCANS32K146 2021-10-25 08:36:54 -07:00
Daniel Agar a548c94230 boards: holybro_durandal-v1_default disable modules to save flash 2021-10-25 13:41:31 +02:00
bresch 6ec9ab11f2 add fw auto-tune module to board configs 2021-10-25 13:41:31 +02:00
bresch 95e2941b17 fw att: inject system identification signal to controller 2021-10-25 13:41:31 +02:00
bresch 6af0856558 add FF to FW rate controllers 2021-10-25 13:41:31 +02:00
bresch 55f0860c31 fw atune: add fixed-wing auto-tuning module 2021-10-25 13:41:31 +02:00
bresch 8dfdb1e3db compute and publish fixed-wing control power 2021-10-25 13:41:31 +02:00
RomanBapst d84b0296d2 support orbit command in fixed wing mode
Signed-off-by: RomanBapst <bapstroman@gmail.com>

commander: support orbit mode for fixed wings

Signed-off-by: RomanBapst <bapstroman@gmail.com>

FwPositionControl: publish orbit status

Signed-off-by: RomanBapst <bapstroman@gmail.com>

commander:reject orbit mode while doing a vtol transition

Signed-off-by: RomanBapst <bapstroman@gmail.com>

FixedWingPositionControl: explicitly cast waypoint for Orbit status

FixedwingPositionControl: fill missing orbit_status fields

navigator_main: handle reposition/orbit corner cases

- set orbit rotation direction correctly
- send mavlink message when orbit is rejected

FixedWingPositionControl: correctly report rotation direction in orbit_status

navigator: hack to not break orbit while doing altitude changes

Signed-off-by: RomanBapst <bapstroman@gmail.com>

navigator: set cruise throttle for orbit command

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-25 09:48:27 +02:00
Daniel Agar 93eb0162e5 drivers/uavcan_v1: fix Kconfig trailing whitespace 2021-10-25 08:15:46 +02:00
Silvan Fuhrer f9cfcc5cfa AirspeedSelector: add bitmask to enable checks seperately in ASPD_DO_CHECKS
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer 73fe300c00 WindEstimator: remove option to disable scale estimation
The situation where this would be desired is unclear, plus it's basically
the same as setting ASPD_SC_P_NOISE to a very small value.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer b38bf23d6e WindEstimator: avoid division by 0
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer c0754cf324 AirspeedValidator: pass vI as reference
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer f9682b86d1 AirspeedSelector: some clean up
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer 7537fa36c8 AirspeedValidator: fix airspeed scale validation (feed raw TAS)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer a2faac148f AirspeedValidator: check_airspeed_innovation() check absolute innovations
Do no longer use tas_innovation from wind estimator and test ratio, but calculate
the innovation  based on wind estimate, TAS measurement (including currently applied scale)
and ground velocity. Use innovations directly to trigger failure.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer f6d37ecacf AirspeedSelector: make sure we don't try to access a negative array index
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer ccab93e68b AirspeedSelector: use Vector3f
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer 259b851ba7 WindEstimator: remove filter reset due to airspeed measurement rejection
As the purpose of this wind estimator is to (mainly) catch airspeed failures,
we don't value estimator stability as much as the reliability to catch
actual sensor issues, and thus do not reset the filter (as this may hide
a real issue with the sensor)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer 3ad901e51d Wind Estimator: use time_literals
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer cad7851774 AirspeedSelector: add _CAS_scale_validated to airspeed_wind for logging
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer 625f556b0e AirspeedSelector: airspeed scale estimation improvements and robustification
- run airspeed scale estimation always, not in dedicated mode
- add option to apply scale automatically, with extra feasibility check
- add airspeed scale for all 3 possible airspeed instances
- clean up parameters
- add check for data stuck (non-changing airspeed data)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
RomanBapst 8e8c6efd66 Mission block: do not care for altitdue acceptance when approaching backtransition point
Not accepting the waypoint causes the vehicle to perform a sharp turn after passing
the land waypoint and this causes worse unexected behavior.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-22 15:37:10 +02:00
Matthias Grob 3d50adc5fe astyle: restore backwards compatibility with old pre-commit hook
I removed the filtering logic from the shell script in #18482 because
the new pre-commit hook already takes care of it.

The problem is if you don't update the .git/hooks/pre-commit file and
use the new shell script there's no filtering
of files done and it checks all files for every file.

This commit restores backwards compatibility because it does not hurt
until I have an automatic way to update the pre-commit hook file.
2021-10-22 12:56:21 +02:00
bresch 78fe6e2152 VelocitySmoothing: fix issue when delta vel is the same on all axes
When the change in velocity is exactly the same on several axes, the T1
of the recumputed trajectories after time sync was set to 0 because it
was skipping both if and else if.
2021-10-22 10:54:36 +02:00
mcsauder 9301288d1f Add parameter and logic to set RTL heading mode. 2021-10-22 09:28:30 +02:00
Matthias Grob 6938d24ec7 pre-commit hook: show all style issues, not just the ones from the first file 2021-10-21 19:07:13 -04:00
Matthias Grob 2716ce7a56 pre-commit hook: clear output with error, file name, diff, instructions 2021-10-21 19:07:13 -04:00
Matthias Grob 4454fe9770 pre-commit hook: don't unstage the entire file containing a style issue 2021-10-21 19:07:13 -04:00
Daniel Agar 19952768fb boards: try to keep test boards in sync 2021-10-21 15:59:15 -04:00
Daniel Agar 6fb1c79ef0 mixer_module: reject mixer load and reset when dynamic mixing is enabled 2021-10-21 11:27:33 -07:00
Daniel Agar f1016dc32c boards: add systemcmds/topic_listener to CAN nodes 2021-10-21 14:06:11 -04:00
Daniel Agar 17328bef69 Jenkins attach GDB and print back trace on failure 2021-10-21 14:04:33 -04:00
David Sidrane 258cde668c nxp_fmurt1062-v1:Pared down boardconfig 2021-10-21 11:04:34 -04:00
David Sidrane 0e29cb31e6 nxp_fmurt1062-v1:Pull more code into XIP Flash 2021-10-21 11:04:34 -04:00
David Sidrane ff3a76d918 nxp_fmurt1062-v1:Needs to usne ocram Linker script 2021-10-21 11:04:34 -04:00
Daniel Agar ea9c64dcd9 drivers/uavcan: add new UAVCAN_SUB_* parameters to enable subscriptions
- only GPS and mag are enabled by default
2021-10-21 09:55:04 -04:00
Silvan Fuhrer fd96bbf9b9 Mavlink: bump MAX_REMOTE_COMPONENTS to 16
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-21 07:48:50 +02:00
Daniel Agar 4247e1320b px4io: allow switching to rate ctrl wq 2021-10-20 09:56:42 -04:00
Beat Küng c0f75b1c79 dshot: add missing '#pragma GCC diagnostic push' 2021-10-20 08:11:07 +02:00
Daniel Agar 757424c2c0 clang-tidy ignore modernize-raw-string-literal for now 2021-10-20 08:10:05 +02:00
Beat Küng 8a2b310b83 topic_listener: avoid code generation, use existing metadata at runtime
This reduces flash size for v5 by ~110KB, the topic listener now only adds
about 1.2KB.
2021-10-20 08:10:05 +02:00
Beat Küng a0e72b35a4 replay: ignore ULogMessageType::PARAMETER_DEFAULT messages 2021-10-20 08:10:05 +02:00
Beat Küng 4c73ac3805 uorb: use single byte for internal types in o_fields metadata
Reduces flash usage by ~9KB.
2021-10-20 08:10:05 +02:00
Landon Haugh 9aaf6e3f3e [NXP_UCANS32K146] Increase usermain stack size to prevent init overrun 2021-10-19 20:17:11 -04:00
Thomas Debrunner f4a85fa951 rcS: Allow startup files to be located on SD card 2021-10-19 14:08:38 -04:00
alexklimaj 6daa579e46 Add ARK RTK GPS Debug, turn on UART RX DMA 2021-10-19 13:30:46 -04:00
mcsauder 21163d859e Whitespace cleanup. 2021-10-19 13:29:26 -04:00
Daniel Agar 4cf8eb8226 ekf2: EKF vehicle_at_rest always require some rotation in addition to vibration metrics 2021-10-18 21:39:40 -04:00
Daniel Agar 33954a904f lib/tunes: never play tunes if circuit breaker is set 2021-10-18 21:37:09 -04:00
Daniel Agar b08f20806b ROMFS: rcS don't play startup tune until after UAVCAN and px4io
- fixes potential duplicate startup tune
2021-10-18 21:37:09 -04:00
Tia 6e3e6846f4 Fix srf05 driver. 2021-10-18 21:00:59 -04:00
bazooka joe b35dd86d04 mc_pos_control: remove unused var 2021-10-18 20:37:18 -04:00
bazooka joe c8d6f8f5e5 remove proto for unused function limit_thrust_during_landing() 2021-10-18 20:37:18 -04:00
Daniel Agar 9d7c4596f7 navigator: increase stack 1800 -> 1864 bytes 2021-10-18 20:31:35 -04:00
Daniel Agar b20d8207a7 Jenkins: compile delete obsolete px4_fmu-v5_ctrlalloc 2021-10-18 20:11:58 -04:00
Beat Küng 3e9c88e48e px4/fmu-v5 test, uavcanv0periph: disable modules to reduce flash 2021-10-18 18:45:19 -04:00
Beat Küng da1df5352c fix pwm: only update oneshot timers owned by the current pwm_out instance
This fixes the case where oneshot was enabled with multi-instance pwm_out,
triggering oneshot updates too close to each other and as a result could
lead to spinning motors while disarmed.
2021-10-18 18:45:19 -04:00
Daniel Agar 2ed623c8ae boards: px4_fmu-v6x_default disable modules to save flash 2021-10-18 18:45:19 -04:00
Daniel Agar be868aae92 boards: px4_fmu-v5_uavcanv0periph disable modules to save flash 2021-10-18 18:45:19 -04:00
Daniel Agar a7a2aa3b74 boards: px4_fmu-v3_test disable modules to save flash 2021-10-18 18:45:19 -04:00
Beat Küng cc1d24a5fe ci compile_nuttx: disable fail-fast
So that all failures can be evaluated.
2021-10-18 18:45:19 -04:00
Beat Küng d01f2b1d40 cubepilot/cubeorange test: disable uavcan to reduce flash usage 2021-10-18 18:45:19 -04:00
Beat Küng dbd4426271 nxp/fmurt1062-v1: set CONSTRAINED_FLASH 2021-10-18 18:45:19 -04:00
Beat Küng e36a8f3765 ROMFS: disable vtol airframes for kakutef7 2021-10-18 18:45:19 -04:00
Beat Küng f1686b1abf px4io: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng 837a1066e0 px4io, pwm_out: update pwm default checking
The defaults changed in the previous commit for per-channel params,
so we make sure that the overall params are still used as long as the
per-channel params are default.
2021-10-18 18:45:19 -04:00
Beat Küng ab1d76ae7d params: use PWM_MAIN_* instead of PWM_FMU_* 2021-10-18 18:45:19 -04:00
Beat Küng ba4a1ec6c4 boards/px4/io-v2: swap timer definitions
So that the ordering of the generated params make more sense.
TIM1 is now for channels 2-4 instead of 5-8.
2021-10-18 18:45:19 -04:00
Beat Küng 319e90961b output_groups_from_timer_config.py: fix timer index
The implementation assumed timers are defined in the same order as used
in the channels. This could lead to a mismatch between TIMx param and
actual timer config.
Now we use the actual array index, same as in the code.
2021-10-18 18:45:19 -04:00
Beat Küng 183ab8bbe7 control_allocator: avoid default argument for virtual method getEffectivenessMatrix
clang tidy error:
/__w/PX4-Autopilot/PX4-Autopilot/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp:50:34: error: default arguments on virtual or override methods are prohibited [google-default-arguments,-warnings-as-errors]
ActuatorEffectivenessMultirotor::getEffectivenessMatrix(matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS> &matrix,
2021-10-18 18:45:19 -04:00
Beat Küng 563cf61126 module_schema.yaml: add actuator_output section
The parameter additions are only used internally for the pwm generator.
2021-10-18 18:45:19 -04:00
Beat Küng 8b3ab7e36d fix pwm_out: ensure up_pwm_servo_arm() is never continuously called
This happened with multi-instance, when the second instance did not load
a mixer. Then the first instance would always return false in
update_pwm_out_state, and continuously call up_pwm_servo_arm.
This led to irregular pulses, e.g. with an output set to fixed 1500us, I
saw pulses of e.g. 1800us occationally (they were in a range of
[1500-2100]).
2021-10-18 18:45:19 -04:00
Beat Küng 838ec5d485 airframes: set output function params for ctrlalloc airframes 2021-10-18 18:45:19 -04:00
Beat Küng 44bbe87165 pwm_out_sim: use PWM_FMU for sitl and HIL_ACT for hitl
We might want to change this later, but for now it allows to use the same
airframe configs for sitl/real, and independent hitl configuration.
2021-10-18 18:45:19 -04:00
Beat Küng 2b039b2af8 px4/fmu-v6x: add capture pins to list of pwm pins 2021-10-18 18:45:19 -04:00
Beat Küng 4e0e2dec57 fmu-v6u: add capture pins to list of pwm pins 2021-10-18 18:45:19 -04:00
Beat Küng 4a4acf7ead px4/fmu-v5x: add capture pins to list of pwm pins 2021-10-18 18:45:19 -04:00
Beat Küng faf481df31 modalai/fc-v2: remove unused DIRECT_PWM_CAPTURE_CHANNELS define 2021-10-18 18:45:19 -04:00
Beat Küng d28dd5cc14 holybro/pix32v5: add capture pins to list of pwm pins 2021-10-18 18:45:19 -04:00
Beat Küng d9bf03b2dc holybro/durandal-v1: add capture pins to list of pwm pins 2021-10-18 18:45:19 -04:00
Beat Küng 0ab4a24de8 px4/fmu-v5: add capture pins to list of pwm pins 2021-10-18 18:45:19 -04:00
Beat Küng a01cf2efc0 rc.mc_apps: allow to set COM_PREARM_MODE with control allocation
This is safe now.
2021-10-18 18:45:19 -04:00
Beat Küng 21c1671693 pwm_out_sim: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng 0871b7974d uavcan_v1: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng ae15ad14a8 tap_esc: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng 35ce6d1b73 pca9685_pwm_out: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng 955179e992 linux_pwm_out: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng c1e5e666f0 pwm_out, dshot: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng 3ff6014a3c uavcan: implement servo outputs 2021-10-18 18:45:19 -04:00
Beat Küng 07fa8c5295 uavcan: reduce sensor status output verbosity 2021-10-18 18:45:19 -04:00
Beat Küng 49f8131f82 uavcan: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng 5f0781b6e9 output modules: add param prefix argument to MixingOutput 2021-10-18 18:45:19 -04:00
Beat Küng f5fbcb0770 dshot: handle telemetry index correctly when dynamic mixer is used 2021-10-18 18:45:19 -04:00
Beat Küng d951c74a7d spracing/h7extreme: use single-line comments instead of multi-lines
Required for output_groups_from_timer_config.py parser
2021-10-18 18:45:19 -04:00
Beat Küng 916447e804 params: add script to parse timer_config.cpp for timer group info
This allows to generate pwm params in the form of:
module_name: PWM Output
actuator_output:
  output_groups:
    - generator: pwm
      param_prefix: PWM_FMU
      channel_labels: ['PWM Main', 'PWM Capture']
      standard_params:
        disarmed: { min: 800, max: 2200, default: 900 }
        min: { min: 800, max: 1400, default: 1000 }
        max: { min: 1600, max: 2200, default: 2000 }
        failsafe: { min: 800, max: 2200 }
      extra_function_groups: [ pwm_fmu ]
      pwm_timer_param:
        description:
            short: Output Protocol Configuration for ${label}
            long: |
                Select which Output Protocol to use for outputs ${label}.

                Custom PWM rates can be used by directly setting any value >0.
        type: enum
        default: 400
        values:
            -5: DShot150
            -4: DShot300
            -3: DShot600
            -2: DShot1200
            -1: OneShot
            50: PWM50
            100: PWM100
            200: PWM200
            400: PWM400
        reboot_required: true
2021-10-18 18:45:19 -04:00
Beat Küng db28ea9cfa generate_params.py: extend params 'definitions' section to support a list
allows to add multiple entries for a multi-instance param with different
instance_start
2021-10-18 18:45:19 -04:00
Beat Küng 6f01b69f49 mixer_module: add param generation for disarmed, min, max, failsafe 2021-10-18 18:45:19 -04:00
Beat Küng 6424faccb1 generate_params.py: fix parse_yaml_parameters_config
Correctly handle multiple parameter sections
2021-10-18 18:45:19 -04:00
Beat Küng 15daded6b0 refactor output_limit: split output_limit_calc_single into separate function 2021-10-18 18:45:19 -04:00
Beat Küng c55626d2d6 refactor Tools/serial: move non-serial param generation into separate script 2021-10-18 18:45:19 -04:00
Beat Küng a65533b469 mixer_module: add output functions for servos, landing gear, parachute, RC passthrough & gimbal 2021-10-18 18:45:19 -04:00
Beat Küng 4b37a3d017 mixer_module: generate output_functions header from yaml file 2021-10-18 18:45:19 -04:00
Beat Küng fd76e5488e mixer_module: add output functions 2021-10-18 18:45:19 -04:00
Beat Küng ab3fe77f46 mavlink_receiver: publish MAV_CMD_DO_SET_ACTUATOR command 2021-10-18 18:45:19 -04:00
Beat Küng 5103f00de3 vehicle_command.msg: add VEHICLE_CMD_DO_SET_ACTUATOR 2021-10-18 18:45:19 -04:00
Beat Küng 38fa65a47e control_allocator: remove direct mixer, add actuator_{motors,servos} instead 2021-10-18 18:45:19 -04:00
Beat Küng a51c465b54 control allocation: introduce parameter SYS_CTRL_ALLOC & unify build targets 2021-10-18 18:45:19 -04:00
Beat Küng 0c5a79d84d fix mixer_module: use PRIx32 for debug printf 2021-10-18 18:45:19 -04:00
Beat Küng ad1bcfd77c commander: correct lockdown CLI description 2021-10-18 18:45:19 -04:00
AuroraRAS 62dd38fe35 Prepare for Android NDK build
Modify CMakeList.txt prepare for Android NDK build

Signed-off-by: AuroraRAS <chplee@gmail.com>
2021-10-18 14:55:56 -04:00
Alex Klimaj b482986e8e uavcannode: Add CANNODE_TERM parameter (configure CAN termination on ARK cannodes)
- adds functionality to enable the built in can termination on the ARK cannodes
2021-10-15 09:29:56 -04:00
Jari van Ewijk 55910caec5 UCANS32K146: Enable CONFIG_BCH to use EEEPROM as character driver 2021-10-15 05:54:27 -07:00
Silvan Fuhrer a66b0829b0 Standard VTOL: add airspeed to back transition logic and refactor it a bit
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
Silvan Fuhrer 358c67226e Tiltrotor: backtransition logic improvements
-use groundspeed in body x for exit condition
-use airspeed for speed exit condition if no valid groundspeed

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
Silvan Fuhrer cba80a6338 Tiltrotor: front transition: fade out yaw equally to roll
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
Silvan Fuhrer 641383cbfb VTOL backtransition improvements
* vtol_type: only allow positive pitch setpoints during backtransition

* vtol params: set default of VT_B_DEC_FF to 0, as for most frames a FF is not necessary

* Tiltrotor: fix throttle during first part of back transition

* Tiltrotor: only enable all motors in second phase of backtransition (tilting phase)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
RomanBapst af291e2040 FlightTaskTransition: Transition improvements
- use fw pitch setpoint offset during transition
- take over previous vertical velocity and smooth out over transition

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-15 09:58:48 +02:00
Silvan Fuhrer d39c32619e Tiltrotor: add minimum throttle of 0.25 during front transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
RomanBapst f61853d428 vtol: implement throttle blending out and into transition
- blend into TECS throttle after front transition
- blend out of TECS throttle during backtransition

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-15 09:58:48 +02:00
RomanBapst 8dd76050e0 vtol: take fixed wing attitude setpoint during transition if altitude is
not controlled

- required as there is no flightask running if altitude is not controlled

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-15 09:58:48 +02:00
Daniel Agar 435e5515df github actions: increase nuttx and linux ccache max size to 100M 2021-10-14 19:45:29 -04:00
Daniel Agar 7e71b7eafc github actions: compile nuttx archive bin files and remove duplicate nuttx cannode builds 2021-10-14 19:45:29 -04:00
Daniel Agar 12c7056ae5 drivers/imu: icm20602/icm20649/icm20948 remove timestamp_sample adjustments 2021-10-14 16:37:11 -04:00
Daniel Agar 56823b5ac9 ekf2: EKF control don't allow invalid flow gyro to propagate 2021-10-14 16:31:22 -04:00
Daniel Agar e8a064af02 github actions: try increasing nuttx ccache limit 2021-10-14 11:54:19 -04:00
Daniel Agar b88c8eb245 Jenkins: hardware stop commander before sensors module to avoid errors
- this is only done to silence timeouts during small benchmarks
2021-10-14 09:17:50 -04:00
Daniel Agar d35cf78e4a commander: PX4_ERR if attitude or angular velocity become invalid 2021-10-14 09:17:50 -04:00
Daniel Agar 4559230de6 drivers/imu/invensense: adjust icm20602/icm20649/icm20948 rescheduling logic
- this handles the case where the driver might be more than one full
transfer cycle behind
2021-10-14 09:17:11 -04:00
Daniel Agar ef4d4c3093 sensors/vehicle_imu: fix timestamp_sample increasing check 2021-10-14 09:12:45 -04:00
Jaeyoung-Lim 4535b18a80 Set setpoint type as const 2021-10-14 11:18:02 +02:00
Jaeyoung-Lim 07d72f8604 Fix comments 2021-10-14 11:18:02 +02:00
Jaeyoung-Lim 443666199e Move setmode outside of control_position
This commit moves the position controller mode handling outside of the control_position method.

The control_method is renamed to control_auto
2021-10-14 11:18:02 +02:00
Jaeyoung-Lim ae9e91f90c FW Pos controller: fix format in new switch
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-14 11:18:02 +02:00
Silvan Fuhrer c3e961a1ed FW Pos C: move setting of control_mode_current to separate function and minor clean ups
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-14 11:18:02 +02:00
Silvan Fuhrer 0cf3ef87e3 FW Position Controller: move nav_speed_2d calculation to function
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-14 11:18:02 +02:00
Jaeyoung-Lim 581ec224be Encapsulate loiter and position setpoint handling
This commit encapsulates the position setpoint and loiter setpoint handling into a single method, in order to make the code easier to understand
4be452
2021-10-14 11:18:02 +02:00
Thomas Debrunner f08f2a340d motion_planning: In VelovitySmoothing, mark const functions const 2021-10-13 21:25:43 -04:00
Thomas Debrunner fed234de81 flight_mode_manager: Extracted position trajectory motion planning into a library
Extract the functionality to plan smooth position motion trajectories into a
motion planning library, such that it can be used in other parts of the code as well.
2021-10-13 21:25:43 -04:00
Peter van der Perk 07303af8f8 UAVCANv1 Fix typo in #define 2021-10-13 21:22:15 -04:00
Peter van der Perk ed394027b1 UAVCANv1 Include Kconfig & Fix #18396 2021-10-13 21:22:15 -04:00
mcsauder a732ddaefb Deprecate 4250_teal from CMakeLists.txt. 2021-10-13 17:25:18 -04:00
mcsauder c1b0d78077 Minimize flash by migrating MIXER quad_x and PWM_OUT 1234 to rc.mc_defaults. Deprecate 4250_teal config file. 2021-10-13 17:25:18 -04:00
Matthias Grob 8b37db7825 Functions: fix corner case x_low == x_high == value resulting in NAN
and added unit test to cover it
2021-10-13 17:24:16 -04:00
alexklimaj f5e1da5b0f Fix broadcom afbrs50 build 2021-10-13 17:22:26 -04:00
Daniel Agar 7de00469a6 platforms: nuttx px4_init fix USB serial mavlink autodetect 2021-10-13 16:34:45 -04:00
Julian Oes f91aa76645 boards: add v5x RTPS version again
I just copied this from v5 and removed the heater.
2021-10-13 16:20:43 -04:00
David Lechner 426efb515f setup: fix installing in virtual env on Ubuntu
This fixes running the Ubuntu setup script in a Python virtual
environment. This was failing because pip doesn't allow the --user
option in virtual environments.
2021-10-13 16:19:24 -04:00
Jukka Laitinen 351f679c2f parameters: Use px4::atomic_bool instead of px4::atomic<bool>
This enables us to define the actual atomic bool type in px4_platform

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-10-13 15:01:26 -04:00
Jukka Laitinen e6658547cf sensors/vehicle_imu: Fix compiler warning for implicit INFINITY double->float cast
This pops up on some newer compilers

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-10-13 15:01:26 -04:00
Jukka Laitinen 5509235517 commander: Fix implicit NaN conversion from double to float compiler warning
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-10-13 15:01:26 -04:00
Daniel Agar 41a4045630 boards: nxp_fmuk66 fix serial_dma_poll 2021-10-13 13:45:39 -04:00
Daniel Agar 49a4283d0d boards: px4_fmu-v5x restore rc.board_mavlink
- this was unintentionally removed in https://github.com/PX4/PX4-Autopilot/pull/16180
2021-10-13 17:34:20 +02:00
alexklimaj ffb47466df Add ARK GPS passthrough 2021-10-12 22:00:58 -04:00
Mathieu Bresciani 56b0c46444 ekf2: improve optical flow angular rate compensation 2021-10-12 13:17:29 -04:00
Daniel Agar fab053d33b mavlink: receiver battery_status prevent out of bounds access
- fixes https://github.com/PX4/PX4-Autopilot/issues/18385
2021-10-12 09:20:40 -04:00
Daniel Agar 12670b70f4 Jenkins: hardware quick cal skip sleeps 2021-10-11 15:21:43 -04:00
Silvan Fuhrer 801ef2d520 VTOL main: add local variable for int(vehicle_command.param1 + 0.5)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-11 18:15:18 +02:00
Silvan Fuhrer 342e9900f8 vtol main: only guard against transition to FW in certain flight modes, never to MC
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-11 18:15:18 +02:00
SalimTerryLi 5ebe41efbf pilotpi: fix upload cmake 2021-10-11 10:43:59 -04:00
RomanBapst 8f8304f31e FixedWingPositionController: Set l1 variables to NAN if no l1 guidance
took place

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-11 16:41:42 +02:00
RomanBapst ae5d3103f4 fw l1 controller: added a flag to indicate if navigation has updated
- can be used to check if l1 controller ran during a cycle

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-11 16:41:42 +02:00
Jaeyoung-Lim e2f048f608 Add sitl glider model
Add airframe configs for SITL glider model

This commit adds an airframe config for a glider model
2021-10-10 12:33:25 -04:00
Shubham Shah 99b098f608 Update FixedwingAttitudeControl.cpp 2021-10-09 19:39:43 -04:00
Shubham Shah c92cd65831 Update EKF2.cpp 2021-10-09 19:39:43 -04:00
Shubham Shah 6576e1fda9 Update battery_status.cpp 2021-10-09 19:39:43 -04:00
Shubham Shah b56bd7cb21 Update AirspeedValidator.cpp 2021-10-09 19:39:43 -04:00
Shubham Shah 47a72a6b7b Update vtol_att_control_main.cpp 2021-10-09 19:39:43 -04:00
Shubham Shah 9fd19a2c83 Update standard.cpp 2021-10-09 19:39:43 -04:00
Shubham Shah af34b21ba8 Update tiltrotor.cpp 2021-10-09 19:39:43 -04:00
Jacob Dahl 98f655815a mavlink: add LAND_TARGET stream 2021-10-09 10:29:02 -04:00
Daniel Agar 4be45229bf fw_pos_control_l1: fix launch detector dt update
- fixes https://github.com/PX4/PX4-Autopilot/issues/18354
2021-10-08 17:34:14 -04:00
Daniel Agar 089f96f800 lib/drivers/{accelerometer,gyroscope} skip obselete Vector3f construction
- FIFO clip count only check if value is INT16_MIN/MAX rather than abs() call
2021-10-08 17:33:27 -04:00
Jacob Dahl fd39d5b9a1 drivers/distance_sensor/lightware_laser_serial: add LW20/C support 2021-10-08 17:30:41 -04:00
Igor Mišić 47dc2ae5a5 Revert "protocol_splitter: delete non rtps or mavlink data from buffer"
This reverts commit 0cae3c129d.
2021-10-08 14:35:12 -04:00
alexklimaj 2ba369dd54 Add uavcannode fix2 mode and submode 2021-10-08 11:00:37 -04:00
Peter van der Perk d8e88aedc6 motor_ramp ram cleanup 2021-10-08 10:51:06 -04:00
Nicolas Martin ba66f8a1e2 reset hover thrust value in controllers when disarmed
During landing, hover thrust value can be very incorrect so it should be
reset before taking off
2021-10-08 10:39:49 +02:00
bresch ba1b7f3a07 CA pseudo inverse: set all small elements in CA matrix to zero
This avoids problems in the sequencial desaturation method where vectors
of the CA matrix are used to desaturate the motors.
2021-10-08 09:35:40 +02:00
bresch d1a2d6e1aa h480_ctrlalloc: tune rate controller 2021-10-08 09:35:40 +02:00
bresch 984a698760 matrix: update to include min/max of slices 2021-10-08 09:35:40 +02:00
bresch 21b1f090e6 SITL: add typhoon_h480_ctrlalloc target 2021-10-08 09:35:40 +02:00
bresch b18b7e84d2 CA pseudo-inverse: normalize control allocation matrix 2021-10-08 09:35:40 +02:00
bresch 927c0c4296 McRateControl: publish torque and thrust setpoint for control allocator 2021-10-08 09:35:40 +02:00
bresch 212df95193 ctrlalloc: use normal rate controller 2021-10-08 09:35:40 +02:00
Peter van der Perk 3de5623556 Kconfig remove defconfig in root directory after gen
Cleanup fmu configs
2021-10-07 10:09:01 -04:00
Peter van der Perk eb8620a0da Kconfig FMU-V5 flash cleanup 2021-10-07 10:09:01 -04:00
Daniel Agar cb6b1bd427 boards: delete unused test and debug variants 2021-10-07 10:09:01 -04:00
Peter van der Perk 6b7237aa3a Kconfig add WIFI serial port option 2021-10-07 10:09:01 -04:00
Peter van der Perk 05d71c8118 Kconfig fix CI issues after rebase 2021-10-07 10:09:01 -04:00
Peter van der Perk 96994b82bb Kconfig cmake change rm to remove to remain compatible with CMake older then 3.17 2021-10-07 10:09:01 -04:00
Peter van der Perk ed5fee1a72 Backport #18311 mc atune 2021-10-07 10:09:01 -04:00
Peter van der Perk 454c907b7d Kconfig backport #18327 mag_bias 2021-10-07 10:09:01 -04:00
Peter van der Perk 36191e649a Kconfig backport #18289 and other flash size fixes 2021-10-07 10:09:01 -04:00
Peter van der Perk 500d80c329 Kconfig backport 51758bd7e6 2021-10-07 10:09:01 -04:00
Peter van der Perk bfa87fdac7 Kconfig fix wrong nuttx submodule commit 2021-10-07 10:09:01 -04:00
Peter van der Perk bb7b033e11 Kconfig backport #18259 & remove contrained flash depedency on NO_HELP 2021-10-07 10:09:01 -04:00
Peter van der Perk c3c9910f04 Backport #17814 to Kconfig 2021-10-07 10:09:01 -04:00
Peter van der Perk 5e98f38f78 Kconfig rebase backports 26-09-21 2021-10-07 10:09:01 -04:00
Peter van der Perk 6a1675ac28 Backport #17864 to px4board config 2021-10-07 10:09:01 -04:00
Peter van der Perk 60790f7112 Backport boards: modalai_fc-v1 update default.cmake (#18202) 2021-10-07 10:09:01 -04:00
Peter van der Perk 9b55a8083a Backport to kconfig: boards: remove camera_capture from sitl and linux targets 2021-10-07 10:09:01 -04:00
Peter van der Perk 12898ea560 [Kconfig] Update configs 06-09-21 2021-10-07 10:09:01 -04:00
Peter van der Perk 010d854023 [Kconfig] Add extra SITL cmake variables 2021-10-07 10:09:01 -04:00
Peter van der Perk 0571932e7c [Kconfig] Backport rebase config changes 2021-10-07 10:09:01 -04:00
Peter van der Perk 7c6b995cb4 [Kconfig] Replace find_executable by python module, moved python check before calling kconfig 2021-10-07 10:09:01 -04:00
Peter van der Perk c6e7b8bae1 [Kconfig] Fix SITL by adding rpm/rpm_simulator 2021-10-07 10:09:01 -04:00
Peter van der Perk f7803fb686 [Kconfig] Bloaty 2nd pass 2021-10-07 10:09:01 -04:00
Peter van der Perk 2dcfe533d6 [Kconfig] Telemetry don't include iridum by default 2021-10-07 10:09:01 -04:00
Peter van der Perk 33fd65e5fe [Kconfig] Fix regressions found by bloaty and cleanup unused cmake 2021-10-07 10:09:01 -04:00
Peter van der Perk 43a3de8c18 [Kconfig] Fix px4 fmu configs 2021-10-07 10:09:01 -04:00
Peter van der Perk a918025adb [Kconfig] fix fmu-v2 configs 2021-10-07 10:09:01 -04:00
Peter van der Perk 892d673b45 [Kconfig] fix flash overflow test builds 2021-10-07 10:09:01 -04:00
Peter van der Perk 8951ed9f12 [Kconfig] fmu-v5 match cmake configs 2021-10-07 10:09:01 -04:00
Peter van der Perk 1eb9a77a9b [Kconfig] Added missing sensor drivers 2021-10-07 10:09:01 -04:00
Peter van der Perk 603d0c594d [Kconfig] fix boards configs 2021-10-07 10:09:01 -04:00
Peter van der Perk efc91d2b69 [Kconfig] Fixed inclusion of microbench bydefault when TESTING was enabled
Added full optimization option
2021-10-07 10:09:01 -04:00
Peter van der Perk a1247d6bcf [Kconfig] Backport cmake config changes 2021-10-07 10:09:01 -04:00
Peter van der Perk 9f38553ab0 [Kconfig} update broken board configs px4 fmu-v4/v5 2021-10-07 10:09:01 -04:00
Peter van der Perk cc752f11df [Kconfig] python script doesn't remove delta, thus we've to manually add remove deltas 2021-10-07 10:09:01 -04:00
Peter van der Perk d4fbd5674e [Kconfig] Change patern matching order so that xx_xx doesnut result xx if it exists 2021-10-07 10:09:01 -04:00
Peter van der Perk b3e799e277 [Kconfig] Add all distance sensors 2021-10-07 10:09:01 -04:00
Peter van der Perk 5542402ca0 [Kconfig] CI fixes and SITL fix 2021-10-07 10:09:01 -04:00
Peter van der Perk 6d0829c251 [Kconfig] px4 io-v2 fix toolchain 2021-10-07 10:09:01 -04:00
Peter van der Perk b44c0eb434 [Kconfig] FMUv4 CI fixes 2021-10-07 10:09:01 -04:00
Peter van der Perk 21e6547ac7 [Kconfig] Toolchain & platform fixes, SITL still broken 2021-10-07 10:09:01 -04:00
Peter van der Perk d1e7642b9a [Kconfig] temporily updated github actions to latest to test CI 2021-10-07 10:09:01 -04:00
Peter van der Perk 4ba1a2f395 [Kconfig] Fix Posix / SITL build 2021-10-07 10:09:01 -04:00
Peter van der Perk 0400c24af5 [Kconfig] 17-08-21 rebase fixes 2021-10-07 10:09:01 -04:00
Peter van der Perk c2ad07b983 [Kconfig] Don't inherit kconfig when bootloader (and canbootloader) 2021-10-07 10:09:01 -04:00
Peter van der Perk 6af0477733 [Kconfig] Gnerate px4board from old cmake
Added make updateconfig to update all config when default's have changed
Added cmake to px4board conversion script
2021-10-07 10:09:01 -04:00
Peter van der Perk 815617e670 Added common options for sensor drivers
uavcan_board_identity check for existance
Added kconfig for compiler definitions
2021-10-07 10:09:01 -04:00
Peter van der Perk 82888d3320 [Kconfig] Merge/diff fixes and added some FMUv5 targets 2021-10-07 10:09:01 -04:00
Peter van der Perk ea393b54d9 [Kconfig] non-default labels config inherit default.px4board config 2021-10-07 10:09:01 -04:00
Peter van der Perk b7f03cec5e [Kconfig] Add FMU-V5 and PX4-IOv2 px4board config 2021-10-07 10:09:01 -04:00
Peter van der Perk 56472eeed7 Completely removed px4_add_board 2021-10-07 10:09:01 -04:00
Peter van der Perk 57593cc56a Initial attempt to make px4_add_board obsolute 2021-10-07 10:09:01 -04:00
Peter van der Perk 7aa28ba9cd Kconfig remove clean use configure depends and apps timestamp instead 2021-10-07 10:09:01 -04:00
Peter van der Perk abd85cd219 Rebase 06-07-21 and add batman Kconfig support 2021-10-07 10:09:01 -04:00
Peter van der Perk 4e4aabc03f Update Kconfig after rebasing 03-05-21 2021-10-07 10:09:01 -04:00
Peter van der Perk d5e3e9a7bc [Kconfig] Decompose Kconfig, now each module has its own Kconfig
Which is better for versioning and decomposability
2021-10-07 10:09:01 -04:00
Peter van der Perk 094d3557d7 Add Kconfig for Gyro calibration #17040 2021-10-07 10:09:01 -04:00
Peter van der Perk a0821afafd [Kconfig] Move UAVCANv0 num interfaces to Kconfig 2021-10-07 10:09:01 -04:00
Peter van der Perk 16f86a99c2 Swap pwm_out with pwm_sim_out to get same binary output as the non-kconfig build 2021-10-07 10:09:01 -04:00
Peter van der Perk e4f9fd8f53 [Kconfig] forgot distance sensor furthermore K66 build should be equal now 2021-10-07 10:09:01 -04:00
Peter van der Perk 29c4d234ec Add make clean after boardconfig configure 2021-10-07 10:09:01 -04:00
Peter van der Perk 787b9b54e1 Board config now saved as defconfig which is smaller and friendlier for version control 2021-10-07 10:09:01 -04:00
Peter van der Perk 8df21b0b42 Changed CMake warning to status to not kill the CI
Furthermore removed obsolete uavcanconfig target
2021-10-07 10:09:01 -04:00
Peter van der Perk 7a747b43f6 Initial boardconfig working with FMUK66 2021-10-07 10:09:01 -04:00
Peter van der Perk 4044fbd4a0 Initial Kconfig implementation in CMake
Used fmuk66-v3 as test case
2021-10-07 10:09:01 -04:00
Peter van der Perk 4b89ff29ce PX4 full firmware Kconfig PoC 2021-10-07 10:09:01 -04:00
Peter van der Perk 55aa2e50ff UAVCANv1 menuconfig make it board label configurable 2021-10-07 10:09:01 -04:00
Peter van der Perk b9bcb7fe7f uavcanconfig force CMake reconfiguration after use 2021-10-07 10:09:01 -04:00
Peter van der Perk 95e593f3b8 Added python menuconfig.py fallback 2021-10-07 10:09:01 -04:00
Peter van der Perk 37271d334b [UAVCANv1] Initial uavcanconfig menuconfig example 2021-10-07 10:09:01 -04:00
Igor Mišić 0cae3c129d protocol_splitter: delete non rtps or mavlink data from buffer
protocol_splitter: add missing buffer_size checker
2021-10-07 09:23:23 -04:00
Silvan Fuhrer a202bcbc73 VTOL: fix param description concerning VT_PITCH_MIN
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-07 09:22:59 -04:00
Silvan Fuhrer fb8bf7eaa6 ROMFS: remove default params from configs
Remove params from airframe configs that are just set again
to the param default value or to the value that is
specified in the mc_default, fw_default or vtol_default.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-07 09:22:59 -04:00
Beat Küng 393f59ae71 param jsonout: handle @boolean flag
This got lost when switching from xml to json metadata
2021-10-07 09:20:50 -04:00
bresch d03bf42f60 slice: add min and max functions 2021-10-07 09:19:28 -04:00
Daniel Agar dc9e072e83 github actions ccache set hash_dir=false 2021-10-06 17:55:50 -04:00
Daniel Agar bbfaa4694c boards: cleanup serial RX DMA hrt_call_every
- remove ts_to_abstime dependency
2021-10-06 14:39:59 -04:00
Matthias Grob b40dbd3d6f FlightTaskAuto: hotfix filter for yawspeed feed-forward
to get rid of derivative spikes when navigator is
continuously updating the yaw setpoint in the
triplet for a POI but is running at a lower rate.

The proper solution is to generate that yaw setpoint
with high rate in the flight task and have the triplet
just guid to the next waypoint at low rate.
2021-10-06 14:06:58 -04:00
Daniel Agar 3e6ff2451b github actions increase newly added timeouts 2021-10-06 13:47:12 -04:00
Daniel Agar 6e057a644b github actions remove ccache from deploy metadata and low priority builds
- this is an attempt to preserve our limited amount of github actions
cache storage
2021-10-06 13:46:20 -04:00
Daniel Agar 0bdcd54184 mavlink: reciever trajectory_representation_waypoints resepect valid_points
- fixes https://github.com/PX4/PX4-Autopilot/issues/18369
2021-10-06 13:45:15 -04:00
Silvan Fuhrer 31a599f303 Commander: add comment in COM_RC_OVERRIDE that it's always enabled in Descend mdoe
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-06 11:32:23 -04:00
Silvan Fuhrer eeb6244c6b Commander: add wind speed warning
Publishes periodically (max every 1 min) a warning if the current wind estimate
is above COM_WIND_WARN.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-06 11:31:13 -04:00
Silvan Fuhrer 1a4ce136f3 Tiltrotor: add hover tilt offset to pusher assist tilt
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-06 11:27:19 -04:00
Silvan Fuhrer 4e3fa7cf35 VTOL: rework forward actuation assist
-allow positive pitch offsets in hover
-add param for min pitch during LAND

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-06 11:27:19 -04:00
Silvan Fuhrer f0de88fada vtol_type: fix motor_state::VALUE
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-06 11:26:39 -04:00
Matthias Grob a461bb971a FlightTask: preserve vertical velocity during reactivation
to allow descending by stick for reliable land detection.
Issue:
Stick smoothing gets completely reset to state when not taken off
-> downwards velocity setpoint is gone when not taken off
-> in_descend flag of land detection is never true when not taken off
-> when landing but falling out of landing it landing detection fails
bafore taking off and landing again
2021-10-06 11:25:51 -04:00
Matthias Grob c20e5e3a00 FlightTaskManualAltitudeSmoothVel: remove separate reactivate handling
It was added before the activation was able to work with the previous
setpoint.
2021-10-06 11:25:51 -04:00
Matthias Grob 9b92862980 MulticopterLandDetector: correct in_descend comment 2021-10-06 11:25:51 -04:00
Daniel Agar 10bc778651 boards: freefly_can-rtk-gps delete unused include 2021-10-06 10:41:36 -04:00
bresch d95e387d79 angular acceleration: change 2nd order to 1st order LPF
Having a 2nd order low-pass filter in the derivative loop reduces
stability at low cutoff values as too much phase is lost through
the filter. Using a 1st order filter avoids this issue because its
maximum phase loss is 90 degrees instead of 180 degrees for a 2nd order
lpf.
2021-10-06 16:26:03 +02:00
bresch 1b58202b0d AlphaFilter: add function to set param from cutoff frequency 2021-10-06 16:26:03 +02:00
Daniel Agar b5d401b20c drivers/imu: ensure timestamp_sample adjustment isn't done as float (continued) 2021-10-06 10:19:01 -04:00
Daniel Agar e31dd34388 lib/led: replace subscription missed error with perf count 2021-10-06 09:31:44 -04:00
Daniel Agar 113ea5ea26 github actions add timeout to all_variants nuttx compile job 2021-10-06 09:28:27 -04:00
Daniel Agar 6edb1fa1f8 github actions add timeout to SITL tests run 2021-10-06 09:28:27 -04:00
Daniel Agar ad27d2c49a github actions enable ccache hash_dir for SITL tests 2021-10-06 09:28:27 -04:00
Daniel Agar 52fccb1e75 github actions decrease ccache max_size selectively 2021-10-06 09:28:27 -04:00
Daniel Agar d002002ceb github actions increase ccache compression level 2021-10-06 09:28:27 -04:00
Daniel Agar ddd1dea4f0 ekf2: avoid uint64 timestamp conversion to float 2021-10-06 09:27:06 -04:00
Daniel Agar dc1b423721 drivers/imu: ensure timestamp_sample adjustment isn't done as float
- larger HRT timestamps can't be represented exactly when cast to float
2021-10-06 09:26:26 -04:00
Julian Oes 6b8840a01b commander: fix switch to ALTCTL when RC regained
This fixes the case where we sometimes switch to altitude control
instead of position control when RC is regained.

What happens is that we detect that the pilot wants to take over control
right when RC comes back. This means that we try to go in position
control in main_state_transition, however, we are already in position
control because we come back from the failsafe state. The result of
main_state_transition is then TRANSITION_NOT_CHANGED, and therefore we
"fall back" to altitude control even though being already in position
control would have been fine.

This fix checks the return result of main_state_transition correctly and
only reacts to TRANSITION_CHANGED and TRANSITION_DENIED but ignores
TRANSITION_NOT_CHANGED.
2021-10-06 10:30:08 +02:00
Daniel Agar 51758bd7e6 boards: delete unused variants 2021-10-05 23:14:04 -04:00
Daniel Agar 3570e5a4f0 boards: cuav_nora_test disable attitude_estimator_q to save flash 2021-10-05 20:43:43 -04:00
Silvan Fuhrer 2dca51216c vtol: change message for transition timeout warning
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-05 18:19:33 -04:00
Silvan Fuhrer bdc57178d4 Tailsitter: add add transition timeout (abort transition after VT_TRANS_TMEOUT, Quadchute)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-05 18:19:33 -04:00
Silvan Fuhrer 1a1bb2629d tiltrotor: add transition timeout (abort transition after VT_TRANS_TIMEOUT, Quadchute)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-05 18:19:33 -04:00
Daniel Agar 02aed782e3 boards: px4_fmu-v6x_default disable sd_stress to save flash 2021-10-05 18:17:22 -04:00
Daniel Agar beb358a344 px4_work_queue: adjust status formatting to accommodate longer names (eg mc_autotune_attitude_control) 2021-10-05 18:09:00 -04:00
Silvan Fuhrer 98c7f664c1 FW Position control: add roll slewrate also in manual Position flight mode
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-05 18:06:49 -04:00
Matthias Grob 2edd97102b Sticks/StickYaw: refactor to use constructor properly 2021-10-05 18:05:54 -04:00
Matthias Grob 0cc13f0799 FlightTaskAutoMapper: add horizontal and yaw nudging during final descent 2021-10-05 18:05:54 -04:00
Matthias Grob bb9f167d79 StickAccelerationXY: add reseting position to specified coordinates 2021-10-05 18:05:54 -04:00
Daniel Agar 578d57a060 Jenkins: hardware disable sd_stress temporarily
- currently failing intermittantly when run on the test rack
2021-10-05 17:55:52 -04:00
Daniel Agar b4d33a36f8 boards: px4_fmu-v6x_default disable examples/fake_gps to save flash 2021-10-05 17:11:47 -04:00
Daniel Agar 2b9ebb7ed6 boards: holybro_kakutef7 disable systemcmds/work_queue to save flash 2021-10-05 17:10:30 -04:00
Thomas Stauber 983dd4db29 don't switch to SETPOINT_TYPE_LOITER during transitions (#18350) 2021-10-05 14:40:14 +02:00
Julian Oes 75b8e11b90 commander: make LAND failsafe stick
By default we would leave the LAND failsafe as soon as a link comes
back. With this change, we switch to the LAND failsafe like a proper
mode change, immediately disabling the failsafe as such.
This is as the same that is done for RTL in fact.

This is not optimal but a workaround for the problem where we switch out
of failsafe right on landing and then discover takeoff again and start
looping through it again and again without ever disarming.
2021-10-05 14:02:22 +02:00
Daniel Agar 896ad3a627 cmake: fix find_program ozone 2021-10-04 18:27:50 -04:00
Daniel Agar a519916d79 systemcmds/sd_stress: return -1 on FAIL 2021-10-04 17:38:31 -04:00
Daniel Agar c271a9e3e6 add sd_stress to all boards and run on test rack 2021-10-04 17:38:31 -04:00
Julian Oes 397b1ed8d6 Add sd_stress command 2021-10-04 17:38:31 -04:00
Julian Oes 4701a513c2 mavlink: fix errno for rename 2021-10-04 17:38:31 -04:00
Julian Oes 59b56dd06f mavlink: add more error messages 2021-10-04 17:38:31 -04:00
Julian Oes 74b2fe326d mavlink: don't (mis)use errno as global variable
I think it was not the best idea to use errno as a global variable to
keep track of the error code. I saw the errno change from where it was
set to where it was actually used, maybe because part of it is called in
the receive thread and part in the regular update/send() thread.

To be safe, I just created a class variable instead.
2021-10-04 17:38:31 -04:00
Julian Oes 96388f07fd mavlink: improve debugging around MAVLink FTP
- Remove ifdefs with MAVLINK_FTP_DEBUG and use PX4_DEBUG instead
- Add a couple of more PX4_DEBUG lines
2021-10-04 17:38:31 -04:00
Daniel Agar c35f68b49d boards: px4_fmu-v5 sync UAVCAN_TIMER_OVERRIDE across all variants 2021-10-04 15:27:15 -04:00
Daniel Agar 00b15798da Tools/HIL/run_tests.py - temporarily disable flaky dataman test until it can be reviewed 2021-10-04 12:54:01 -04:00
Daniel Agar 1325b9c876 Jenkins: hardware retry checkout if necessary 2021-10-04 12:54:01 -04:00
benjinne 413e15d083 Add vscode cmake-variant for px4_sitl_rtps 2021-10-04 11:58:26 -04:00
Beat Küng 540c024cbb parameters: avoid printing errors for erased flash devices
Errors:
ERROR [parameters] param import failed (-1) attempt 1, retrying
ERROR [parameters] param import failed (-1) attempt 2, retrying
ERROR [parameters] param import failed (-1) attempt 3, retrying
ERROR [parameters] param import failed (-1) attempt 4, retrying
ERROR [param] importing from '/fs/mtd_caldata' failed (-1)
2021-10-04 10:25:32 -04:00
Daniel Agar cc4152e10d gyro_fft: require higher SNR for initially tracking a peak
- initial frequency peak tracking SNR increased from 10->15 db
 - after initial detection the threshold decreases to SNR 5db
 - gyro_fft large method refactored into smaller pieces
 - sensors/vehicle_angular_velocity: dynamic notch FFT make sample rate
check a percentage and relax lower bound safety threshold
2021-10-04 10:17:16 -04:00
Daniel Agar 6d78054f50 mavlink USB auto start/stop on boards with VBUS
- no longer start sercon or mavlink usb by default
 - on USB connection (VBUS) monitor serial USB at low rate and start Mavlink if there's a HEARTBEAT or nshterm on 3 consecutive carriage returns
 - the mavlink USB instance is automatically stopped and serdis executed if USB is disconnected
 - skipping Mavlink USB (and sercon) saves a considerable amount of memory on older boards
2021-10-03 15:32:54 -04:00
bresch 07e307b074 FieldSensorBiasEst: fix bias learning equation
Also compensate the tuned learning gains for the new equation to keep
the same tuning
2021-10-02 21:25:21 -04:00
bresch e0bcc17f5b mbe: integrate pre-takeoff mag bias estimate in VehicleMagnetometer 2021-10-02 21:25:21 -04:00
bresch 1443f773da mbe: add module to targets 2021-10-02 21:25:21 -04:00
bresch ec178c8745 create new mag_bias_estimator module
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-10-02 21:25:21 -04:00
bresch d858835fd0 mbe: initialize estimator with current measurement 2021-10-02 21:25:21 -04:00
bresch 9067d9cae9 mbe: improve algorithm and fix unit test 2021-10-02 21:25:21 -04:00
Matthias Grob 24dc627e8a Add MagnetometerBiasEstimator for online magnetometer calibration 2021-10-02 21:25:21 -04:00
bresch 5874b1f87c mc atune: add module to all targets
- adjust flash constrianed targets to fit
2021-10-02 18:12:05 -04:00
bresch b99dbcc6a7 ModuleDocumentation: add autotune categorie 2021-10-02 18:12:05 -04:00
bresch 61dabca4c8 mavlink_receiver: Add mavlink handler with progress report 2021-10-02 18:12:05 -04:00
bresch d463dfe2d8 mavlink_receiver: handle auto-tuning command 2021-10-02 18:12:05 -04:00
bresch cd61065aea sitl: start MC autotune module 2021-10-02 18:12:05 -04:00
bresch 9681f819a8 mc_att: inject identification signal in att control output 2021-10-02 18:12:05 -04:00
bresch 0498ee92d0 mc atune: add multicopter attitude auto-tuner module 2021-10-02 18:12:05 -04:00
bresch d3cb806627 pid_design: add model-based PID tuning law based on GMVC 2021-10-02 18:12:05 -04:00
bresch 404145c655 sysID: add system identification library 2021-10-02 18:12:05 -04:00
bresch d504b49695 mc_rate: compute control energy and publish to status msg 2021-10-02 18:12:05 -04:00
Alex Klimaj 0a662ef22c Add uavcannode RTCM subscriber 2021-10-01 20:43:49 -04:00
alexklimaj 05ee31072a Add ARK RTK GPS 2021-10-01 20:34:32 -04:00
Daniel Agar c1c86bc349 Jenkins: hardware clear ccache stats before compiling 2021-10-01 20:31:29 -04:00
Daniel Agar a53946649a sensors/vehicle_magnetometer: only check if sensor enabled after parameters loaded 2021-10-01 20:30:46 -04:00
Daniel Agar 3c8f1f2a50 Jenkins: reduce build agent cpu share 2021-10-01 18:18:51 -04:00
SungTae Moon 2adf3f959b Update Tools/gazebo_sitl_multiple_run.sh
Co-authored-by: JaeyoungLim <jalim@ethz.ch>
2021-10-01 16:09:32 +02:00
stmoon bc5d55c4a4 fix the problem related to sitl multiple vehicle environment 2021-10-01 16:09:32 +02:00
marcojob 68a13326f0 mavlink: remove unused strncpy (#18300) 2021-10-01 10:58:25 +02:00
David Sidrane 7c9903f610 stm32h7:px4io_serial use TRBUFF
- includes NuttX with TRBUFF backports
2021-09-29 23:55:00 -04:00
David Sidrane 25a27d26e0 logger:log_writer_file Do not try to store ulog name on systems without hardfault logging 2021-09-29 23:51:25 -04:00
David Sidrane f56701e72f micro_hal:Remove px4_savepanic on arch without hardfault logging 2021-09-29 23:51:25 -04:00
David Sidrane cb47203a9e NuttX with deglitched GPIO backports 2021-09-29 23:50:11 -04:00
Daniel Agar f3a904c109 Jenkins: HIL increase timeout
- occasionally we have a considerable backlog
2021-09-29 20:37:07 -04:00
David Sidrane 63e29b821c holybro_can-gps-v1:Ensure sensors are powered 2021-09-29 14:37:17 -04:00
David Sidrane 2abbf791b3 NuttX with deglitched GPIO backports 2021-09-29 14:37:17 -04:00
David Sidrane 70eca23468 ark_can-gps_debug:Fit in Flash w/o loosing tools 2021-09-29 14:37:17 -04:00
David Sidrane 20c1f763d2 px4_fmu-v4:CAN build needs .app_descriptor 2021-09-29 14:34:42 -04:00
David Sidrane 797bd9592b mxp_ucans32k146:using padding of 8 2021-09-29 14:34:42 -04:00
David Sidrane f4e9672fde make_can_boot_descriptor:Add padding argument 2021-09-29 14:34:42 -04:00
Peter van der Perk 360c3781f3 UCANS32K146-01 Add CAN tranceiver self test 2021-09-29 09:36:14 -07:00
Daniel Agar c39a21aa54 ekf2: selector remove special timeout condition
- this mainly produces false positives when disarmed and bench testing
2021-09-29 09:59:08 -04:00
Paul Riseborough ed7c5991eb ekf2: Fix dimensional error in gyro and accel bias variance conversions 2021-09-29 09:58:41 -04:00
Hyungsub 5677ab042b tap_esc: fix resource leak (#18296) 2021-09-29 14:51:31 +02:00
Daniel Agar 03bd5e0f48 lib/led: move drivers/lights/rgbled LED_RGB_MAXBRT -> SYS_RGB_MAXBRT 2021-09-28 10:09:55 -04:00
Nicolas Martin b24e5fc0af clean remaining offboard_control_signal_found_once
offboard_control_signal_found_once is not used any more
2021-09-28 09:25:04 -04:00
Nicolas Martin 417a50b2cc fix typo in comment 2021-09-28 09:24:47 -04:00
Jukka Laitinen 6cae4c92e7 Add a header to logfile encryption key exchange file
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 9a4ef709ca Add parameters for configuring the logfile encryption
SDLOG_ALGORITHM for selecting the crypto algorithm
SDLOG_KEY for selecting the key in keystore to use with the algorithm.
  for symmetric algorithms which are currently supported, this is just a free
  slot to be used, the key is generated at logging start
SDLOG_EXCH_KEY for selecting an RSA2048 key for encrypting the SDLOG_KEY

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 1687cab56c FMUv5: Add a build target for crypto interface testing, px4_fmu-v5_cryptotest
To avoid messing with existing targets, and to automatically set the test keys
for the keystore.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen ce76380051 Add a simple script to decrypt ulog files
This now only decrypts xchacha20 encrypted logs, where keys are
exchanged with rsa_oaep_sha256 and nonce appended to the end of the
key

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 9472f79307 Take crypto interfaces into use in logger, to encrypt ulog data
- Generate a symmetric encryption key and a nonce value
- Use a public key in keystore to encrypt the symmteric key
- Write the encrypted key and the nonce value to disk into .ulgk, name matching with the encrypted log file
- use quick stream encryption to crypt the .ulg file contents

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 6b22fe99b7 Globally define -DPX4_CRYPTO when the board defines some crypto backend
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 3db76d88fe Add crypto key generation functions
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 4c6779812d Add keystore_put_key interface function for storing keys permanently
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen fc2668cba1 Add encryption function for the crypto_backend and px4_crypto
Take into use libtomcrypt library to add RSA and some other algorithms
for SW ecnryption use case

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 634d911b74 Add a test key for RSA2048
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 40063bd54b Add libtomcrypt and libtommath submodules
These provide e.g. rsa_oaep, which can be used for sw crypto

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen be4f7cabf9 Add compilation of nuttx_crypto
NuttX has lots of usable functionality for crypto, such as rng with entropy pool

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen d36a91ceaf Add generic px4 interface for crypto features
Add common functions, implemented for nuttx, and link to architecture specific libraries

Make a separate library to wrap nuttx random number generator as "os_random".

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen aa61bc4942 Add functions for initializing empty crypto backend handles
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Julian Oes 9290ea974e commander: allow force disarming
Allows to do commander disarm -f to disarm no matter what.
2021-09-27 09:58:03 -04:00
Daniel Agar 333f539900 mavlink: add simple incoming message stats to status 2021-09-27 09:48:00 -04:00
PX4 BuildBot feff564882 Update submodule jMAVSim to latest Mon Sep 27 00:38:51 UTC 2021
- jMAVSim in PX4/Firmware (592885480e): https://github.com/PX4/jMAVSim/commit/0a5375a70689aac53143768de9033034f3636022
    - jMAVSim current upstream: https://github.com/PX4/jMAVSim/commit/0a5a8c6d9da05bee5f82faa25430213d97d396b0
    - Changes: https://github.com/PX4/jMAVSim/compare/0a5375a70689aac53143768de9033034f3636022...0a5a8c6d9da05bee5f82faa25430213d97d396b0

    0a5a8c6 2021-09-02 Julian Oes - Merge pull request #130 from PX4/pr-udp-connection
2590b24 2021-09-01 Julian Oes - UDPMavLinkPort: add debug output around wait
7255b28 2021-08-31 Julian Oes - src: enable UDP connection in client and host mode
2021-09-27 08:05:48 +02:00
Daniel Agar 592885480e boards: ark_can-gps_debug disable perf to save flash 2021-09-26 12:29:11 -04:00
Daniel Agar 9a3fa6199b uorb top report total publication rate 2021-09-26 12:29:11 -04:00
Julian Oes e81214a22f mavlink: avoid double trigger using sequence
By adding the sequence number we can avoid double triggering due to
command retransmissions. This is according to the mavlink spec for
MAV_CMD_IMAGE_START_CAPTURE.
2021-09-25 20:18:07 -04:00
bresch 76615f8df3 VTOL: set HTE horizontal speed sensitivity threshold low 2021-09-25 20:07:28 -04:00
bresch 904ed57aba HTE: decrease sensitivity with speed
VTOL planes are getting lift from the wing when flying in MC mode at
high speed. They (and some other drones) also get extra drag when
climbing and descending at high speed, corrupting the hover thrust
estimate.

To avoid this, two speed thresholds (vertical and horizontal) are defined
above which the sensitivity of the estimator is decreased by linearly
increasing the observation noise.
2021-09-25 20:07:28 -04:00
achim c67d943158 boards: mro_ctrl-zero-h7-oem board.h fix SPI5 (#18294)
- fix spi pin missmatch PF9=GPIO_SPI5_MOSI_2
2021-09-25 20:05:18 -04:00
Daniel Agar e4b0fa25a2 systemcmds/tests: remove px4io conv test 2021-09-25 19:15:05 -04:00
Beat Küng 1b0bfd6381 dataman: remove nonexisting SYS_RESTART_TYPE param 2021-09-25 19:15:05 -04:00
Daniel Agar 089c962d92 px4io: moving mixing to FMU side
Using mixers on the IO side had a remote benefit of being able to
override all control surfaces with a radio remote on a fixed wing.
This ended up not being used that much and since the original design
10 years ago (2011) we have been able to convince ourselves that the
overall system stability is at a level where this marginal benefit,
which is not present on multicopters, is not worth the hazzle.

Co-authored-by: Beat Küng <beat-kueng@gmx.net>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-09-25 19:15:05 -04:00
PX4 BuildBot f772b0f45d Update submodule sitl_gazebo to latest Sat Sep 25 12:38:57 UTC 2021
- sitl_gazebo in PX4/Firmware (e800e7c27663ae0a08ae1e377cbccd2272657ad0): https://github.com/PX4/PX4-SITL_gazebo/commit/53d606b32f5729cc70d59281085d639bd97b30d7
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/d8366bf2389eae6106d1dbfaac72ebfdf23a5d2d
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/53d606b32f5729cc70d59281085d639bd97b30d7...d8366bf2389eae6106d1dbfaac72ebfdf23a5d2d

    d8366bf 2021-09-19 Mohamed ElDewany - Fix gazebo plugin for laser sensor
37a3a64 2021-09-16 Julian Oes - camera: fix stream URI
2561ff0 2021-09-01 Julian Oes - mavlink_interface: enable HITL over UDP
9216dab 2021-09-01 Julian Oes - mavlink_interface: remove poll before writing
8e9eb3f 2021-09-01 Julian Oes - mavlink_interface: clean up switch case
a009174 2021-09-01 Julian Oes - mavlink_interface: use flag from mavlink_interface
6f1243a 2021-09-01 Julian Oes - mavlink_interface: remove redundant inline keyword
2021-09-25 11:56:50 -04:00
David Sidrane f01cab3be1 px4io:Ensure proper lifecycle of registration of cdev 2021-09-24 19:01:54 -04:00
Igor Mišić 9ad0e5b357 mavlink_receiver: updated sens flow parameters to be dynamically handle 2021-09-23 09:23:22 +02:00
Beat Küng e73172b537 hrt: remove hrt_elapsed_time_atomic
There's no protection on posix
2021-09-23 09:23:08 +02:00
Beat Küng 6f902e54f9 mavlink: correctly lock radio status
- hrt_elapsed_time_atomic is not atomic on posix
- other fields like _radio_status_mult need protection as well
2021-09-23 09:23:08 +02:00
Beat Küng 0bfb1a983b px4iofirmware: avoid using hrt_elapsed_time_atomic
It's only ever read and written in controls_tick() after startup
2021-09-23 09:23:08 +02:00
Beat Küng eec94965f2 serial: add pixhawk payload bus option 2021-09-23 09:23:08 +02:00
Igor Mišić 682db4b8ac dshot: timeout if commands are not processed 2021-09-23 09:22:49 +02:00
bresch e53d2907d7 AutoSmoothVel: adjust controller constraints in emergency braking
When engaging auto mode at high vertical speed, we don't want to cut the velocity
trajectory setpoint in order to create a smooth deceleration.
2021-09-23 09:22:32 +02:00
bresch 316e0dfeb5 AutoLineSmoothVel: add emergency braking mode
Currently only for the Z axis. If the current downward velocity is more
than twice the maximum allowed value, the emergency braking mode is
activated. In this mode, a higher vertical acceleration and jerk is used
until the vehicle stops moving.
2021-09-23 09:22:32 +02:00
Igor Mišić 92696b589f sdp3x: stop continuous measurement while reconfig 2021-09-23 09:22:09 +02:00
Igor Mišić 3a148bc777 camera_trigger: remove camera trigger secondary
camera_trigger: publish trigger when capture feedback is not enabled
2021-09-23 09:21:56 +02:00
Hamish Willee f41e5985e8 vehicle_local_position: clarify origin of system 2021-09-22 10:14:23 +02:00
Thomas Debrunner 43ece74fa0 ina238: Do not expose raw adc config to user, make specific to ina238 2021-09-22 10:02:17 +02:00
Thomas Debrunner b8d0bb44c4 ina23X: Support for ina23X power monitors 2021-09-22 10:02:17 +02:00
Daniel Agar cf5da66e9f Jenkins: hardware disable gyro auto cal and FFT before running tests 2021-09-21 19:13:30 -04:00
Daniel Agar 87db18c1a0 Jenkins: hardware don't allow board cleanup commands to fail build 2021-09-21 19:13:30 -04:00
Daniel Agar a92e44c90e Tools/HIL/run_nsh_cmd.py: echo success cmd twice to avoid missing dropouts 2021-09-21 19:13:30 -04:00
Julian Oes faca2b17d0 camera_trigger: only get param if available 2021-09-17 12:23:30 +02:00
Daniel Agar 7af5a33ff3 commander: don't play failsafe tune if disarmed 2021-09-16 09:17:00 -04:00
Matthias Grob ecb1264832 vscode: do not disable autocomplete on enter 2021-09-16 09:11:52 -04:00
Julian Oes c779946e05 setup: Use available Java version for Ubuntu 20.04
14 was not available for me, 16 would have been.
2021-09-16 13:59:27 +02:00
Julian Oes addb978364 setup: Let's not ignore errors
Otherwise the script finishes and you don't know if it worked.
2021-09-16 13:59:27 +02:00
Daniel Agar 3d56836850 boards: nxp_fmurt1062-v1 disable extra barometers to save flash 2021-09-15 12:59:36 -04:00
Thomas Stauber 2b80a6958a fix disable airspeed check with negative ASPD_FS_INTEG (#18186)
* fix disable airspeed check with negative ASPD_FS_INTEG

* improve logic when nav velocity data is not good

* simplify logic. Reset integrator state when the check is not run.
2021-09-14 12:13:56 +02:00
Matthias Grob e7a90bf367 PositionControl: correct horizontal margin calculation
It was using the already reduced vertical thrust to do
the horizontal limitation resulting in no margin.
2021-09-14 10:57:38 +02:00
Matthias Grob d1f1e02afb Refactor mode button changes 2021-09-14 09:52:32 +02:00
Claudio Micheli 05d40f40d4 Handle rc toggle mode buttons to initialize flight modes
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-09-14 09:52:32 +02:00
Claudio Micheli c50daae4a3 rc_update: introduce support for toggle buttons via RC channels
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-09-14 09:52:32 +02:00
Daniel Agar ca2d8f6de2 Update submodule simulation-ignition to latest Tue Sep 14 00:39:01 UTC 2021 2021-09-13 21:09:50 -04:00
Daniel Agar e6552370ab imu/invensense: adjust scheduling dynamically if not using data ready interrupt 2021-09-12 17:34:35 -04:00
Claudio Micheli fa4fc5f347 esc_report: change esc_temperature field to allow negative values
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-09-11 15:14:49 -04:00
David Jablonski 7d7200cf2f Added yaw to CMD_DO_SET_HOME 2021-09-11 15:14:01 -04:00
Hamish Willee ce206d992b RC_FAILS_THR and RC_MAP_FAILSAFE improve parameter description 2021-09-11 15:12:54 -04:00
Daniel Agar 212898ff42 Makefile: fix submodulesupdate 2021-09-11 15:10:56 -04:00
Beat Küng 810d2e9497 ModuleParams: remove parent in destructor
This allows for dynamic deletion of children objects (in most cases this
is not used).

Uses ~100B memory.
2021-09-11 15:07:49 -04:00
bresch f09b34007e CA: reload CA matrix to newly created CA class properly
Also remove the dependency of ActuatorEffectivenessMultirotor
to param update uORB topic; the CA module
sends a "force" parameter when needed
2021-09-11 15:07:49 -04:00
bresch cf5917d188 control_allocator: restructure param update
recompute effectiveness on param change
clear update at the end
2021-09-11 15:07:49 -04:00
David Jablonski 9d974062d0 replay: improved logging for format mismatchs 2021-09-11 14:37:52 -04:00
Beat Küng bf48057090 px4/fmu-v2_test: disable modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng 946857ddf7 px4/fmu-v6x: disable modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng 673de86553 cubepilot/cubeorange: disable system_time and motor_ramp to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng 759d03e5f9 nxp/fmurt1062-v1: disable modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng ce747fac62 cuav/x7pro: disable modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng 3e899564d4 cuav/nora: disable some modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng c49e78cbac holybro/durandal-v1: disable modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng 5b674ea831 ROMFS: remove some airframes and mixers on v2 to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng 1a743e1117 collision_prevention: switch to events 2021-09-11 14:08:41 -04:00
Beat Küng 5b70fd4a1d airspeed_selector: switch to events 2021-09-11 14:08:41 -04:00
Beat Küng 5fb16e4395 fw_pos_control_l1: switch to events 2021-09-11 14:08:41 -04:00
Beat Küng 0a1ae37c1a logger: switch to events 2021-09-11 14:08:41 -04:00
Beat Küng 38eca0c64b logger: start session & log index at 100
To avoid leading zeros, as the events interface does not support that (yet)
2021-09-11 14:08:41 -04:00
Beat Küng b31276a4f5 mavlink: switch to events 2021-09-11 14:08:41 -04:00
Beat Küng 90940c3672 mc_pos_control: switch to events 2021-09-11 14:08:41 -04:00
Beat Küng 79a0edafb5 vehicle_air_data: switch to events 2021-09-11 14:08:41 -04:00
Beat Küng a8cc2f9ef6 vehicle_imu: switch to events 2021-09-11 14:08:41 -04:00
Beat Küng acb73fde14 vehicle_magnetometer: switch to events 2021-09-11 14:08:41 -04:00
Beat Küng f8dc915789 vtol_att_control: switch to events 2021-09-11 14:08:41 -04:00
Beat Küng dc87f8a7a4 events: unescape message to match the behavior of the C++ compiler 2021-09-11 14:08:41 -04:00
Beat Küng e1b8611323 px4/fmu-v5/optimized: disable some modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng 9bba13f3e2 px4/fmu-v2/multicopter: disable some modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng 1f73294ad7 navigator: switch to events 2021-09-11 14:08:41 -04:00
Beat Küng 5ac43e7236 commander: switch to events 2021-09-11 14:08:41 -04:00
Daniel Agar 8866215d1d sensors/vehicle_imu: add protections for bad sensor data
- check for inconsistent timestamps, zero samples, and numerical issues in online mean
2021-09-11 13:04:46 -04:00
Matthias Grob 3c57c67ce3 Make arch setup script executable
I usually called it using `source arch.sh`
but if it's executable it could also be called using `./arch.sh`
and that's also what's done for the ubuntu setup script.
2021-09-10 07:50:23 +02:00
m4v3r a238965228 boards: modalai_fc-v1 update default.cmake (#18202)
- makes TELEM/SERIAL-4 (VOXL-Flight J1009) work
2021-09-09 09:03:21 -04:00
Jukka Laitinen 28dbd8dc1d NuttX at 10.1.0+
NuttX backport fixing ARM protected build
2021-09-09 04:43:22 -07:00
Thomas Schneider 2e36fff31d Implement option to reboot px4 using protocol_splitter format when flashing. 2021-09-09 10:12:11 +02:00
Jukka Laitinen ffa5abbd65 ci: update container versions to 2021-09-08
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-09 09:43:15 +02:00
Beat Küng c5c80e31b6 boards: remove DIRECT_INPUT_TIMER_CHANNELS from board_config.h 2021-09-08 16:10:24 -04:00
Beat Küng ae8733c2d4 pwm_input: remove 'test' command and use 'status' instead 2021-09-08 16:10:24 -04:00
Beat Küng f1aafe83b3 pwm_out: cleanup, remove _output_mask & only update owned channels
_pwm_mask reflects the actually owned channels.
2021-09-08 16:10:24 -04:00
Beat Küng a8e75d174c boards: remove BOARD_HAS_PWM and use DIRECT_PWM_OUTPUT_CHANNELS 2021-09-08 16:10:24 -04:00
Beat Küng 1ee423e3c8 pwm_out, dshot: remove mode_* handling and capture ioctl's
They now use all unused pins, whereas camera_capture, camera_trigger and
pwm_input modules start before to reserve their pins.
2021-09-08 16:10:24 -04:00
Beat Küng 062dd28f4d camera_capture: use up_input_capture_set directly
It reserves the channel and pwm_out will not use it
2021-09-08 16:10:24 -04:00
Beat Küng 78b5cdae4c s32k1xx: io_timer: reserve pins & timers on first use 2021-09-08 16:10:24 -04:00
Beat Küng ab828b8e94 kinetis: io_timer: reserve pins & timers on first use 2021-09-08 16:10:24 -04:00
Beat Küng 7d9a3bf29f imxrt: io_timer: reserve pins & timers on first use 2021-09-08 16:10:24 -04:00
Beat Küng 9a74c6f3c6 stm32: io_timer: lock around io_timer_allocate_channel and io_timer_get_channel_mode
This is to avoid potential race conditions during startup.
All startup code runs sequentially atm, so this is just for robustness
for later (e.g. concurrent pwm_out and dshot start).
2021-09-08 16:10:24 -04:00
Beat Küng 847bd120fa io_timer: reserve pins & timers on first use
This allows modules to do a first-come-first-serve pin/timer reservation
on bootup.
E.g. camera trigger reserves any of the pins, and then PWM/DShot output
will just use the rest of the available pins.
2021-09-08 16:10:24 -04:00
Beat Küng 0d7176b766 boards: remove camera_capture from sitl and linux targets
It uses io_timer lib
2021-09-08 16:10:24 -04:00
Daniel Agar 422a0f7103 boards: px4_fmu-v5_debug enable more debug errors and warnings 2021-09-08 16:04:45 -04:00
bresch aad11ecc65 PreFltCheck: do not force to report ekf2 failures on GCS connection
EKF2 has a grace period of 10 seconds after boot where it doesn't need
to warn the user while the sensors (especially GNSS) are still
converging.
A connection to a GCS shouldn't skip this grace period but
an arming request should.
2021-09-08 14:41:26 -04:00
Matthias Grob 58ea97a699 MulticopterPositionControl: add horizontal margin for saturation cases 2021-09-08 19:55:27 +02:00
benjinne 06a91ec752 Improve offboard failsafe (#18160)
* state_machine_helper: improve offboard failsafe

* state_machine_helper: add missing parameter to set_link_loss_nav_state

* state_machine_helper: fix no rc and offboard reason

* Fix offboard test by enabling rcl_except

* mavros_test fix offboard_posctl_test with rcl_except

* autopilot_tester make RcLossException bits explicit

Co-authored-by: Julian Oes <julian@oes.ch>

* autopilot_tester change rcl_except to rc_loss_exception

Co-authored-by: Julian Oes <julian@oes.ch>

* autopilot_tester fix rc_loss_exception renaming errors

Co-authored-by: Julian Oes <julian@oes.ch>
2021-09-08 18:19:53 +02:00
ShiauweiZhao 686bcff8a7 new TDK ICM42670p IMU driver support (#18141)
Co-authored-by: zhaoxiaowei <zhaoxiaowei@efy-tech.com>
2021-09-08 10:24:22 -04:00
Daniel Agar 000765e9f0 NuttX mount procfs and binfs in px4 init 2021-09-08 10:21:24 -04:00
Daniel Agar 29a91306b5 lib/led: error if dropping ORB_ID(led_control) messages 2021-09-08 10:21:09 -04:00
Daniel Agar 5c7882b787 icm42688p: properly disable anti-aliasing and notch filter 2021-09-08 10:20:57 -04:00
Daniel Agar 4b5a91bf7d experimental driver for the Tattu 12S 16000mAh Smart Battery on /dev/can0 (#18164)
-  This driver is highly specific to this model of Tattu battery and cannot work with other models without code changes. 
 - The driver simply reads CAN frames using the NuttX CAN character device interface and converts the data into the proper format as specified in the Tattu datasheet

Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2021-09-08 10:20:14 -04:00
Daniel Agar 5eddf32cd3 boards: cubepilot_cubeorange only start ADSB mavlink if console not present
- cubepilot_cubeorange_test has the console enabled (used for test rack and bench debugging)
2021-09-06 11:52:58 -04:00
Sander Swart dbb0974b0c Removed TEL3 from cube orange default.cmake as it is used for the built in ADS-B receiver 2021-09-06 09:51:38 +02:00
Sander Swart bce1c06174 Added new line at the end of the file as per code style 2021-09-06 09:51:38 +02:00
Sander Swart 223410e17a Enable Cube Orange built in ADS-B receiver by default 2021-09-06 09:51:38 +02:00
Daniel Agar 8c47a190ac Jenkins: hardware stop sensors module before mirobenchmarks
- ignore irrelevant sensor timeouts during microbenchmarks
2021-09-05 23:18:28 -04:00
Daniel Agar cf0a4e06db boards: px4_fmu-v5x_test disable unused drivers to save flash 2021-09-05 23:18:28 -04:00
Daniel Agar 560ff42923 boards: px4_fmu-v2_test disable ms4525 to save flash 2021-09-05 23:18:28 -04:00
Daniel Agar 56a8f5f73e boards: px4_fmu-v2_test disable mc_hover_thrust_estimator to save flash 2021-09-05 23:18:28 -04:00
Daniel Agar 3dda360fac boards: px4_fmu-v5_optmized disable all additional barometers to save flash 2021-09-05 23:18:28 -04:00
Daniel Agar 476e050000 boards: cubepilot_cubeorange_test disable unused modules to save flash 2021-09-05 23:18:28 -04:00
Beat Küng 291ca246d2 matrix: update submodule (improves matrix inversion) 2021-09-05 23:18:28 -04:00
Beat Küng 73ab153fe0 fix test_microbench_math: don't try to measure single instructions
The clock is simply not accurate enough to do that.
Plus the measuring overhead is much higher than the executed instruction.

Remaining issue: memory transfers (due to volatile) add non-negligible
overhead and distort the result. Could be solved by using inline assembly.
2021-09-05 23:18:28 -04:00
Daniel Agar 02ca1a6711 Update submodule mavlink v2.0 to latest Sun Sep 5 12:39:18 UTC 2021 2021-09-05 20:42:54 -04:00
PX4 BuildBot 6278c072c9 Update submodule sitl_gazebo to latest Mon Sep 6 00:40:01 UTC 2021
- sitl_gazebo in PX4/Firmware (51697b0d07665d85ca1ebd9105e3cdc621b41969): https://github.com/PX4/PX4-SITL_gazebo/commit/7fda4d311a9daff4bec4f2fe83e63fde0b8f04b0
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/53d606b32f5729cc70d59281085d639bd97b30d7
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/7fda4d311a9daff4bec4f2fe83e63fde0b8f04b0...53d606b32f5729cc70d59281085d639bd97b30d7

    53d606b 2021-09-01 stmoon - fix the bug for the low real time factor in gazebo
2021-09-05 20:42:33 -04:00
Daniel Agar a4e9444ca4 Makefile: submodulesupdate include fetching all tags recursively 2021-09-05 14:50:56 -04:00
RomanBapst 93075ad5e8 rtl: fixed computation of return altitude if destination is not home
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-09-05 10:26:24 +02:00
Jaeyoung-Lim d32f0d6168 Support headless mode for ignition gazebo
This adds support for `HEADLESS=1` when starting ignition gazebo with headless mode
2021-09-04 14:01:39 +02:00
Jaeyoung-Lim 3aa3f542ae Update simulation-ignition submodule 2021-09-03 15:54:46 +02:00
Jaeyoung-Lim 121bdfa630 Add verbose option for ignition gazebo
This commit adds verbose option for ignition gazebo
2021-09-03 15:54:46 +02:00
Jaeyoung-Lim 3c57626627 Update world path for ignition gazebo 2021-09-03 15:54:46 +02:00
xdwgood c35293107d tailsitter.cpp:If transition timeout,abort transition 2021-09-03 13:41:40 +02:00
Beat Küng 007a7f78ae CI: switch to github actions 2021-09-03 12:07:26 +02:00
Beat Küng c96f0a48b6 test: update gtest to v1.11.0 2021-09-03 12:07:26 +02:00
Beat Küng 7c1860f286 geninv(): pass result as argument
depending on usage, this reduces stack usage a bit.
2021-09-03 12:07:26 +02:00
Beat Küng dc7f119b99 geninv(): improve runtime performance and reduce stack usage
- use associativity of matrix operations to reduce size of temporary
  matrices and number of multiplications in the M <= N case
- minimize the number of temporary matrices required
2021-09-03 12:07:26 +02:00
RomanBapst 92abf0545a GeofenceBreachAvoidance: fixed bug which caused min vertical distance to fence
not to be calculated

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-09-02 15:45:19 +03:00
profff 9418d36cc9 Tools/docker_run.sh: use recent docker image to fix missing python jsonschema when compiling linux arm based targets (#18178) 2021-09-01 19:11:54 -04:00
Daniel Agar 99d7cf4255 parameters: only warn on invalid parameter import 2021-09-01 15:16:00 -04:00
Daniel Agar 92a48657e3 Jenkins: hardware tolerate listener command failure
- these are only for casually inspecting the system
2021-09-01 15:16:00 -04:00
Daniel Agar 86bd6a253b Jenkins: hardware test rebooting back to back multiple times 2021-09-01 15:16:00 -04:00
Daniel Agar 06c673a94f Jenkins: hardware move sd_bench to test section 2021-09-01 15:16:00 -04:00
Daniel Agar 478cc576ee commander: warn on offboard mission init
- this could happen because the SD card was formatted
2021-09-01 15:16:00 -04:00
Daniel Agar 347720e049 Jenkins: hardware always reset board when finished 2021-09-01 15:16:00 -04:00
Daniel Agar e7607b858d sensors: use vehicle_imu timestamp_sample instead of timestamp 2021-09-01 15:16:00 -04:00
Daniel Agar 45001d1ba4 boards: px4_fmu-v5x_test disable modules to save flash 2021-09-01 15:16:00 -04:00
Daniel Agar f1d00fe697 Tools/HIL: only print timestamp if newline in output 2021-09-01 15:16:00 -04:00
Daniel Agar 6ee16156bb Jenkins: hardware only list relevant parameters 2021-09-01 15:16:00 -04:00
Daniel Agar 33a3bc143b boards: ark_can-gps_debug disable systemcmds to save flash 2021-09-01 15:16:00 -04:00
Daniel Agar 225bd2d5a3 Jenkins: hardware limit stackcheck and debug build cpu usage 2021-09-01 15:16:00 -04:00
Daniel Agar a5a457d744 sensors: relax default data_validator timeout 20->40ms 2021-09-01 15:16:00 -04:00
Daniel Agar 3ff9295cbd Jenkins: hardware nxp_fmuk66-v3 limit IMU_GYRO_RATEMAX to save cpu 2021-09-01 15:16:00 -04:00
Daniel Agar bd8937642f lib/sensor_calibration: only warn if external rotation resetting
- this also happens with the actual default parameter value (-1)
2021-09-01 15:16:00 -04:00
Daniel Agar 40e5477edb NuttX boards fix mkfatfs and rcS logic 2021-09-01 15:16:00 -04:00
Daniel Agar 65b1a9648d Tools/HIL/run_nsh_cmd.py: fail if ERROR printed in output 2021-09-01 15:16:00 -04:00
Daniel Agar 2f99857b0a systemcmds/bl_update: add CONFIG_ARCH_CHIP_STM32F7 file size limit 2021-09-01 15:16:00 -04:00
Daniel Agar 369776cd4e Jenkins: hardware don't tolerate px4io status on known hardware 2021-09-01 15:16:00 -04:00
Daniel Agar c6dd03a8aa Tools/HIL/run_nsh_cmd.py - raise timeout slightly
- helps on slower debug builds
2021-09-01 15:16:00 -04:00
Daniel Agar c508404975 boards/px4/fmu-v4pro: fix incorrectly sized FRAM 2021-09-01 15:16:00 -04:00
Daniel Agar 61931fcbbc Jenkins: hardware failure allow px4_fmu-v5_debug monitor firmware upload failure
- due to reported errors in NuttX low level drivers
2021-09-01 15:16:00 -04:00
Daniel Agar 9e0fa8e82b boards: set SENS_TEMP_ID defaults 2021-09-01 15:16:00 -04:00
Daniel Agar 5dfc07cb1b systemcmds/param: add set-default sient (-s) option 2021-09-01 15:16:00 -04:00
Daniel Agar 054d0b995c px4iofirmware: remove police lights to avoid getting stuck 2021-09-01 15:16:00 -04:00
Daniel Agar 2864735c44 Tools/HIL/monitor_firmware_upload.py - fail if there's an ERROR during startup 2021-09-01 15:16:00 -04:00
Daniel Agar 70831a8e2c px4io: checkcrc warn on mismatch 2021-09-01 15:16:00 -04:00
Daniel Agar 8434da6f79 px4io: reduce upload retries 5 -> 2 2021-09-01 15:16:00 -04:00
Daniel Agar 6be7926ed3 px4io: add watchdog
- F1 iwdg:Support optional configuable init

Co-authored-by: David Sidrane <David.Sidrane@NscDg.com>
2021-09-01 15:16:00 -04:00
Daniel Agar f856b89723 boards: Holybro H7 boards clear MPU early in board init
- needed if the bootloader configures the memory protection unit (MPU)
2021-09-01 08:53:05 +02:00
Daniel Agar c700ffff92 boards: CUAV H7 boards clear MPU early in board init
- needed if the bootloader configures the memory protection unit (MPU)
2021-09-01 08:53:05 +02:00
Lorenz Meier 965f11e923 MRO: Set up MPU after boot to app
This is needed in case the bootloader configured the MPU, which could interfere with the app as the bootloader memory map / configuration is different.
2021-09-01 08:53:05 +02:00
Daniel Agar a819a7b7c4 boards: cube orange fully clear any existing MPU configuration as soon as possible 2021-09-01 08:53:05 +02:00
Daniel Agar 7925787f62 px4io_serial: ensure TX DMA is stopped if exiting early on stream error
- otherwise the next retry can happen quickly enough that dma setup
hangs waiting for the stream
2021-08-31 23:11:07 +02:00
Julian Oes 6cb0259b79 commander: improve progress output
Instead of outputting progress at weird percentages and dropping 100%,
this now sends the progress every 10 %.
2021-08-30 21:05:40 -04:00
Daniel Agar ca685490a9 drivers/rc_input: only print vrssi if analog stable 2021-08-30 12:45:56 -07:00
Daniel Agar 15c01a9732 drivers/rc_input: flush buffers when beginning new scan state 2021-08-30 12:45:56 -07:00
Daniel Agar a305fc9c34 drivers/rc_input: only invert RC when starting/ending SBUS 2021-08-30 12:45:56 -07:00
Daniel Agar 79703c9c7a drivers/rc_input: don't resume scanning if armed 2021-08-30 12:45:56 -07:00
Daniel Agar 98f89aae9b drivers/rc_input: always report new lock 2021-08-30 12:45:56 -07:00
Hylke Faas 34483aef0f Do not resend a mission request if it is not the expected sequence number, this can cause an excessive increase of used bandwith (#18082) 2021-08-30 13:39:51 +02:00
Daniel Agar a917793248 mavlink: only block parameter sync until boot complete 2021-08-30 13:27:51 +02:00
Daniel Agar ab1c90d831 boards: cubeorange/cubeyellow use amber LED for armed state 2021-08-28 09:15:41 -04:00
Jukka Laitinen c3c30e5d4f Fix memory corruption when work queue is being deleted
When the last WorkItem is deleted, it is removed from a work queue and the
queue is being stopped. But, the queue itself might get deleted in the middle,
in a higher priority thread than where the WorkItem deletion was performed from

If the WorkQueue::Detach accesses the member variables after this, there is memory
corruption

This happens in particular when launching i2c or spi devices in
I2CSPIDriverBase::module_start:

- The "initializer" is deleted when the instance is not found and the iterator
  while loop continues.
- The workqueue is deleted in the middle of "initializer" deletion when the
  WorkQueueRunner returns.

This prevents deletion of the WorkQueue before the Detach has been finished,
in the specific case that the ::Detach triggers the deletion

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-08-27 10:43:45 +02:00
Daniel Agar 99463fce48 Update submodule mavlink v2.0 to latest Thu Aug 26 12:39:19 UTC 2021 (#18153)
- mavlink v2.0 in PX4/Firmware (c6a6403ce2): https://github.com/mavlink/c_library_v2/commit/51204fc82bc89b6862ebf03a1f49e80c52feeecc
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/e0e24de6228326101ff85dd5cdea638f2569c70e
    - Changes: https://github.com/mavlink/c_library_v2/compare/51204fc82bc89b6862ebf03a1f49e80c52feeecc...e0e24de6228326101ff85dd5cdea638f2569c70e

Co-authored-by: PX4 BuildBot <bot@px4.io>
2021-08-26 11:43:31 -04:00
Daniel Agar c6a6403ce2 px4io: increase stack 1500 -> 1536 bytes 2021-08-25 21:32:05 +02:00
Daniel Agar f59b54abd7 boards: io-v2 increase idle thread stack 280 -> 316 bytes 2021-08-25 21:32:05 +02:00
Daniel Agar 22e62a044a px4iofirmware: never directly touch mixer from isr 2021-08-25 21:32:05 +02:00
Jacob Crabill 1ee5f75aa5 uavcan_v1: Add PublicationManager and uORB Publisher (#17863) 2021-08-25 14:56:23 -04:00
Beat Küng d8214f5e00 component_information: merge extra component_information_header target
With Makefile build, generate_component_general.py was called twice during
build, which did not happen with the ninja build.

This created a race condition with the following error in rare cases:
Traceback (most recent call last):
  File "/__w/PX4-Autopilot/PX4-Autopilot/src/lib/component_information/generate_component_general.py", line 79, in <module>
    save_compressed(filename)
  File "/__w/PX4-Autopilot/PX4-Autopilot/src/lib/component_information/generate_component_general.py", line 33, in save_compressed
    with open(filename, 'r') as content_file:
FileNotFoundError: [Errno 2] No such file or directory: '/__w/PX4-Autopilot/PX4-Autopilot/build/px4_sitl_default/component_general.json'
make[3]: *** [src/lib/component_information/CMakeFiles/component_information_header.dir/build.make:68: component_general.json] Error 1

Merging the targets avoids the duplicate execution.
2021-08-25 10:04:39 -04:00
Beat Küng af53b60713 Revert "component_information: add debug instrumentation for FileNotFoundError exception"
This reverts commit ca454c93d1.
2021-08-25 10:04:39 -04:00
Jukka Laitinen 8f03045fb2 Increase micrortps_client_rcv stack for 64 bit targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-08-24 10:16:27 -04:00
Jukka Laitinen 69021dbafa Increase navigator stack for 64-bit targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-08-24 10:16:27 -04:00
Jukka Laitinen e49791cdf2 Increase mavlink stack for 64 bit targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-08-24 10:16:27 -04:00
Jukka Laitinen 523578d2ce Increase stack size of wq:manager and worker threads for 64 bit targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-08-24 10:16:27 -04:00
Jukka Laitinen 29248cb6b8 Increase gps stack for 64 bit targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-08-24 10:16:27 -04:00
Jukka Laitinen 733b1e9e67 Increase logger stack size for 64 bit targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-08-24 10:16:27 -04:00
Jukka Laitinen 8cf121fc9d Increase dataman stack size for 64 bit targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-08-24 10:16:27 -04:00
Kjersti Brynestad 62aa9c9f34 Correct conversion from sec to usec 2021-08-23 20:17:26 +01:00
Andrew Brahim 04adf6c9be drivers/distance_sensor/vl53l1x: added multiple region of interest settings (#18073)
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
2021-08-23 14:15:41 -04:00
Daniel Agar a4527485a3 mavlink: update radio status timestamp atomically
- this is updated by the mavlink rx thread, but checked in the tx thread
2021-08-23 11:16:10 -04:00
Daniel Agar 61702d0d97 sensors: always start baro/GPS/mag aggregators if SYS_HAS_* set
- add new SYS_HAS_GPS parameter
2021-08-23 10:59:58 -04:00
Thomas Stauber 6d3120d00d lower case c in Quadchute 2021-08-23 09:08:53 -04:00
Thomas a260ea8233 more consistent quadchute messages 2021-08-23 09:08:53 -04:00
Daniel Agar 2b1c97eb37 Update world_magnetic_model to latest Sun Aug 22 11:14:24 UTC 2021 2021-08-22 16:28:00 -04:00
Daniel Agar 60d50b9d5d boards: px4_fmu-v6x_default disable batmon to save flash 2021-08-22 14:48:01 -04:00
David Sidrane 1339dd3681 px4_fmuv6x:Use parameter setting for ina22x 2021-08-22 14:48:01 -04:00
David Sidrane f2925d234e px4_fmuv5x:Use parameter setting for ina22x 2021-08-22 14:48:01 -04:00
David Sidrane bf89771710 ina22x:Enabled by paramaters 2021-08-22 14:48:01 -04:00
David Sidrane f820771ea2 px4_fmuv6x:Add INA228 2021-08-22 14:48:01 -04:00
David Sidrane 7e7cbceaea px4_fmuv5x:Add INA228 2021-08-22 14:48:01 -04:00
David Sidrane f819be2075 Support INA228 2021-08-22 14:48:01 -04:00
Beat Küng fdb92d4746 protocol_splitter: check available bytes before read()
This is to avoid blocking in any case.
If we don't do that, ioctl() may signal data available while the other
protocol does a read(), and when the first protocol tries to do a read(),
it would not have data anymore and would block (so this avoids a race
condition).
2021-08-22 10:42:13 -04:00
Beat Küng 5d1e78befb protocol_splitter: return correct FIONSPACE
This is now possible since we don't parse the protocol.
2021-08-22 10:42:13 -04:00
Beat Küng 6edb55c874 protocol_splitter: simplify write()
With the protocol header we don't need to parse the protocol anymore.
2021-08-22 10:42:13 -04:00
Beat Küng 868f9cebb0 protocol_splitter: return 0 when no data to read instead of -1
This avoids mavlink adding another usleep() due to read error
2021-08-22 10:42:13 -04:00
Beat Küng 375b014444 protocol_splitter: reduce poll timeout from 100ms to 10ms
This matches the timeout in mavlink_receiver.
With the higher timeout sending of e.g. mavlink logging was done at a lower
rate.
2021-08-22 10:42:13 -04:00
Beat Küng 00d939995b fix micrortps_transport: set poll fd when baudrate is 0 2021-08-22 10:42:13 -04:00
Daniel Agar 0885f37667 micrortps_bridge: add "msg/tools/urtps_bridge_topics.yaml" to CMAKE_CONFIGURE_DEPENDS
- this is necessary because urtps_bridge_topics.yaml is processed at
cmake configure time (via cmake execute_process)
2021-08-22 10:41:04 -04:00
Daniel Agar 4422030037 micrortps_bridge/micrortps_client: fix topic path dependencies 2021-08-22 10:41:04 -04:00
Christian Llanes c0efbe1f9c change PublicationMulti-> Publication as a temporary fix 2021-08-20 19:56:56 +01:00
David Sidrane 376b1c9987 rgbled_ncp5623c:Add comand line mapping of PWM to color 2021-08-20 10:15:57 -04:00
David Sidrane 8e04985940 rgbled_ncp5623c:Needs 2 retries 2021-08-20 10:15:57 -04:00
David Sidrane 74903cf215 rgbled_ncp5623c:Can change address, return actual 2021-08-20 10:15:57 -04:00
David Sidrane cba78081af rgbled_ncp5623c:Document support for ncp5623[c|b] parts 2021-08-20 10:15:57 -04:00
David Sidrane 78b76cb636 i2c_spi_buses:Support devices that may change address 2021-08-20 10:15:57 -04:00
David Sidrane 075cb39c34 vcm1193l:Bug Fix set default address 2021-08-20 10:15:57 -04:00
David Sidrane 8f4811daa8 px4_fmu-v5x:Newer HW Start BARRO on bus 2 2021-08-20 10:15:57 -04:00
David Sidrane 566d1499bc px4_fmu-v6x:Use HB 10pin GPS rotation 2021-08-20 10:15:57 -04:00
David Sidrane dc5fd25e8c px4_fmu-v5x:Use HB 10pin GPS rotation 2021-08-20 10:15:57 -04:00
David Sidrane 1618933014 rcS:Scope netman to all 5X and 6X 2021-08-20 10:15:57 -04:00
Daniel Agar 69d1a73f85 Update submodule GPSDrivers to latest Fri Aug 20 12:39:20 UTC 2021 (#18111)
- GPSDrivers in PX4/Firmware (1cbb007b95d375ababeae79f753cfafae9a9a4de): https://github.com/PX4/PX4-GPSDrivers/commit/8af5336d3f112278fd321e2c512453f23a350540
    - GPSDrivers current upstream: https://github.com/PX4/PX4-GPSDrivers/commit/6fcf06894973240d45dc49d3b31565917dc8f2f6
    - Changes: https://github.com/PX4/PX4-GPSDrivers/compare/8af5336d3f112278fd321e2c512453f23a350540...6fcf06894973240d45dc49d3b31565917dc8f2f6

6fcf068 2021-08-18 Femtomes - Femto_gps_driver: change UNLOGALL command
c51adac 2021-08-18 Oleg Evseev - nmea: add rtcm parsing and add debug ouput
2021-08-20 10:14:47 -04:00
Daniel Agar df3608d38a Update submodule mavlink v2.0 to latest Fri Aug 20 12:39:17 UTC 2021
- mavlink v2.0 in PX4/Firmware (31545f85fb): https://github.com/mavlink/c_library_v2/commit/5095bcd856537330e66e6fc833a1c7bf689bf5ed
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/51204fc82bc89b6862ebf03a1f49e80c52feeecc
    - Changes: https://github.com/mavlink/c_library_v2/compare/5095bcd856537330e66e6fc833a1c7bf689bf5ed...51204fc82bc89b6862ebf03a1f49e80c52feeecc
2021-08-20 09:05:23 -04:00
Daniel Agar 31545f85fb gitmodules update NuttX branches to latest v10.1.0 2021-08-19 13:02:31 -04:00
Beat Küng c4b91c8558 calibration params: avoid using NaN as default
- NaN is not supported by JSON, and leads to parsing failure in QGC.
 - fixes https://github.com/PX4/PX4-Autopilot/issues/18095
2021-08-19 11:29:26 -04:00
Daniel Agar 507cce78d5 boards: px4_fmu-v6{u,x} fix test variant flash overflow and sync defaults 2021-08-19 11:25:21 -04:00
Daniel Agar c4499aa7bb uavcan: save parameter after successful set 2021-08-19 02:06:02 -07:00
Daniel Agar 06c2d14903 ekf2: multi-mode allow first instance to save EKF2_MAG_DECL 2021-08-19 10:14:35 +02:00
Daniel Agar 1af2ecaff6 boards: px4_fmu-v5_test disable attitude_estimator_q and local_position_estimator to save flash 2021-08-18 19:31:24 -04:00
Christian Llanes 6423ea50e6 add sensor_combined to urtps_bridge_topics.yaml 2021-08-18 23:52:45 +01:00
Daniel Agar 3423c5e48a boards: nxp_fmurt1062-v1_default disable attitude_estimator_q and local_position_estimator to save flash 2021-08-18 18:06:22 -04:00
Daniel Agar 3fc4ee6c90 boards: px4_fmu-v6x_default disable attitude_estimator_q to save flash 2021-08-18 18:01:14 -04:00
Daniel Agar 4c401b070e boards: cuav_can-gps-v1 delete unused debug variant 2021-08-18 17:40:33 -04:00
Beat Küng 7b9d16d2f8 fix gps: remove Wno-cast-align & fix it 2021-08-18 12:24:17 -04:00
Beat Küng 4b49f9261e gps: add generic nmea driver 2021-08-18 12:24:17 -04:00
Beat Küng 22e2fc9465 gps: add missing case & arguments for femtomes driver 2021-08-18 12:24:17 -04:00
Daniel Agar 49f81a9e0e boards: px4_fmu-v2_default disable load_mon to save flash 2021-08-18 12:20:13 -04:00
Daniel Agar 7b8ef07235 github actions: add all CAN nodes 2021-08-18 12:17:46 -04:00
Claudio Micheli 2607527d63 Commander: improve user notification for yaw emergency
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-08-18 10:16:02 -04:00
Hyungsub d089d4a6a4 fix memory bugs in replay and bl_update 2021-08-18 07:45:51 +02:00
alexklimaj 810dbbd25b AFBR mode switching, rate switching, and test 2021-08-17 19:38:33 -04:00
Hamish Willee c1f588806a BAT_ADC_CHANNEL should point to BAT1_I_CHANNEL 2021-08-17 19:35:11 -04:00
Daniel Agar cb610caf1e drivers: minimize additional I2C retries 2021-08-17 09:54:50 -04:00
Daniel Agar 8a8171c7aa platforms/nuttx: px4_init initialize and reset all I2C buses 2021-08-17 09:54:50 -04:00
Daniel Agar 2b581ef407 platforms/nuttx: s32k14x & s32k1xx add i2c_hw_description.h 2021-08-17 09:54:50 -04:00
Daniel Agar 29616ec387 Jenkins: remove modalai_fc-v1 temporarily
- board test harness needs to be repaired
2021-08-16 21:45:37 -04:00
Beat Küng 474b0188f7 mixer_module: set MAX_CUSTOM_OPT_LEVEL 2021-08-16 11:05:39 -04:00
Beat Küng f00f3d1a27 dshot: improve performance by removing extra motor_buffer array
Reduces CPU load by almost 1.5% @ 2khz on F4 and F7.

This changes the motor ordering on boards where the timer ordering does
not match the order of the timer usage in the channels defintion.
Only omnibus f4sd is affected.
2021-08-16 11:05:39 -04:00
Beat Küng afed10618b dshot: inline up_dshot_motor_data_set and up_dshot_motor_command
Slight performance improvement (~0.1% @1khz on F4)
2021-08-16 11:05:39 -04:00
Hamish Willee 8aecc64a73 generate uorb - support multiline descriptions 2021-08-16 08:29:44 +02:00
Hamish Willee 9c081ed24b ekf2_timestamps.msg - make first line a complete sentence
Fixes the docs.
2021-08-16 08:29:44 +02:00
Hamish Willee 51fa834ac6 generate_msg_docs: generate better page title 2021-08-16 08:29:44 +02:00
Daniel Agar ff39e27e2d sensor calibration: save temperature at calibration time for monitoring 2021-08-15 11:19:24 -04:00
Daniel Agar a76bcd3e01 CI fix renamed uorb_to_ros_rtps_ids.py -> uorb_to_ros_urtps_topics.py 2021-08-14 15:53:14 -04:00
Daniel Agar c6931814fa Jenkins: fix msg docs stash and archive 2021-08-14 15:18:57 -04:00
Daniel Agar b98656ccb4 Jenkins: fix msg files stash 2021-08-14 14:58:57 -04:00
Daniel Agar f2bae02f87 msg: purge unused qshell 2021-08-14 12:54:01 -04:00
Daniel Agar 5fb386a1bb magnetometer/bosch/bmm150: free all perf counters 2021-08-14 11:42:53 -04:00
Daniel Agar a83675c622 gyro_fft: improve scheduling
- move to high priority work queue (from low priority)
 - schedule slightly more often to avoid missing messages
 - perf counter include all FFT processing work
 - lazily allocate gyro gap perf counters on initial sensor selection
2021-08-13 15:00:08 -04:00
David Sidrane 8952fa2935 rc.sensors:Fix Shell Check warning 2021-08-13 14:22:00 -04:00
David Sidrane 3c227b6f76 hardfault_log:Remove verbose output when CONSTRAINED_FLASH_NO_HELP is lit 2021-08-13 14:22:00 -04:00
David Sidrane 53c81d986e atl_mantis-edu:Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane c4b810eef9 tap_esc_uploader:Use inttypes 2021-08-13 14:22:00 -04:00
David Sidrane a7123f115c sih:Fix type mismatch 2021-08-13 14:22:00 -04:00
David Sidrane e8c418caaf EKF:Use inttypes 2021-08-13 14:22:00 -04:00
David Sidrane 79f8865e65 px4_fmu-v2:All configs Use NO_HELP option to save flash 2021-08-13 14:22:00 -04:00
David Sidrane 3e9c8e401e freefly_can-rtk-gps_canbootloader: Stub out printf to remove write dependancy 2021-08-13 14:22:00 -04:00
David Sidrane 518700b39b platforms/nuttx/CMakeLists:Resolve fs->libc(strcat) libc->fs 2021-08-13 14:22:00 -04:00
David Sidrane bb913ae11a system_load:Track Dynamic PID hash 2021-08-13 14:22:00 -04:00
David Sidrane e6d9c2b734 px4_fmu-v5_optimized: Fit in flash 2021-08-13 14:22:00 -04:00
David Sidrane cf292bef07 px4_fmu-v6x: Update nsh defconfig NuttX 10.1.0+ CONFIG_NET_SOCKOPTS Automatic 2021-08-13 14:22:00 -04:00
David Sidrane f5d679fae4 px4_fmu-v5x: Update nsh defconfig NuttX 10.1.0+ CONFIG_NET_SOCKOPTS Automatic 2021-08-13 14:22:00 -04:00
David Sidrane cab2ba209e px4_fmu-v5x: Update base_phy_DP83848C defconfig NuttX 10.1.0+ CONFIG_NET_SOCKOPTS Automatic 2021-08-13 14:22:00 -04:00
David Sidrane 53477a1f82 av_x-v1: Update nsh defconfig NuttX 10.1.0+ CONFIG_NET_SOCKOPTS Automatic 2021-08-13 14:22:00 -04:00
David Sidrane a1c90057cb px4_fmu-v5:ARM Stack check (debug) needs headroom 2021-08-13 14:22:00 -04:00
David Sidrane 10d3909087 px4_fmu-v5:ARM Stack check needs headroom 2021-08-13 14:22:00 -04:00
David Sidrane 58fc5b21b8 NuttX at 10.1.0+
With PX4 contrib for building
2021-08-13 14:22:00 -04:00
David Sidrane e2d05157dd afbrs50: Use inttypes 2021-08-13 14:22:00 -04:00
David Sidrane 9455bfd857 px4_fmu-v5: Update uavcanv1 defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane e3104861df cuav_can-gps-v1: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 8cdea33074 modalai_fc-v2: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 02ef9dc188 modalai_fc-v2: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 5beda51fa4 modalai_fc-v1: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane b600c7cc55 cuav_x7pro: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane a0c74a8563 cuav_x7pro: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 51b1cf774c cuav_nora: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane b8aa6ccaa1 cuav_nora: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane a73b688566 holybro_kakutef7: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane b3555ada6b holybro_can-gps-v1: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 7d572c515c holybro_pix32v5: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 55bf2c7610 holybro_durandal-v1: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane b45e0dd872 holybro_durandal-v1: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 6b27c28787 uvify_core: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 9e3d275f0c omnibus_f4sd: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 3c78d7285a freefly_can-rtk-gps: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 24a263a6bc av_x-v1: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 9676b3fd27 airmind_mindpx-v2: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 2731238ce3 ark_can-gps: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 7268c344e4 ark_can-flow: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane defbb0e17a mro_ctrl-zero-f7-oem: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 47f1b934d3 mro_x21: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 0823bb5584 mro_x21-777: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane f527286200 mro_ctrl-zero-h7-oem: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 5446d4bde8 mro_ctrl-zero-h7-oem: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane e96c3e5093 mro_pixracerpro: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 1d789863b4 mro_pixracerpro: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane fe8c902f90 mro_ctrl-zero-f7: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 49c85e7713 mro_ctrl-zero-h7: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 0d47f1a3cb mro_ctrl-zero-h7: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 181e82dd17 nxp_fmurt1062-v1: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 89c553b161 nxp_fmuk66-v3: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane ea1538a04f nxp_fmuk66-v3: Update socketcan defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 6ad56c537f nxp_fmuk66-e: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 71d5de5715 nxp_fmuk66-e: Update socketcan defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 44b29b6126 nxp_ucans32k146: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane cc6d15b4fd bitcraze_crazyflie: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 655a10ffdd bitcraze_crazyflie21: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 64bf02384f cubepilot_cubeyellow: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 281a238bb0 cubepilot_cubeyellow: Update test defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 9c1752bf4d cubepilot_io-v2: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane d9da05bd02 cubepilot_cubeorange: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 2a4b4824e5 cubepilot_cubeorange: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane f5b22d8832 cubepilot_cubeorange: Update test defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 9b15d2db10 px4_fmu-v6u: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane d4d149758d px4_fmu-v6u: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane ffc9ed8a75 px4_fmu-v5: Update debug defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 3e020a33b9 px4_fmu-v5: Update optimized defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 33897727cd px4_fmu-v5: Update stackcheck defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 63198fb6cb px4_fmu-v5: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 0b084461b5 px4_fmu-v4pro: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 6e93251169 px4_fmu-v5x: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 7344c050a8 px4_fmu-v5x: Update base_phy_DP83848C defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane cb150b3ced px4_fmu-v3: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane c3d9504933 px4_io-v2: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane be479654c2 px4_fmu-v2: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 0316010027 px4_fmu-v6x: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 639486f4ba px4_fmu-v6x: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane d709bafa11 px4_fmu-v4: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 2e4e4018b6 px4_fmu-v5:ARM Stack check needs headroom (237 bytes) 2021-08-13 14:22:00 -04:00
David Sidrane bea495999f spracing_h7extreme:Update defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 173e5c7554 NuttX:Track Stack naming changes 2021-08-13 14:22:00 -04:00
David Sidrane 069130403d LoadMon:Support NuttX Dynamic FDs 2021-08-13 14:22:00 -04:00
David Sidrane 4353d0faf3 print_load:Support NuttX Dynamic FDs 2021-08-13 14:22:00 -04:00
David Sidrane ec61512cdf NuttX inits null console 2021-08-13 14:22:00 -04:00
David Sidrane 01ef9cf3e6 NuttX at 10.1.0+
With PX4 contrib for building
2021-08-13 14:22:00 -04:00
Silvan Fuhrer 40f9b53b90 Remove a couple of unnecessary reboot_required from parameter meta data
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-08-13 10:35:43 -04:00
Jaeyoung-Lim d30760a2ea Remove flap scaling to prevent flaps being deployed in manual mode
This commit restores the flap scaling since it was always getting deployed in manual flight modes
2021-08-13 15:46:23 +02:00
Beat Küng 72bc8647a9 commander: add sensors reset to factory calibration 2021-08-12 10:20:33 -04:00
Daniel Agar 3f172dbfa7 ROMFS: new parameters for starting differential pressure sensors 2021-08-12 10:11:13 -04:00
romain-chiap c8346534f1 sih: using Quatf::expq(), fuselage added 2021-08-12 10:10:03 -04:00
Beat Küng 265c77b02a logger: remove unused topics, move some to debug profile 2021-08-12 10:09:11 -04:00
Beat Küng c0285611ec fix logger: turn off lockstep when starting log streaming
Lockstep created deadlocks between logger and mavlink, due to logger
waiting for mavlink and mavlink waiting for lockstep.
2021-08-12 10:09:11 -04:00
Beat Küng f88f224fe6 logger: avoid data bursts by distributing slow subscription updates over time
There's an increasing amount of slow logged topics at 1-2Hz, which were all
updated in the same logger iteration, leading to data bursts. For log
streaming this started to exceed uart buffer sizes. By distributing updates
more equal over time those bursts are removed, reducing buffer size
requirements.

Tests showed during steady state a reduction of maximum topic updates per
iteration from 40 down to 17.
Also the SD log buffer fill level is more constant.
2021-08-12 10:09:11 -04:00
Beat Küng d3c45c00c7 mavlink_ulog_streaming: when stopping, wait after receiving the ack
So we log additional data send afterwards
2021-08-12 10:09:11 -04:00
Beat Küng e1ac6fe297 logger: send post-flight perf data when stopping mavlink log streaming
- send out VEHICLE_CMD_RESULT_IN_PROGRESS
- delete the ulog object when receiving the ACK from logger, instead of
  the stop command
2021-08-12 10:09:11 -04:00
Beat Küng 0f6bf6bc0e refactor gps: use enum class for gps_driver_mode_t 2021-08-12 10:06:39 -04:00
Beat Küng 09a42e7af2 gps: extend GPS_DUMP_COMM param to enable RTCM output + logging 2021-08-12 10:06:39 -04:00
Martina Rivizzigno 159c87a6fb ll40ls: add support for LidarLite V4
Co-authored-by: Claudio Micheli <claudio@auterion.com>
2021-08-12 10:05:19 -04:00
Daniel Agar 68dcc25709 flight_mode_manager: ManualAcceleration support weathervane yaw handler
- fixes https://github.com/PX4/PX4-Autopilot/issues/17911
2021-08-12 09:58:29 -04:00
TSC21 21953daa3b microRTPS: transport: fix UART configuration 2021-08-12 08:44:53 +02:00
TSC21 4b6646c5f3 microRTPS: transport: normalize configs with mavlink/mavlink-router 2021-08-12 08:44:53 +02:00
TSC21 af8a6117fa microRTPS: agent: add missing 'g' option 2021-08-12 08:44:53 +02:00
TSC21 2a368b4db1 uorb_to_ros_urtps_topics: minor cleanup 2021-08-12 08:44:53 +02:00
TSC21 74557c9071 uorb_to_ros_msgs: minor cleanup 2021-08-12 08:44:53 +02:00
TSC21 00ad0d3b82 microRTPS: add make targets to update the PX4-ROS2/microRTPS bridge
This allows to easily update the px4_ros_com and/or px4_msgs through a make target and by passing the location of their directories
2021-08-12 08:44:53 +02:00
TSC21 8762dce762 microRTPS: transport: small format fix 2021-08-12 08:44:53 +02:00
TSC21 fae1627d92 microRTPS: client: cleanup and make arguments consistent 2021-08-12 08:44:53 +02:00
TSC21 109b031156 microRTPS: agent: cleanup and make arguments consistent 2021-08-12 08:44:53 +02:00
TSC21 e83a3a6cf7 microRTPS: update RTPS message list naming from 'ids' to 'msgs' 2021-08-12 08:44:53 +02:00
TSC21 0b23679f98 msg: templates: update empy contexts, required fields and license header years 2021-08-12 08:44:53 +02:00
TSC21 ffa70ac0fd microRTPS: generate_microRTPS_bridge: run fastrtsgen only once for all files
Reducing the generation time to a 4th of the time (!!)
2021-08-12 08:44:53 +02:00
TSC21 a8a56a03a4 microRTPS: rename uorb_to_ros_rtps_ids to uorb_to_ros_urtps_topics and remove the 'id' references on it 2021-08-12 08:44:53 +02:00
TSC21 4609949bbb microRTPS: generate_microRTPS_bridge: only run the generator for the topics that are actually marked to be used 2021-08-12 08:44:53 +02:00
TSC21 695e1fa574 uorb_to_ros_rtps_ids: add an header with a notice regarding the autogneration of the 'px4_ros_com' urtps_bridge_topics.yaml file
Although it can be modified manually, we are going to recommend the developer to generate it from the PX4-Autopilot side instead
2021-08-12 08:44:53 +02:00
TSC21 c478e2985a microRTPS: simplify the attribution of the RTPS IDs by makiing it automatic
1. The RTPS IDs are now automatically assigned to the topics
2. Only the topics that get defined to be sent or received in the urtps_bridge_topics.yaml (renamed, since now it doesn't contain IDs) receive the IDs
3. Any addition or removal on the urtps_bridge_topics.yaml file might update the topic IDs - this will require that the agent and the client ID list has to be in sync. This will further require a robustification of the way we check the IDs and the message definitions when starting the bridge.
2021-08-12 08:44:53 +02:00
TSC21 f557fbc99f protocol_splitter: add perf counters for the stats so they can be logged 2021-08-12 08:44:53 +02:00
TSC21 5a75277ff1 protocol_splitter: update header length and payload length position
To match the change on the microRTPS message header, which adds the sys ID as the 5th byte of the header
2021-08-12 08:44:53 +02:00
TSC21 ba3dbbd38d microRTPS: send the system ID with the RTPS packet header and remove the need for extra id fields in uORB
This allows that all messages (not only timesync messages) that get received on the same system that sent them do not get parsed. As the microRTPS agent is built currently, this will only happen right now if someone sets the same UDP port to send and receive data, or by manually changing the agent topics (which were always autogenerated).
2021-08-12 08:44:53 +02:00
TSC21 a10dab516c timesync: remove system ID field from the timesync message 2021-08-12 08:44:53 +02:00
TSC21 25dbffe1aa microRTPS: agent: split FMU input from output topics in Pubs/Subs 2021-08-12 08:44:53 +02:00
TSC21 d31b7feb31 microRTPS: agent: publish timesync status 2021-08-12 08:44:53 +02:00
TSC21 a324e5465a timesync: extend timesync_status message with protocol source field and enum 2021-08-12 08:44:53 +02:00
TSC21 a930edf34b init.d-posix: rcS: allow to use a different startup config to the micrortps_client in UDP 2021-08-12 08:44:53 +02:00
TSC21 6d4f65a47a microRTPS: allow timesync using ROS time 2021-08-12 08:44:53 +02:00
TSC21 e762d57222 sitl_run: allow to start required ROS2 plugins with Gazebo when ROS_VERSION is set to 2 2021-08-12 08:44:53 +02:00
Julian Oes cb2b09b80f protocol_splitter: implement with one read buffer
This is an attempt to implement the protocol_splitter with one
read buffer only. The idea is to prevent additional copy
operations from an incoming buffer to the respective protocol buffer.

Right now the benefit is not really there because we are not using a
ringbuffer and have to shift data around quite a bit.

We also try to parse and copy data to the reader immediately without
doing a read from the device which potentially takes 100ms.

We further use a timeout mechanism to prevent starvation if one reader
disconnects and the buffer would fill up from unread data.
2021-08-12 08:44:53 +02:00
Julian Oes 0c9fefce32 urtps: rectify comment 2021-08-12 08:44:53 +02:00
Julian Oes 31b1241de8 uorb_microcdr: collect all messages
Without this we are potentially too slow to collect them all which can
lead to the buffer in protocol_splitter to overflow and be reset.
2021-08-12 08:44:53 +02:00
Daniel Agar 326c4f95ce ROMFS cmake remove directory VERBATIM 2021-08-11 13:29:14 -04:00
Beat Küng 61e3ec53b0 mixer_module: check for motor test after topic update
Otherwise if a module restricts the update rate via setMaxTopicUpdateRate()
and then motor_test is used, the module might run faster than expected.
2021-08-11 12:06:32 -04:00
Claudio Micheli a6d88cad18 mavlink_main: add ESC_INFO & ESC_STATUS to onboard_lowbandwith configuration
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-08-11 17:20:08 +02:00
Oleg Evseev a93f8dade4 mavlink: receiver fix geo include 2021-08-10 08:18:28 -04:00
PX4 BuildBot e9a21ee911 Update submodule devices to latest Mon Aug 9 00:39:11 UTC 2021
- devices in PX4/Firmware (48b31124a4cdab9f7f91dba14649206f41c30c97): https://github.com/PX4/PX4-GPSDrivers/commit/f51267815db3331723b880ab20afc5a67a87c22b
    - devices current upstream: https://github.com/PX4/PX4-GPSDrivers/commit/6815e1d3b294cd6ea583294ebadf191321e4beba
    - Changes: https://github.com/PX4/PX4-GPSDrivers/compare/f51267815db3331723b880ab20afc5a67a87c22b...6815e1d3b294cd6ea583294ebadf191321e4beba

    6815e1d 2021-08-04 zhangft - femtomes: add UAVSTATUS and fall back to 10Hz rate if 20Hz not supported
2021-08-08 22:31:14 -04:00
Daniel Agar c8366e736e ROMFS: update ATL Mantis EDU optical flow defaults 2021-08-08 14:21:28 -04:00
Daniel Agar 66cfacaec2 boards: px4_fmu-v6x_test disable attitude_estimator_q to save flash 2021-08-08 14:20:58 -04:00
Daniel Agar 2ad448a4e8 boards: holybro_pix32v5 remove unused test build 2021-08-08 14:20:58 -04:00
alexklimaj a904bb506f Fix afbrs50 high cpu load from switching 2021-08-08 11:42:30 -04:00
bresch 741f9c6d1a Commander: change attitude quaternion check to avoid numerical issues 2021-08-08 11:41:23 -04:00
Daniel Agar fb4ac0f08c ekf2: remove redundant IMU vibration metrics
- consume IMU vibration metrics from vehicle_imu_status
2021-08-08 06:26:03 -07:00
Daniel Agar a397004bf8 adis16448: add additional delay after transfer in case of back to back transcations
- add verified register read method
2021-08-08 06:25:16 -07:00
Julian Oes 0033c0fc51 navigator: fix param description 2021-08-05 15:18:55 +02:00
bresch 01d0b8800e commander: report GNSS yaw fault to user 2021-08-05 11:10:02 +02:00
bresch 44219e9f45 EKF: add GNSS yaw to emergency yaw fallback test 2021-08-05 11:10:02 +02:00
bresch 11cd51c132 EKF: allow emergency reset in GNSS yaw and EV yaw aiding modes 2021-08-05 11:10:02 +02:00
bresch 4ebfbc6eab GNSS yaw: use NIS sequence to detect bias in state
A constant large value in the (signed) normalized innovation test ratio is a sign
of bias in the state estimate. This metric can be used to trigger a
covariance boost or reset
2021-08-05 11:10:02 +02:00
bresch 3fe04a91f6 GNSS yaw: add observation jump on ground
Some receivers are initializing to some heading and then resetting to
the correct one after a couple of seconds. EKF2 should detect that and
reset to the new value
2021-08-05 11:10:02 +02:00
bresch 30c7a596af GNSS yaw: allow unlimited resets on ground 2021-08-05 11:10:02 +02:00
bresch e90e1c7e2a GNSS yaw: use dedicated observation noise 2021-08-05 11:10:02 +02:00
romain-chiap 718e5b5b5d sih: add fixed-wing support 2021-08-05 09:16:14 +02:00
PX4 BuildBot 6060ec8c9a Update submodule matrix to latest Thu Aug 5 00:39:10 UTC 2021
- matrix in PX4/Firmware (6be58a88905d2ef63bc3aaa1a01c82346c181742): https://github.com/PX4/PX4-Matrix/commit/b8568a89db8455d0ab2e2e391e2149ba2e5e10dd
    - matrix current upstream: https://github.com/PX4/PX4-Matrix/commit/3d1c9b988dff1d95f36cdd1df3e84d7a2365501c
    - Changes: https://github.com/PX4/PX4-Matrix/compare/b8568a89db8455d0ab2e2e391e2149ba2e5e10dd...3d1c9b988dff1d95f36cdd1df3e84d7a2365501c

    3d1c9b9 2021-08-05 romain-chiap - quaternion exponential (#164)
2021-08-04 21:59:01 -04:00
romain-chiap 3d1c9b988d quaternion exponential (#164) 2021-08-04 19:04:57 -04:00
Daniel Agar be2f65be35 drives/tap_esc: refactor to use OutputModuleInterface 2021-08-04 17:15:24 -04:00
Daniel Agar 2e02ad7c4e atl_mantis-edu front and rear status LEDS 2021-08-04 17:15:24 -04:00
Daniel Agar 89b920333b boards: px4_fmu-v2_multicopter disable gyro_calibration module to save flash 2021-08-04 17:15:24 -04:00
Daniel Agar fb3b7a4649 mavlink: receiver handle RC_CHANNELS if from MAV_COMP_ID_SYSTEM_CONTROL 2021-08-04 17:15:24 -04:00
Daniel Agar 2b96e330a5 boards: atl_mantis-edu add bootloader 2021-08-04 17:15:24 -04:00
Daniel Agar 5d06ef8256 drivers/barometer/mpc2520: MaierTek MPC2520 barometer support
- used in the Advanced Technolgy Labs (ATL) Mantis EDU
2021-08-04 17:15:24 -04:00
Daniel Agar 6ab8153f32 drivers/tap_esc: Advanced Technology Labs (ATL) Mantis EDU ESC support
Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-08-04 17:15:24 -04:00
Daniel Agar e900f2ea54 boards: Advanced Technology Labs (ATL) Mantis EDU support and airfarme (SYS_AUTOSTART 4061)
Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-08-04 17:15:24 -04:00
David Sidrane 8f64f7ce90 uavcan_1:Fixed hardfault on stop 2021-08-04 10:40:34 -04:00
Hamish Willee 6aa4e12b5f Typo in LTEST_MEAS_UNC docs 2021-08-04 08:01:39 +02:00
Hamish Willee f5dd0edc9f LTEST_VEL_UNC_IN typo in docs 2021-08-04 08:01:39 +02:00
Hamish Willee b157bc407e Typo in docs for LPE_VIS_DELAY 2021-08-04 08:01:39 +02:00
Hamish Willee b82464f0ef Parameter typo PLD_MAX_SRCH 2021-08-04 08:01:39 +02:00
Beat Küng ca454c93d1 component_information: add debug instrumentation for FileNotFoundError exception
The following exception occurs in some rare cases (but only with make build: NO_NINJA_BUILD=1 px4_sitl_default):
Traceback (most recent call last):
  File "/__w/PX4-Autopilot/PX4-Autopilot/src/lib/component_information/generate_component_general.py", line 79, in <module>
    save_compressed(filename)
  File "/__w/PX4-Autopilot/PX4-Autopilot/src/lib/component_information/generate_component_general.py", line 33, in save_compressed
    with open(filename, 'r') as content_file:
FileNotFoundError: [Errno 2] No such file or directory: '/__w/PX4-Autopilot/PX4-Autopilot/build/px4_sitl_default/component_general.json'
make[3]: *** [src/lib/component_information/CMakeFiles/component_information_header.dir/build.make:68: component_general.json] Error 1
2021-08-03 10:36:25 +02:00
Beat Küng b9e2d2c0f2 4100_tiltquadrotor: remove LED_RGB_MAXBRT 2021-08-03 10:36:25 +02:00
Beat Küng 95789252d0 airframes: minor param cleanups (remove commented 'param set') 2021-08-03 10:36:25 +02:00
Beat Küng 0e1f3a2d62 px4_add_board: infer VENDOR, MODEL & LABEL from cmake file name 2021-08-03 10:36:25 +02:00
Beat Küng 86dc35022a generate_msg_docs.py: simplify logic a bit 2021-08-03 07:54:41 +02:00
Beat Küng 45ed1c5b5d uorb_graph: improve module dependency search 2021-08-03 07:54:41 +02:00
Beat Küng 91cae70097 uorb_graph: fix module scope logic 2021-08-03 07:54:41 +02:00
Hamish Willee bf59fd84ba Add simple comment parser 2021-08-03 07:54:41 +02:00
Beat Küng fccb56d76b Jenkinsfile: deploy uorb graph 2021-08-03 07:54:41 +02:00
Beat Küng 2320477839 uorb graph: some minor fixes, add full graph w/o mavlink 2021-08-03 07:54:41 +02:00
Beat Küng da6275e43a msg: add script structure to generate docs from .msg files 2021-08-03 07:54:41 +02:00
InspiredBrandon b2def13d6f NCP5623c RGB LED driver I2C address auto detect
* Enables the LED on mRobotics GPS receivers
 * Probes I2C addresses and sets colors accordingly
2021-08-02 20:36:09 -04:00
Daniel Agar 93aa6e3f78 ekf2: baro bias publish minor cleanup
- naming consistency (estimator prefix as "namespace")
 - only publish if baro is available and bias is changing as a small logging optimization
 - avoid unnecessary copying (get const reference to status directly)
 - trivial code style fixes
2021-08-02 13:59:38 -04:00
Daniel Agar d997a8d308 mavlink: receiver fix HIL_STATE_QUATERNION map projection init
- fixes https://github.com/PX4/PX4-Autopilot/issues/17977
2021-08-02 09:59:09 -04:00
David Jablonski 9c36236565 ekf2: increase stack size to 3600 2021-08-02 09:47:38 -04:00
Hamish Willee 219c9cf4b7 More specific airframe css 2021-08-02 08:26:46 +02:00
Hyungsub 1e2877cedf Tune down solo roll rate controller 2021-08-02 07:51:13 +02:00
murata e33d2141ec px4io: Changing the timeout time description (NFC) 2021-08-01 20:27:25 -04:00
PX4 BuildBot e01ae95768 Update submodule jMAVSim to latest Sun Aug 1 16:12:33 UTC 2021
- jMAVSim in PX4/Firmware (8261aa1f0b): https://github.com/PX4/jMAVSim/commit/0a816d8100e9860a031ccfccfb9941bcd6eedc81
    - jMAVSim current upstream: https://github.com/PX4/jMAVSim/commit/0a5375a70689aac53143768de9033034f3636022
    - Changes: https://github.com/PX4/jMAVSim/compare/0a816d8100e9860a031ccfccfb9941bcd6eedc81...0a5375a70689aac53143768de9033034f3636022

    0a5375a 2021-07-24 Romain Chiappinelli - vehilce model selectio
5f51d98 2021-07-19 Romain Chiappinelli - added cessna visual model
2021-08-01 17:03:03 -04:00
Daniel Agar 1c48a81993 Jenkins fix compile job
- this was broken during the Snapdragon purge (#17921) that happened to correspond with the primary Jenkins master (ci.px4.io) being down.
2021-08-01 17:02:47 -04:00
PX4 BuildBot 4ca6e42c47 Update submodule sitl_gazebo to latest Sun Aug 1 16:12:39 UTC 2021
- sitl_gazebo in PX4/Firmware (d6eb3b0cb90d4988409b1aaf3e10662ecc361aac): https://github.com/PX4/PX4-SITL_gazebo/commit/b6be00542be4d77f436c66ee48c22ca911601a2a
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/7fda4d311a9daff4bec4f2fe83e63fde0b8f04b0
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/b6be00542be4d77f436c66ee48c22ca911601a2a...7fda4d311a9daff4bec4f2fe83e63fde0b8f04b0

    7fda4d3 2021-07-27 Jaeyoung-Lim - Reduce yaw authority for tecpod
6b87853 2021-07-27 Jaeyoung-Lim - Reduce yaw authority on plane
7505aee 2021-07-18 Jaeyoung-Lim - Add glider model
32893bc 2021-07-14 Jaeyoung-Lim - Add control allocation module for the typhoon h480
55e479a 2021-06-12 TSC21 - gazebo_mavlink_interface: get latest occurrence of '::' to obtain the sensor name
f650396 2021-07-13 Jaeyoung-Lim - Add Believer fixedwing model
2021-08-01 13:55:15 -04:00
PX4 BuildBot 8963c403c6 Update submodule v2.0 to latest Sun Aug 1 16:12:42 UTC 2021
- v2.0 in PX4/Firmware (c82a4412bd255753bf802b90d2e9bd459ca626aa): https://github.com/mavlink/c_library_v2/commit/94963ac650f39709df20e4fc03c1a9ed8f740b35
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/5095bcd856537330e66e6fc833a1c7bf689bf5ed
    - Changes: https://github.com/mavlink/c_library_v2/compare/94963ac650f39709df20e4fc03c1a9ed8f740b35...5095bcd856537330e66e6fc833a1c7bf689bf5ed

    5095bcd8 2021-07-29 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/b030a760e8c350aa078542036bd9e8f39a494ac1
f57b9ff5 2021-07-29 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/2cc1a22e30e0f8ef4e119424e968a82877636c67
a3b97841 2021-07-29 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/d484de4eb18906a94104ca56026391304be31aa1
f66b31fc 2021-07-15 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/a764308f30903e269090c8cda87d92f46d318b3e
2021-08-01 13:54:18 -04:00
Daniel Agar 54918f650b Update world_magnetic_model to latest Sun Aug 1 16:57:37 UTC 2021 2021-08-01 13:53:53 -04:00
Daniel Agar 8261aa1f0b boards: cuav_nora_test disable local_position_estimator to save flash 2021-07-31 20:59:45 -04:00
Igor Mišić af2247bd94 mavlink: use dynamic camera comp id instead of hardcoded value 2021-07-31 12:41:49 -04:00
David Sidrane 6379f2b032 px4_fmu-v2:Use NO_HELP option to save flash 2021-07-30 22:35:02 -04:00
David Sidrane ced366b74e Add Option NO_HELP for CONSTRAINED_FLASH system 2021-07-30 22:35:02 -04:00
Dima Ponomarev d08d0443bc Add internal combustion engine status uavcan bridge and mavlink EFI_STATUS stream 2021-07-30 22:31:43 -04:00
Sam Chamberlin 7764183f89 Broadcom AFBR-S50LV85D Distance Sensor Driver: Automatic Range Mode Switching 2021-07-30 22:27:27 -04:00
bresch 1016600ded Revert "mc_pos_control: omit initial warning"
This reverts commit 446598d003.

The first warning was due to a race condition that is fixed by the previous commit;
don't omit the first warning anymore
2021-07-30 21:39:18 -04:00
bresch e7a2c1d88e MCPosControl: fix invalid setpoint race condition
Only modify the _setpoint for takeoff when there is a new uORB message
to avoid a race condition where both vel_sp(2) and accel_sp(2) can be
NAN at the same time.
2021-07-30 21:39:18 -04:00
Silvan Fuhrer 44f12acafe mavsdk tests: remove hover missions for VTOL
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-07-30 21:27:53 -04:00
Daniel Agar 713a1d08a3 sensors: add accel/gyro current priority to sensors_status_imu
- later the sensor priorities (user configurable) can be factored into the estimator selection criteria
2021-07-30 21:20:01 -04:00
Daniel Agar b33fdf704b boards: px4 fmu-v2/v3 swap external SPI chip select order
- fixes https://github.com/PX4/PX4-Autopilot/issues/17858
2021-07-30 09:28:04 -04:00
Ramon Roche 607be59fd5 Github: Issue Template update link to Slack invite 2021-07-28 07:39:20 +02:00
Ramon Roche 5918fe6a37 README: update slack invite and badge 2021-07-28 07:39:20 +02:00
leonardosimovic e6166dfc76 AirspeedSelector: Improve wording of sensor failure message 2021-07-28 07:37:38 +02:00
bresch 521b9f5dcc control: do not constantly ask for mag reset if yaw not aligned
This also prevents triggering the `_mag_yaw_reset_req` flag in magless
mode; preventing the GNSS fustion from starting.
2021-07-27 13:34:53 +02:00
bresch 639e0a39cf EKF2: add yaw estimator alignment test 2021-07-27 13:34:53 +02:00
Mathieu Bresciani 17ebcd2456 mag_control: fuse fake heading during leveling fine alignment (#17964)
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-07-27 11:50:50 +02:00
Daniel Agar f2ae8ae814 sensors/vehicle_imu: vibration metrics use acceleration and angular velocity
- this avoids any jitter in the integration timespan from impacting the vibration metrics
 - vehicle_imu_status vibration metrics are not consumed by anything
(yet), so changing the scaling of the metric shouldn't matter
2021-07-26 13:55:47 -04:00
Daniel Agar e01b631465 ekf2: change indication test limit float precision to minimize false positives 2021-07-26 13:54:36 -04:00
Daniel Agar e84c6664bb ROMFS: update airframes/4901_crazyflie21 legacy battery parameter 2021-07-23 19:58:38 -04:00
Daniel Agar 6f4111e073 ROMFS: update airframes/17003_TF-G2 legacy battery parameter 2021-07-23 19:58:38 -04:00
Daniel Agar e9f84ba708 keep minimal legacy battery parameters for older QGC usability
- BAT_V_EMPTY, BAT_V_CHARGED, BAT_V_LOAD_DROP, BAT_N_CELLS
2021-07-23 15:07:53 -04:00
Daniel Agar fe1eb8cd62 cmake cleanup jlink flashing helpers 2021-07-23 15:07:25 -04:00
Daniel Agar 7846771c68 sensors: populate sensors_status_imu healthy flags even in multi-EKF mode 2021-07-23 11:17:08 -04:00
Julian Oes af50e25647 mavsdk_tests: update to MAVSDK v0.41.0
This required replacing some of the methods which had been deprecated
and now removed.
2021-07-23 09:05:31 +02:00
Julian Oes 11480cdbc7 mavlink: fix offboard velocity input
This reverts the behavior for offboard velocity setpoint.

Back in v1.11, the velocity input in NED_BODY was assumed to be in the
world frame but rotated by yaw to the vehicle frame. With the current
state the frame is completely fixed to the body. While this might be
technically correct, it doesn't seem much intuitive for multicopters
and breaks the MAVSDK offboard velocity API.

So as an example, with a velocity setpoint of 5 m/s forward, the drone
would in
- v1.11: fly forward with 5 m/s
- v1.12: start to fly forward by pitching down but then descend rapidly
  as the forward velocity would translate to a setpoint in Z into the
  ground as it is pitched down.

This commit restores the behavior to what we had previously.
2021-07-22 09:40:29 +02:00
alessandro bd17653383 Fix template_module header
- SubscriptionInterval.hpp includes Subscription.hpp, but not vice versa
- The time literal 1_s is defined in the namespace time_literals
2021-07-21 09:44:09 -04:00
Oleg Evseev 440449b85f mavlink: use explicit routing for message forwarding
Forward message to other mavlink channels only if it is broadcast or the target component was seen on this link before (at least one message was received)
2021-07-21 10:39:14 +02:00
Daniel Agar b1eb762753 drivers/imu: set sample timestamp from interrupt (if available)
- minor scheduling improvements
   - if expected number of samples larger than expected adjust timestamp sample and save sample for next iteration
   - when scheduling via data ready interrupt (with no FIFO watermark) count continuously without clearing
2021-07-21 02:19:11 -04:00
honglang 6ac6917430 boards: CUAV-x7pro: reoder brick to fixed cuav hvpm cannot detect voltage 2021-07-20 22:02:03 -07:00
Daniel Agar 949fef1f3b boards: px4_fmu-v5_optimized disable optical_flow drivers to save flash 2021-07-20 21:43:48 -04:00
David Sidrane d6ee418cdf nxp_fmuk66:Add Serial RX DMA on Console 2021-07-20 18:22:35 -04:00
David Sidrane 0709a9bb1c NuttX With Kinetis LPUART DMA backport 2021-07-20 18:22:35 -04:00
DonLakeFlyer 0af1716864 Fix incorrect max for INT32 2021-07-20 16:29:39 -04:00
David Sidrane 78ecad6170 Revert "nxp_fmuk66-v3:DMA Poll not needed"
This reverts commit 962f02220a.
2021-07-20 07:52:10 -07:00
David Sidrane 89dff2d31c Revert "nxp_fmuk66-e:DMA Poll not needed"
This reverts commit 39d684958d.
2021-07-20 07:52:10 -07:00
David Sidrane b85a01f4c2 NuttX with Kinetis SerialPoll back in 2021-07-20 07:52:10 -07:00
Kirill Shilov e13884410b heater: added support of inverted IMU heat controller output 2021-07-20 10:37:53 -04:00
TSC21 205d4400eb add baro_bias_estimate to RTPS list 2021-07-20 04:56:33 -07:00
Oleg 8fbbf56c4d microRTPS: fix setting UART communication flags
bitwise not should be used instead of logical not
2021-07-20 12:34:58 +02:00
PX4 BuildBot 34160bb6c9 Update submodule sitl_gazebo to latest Fri Jul 16 12:39:10 UTC 2021
- sitl_gazebo in PX4/Firmware (4a0fa08953): https://github.com/PX4/PX4-SITL_gazebo/commit/1f3f1b1dec5a31c2c400f141fc344f11f68659c9
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/b6be00542be4d77f436c66ee48c22ca911601a2a
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/1f3f1b1dec5a31c2c400f141fc344f11f68659c9...b6be00542be4d77f436c66ee48c22ca911601a2a

    b6be005 2021-07-13 Jaeyoung-Lim - Add iris model for control allocation development
2021-07-19 20:19:28 -04:00
JaeyoungLim 58060b23d9 Add ignition gazebo support for PX4 Software-In-The-Loop simulations
This commit adds SITL support for ignition gazebo. Ignition gazebo is a replacement for the "classic" gazebo for future applications.

The simulation can be run as the following
```
make px4_sitl ignition
```
2021-07-19 19:59:41 -04:00
dagar a8e3c46cdb [AUTO COMMIT] update change indication 2021-07-19 16:53:45 -04:00
Daniel Agar 14274ab071 boards: px4_fmu-v5_optimized disable pwm_input to save flash 2021-07-19 16:53:45 -04:00
bresch 54c7e74de3 EKF: add baro bias estimator using GNSS altitude 2021-07-19 16:53:45 -04:00
Daniel Agar 10f4fc7783 ekf2: don't print distance_sensor selection unless there are multiple options 2021-07-19 12:17:12 -04:00
Daniel Agar 1a222bf06e Tools/HIL/run_nsh_cmd.py handle missing echo, but cmd succeeded 2021-07-19 11:53:54 -04:00
Daniel Agar 87610957a4 flight_mode_manager: pass deltas on estimator reset 2021-07-19 09:34:07 -04:00
Daniel Agar d79eea0c41 Jenkins: HIL flash bootloaders
- add new jlink_upload_bootloader helper target
2021-07-18 23:33:00 -04:00
Daniel Agar 4c59997ff4 Jenkins: HIL attempt to set certain parameters initially
- attempt to minimize issues on heavily loaded debug and stackcheck builds
 - disable systemcmds/bl_update on debug and stackcheck fmu-v5
2021-07-18 21:25:00 -04:00
Daniel Agar 774ad80ba0 systemcmds/tests: split out microbenchmarks and remove obsolete tests
- reorganize Jenkins HIL tests
2021-07-18 18:02:33 -04:00
Daniel Agar 0101934f47 ekf2: multi-EKF instance message INFO -> DEBUG 2021-07-18 18:02:33 -04:00
Daniel Agar 0ad65738db gyro_calibration: reset on any parameter change
- perform fresh calibration once system has settled
2021-07-18 18:02:33 -04:00
Daniel Agar 9ac860ac33 ekf2: test fix double promotion warnings 2021-07-18 15:49:53 -04:00
Daniel Agar 9087ba2259 world_magnietc_model: update to latest and fix code style
- minimize test_geo_lookup.cpp optimization to improve compile times
2021-07-18 15:49:53 -04:00
mcsauder f34862f143 Delete redundant Ekf class member variable constructor initilizations and add missing C++ style initializers to the header file. 2021-07-17 12:24:56 -04:00
Daniel Agar eeb73fdbe6 ekf2: resetting IMU bias message INFO -> DEBUG 2021-07-17 10:57:09 -04:00
Daniel Agar 36dea8487c Jenkins: HIL remove redundant board_adc test 2021-07-17 10:57:09 -04:00
Daniel Agar bc79ea54dc Jenkins: HIL lower quick cal sleep time before checking parameters 2021-07-17 10:57:09 -04:00
Daniel Agar 858a30df21 systemcmds/tests: replace warnx -> PX4_INFO 2021-07-17 10:57:09 -04:00
Daniel Agar 209fde9ff3 Tools/HIL: console print timestamps 2021-07-17 10:57:09 -04:00
Daniel Agar 847b3b5b64 Tools/HIL/nsh_param_set.py bump timeout slightly 2021-07-16 22:18:07 -04:00
Igor Mišić 54c91002cd mavlink_ulog: update ulog_stream message lost errors to perf counter 2021-07-16 21:38:56 -04:00
Beat Küng cfef0c5d5a mavlink_ulog: check for lost ulog_stream ulog messages 2021-07-16 21:38:56 -04:00
Daniel Agar 5a046cae7e Tools/HIL: fix terminal colors (ANSI escape codes) 2021-07-16 21:37:48 -04:00
Daniel Agar f80f0e6c7e Jenkins: HIL set CCACHE_NOHASHDIR and remove obsolete "make sizes" 2021-07-16 21:06:07 -04:00
Daniel Agar cbf6c97682 Jenkins: HIL print dmesg output only on boards with enough memory 2021-07-16 19:33:27 -04:00
Daniel Agar 8c6ade0fc8 Tools/HIL: color output (ERROR, WARN, etc) 2021-07-16 19:33:27 -04:00
Daniel Agar 7f4ffcef93 Jenkins: HIL add separate status for flash constrained boards 2021-07-16 19:33:27 -04:00
Daniel Agar e61d8d6e7e Tools/HIL: add nsh_param_set.py and use on test rack 2021-07-16 19:33:27 -04:00
Daniel Agar ae0438e8f5 Jenkins: HIL no longer tolerate SD failures 2021-07-16 19:33:27 -04:00
Daniel Agar 65745a3676 purge broken qurt support and atlflight boards 2021-07-16 08:53:36 -04:00
Daniel Agar 4a0fa08953 Tools/HIL/run_nsh_cmd.py fail if command failed 2021-07-15 23:29:46 -04:00
Daniel Agar c8e6d93cc0 ekf2: backend apply code style (generated code still exempt) 2021-07-15 21:15:41 -04:00
Daniel Agar 12ad7b17ce Makefile: add all_variants_@ helper target and consolidate github actions builds 2021-07-15 21:09:50 -04:00
Daniel Agar fcf0d3536f NuttX debug jlink scripts minor improvements
- script return non-zero exit if there's a failure
 - upload script look for both gdb-multiarch and arm-none-eabi-gdb
2021-07-15 17:07:51 -04:00
Hamish Willee f70b6fbf0b Fix rendering if name has inch symbol 2021-07-15 17:16:12 +02:00
Hamish Willee 72d08fe915 improve airframe generated output 2021-07-15 17:16:12 +02:00
Daniel Agar 2cf66a5d8f ekf2: move EKF out of ecl 2021-07-15 10:38:24 -04:00
Daniel Agar 883624d915 lib/geo: move from ecl 2021-07-15 10:38:24 -04:00
Daniel Agar 6f6d3f98a6 wind_estimator: move from ecl and consolidate airspeed selector 2021-07-15 10:38:24 -04:00
Daniel Agar fedf8f0266 world_magnetic_model: move from ecl 2021-07-15 10:38:24 -04:00
Daniel Agar b5430c22c4 AlphaFilter: move from ecl -> mathlib 2021-07-15 10:38:24 -04:00
Daniel Agar 645fb2ff8c Update submodule mavlink v2.0 to latest Thu Jul 15 00:38:28 UTC 2021 2021-07-14 21:54:54 -04:00
Daniel Agar 7f2acb6d59 consume PX4 ecl submodule and preserve all history 2021-07-14 07:00:52 -04:00
Blake McHale 4a436f1ac9 Add missing receive port arg to micrortps_client start 2021-07-13 21:42:10 -04:00
Daniel Agar 18dcec43d3 github actions: add standalone ecl builds and testing 2021-07-13 19:01:19 -04:00
Daniel Agar ad11927661 ROMFS: delete redundant wing mixers
- these are nearly identical with slightly different scaling and haven't been tested for years
2021-07-13 21:12:11 +02:00
Oleg a8bf8d42db sensors: add include for sensor_baro topic 2021-07-13 14:18:31 -04:00
Daniel Agar 06cd1c79dd logger: limit distance_sensor to 2 instances 2021-07-13 14:11:42 -04:00
Daniel Agar 3924f0ef30 ROMFS: delete Hobbyking Micro PCB 2021-07-13 14:07:45 -04:00
Jaeyoung-Lim db1dc1c9a1 Add airframe configuration and make target for believer
This commit adds an airframe configuration and make target for believer
2021-07-13 18:04:52 +02:00
Daniel Agar dbaed99626 cmake remove git_ecl target 2021-07-13 10:03:06 -04:00
Daniel Agar a5f7406211 Merge entire PX4/ECL submodule and history into PX4-Autopilot 2021-07-13 10:01:09 -04:00
Daniel Agar cd1e04d034 delete ecl submodule 2021-07-13 09:54:02 -04:00
bresch 8a0510d52e update change indicator 2021-07-13 10:49:32 +02:00
bresch 97485f131a update covariance prediction 2021-07-13 10:49:32 +02:00
bresch 2d8e183aa3 update EKF derivation auto-generated code 2021-07-13 10:49:32 +02:00
bresch dccd662dfe EKF python derivation: use unit quaternion constraint
This produces a more numerically stable and simpler derivation as it
already contains the unit quaternion constraint
2021-07-13 10:49:32 +02:00
bresch 0bebe1a656 Add gyro bias initialization unit test 2021-07-13 10:49:32 +02:00
bresch 057a95a954 EKF_init: check for accel bias amplitude 2021-07-13 10:49:32 +02:00
bresch 9f2d1f9e27 CI: update container version 2021-07-13 10:29:05 +02:00
Oleg 76b34132a5 mavlink: fix incorrect rejection of forwarded alien commands 2021-07-12 10:34:43 +02:00
Daniel Agar d8704cee67 platforms: px4 log build string then print (fputs) 2021-07-10 13:14:49 -04:00
Oleg 76dedfec5d mavlink: optimize message forwarding 2021-07-10 12:04:17 -04:00
DanAbara 64448e17ca Update README.md to fix broken crazyflie2.0 link 2021-07-10 12:03:30 -04:00
Daniel Agar 552ec4a37c Jenkins: hardware test rack remove Holybro Durandal
- IMUs on this particular unit no longer function
2021-07-10 12:02:45 -04:00
Daniel Agar 62144c6b6b optical_flow/paw3902: minor improvements
- configure a backup schedule when using motion interrupt otherwise the
sensor will stop publishing entirely in the dark
 - as a precaution issue full reset if sensor is stuck in a bad state
(no vaid data for an extended period)
 - update light mode change criteria to match datasheet exactly
2021-07-10 09:46:56 -04:00
David Sidrane f5e5794930 platforms/common:SPI - fix hang on bords supporting BOARD_HAS_BUS_MANIFEST 2021-07-10 11:37:29 +02:00
Daniel Agar d01cec192f Makefile: remove check_px4_fmu-v2_lpe 2021-07-09 11:54:06 -04:00
Florian Achermann d4ee5a52c9 Adjust lower bound for CAL_AIR_TUBED_MM to 1.5 mm
Below 1.5 mm the tube pressure drow compensation will result in unrealistic compensation factors causing the measured airspeed to be too high.
In addition sensirion recommends a diameter of 1.8 mm or larger for the tubes.
2021-07-09 16:10:21 +02:00
TSC21 e39e3b3418 events interface: chance uORB 'sequence' to 'event_sequence'
The reason is that sequence is an IDL reserved keyword, which results on failure when parsing with FastRTPSGen.
2021-07-09 13:24:13 +02:00
Beat Küng 5a370bf575 CI: update remaining container to 2021-05-04 2021-07-09 10:51:47 +02:00
Paul Riseborough 223ca11aed ekf2: update drag fusion parameter descriptions 2021-07-08 22:19:52 -04:00
Paul Riseborough 2d6363e0ef ekf2: Add parameter for propeller momentum drag 2021-07-08 22:19:52 -04:00
Paul Riseborough 909326e9d8 ecl: use latest version with momentum drag fusion 2021-07-08 22:19:52 -04:00
Daniel Agar c5b1fe86ca delete deprecated BAT_* parameters 2021-07-08 22:19:12 -04:00
PX4 BuildBot 19bc1f9d02 Update submodule sitl_gazebo to latest Fri Jul 9 00:39:54 UTC 2021
- sitl_gazebo in PX4/Firmware (7144566afe): https://github.com/PX4/PX4-SITL_gazebo/commit/822050a7ab6fd87972e59f16312f451bce217a56
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/1f3f1b1dec5a31c2c400f141fc344f11f68659c9
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/822050a7ab6fd87972e59f16312f451bce217a56...1f3f1b1dec5a31c2c400f141fc344f11f68659c9

    1f3f1b1 2021-06-18 Jonas Vautherin - Add plugin allowing to draw a force (e.g. liftdrag) (#771)
2021-07-08 21:56:36 -04:00
Beat Küng 7144566afe metadata.cmake: ensure events directory exists & add px4 enums 2021-07-08 16:29:37 -04:00
Beat Küng 6938b1710a fix github deploy_all.yml: explicitly call events_json
Some targets don't build it (e.g. ark can bootloader)
2021-07-08 16:29:37 -04:00
Daniel Agar 23688d8234 monocypher submodule point to px4 branch 2021-07-08 13:54:34 -04:00
Daniel Agar bcfed93c57 github actions: fix airframe_metadata 2021-07-08 13:11:53 -04:00
Beat Küng e644036325 drivers: use updated I2C SPI driver interface 2021-07-08 12:59:35 -04:00
Beat Küng c5aef9d512 i2c_spi_buses: add support for multiple instances of the same device on a bus
This also simplifies the API a bit, since we anyway have to change the
drivers to pass additional information (the bus device index).

The orientation flag is merged with the rotation.
2021-07-08 12:59:35 -04:00
Daniel Agar e4983ab88c px4_platform_common: atomic support larger types with critical sections (on NuttX) 2021-07-08 10:56:25 -04:00
Beat Küng 32fe63916d mixers: exclude FX79.main.mix from px4_fmu-v2 2021-07-08 10:07:52 +02:00
Igor Mišić 376450ccf0 navigator: reduce traffic alert messages 2021-07-08 07:28:38 +02:00
Sam Chamberlin 496e3fe2e0 afbr-s50: added gate for processing distance measurements
updating variable naming convention

publish data when measurements are invalid, just set them to zero

add quality to distance measurements
2021-07-07 21:40:29 -04:00
Beat Küng dfd6999643 px4/fmu-v5: disable dumpfile & motor_ramp commands in optimized.cmake
Reduce flash
2021-07-07 21:38:09 -04:00
Beat Küng 5670db033d ark/can-gps: add EXTERNAL_METADATA
It has no mavlink, so no use in adding the metadata in the first place.
2021-07-07 21:38:09 -04:00
Beat Küng d9aec564f3 px_process_events.py: canonicalize + remove duplicate source files 2021-07-07 21:38:09 -04:00
Beat Küng 7f2bab9b0f px4/fmu-v6x: remove some modules to reduce flash 2021-07-07 21:38:09 -04:00
Beat Küng d30720c960 airframes: exclude some mixers + airframes (HIL, vtol) from fmu-v2
To reduce flash
2021-07-07 21:38:09 -04:00
Beat Küng e3972d563a cmake: ensure generated source files exist before extracting events
Only needed for Makefile-based builds:
gmake[3]: *** No rule to make target 'src/modules/flight_mode_manager/FlightTasks_generated.hpp', needed by 'events/px4.json'.  Stop.
2021-07-07 21:38:09 -04:00
Beat Küng b12b884f4c ci: update container version to 2021-05-04 2021-07-07 21:38:09 -04:00
Beat Küng c6eccd4518 requirements.txt: add jsonschema (required for events json validation) 2021-07-07 21:38:09 -04:00
Beat Küng 594f47c9f8 mission: switch to events 2021-07-07 21:38:09 -04:00
Beat Küng 38ee923658 px4io: switch to events 2021-07-07 21:38:09 -04:00
Beat Küng 7bb123c65e voted_sensors_update: switch to events 2021-07-07 21:38:09 -04:00
Beat Küng 6d26cabdbb github ci: deploy airframes metadata to s3 2021-07-07 21:38:09 -04:00
Beat Küng ab701ae502 rtl: switch to events 2021-07-07 21:38:09 -04:00
Beat Küng 59f359f7dc events: add custom (px4-specific) enums json file 2021-07-07 21:38:09 -04:00
Beat Küng 14d3582d38 events parser: make '/* EVENT' optional, but prevent 'using namespace events'
Allows for more compact code for very simple events w/o description
2021-07-07 21:38:09 -04:00
Beat Küng e1852a7a9a github ci: deploy events metadata 2021-07-07 21:38:09 -04:00
Beat Küng 60850fa528 metadata: add extract_events target
This will collect the events from the whole source tree
2021-07-07 21:38:09 -04:00
Beat Küng 38f3b8d356 mavlink & system: add events interface
- sending protocol
- uorb event message & template methods for argument packing
- libevents submodule to send common events and handle json files
- cmake maintains a list of all (PX4) source files for the current build
  (PX4 modules + libs), which is used to extract event metadata and
  generate a json file
2021-07-07 21:38:09 -04:00
Beat Küng 7c5838116a Tools: add parser to extract event definitions in source & generate json output
Example definition:
			/* EVENT
			 * @description
			 * test description
			 * @arg1: test
			 */
			events::send<uint8_t>(events::ID("test_event"),
					"test message", events::Log::Error, 0);
2021-07-07 21:38:09 -04:00
mcsauder fef2c43395 Modify occurrences of control_mode to vehicle_control_mode in MulticopterPositionControl.cpp/hpp to reflect the existing naming convention in the files. 2021-07-06 22:02:15 -04:00
Daniel Agar 1ee3484827 drivers/gps: close port if configure fails
- open if necessary at beginning of each iteration
2021-07-06 22:01:24 -04:00
JacobCrabill 3143756d97 uavcan_v1: Cleanup _uavcan_subs in SubMgr
Remove hard-coding of PX4 param names - use subject name and instance
instead

Also cleanup duplicates of CANARD_PORT_ID_UNSET/MAX vars
2021-07-06 22:00:07 -04:00
JacobCrabill 8f55c960b6 uavcan_v1: Change '_PID' params to '_SUB' for clarity 2021-07-06 22:00:07 -04:00
JacobCrabill 10019bbccc fmu-v5_uavcanv1: Increase CAN FIFOSIZE to 32 2021-07-06 22:00:07 -04:00
JacobCrabill fce809841f uavcan_v1: Revert HeapSize to 8192 2021-07-06 22:00:07 -04:00
JacobCrabill a644cf19c5 uavcan_v1: Update SubscriptionManager
Make _uavcan_subs struct 'const' again
Refactor updateDynamicSubscriptions()
Add getSubjectName(), getInstance() to BaseSubscriber class
2021-07-06 22:00:07 -04:00
JacobCrabill ab46b8026c uavcan_v1: Don't re-subscribe to fixed port ID subscribers 2021-07-06 22:00:07 -04:00
JacobCrabill a99b657f03 uavcan_v1: Fix SubscriptionManager dynamic update 2021-07-06 22:00:07 -04:00
JacobCrabill db460daf46 uavcan_v1: Bugfix: pop timed-out transfers from tx queue 2021-07-06 22:00:07 -04:00
JacobCrabill c9f743049b uavcan_v1: Increase _uavcan_heap size 2021-07-06 22:00:07 -04:00
JacobCrabill 4ba1f966e5 uavcan_v1: Add update and print support to SubscriptionManager 2021-07-06 22:00:07 -04:00
JacobCrabill 74d0f46279 uavcan_v1: Publisher: Fix port_id update 2021-07-06 22:00:07 -04:00
Daniel Agar 1b5e65df04 gyro_fft: change default length 1024 -> 512 to decrease latency
- change default FFT length (1024 -> 512)
      - this doubles the update rate because half the number of samples are required for each
 - decrease number of peaks (4 -> 3)
      - so far 3 seems to be sufficient on most vehicles
 - increase median filter window (3 -> 5)
 - decrease SNR requirement (likely needs to be configurable)
2021-07-06 21:54:18 -04:00
Daniel Agar ca4932cfc0 EKF: initialize vertical position and velocity variables
- otherwise checkVerticalAccelerationHealth() can fail if GPS or EV
aren't available to correctly set vertical velocity fusion time and
innovation ratio
2021-07-06 17:11:16 -04:00
Oleg Evseev f296a41737 cdev: fixes hardfaults when device get disconnected (#17846)
check if inode is not unlinked before use
2021-07-06 12:35:47 -04:00
Daniel Agar a5ee28883a gyro_fft: track FFT peaks and median filter frequency 2021-07-06 12:32:25 -04:00
alexklimaj 72389c2306 Increase hp work priority. Turn on SPI2 DMA for AFBR. 2021-07-06 11:35:01 -04:00
Paul Riseborough 0c15624a0c EKF: Fix clang-tidy complaint 2021-07-06 15:20:39 +02:00
Daniel Agar 9524e8ec03 drivers/px4io: mirror PWM_MAIN_OUT support 2021-07-05 21:23:04 -04:00
Daniel Agar 6dd0a58302 [at24c] free perf counter if px4_at24c_initialize fails
- add driver prefix to perf counter naming
2021-07-05 21:22:08 -04:00
murata c9b5e488f5 NCP5623C: Change the class name to the device name 2021-07-04 14:22:20 -04:00
David Sidrane 9dee09b81b NuttX and Apps updated w/ALL backports 2021-07-02 09:08:10 -07:00
David Sidrane 962f02220a nxp_fmuk66-v3:DMA Poll not needed 2021-07-02 09:08:10 -07:00
David Sidrane 39d684958d nxp_fmuk66-e:DMA Poll not needed 2021-07-02 09:08:10 -07:00
David Sidrane 2a7c95d7ac nxp_fmuk66-v3:Use eDMA 2021-07-02 09:08:10 -07:00
David Sidrane cd8182ba3c nxp_fmuk66-e:Use SPI DMA 2021-07-02 09:08:10 -07:00
David Sidrane 5ea4b7dc9e NuttX with Kinetis eDMA (SPI, Serial) Backports 2021-07-02 09:08:10 -07:00
Matthias Grob acf848ba99 PWM: Draft implementation to respect PWM_OUT when loading defaults 2021-07-02 12:48:04 +02:00
Beat Küng 50b0f0e392 iridiumsbd: disable module until everything is fixed
There seem to be more issues in combination with MAVLink.
2021-07-02 12:45:18 +02:00
Beat Küng fcf3bb5af9 fix iridiumsbd: use ModuleBase
fixes hardfaults, e.g. when device not connected
2021-07-02 12:45:18 +02:00
Beat Küng 9b7170551c ModuleBase: allow configurable timeout for wait_until_running() 2021-07-02 12:45:18 +02:00
Peter van der Perk cf524cd2c9 [UAVCANv1] Added uORB actuator_outputs publisher 2021-07-02 00:58:38 -04:00
Beat Küng 6a44fc7cac fix vtol_att_control: set _current_max_pwm_values to current values on init 2021-07-02 00:53:42 -04:00
Beat Küng 894ecac8da px4io: ensure pwm params are loaded before any other module starts
The vtol module will read them later on.
2021-07-02 00:53:42 -04:00
alexklimaj 962c2cc960 Add fmuv6x to vscode cmake variants 2021-07-01 20:14:05 -04:00
David Sidrane 3e00450052 NuttX with SDMMC BACKPORT 2021-07-01 11:51:14 -07:00
Thies Lennart Alff cacab75b42 define decimals for uuv_att_control gains
decimal for the uuv_att_control gain parameters was not defined. So
QGroundControl displays them as integers what is rather unhandy.
2021-07-01 11:08:16 -04:00
Daniel Agar 0aa14deb5d drivers/distance_sensor/broadcom/afbrs50: minimize IRQ_LOCK()/IRQ_UNLOCK() calls 2021-07-01 10:47:53 -04:00
Matthias Grob 62546350f1 battery: use local instead of global member battery_status message 2021-07-01 14:24:38 +02:00
Matthias Grob fa976f84b1 battery: clear interface for determineWarning() 2021-07-01 14:24:38 +02:00
Matthias Grob f41c294028 BatterySimulator: No need to explicitly mention throttle being set to zero 2021-07-01 14:24:38 +02:00
Matthias Grob b824f33ae9 battery: publish measured values also when battery not connected 2021-07-01 14:24:38 +02:00
Matthias Grob a99ddd0845 battery: don't reset on every loop iteration 2021-07-01 14:24:38 +02:00
Matthias Grob 8d74e52bb7 battery: omit separate publish() function 2021-07-01 14:24:38 +02:00
Matthias Grob 9c0c85c9e2 battery_status: naming consistency current_filtered_a -> current_average_a 2021-07-01 14:24:38 +02:00
Matthias Grob 41cc73e555 battery: simplify battery_initialized condition 2021-07-01 14:24:38 +02:00
Matthias Grob a51d47f8e8 battery: connected check outside of determineWarning() 2021-07-01 14:24:38 +02:00
Jaeyoung-Lim e45b862f1d Specify orientaiton of ADIS16448 IMU from rc.sensors
Specify orientaiton of ADIS16448 IMU for from the rc.sensors

WIP: Currently only handling one orientation
2021-06-30 09:34:12 -04:00
Daniel Agar 33bf4e0303 EKF: set uninitialized vel/pos/hgt test ratios to NAN
- ensure valid min is numerically larger than 0 (float32)
2021-06-30 09:30:44 -04:00
Daniel Agar d87cd171f4 sensors/vehicle_imu: continue integrating gyro if there's a gap in data
- minor improvement that helps to determine the sensor publication rate
as soon as possible
2021-06-30 09:13:49 -04:00
Daniel Agar 7ddcb7fe3c adis16470: disable debug 2021-06-30 01:01:07 -04:00
Daniel Agar 982692f5ed ekf2: selector handle NAN test ratios as uninitilaized
- requires https://github.com/PX4/PX4-ECL/pull/1020
2021-06-29 21:36:24 -04:00
Daniel Agar f08a22934e boards: px4_fmu-v4_test remove deleted drivers/tap_esc 2021-06-29 21:27:29 -04:00
Daniel Agar f0d8d53da6 sensors/vehicle_imu: minor IMU integration improvements
- IMU integrator set max dt based on final return size (uint16)
 - improve integration consuming gyro as needed then integrate all available accel until caught up
 - increase required number of samples for sensor rate measurement (online Welford mean)
2021-06-29 10:43:09 -04:00
Daniel Agar 3fcd323f6a drivers/imu/invensense: store offset registers on configure, trigger reset on any change
- this can catch subtle failures that occur after self hours of continuous operation on some units
2021-06-29 10:33:03 -04:00
alexklimaj 9d3e18dbe1 ARK Flow rev 2 add icm42688p 2021-06-25 09:44:45 -04:00
TSC21 a67e66000e protocol_splitter: including magic number on XOR for checksum 2021-06-25 13:05:24 +02:00
TSC21 4741ec25ce microRTPS: increase base message ID space to 179 2021-06-25 13:05:24 +02:00
Matthias Grob 5ac5399d83 Remove horizontal slow down close to ground
Because based on the numerous complaints it was disabled by default
(only velocities above 10m/s were limited)
and since then no one intentionally used it anymore. But
there were some minor investigations of drones not reaching
their maximum speed which always showed 10m/s.
2021-06-25 11:15:41 +02:00
Matthias Grob 055c9db178 state_machine_helper: allow takeoff and hold without any link 2021-06-25 10:46:43 +02:00
Matthias Grob 15096ead5f state_machine_helper: explicitly notify about rca and data link loss 2021-06-25 10:46:43 +02:00
Matthias Grob bec9eef5b0 state_machine_helper: react on link losses during takeoff
The same way like in loiter. This should be further unified in the code
but at least we can increase safety in the case the takeoff altitude is
very high and the vehicle never reaches it but looses links.
2021-06-25 10:46:43 +02:00
Matthias Grob 11556d4e9a Commander: allow disabling RC loss failsafe for mission, hold, offboard independently 2021-06-25 10:46:43 +02:00
Matthias Grob 933d31b476 commander_params: correct parameter group from Mission to Commander 2021-06-25 10:46:43 +02:00
Matthias Grob 6ee8f7be0f Commander: switch to static_cast<> for set_nav_state parameters 2021-06-25 10:46:43 +02:00
Jukka Laitinen d83033f449 Take the crypto_backend library into use in bootloader for signature verification
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-06-25 08:35:58 +02:00
Jukka Laitinen 0d4f481035 Add simple SW implementations for crypto_backend and keystore_backend
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-06-25 08:35:58 +02:00
Jukka Laitinen d068ae48d6 Add header file for arhitecture/implementation specific px4 crypto and
configuration for cmake

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-06-25 08:35:58 +02:00
Jukka Laitinen b3e9904df0 Add monocypher crypto library in src/lib/crypto/monocypher
This simple crypto library is used as an example default backend for the crypto
interfaces

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-06-25 08:35:58 +02:00
Jukka Laitinen 09e62f96b2 Put all the test key material into same directory
Move Tools/test_key.json and key0.pub into same directory.

key0.pub is just a hex-dump of the public key part from the test_key.json,
for easy inclusion into bootloader monocypher sw crypto

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-06-25 08:35:58 +02:00
Jukka Laitinen caed8e4b05 Fix cryptotools.py signature alignment
If the signature start address is already aligned, the tool erroneously adds 4 filling bytes

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-06-25 08:35:58 +02:00
Roman Dvořák ab0e3b6001 icm20948_i2c_passthrough: allow to configure i2c address 2021-06-25 07:50:31 +02:00
Beat Küng d79229f958 mavlink_shell.py: allow scripted use
E.g. echo free|./Tools/mavlink_shell.py

Or creating a virtual nsh console:
socat pty,rawer,link=/tmp/fmu_nsh_pts exec:"mavlink_shell.py 0.0.0.0\\:14550,pty,rawer"
2021-06-24 15:18:06 +02:00
Sander Swart aa60d76963 camera trigger: don't keep triggering while enabled but paused 2021-06-24 06:56:58 +02:00
achim 6b356068cb boards: mro_x21-777 board.h fix SPI 2 SCK pin
- SPI 2 had the wrong SCK PIN -> PB10 instead of PB13 -> accidentally the kill pin
could be probably wrong on other mro boards
2021-06-23 15:00:20 -04:00
Mathieu Bresciani 9cedb169fc HTE: relax validity condition when already valid (#17783)
The condition to get valid requires a low variance and test ratio. but
to stay valid, only the variance is required.

Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-06-23 07:33:11 +02:00
Hamish Willee 74cc1d901d Thoneflow - fix up links to docs 2021-06-22 13:43:53 -04:00
Paul Riseborough 3beb5bcbe0 EKF: Fix momentum drag density altitude scaling and update comments 2021-06-22 18:50:56 +10:00
Paul Riseborough 97b5ae1e96 EKF: Fix derivation comments for drag fusion 2021-06-22 18:50:56 +10:00
Paul Riseborough 58d376e2be EKF: prevent /0 and use pre-computed inverses 2021-06-22 18:50:56 +10:00
Paul Riseborough de8625d255 EKF: fix sign error in bluff body drag fusion 2021-06-22 18:50:56 +10:00
Paul Riseborough 73d1e514d0 EKF: Extend drag fusion to include propeller momnetum drag 2021-06-22 18:50:56 +10:00
Matthias Grob 0dee7af81f ekf2_params: enable baro ground effect compensation by default 2021-06-22 10:32:54 +02:00
BazookaJoe1900 91808f7c9e Update EKF/common.h
Set non-zero default value for airspeed threshold to enable it by default

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2021-06-22 18:30:47 +10:00
Bazooka Joe 9c0a52d52a delay time: potentially reduce delay time if baro/aux velocity/airspeed is not used 2021-06-22 18:30:47 +10:00
bresch 611ace0ed6 EV_yaw: reset ev_to_ekf to identity when yaw is reset to EV
Otherwise, the old rotation matrix is used and not updated anymore
because the EKF is fusing EV yaw data.
2021-06-22 10:25:55 +02:00
bresch 804c3563fb heading_fusion: fix yaw gyro bias oscillation on ground
When the mag is pulled away before takeoff, the EKF can end up learning
a bad yaw gyro bias. This bad gyro bias makes the estimated heading spin
and even if the bias continues to be learned, it can end up being stuck
in limit cycle due to the innovation changing its sign every time the
heading estimate overshoots the measurement.
To prevent this, the Z gyro bias variance is reset when the mag heading
fusion test ratio fails on ground.
2021-06-22 16:45:26 +10:00
Thomas a264541861 explicitly set param2 to 0 in existing *DO_VTOL_TRANSITION commands. add a guard against NaNs. 2021-06-21 22:39:54 +02:00
TSC21 0c5f2d3b8c microRTPS: add missing header for PRIu32 and PRIu16 macros
Co-authored-by: squizz617 <seulbae@gatech.edu>
2021-06-21 16:36:44 +02:00
TSC21 9fb53d4276 microRTPS: add option to build the microRTPS agent after its generation 2021-06-21 16:36:44 +02:00
TSC21 084a992572 microRTPS: agent: only allow to whitelist the localhost when using FastDDS as the rmw 2021-06-21 16:36:44 +02:00
TSC21 79f7986715 apply ROS2 default memory management and publish mode QoS policies; make sure that SharedMemory is only used with FastDDS as the rmw 2021-06-21 16:36:44 +02:00
Igor Mišić 39909128ec micrortps_client: increased stack size by 250B
Co-authored-by: Nuno Marques <n.marques21@hotmail.com>
2021-06-21 16:36:44 +02:00
TSC21 d3a23cee40 microRTPS: agent: fix double free memory problem on SIGINT
It fixes also some minor issues when exiting the agent, including the printed stats
2021-06-21 16:36:44 +02:00
TSC21 6d5f12d2a2 microRTPS: client: add TX rate limiter 2021-06-21 16:36:44 +02:00
TSC21 ac2b38603c microRTPS: client: add missing "-p" option for the UART poll timeout and use microsecs for the send/rcv thread sleeps 2021-06-21 16:36:44 +02:00
TSC21 0cc79f3e48 microRTPS: client: show diagnostic of current bandwidth usage on the 'status' option 2021-06-21 16:36:44 +02:00
TSC21 d6ee15596d microRTPS: client: show diagnostic of average bandwidth usage on the 'status' option 2021-06-21 16:36:44 +02:00
TSC21 40462bfc1f microRTPS: client: reduce name set by pthread_setname_np since Linux requires names (with NUL) to fit in 16 chars, otherwise returns ERANGE (34) 2021-06-21 16:36:44 +02:00
TSC21 145e7387fb posix: start the microRTPS client in sim every time the module is available 2021-06-21 16:36:44 +02:00
TSC21 773d81f208 microRTPS: client: fix send per allocated topic 2021-06-21 16:36:44 +02:00
TSC21 f2fad6d966 microRTPS: by default, when FastDDS >= 2.0, enable Shared Memory transport for the agent participants when the localhost network is enabled 2021-06-21 16:36:44 +02:00
TSC21 320b414511 microRTPS: client: match the code style from the PX4 Firmware 2021-06-21 16:36:44 +02:00
TSC21 63571b3e3f microRTPS: agent: match the code style from the PX4 Firmware 2021-06-21 16:36:44 +02:00
TSC21 323ce797f8 microRTPS: allow communications only in the localhost network when ROS_LOCALHOST_ONLY env variable is set 2021-06-21 16:36:44 +02:00
TSC21 578e426e9e microRTPS: set trajectory_waypoint to be sent only, as this is outgoing data with vehicle_trajectory_waypoint_desired 2021-06-21 16:36:44 +02:00
Pieter-Jan Dewitte 155d3c7d36 FW pos control: fix airspeed input constaining 2021-06-21 10:55:21 +02:00
Claudio Micheli b1829e5766 Predict and use braking distance when Pausing auto modes (for multicopters) (#17269) 2021-06-18 10:45:03 +02:00
Daniel Agar 76a8617529 sensors: fix IMU init race condition
- IMU init requires valid published data (device ids, etc)
 - orb_group_count will include advertised instances before data is published, so this can't be used to throttle IMU init attempts
2021-06-17 10:38:33 -04:00
Peter van der Perk b2742658b7 UAVCANv1 port unset fixes and deinitialization 2021-06-17 10:02:17 -04:00
Beat Küng 1c3f30be01 protocol_splitter: tcflush() uart before closing it 2021-06-17 09:40:57 -04:00
Beat Küng 14ec7a0d93 mavlink: tcflush() uart before closing it
On NuttX with flow control, if no one was reading from the uart, the
close() call would block indefinitely waiting for data to be sent.
2021-06-17 09:40:57 -04:00
honglang 074ed24d02 nora:fixed syntax error 2021-06-17 09:37:04 -04:00
Daniel Agar 500c45e798 uORB: Subscription check if uORB::Manager instance is valid
- this is necessary if uORB::Subscription is used with static storage
duration
2021-06-17 08:07:24 +02:00
David Sidrane a728431e43 spracing_h7extreme:Track NuttX assert changes 2021-06-16 17:07:47 +02:00
David Sidrane b399b8d5ea protocol_splitter:Track NuttX assert changes 2021-06-16 17:07:47 +02:00
David Sidrane 61f80c087a px4io:Fix Type 2021-06-16 17:07:47 +02:00
David Sidrane 18960f0b82 RoboClaw:Fix Types 2021-06-16 17:07:47 +02:00
David Sidrane 9377b02c58 Track NuttX Timer changes 2021-06-16 17:07:47 +02:00
David Sidrane 05bdef867d Track NuttX syslog change 2021-06-16 17:07:47 +02:00
David Sidrane 028ae9561d logger:watchdog Track NuttX file reorg 2021-06-16 17:07:47 +02:00
David Sidrane eea1477e80 FakeImu:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 37d93320eb uavcan_v1:Uavcan: Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 026d36dee8 microRTPS:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane fd68fd2933 tests:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane f3624c172c kinetis pinirq:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 93c37e4e0c syslink:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 8d078eb02e vtol_att_control:Fix type 2021-06-16 17:07:47 +02:00
David Sidrane bec5d6de9b vmount:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 350e43f02c dataman:fix types 2021-06-16 17:07:47 +02:00
David Sidrane 77082188d8 temperature_calibration:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane d73f842151 sensors:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 274c55a4ae navigator:mission Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 65d026d45c mavlink:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 5faa116681 logger:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 3b725e5525 gyro_fft:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 07fbf8681d gyro_calibration:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 85f4f13e8a flight_mode_manager:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 9a423e222b ekf2:Use inttypes and fix types 2021-06-16 17:07:47 +02:00
David Sidrane ed474794cc commander:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane a3593d7d07 analog_battery:Use inttytpes 2021-06-16 17:07:47 +02:00
David Sidrane 9c87766021 sensor_calibration:Use inttytpes 2021-06-16 17:07:47 +02:00
David Sidrane 4bc7f1f3f3 lib/perf:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane f50b238c78 lib/parameters:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane b4ebc68a40 lib/drivers/nuttx/ I2C SPI:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane ff2748ba53 PX4Gyroscope:Fix types 2021-06-16 17:07:47 +02:00
David Sidrane 42e51b0215 PX4Accelerometer:Fix types 2021-06-16 17:07:47 +02:00
David Sidrane 17502da493 lib/battery:Fix types 2021-06-16 17:07:47 +02:00
David Sidrane 42e4ea86b1 uavcannode_gps_demo:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 616401190c UavcanNode:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 71f3a02c65 uavcan:use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane a07390a2d7 iridiumsbd:use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 2af9934f1c pcf8583:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 4ecda97fc1 roboclaw:Fix types 2021-06-16 17:07:47 +02:00
David Sidrane 4aa7bff8c6 rc_input:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane e7406bbd46 px4io:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 3747d0bc80 px4io:Fix types 2021-06-16 17:07:47 +02:00
David Sidrane 9443dd6345 pwm_out:use inttypes, match signature 2021-06-16 17:07:47 +02:00
David Sidrane bd511e1074 dShot: Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 810e9e174f distance_sensor: Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane c12a3330b8 camera_trigger: Use proper types 2021-06-16 17:07:47 +02:00
David Sidrane 7b2a1d4742 drivers:camera_trigger Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane b6435bb7f2 drivers:camera_capture Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 3a0770499a drivers:batt_smbus Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 05007944f1 drivers:barometer Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 824dbce941 drivers:ADC Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 6e5a86b6fe dshot:Matched signature to drv_pwm_output.h 2021-06-16 17:07:47 +02:00
David Sidrane dc23c85085 px4/common:mtd Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 1b80018f30 systemcmds:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane 62fd132047 boards:Use inttypes
nxp_ucans32k146:Fix constant

spracing_h7extreme:Use inttypes
2021-06-16 17:07:47 +02:00
David Sidrane 84dd8839a2 i2c_spi_buses:Track NuttX change to getopts avoid name collision
NuttX #defined optarg and getopt to move to TLS. This fixes the
  name collision.
2021-06-16 17:07:47 +02:00
David Sidrane 64db89ab20 px_generate_uorb_topic_helper: Use inttypes 2021-06-16 17:07:47 +02:00
bresch 0ef5d7d4c8 test_replay: remove setting read-only parameter 2021-06-16 15:38:17 +02:00
AlexKlimaj dddd2c3297 drivers/distance_sensor: New Broadcom AFBR-S50LV85D distance sensor driver
* Basic Broadcom AFBR-S50 driver using vendor API and binary blob https://github.com/Broadcom/AFBR-S50-API
* fix ARK Flow paw3902 rotation
2021-06-15 12:12:24 -04:00
Julian Oes e828ba4288 commander: send parachute command on termination (#17564)
* commander: send parachute command on termination

This sends the DO_PARACHUTE command to parachute component.

* commander: fix lying comments and printf

* commander: use one flag for termination triggered

This merges the duplicate flags _flight_termination_triggered and
_flight_flight_termination_printed.

* commander: correct variable name

* commander: always send tune with parachute

* commander: fix target_component for parachute cmd

The previous changes were wrong in that all commands were now sent to
the parachute component which doesn't make any sense. Of course only the
parachute command should be sent there.
2021-06-15 11:50:30 +02:00
Jukka Laitinen b550ad22b9 EKF2: Always publish global position
For historical reasons, there is a check in EKF2 to only publish global
position if it has moved for 1mm.

This is no longer necessary, and also this if doesn't save any cpu cycles
in real conditions where GPS errors are always much bigger that this.

When using simulated or fake GPS, based on some other positioning
system, the GPS coordinate input can be very accurate due to quantization
or true accuracy. In this case this check bites and perfectly valid position
doesn't get published.

Just removed this if.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-06-15 10:55:39 +02:00
Julian Oes 8415692f2a commander: enable user override when GPS is lost
When user override using the RC sticks is allowed, I would expect this
feature to also work in the case where GPS is lost and the vehicle goes
into a blind land/descent.

Without this commit, the vehicle would switch to Land mode and a pilot
could not take over control unless they switch to Altitude control in
a ground station.

With this commit, user override works as I would expect it and it will
switch to Altitude control allowing a pilot to recover in this
situation.
2021-06-15 10:36:11 +02:00
TSC21 749f213ca5 make_list: check if file exists before the other operations 2021-06-14 11:54:05 +02:00
TSC21 c4d54d983b mavsdk_tests: bump MAVSDK version to 0.40.0 2021-06-14 09:23:38 +02:00
Daniel Agar 0c303f03f4 Update submodule mavlink v2.0 to latest Mon Jun 14 00:39:13 UTC 2021 2021-06-13 21:30:10 -04:00
Hamish Willee d6f69ef2a0 aion robotic frame - fix broken link to R1 UGV docs 2021-06-12 11:58:26 -04:00
TSC21 0f47ae8e7b update submodule Tools/sitl_gazebo 2021-06-12 11:57:17 -04:00
David Sidrane 9c8e95db8d NuttX w/NXP contrib for FlexCAN fixes 2021-06-12 06:22:01 -07:00
David Sidrane 5b9201e5b4 cuav:Nora X7 Pro:Camera trigger is on 13/14 2021-06-11 15:13:23 +02:00
David Sidrane e0fab172a4 camera_trigger:Support more than 8 channles 2021-06-11 15:13:23 +02:00
Beat Küng 615e1f3e29 mavlink: fix module doc for broadcast 2021-06-11 09:01:41 +02:00
Beat Küng 468aea9409 cmake: enable --ethernet to generate common param metadata
This will add the MAV_x_BROADCAST params.
2021-06-11 09:01:41 +02:00
Peter van der Perk 8c4b900f9a uavcan_v1: Correct transmission deadline check & fix SocketCAN tx deadline 2021-06-10 02:26:28 +00:00
Julian Oes ca86416ce6 mavlink: don't read garbage target sysid/compid
This fixes a tricky bug that we discovered in MAVSDK:
https://github.com/mavlink/MAVSDK/pull/1464

It turns out the target_system and target_component fields can
potentially be:
1. at the end of a message payload,
2. and zero,

and therefore they get trimmed. When you then try to read it you
potentially read some garbage from the CRC fields.
2021-06-09 15:40:46 -04:00
echoG 6bc09138c1 Adding BatMon smart battery as a module and refactoring SMBUS based SBS 1.1 spec to a library 2021-06-09 12:17:45 -04:00
Julian Oes 8be1034346 workflows: fixes typo on python package name (#17740)
The previous PR was merged optimistically.
2021-06-09 09:11:28 -07:00
bresch 514845592b en-/disable mc position controller using explicit control mode flag 2021-06-09 18:10:22 +02:00
Julian Oes 17ea92bb54 workflows: add missing dependency for mypy (#17736) 2021-06-09 08:52:21 -07:00
Daniel Agar 328c5cb1cf mavlink: properly cleanup instance on exit 2021-06-09 10:58:34 -04:00
Hamish Willee 9f87702074 px4moduledoc/markdownout.py - source links to PX4-Autopilot 2021-06-09 11:11:08 +02:00
Hamish Willee 665d2ea74e markdownout for parameters - makes link internal 2021-06-09 11:09:48 +02:00
Hamish Willee f9201811b4 airframes markdownout.py - fix link to not open file for editing 2021-06-09 11:08:37 +02:00
JacobCrabill 0931ff10d5 uavcan_v1: Clean up handling of invalid port IDs
Always convert 'invalid' port ID values (e.g., the default PX4 port-ID
parameter value of -1) to CANARD_PORT_ID_UNSET in all comparisons.
2021-06-08 20:13:19 -04:00
JacobCrabill 73ef22ae77 uavcan_v1: Fix heartbeat pub timestamp
The hrt_abstime value used to control the 1s pub rate was the value of
the timestamp_usec of the CanardTransfer, which has a timeout of 100ms
added to it.

Since hrt_abstime is an unsigned datatype, if the hrt_elapsed_time()
check was called <100ms apart, the negative value would result in a
large hrt_elapsed_time, and the bus would be spammed with Heartbeat
messages (or error messages from canardTxPush).
2021-06-08 20:13:19 -04:00
Daniel Agar 251f1a069b ekf2: update message lost error messages to perf counters
- only allocate these perf counters if data source is present
2021-06-08 20:12:17 -04:00
bresch 841914462d MC pos control: use vz<->z_deriv blending in pure vel mode only
This logic was introduced to avoid large altitude drifts in velocity
mode (altitude not controlled) due to potential velocity estimate bias
in case of IMU problems (see PR #8445). After some refactorings,
the logic started to be used in altitude-controlled modes as well, which is not needed.
2021-06-08 14:58:14 +02:00
Daniel Agar 47b9016f5e I2CSPIDriverBase: print rotation and i2c address if set 2021-06-08 09:27:21 +02:00
CUAV_gitfishup c61c1a15ee cuav/x7pro: fix syntax error in rc.board_sensors 2021-06-08 09:18:20 +02:00
honglang 8b1d2b8551 change fmu-v5's uavcan timer5 to timer6 2021-06-07 20:07:03 +02:00
achim 00229c4fd2 drv_pwm_output.h: increase highest max pwm limit from 2150 to 2500
- servo linkages in vtol often need further travel of the servos to cover the full tilt travel
2021-06-07 09:13:39 -04:00
Daniel Agar 578c003c13 ekf2: selector handle uninitalized test ratios
- choose the best instance regardless of tilt or yaw alignment
2021-06-07 08:56:37 -04:00
Matthias Grob ed62ae0e4f mavlink: add actuator_armed header to heartbeat 2021-06-07 08:55:49 -04:00
Julian Oes 446598d003 mc_pos_control: omit initial warning 2021-06-07 08:54:19 -04:00
Daniel Agar 4f850c7cd0 sensors: preserve all valid calibration parameters even if sensor currently missing
- mark calibration slots active for first N sensors found
 - calibration procedure don't bother resetting unused slots
2021-06-07 08:50:32 -04:00
Daniel Agar 2ccd86102b ekf2: add command line option to manually select instance 2021-06-07 08:47:17 -04:00
achim 66dbc1e25f Update rc.board_arch_defaults
logger doesn't start at all up to 4k buffer
2021-06-05 11:46:30 -04:00
achim fd2161b6bf Update rc.board_arch_defaults
logger doesn't start at all up to 4k buffer
2021-06-05 11:46:10 -04:00
achim 1ab7943940 Update rc.board_arch_defaults
Logger doesn´t start at all with 4k buffer
2021-06-05 11:45:53 -04:00
Daniel Agar 4f8f1a5f7e mavlink: streams HEARTBEAT fix code style 2021-06-04 20:43:25 -04:00
Daniel Agar d31a45a62d github actions SITL test run standard_vtol with address sanitizer 2021-06-04 13:27:42 -04:00
Matthias Grob faabe2d431 mavlink: make sure heartbeat reports flight termination 2021-06-04 12:48:22 -04:00
achim 6fb1ba7583 Update rcS
remove sd index file spoofing
2021-06-04 11:43:17 -04:00
Matthias Grob 70050ae4f5 mc_pos_control_params: correct MPC_POS_MODE docs since 1 is depracated 2021-06-04 09:32:03 -04:00
Peter van der Perk 9756c70491 UAVCANv1 Iteration, dynamic subscribers and decoupling (#17624)
* Update to use libcanard callback
Reworked param system with lambda

* Use callback instead of lambda saves 500 bytes of flash

* [UAVCANv1] Added ServiceRequest class, subscribers decoupled

* PX4 UAVCANv1 portID param default CANARD_PORT_ID_UNSET (65535U)

* [UAVCANv1] uORB sensor_gps modify timestamp for now untill we've got timesync working

* UAVCANv1 update parameter definition to use -1 as unset
2021-06-04 09:30:17 -04:00
Daniel Agar 470c3cfa6e mavlink: streams HEARTBEAT fix vehicle_control_mode copy 2021-06-04 15:19:34 +02:00
CUAVmengxiao 98fb373590 mavlink: 14S battery support 2021-06-04 09:15:40 -04:00
RomanBapst ad9288536b TECS: enable direct height-rate control
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-06-04 14:51:27 +02:00
RomanBapst f6de99d42e FixedWingPositionControl: control only height rate when using pitch stick
in manual altitude controlled modes

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-06-04 14:51:27 +02:00
Silvan Fuhrer 3d87bfcc0a rename FW_T_CLIMB_R_SP to FW_T_CLMB_R_SP
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-06-04 14:51:27 +02:00
RomanBapst 19449a4e75 FixedWingPositionControl: use target climb/sink rate parameters as maximum
rates in manual altitude controlled modes

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-06-04 14:51:27 +02:00
RomanBapst a5cc449e69 tecs: propagate altitude setpoint based on target climb/sink rate
- avoids tecs always climbing and sinking and max rates and allows to fine tune these rates
- avoid numerical calculation of feedforward velocity using derivative, this
 was prone to jitter in dt

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-06-04 14:51:27 +02:00
RomanBapst 4b7416c05b FixedWingPosControlL1: added target climb and sink rate parameters
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-06-04 14:51:27 +02:00
Travis Bottalico 861e15be4c - update CDCAM_PRODUCTID to match bootloader 2021-06-03 21:38:53 -04:00
bresch 8ad0f36f48 pwm: specific fail/disarm parameters should default to global value 2021-06-03 21:26:13 -04:00
Daniel Agar db1657fa84 sensors/vehicle_magnetometer: apply current compensation regardless of arming state
- simplify update on mag compensation type change
2021-06-03 10:08:19 -04:00
Julian Oes 60235f8474 mavlink: properly initialize vehicle_command queue
This makes sure that the vehicle_command topic is properly
initialized from the beginning.

orb_exists returns -1 or 0 and not a bool as one would expect.
2021-06-03 08:53:39 -04:00
Hamish Willee 00cc1323ea gpio.cpp: Add backticks around gpio command docs 2021-06-03 12:37:48 +02:00
alexklimaj 3e9b295c22 Add watchdog_init to ark boards to ensure watchdog pauses during debugging 2021-06-03 00:54:57 -04:00
Daniel Agar 284375efc3 px4io: only update PWM MAX/MIN/DIS/FAIL/REV once
- Updating PWM params on param change was interfering with VTOL
parameter settings (e.g. PWM_MIN is set by VTOL at init, and
was then overwritten here after an arbitrary param change).
2021-06-03 00:52:05 -04:00
Silvan Fuhrer 697d713faf pwm out: disable PWM parameter update on param change
Only update PWM params on initialisation.
Updating PWM params on param change was interfering with VTOL
parameter settings (e.g. PWM_MIN is set by VTOL at init, and
was then overwritten here after an arbitrary param change).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-06-03 00:52:05 -04:00
Daniel Agar c6d5bd868e boards: px4_fmu-v6x_default disable LPE to save flash 2021-06-02 09:12:24 -04:00
honglang 5672af4299 CUAV X7pro and Nora: use icm42688p instead of bmi088 2021-06-02 09:11:37 -04:00
Julian Oes 1b67187770 navigator: protect against 0 acceptance radius
This seems to slip in e.g. as part of the VTOL_LAND command.
2021-06-02 07:28:19 +02:00
Julian Oes ab23a44b99 navigator: fix acceptance radius for multicopter
This fixes a regression introduced in
https://github.com/PX4/PX4-Autopilot/pull/16646
which meant that the acceptance radius was no longer used at all for
multicopter, and instead only the NAV_ACC_RAD param was used.

With this change we use the acceptance radius of the mission item again
if it is actually set (and not NAN) which we did not do before, and we
only do that for multicopter.
2021-06-02 07:28:19 +02:00
Daniel Agar 5f775b508f boards: enable CONFIG_OTG_ID_GPIO_DISABLE on all F7/H7 2021-06-01 15:19:15 -04:00
David Sidrane 32e92ba817 Revert:Pull downs - bad levels cause motor spins 2021-06-01 15:18:47 -04:00
Beat Küng dfa5964719 Accelerometer: fix thermal calibration index 2021-06-01 10:01:36 -04:00
Daniel Agar d430e13401 sensors: wait for real sample rate to initialize LowPassFilter2p 2021-06-01 08:58:10 -04:00
Daniel Agar 438b0abc7a mathlib: Biquad filters use internal fields for parameter update 2021-06-01 08:58:10 -04:00
Daniel Agar 9661eddef8 mathlib: LowPassFilter2p initialize b0 to 1 for safety 2021-06-01 08:58:10 -04:00
Daniel Agar e52c0ceca5 Update submodule mavlink v2.0 to latest Tue Jun 1 00:39:07 UTC 2021 2021-05-31 21:11:01 -04:00
RomanBapst b06b46b224 log raw airspeed derivative, pitch setpoint and airspeed innovation for TECS
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-31 23:56:23 +02:00
Daniel Agar 806b462935 px4_work_queue: increase UART stack 2021-05-31 14:49:40 -04:00
Daniel Agar 5831494164 boards: px4_fmu-v2_default disable gyro_calibration module to save flash
- this doesn't impact regular gyro calibration
2021-05-31 12:11:53 -04:00
Daniel Agar 90e106ede3 boards: cuav_x7pro_test disable LPE to save flash 2021-05-31 10:26:45 -04:00
Daniel Agar 5493d96d17 mathlib: merge LowPassFilter2p, LowPassFilter2pArray, and LowPassFilter2pVector3f
- fix reset for direct form 2
 - push NAN checks out to filter users
2021-05-31 10:26:45 -04:00
Daniel Agar 2a792ca201 gyro_fft: add simple SNR requirement and reduce number of peaks 2021-05-31 10:26:45 -04:00
Daniel Agar 3269ee8df1 sensors/vehicle_angular_velocity: accumualted notch filtering and reset improvements
- apply sensor scaling immediately to keep things simple (FIFO vs regular)
 - inline filter helpers (minor performance improvement)
 - dynamic notch filtering
    - reorder by axis (applied per axis)
    - don't remove notch filters immediately if ESC or FFT data times out
    - constrain notch filter frequency and bandwidth to safe range (minimum bandwidth for flaot precision, Nyquist, etc)
 - add safe constraint on dt
2021-05-31 10:26:45 -04:00
Daniel Agar 561cfca4f9 fake_imu: add fake ESC status for testing dynamic notch filters 2021-05-31 10:26:45 -04:00
Daniel Agar f25a70a674 mathlib: Notchfilter updates
- merge NotchFilterArray into regular NotchFilter (apply vs applyArray)
 - only use direct form 1 to prevent reset confusion
 - safe default field initialization
 - update VehicleAngularVelocity usage
2021-05-31 10:26:45 -04:00
Daniel Agar 055b5404c3 sensors/vehicle_imu: switch to WelfordMean library and other improvements
- use WelfordMean library to determine sensor sample rate average
 - if gyro samples exceeds queue depth, instead round to nearest even integer to ease scheduling
 - force update if publication latency is falling behind
 - remove redundant sample interval perf counters
 - status print accel & gyro interval standard deviation
2021-05-31 10:05:10 -04:00
Daniel Agar 3340fca332 sensors/vehicle_imu: move accel & gyro updates to separate methods 2021-05-31 10:05:10 -04:00
Daniel Agar a5979e16be sensors/vehicle_imu: move publish to separate method 2021-05-31 10:05:10 -04:00
Daniel Agar 0b9e4a5902 sensors/vehicle_imu: Integrator simplify and make header only 2021-05-31 10:05:10 -04:00
Silvan Fuhrer cf5e6e4133 Sensors: subscribe to differential_pressure in vehicle_air_data to calculate air density
-constrain range to -20..35°C
-do not use temperature readings if exactly 0 (as likley not filled by driver at all in this case)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-31 09:53:47 +02:00
David Sidrane 973068ebfe holybro_can-gps-v1:Rev to RC9 HW
holybro_can-gps-v1:Fix LEDs

holybro_can-gps-v1:Only CAN1

holybro_can-gps-v1:ncp5623c at 0x39
2021-05-29 10:53:27 -04:00
Daniel Agar 51f738e54c boards: bootloader.cmake trivial whitespace cleanup 2021-05-28 23:56:20 -04:00
modaltb e25cfaaa2f boards: Add ModalAI Flight Core v2 initial support 2021-05-28 22:26:40 -04:00
Jukka Laitinen 34de392425 Add compiler cmake files for RISC-V (rv64gc) targets
This adds the basic support for riscv64-unknown-elf compiler amd rv64gc ISA

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-28 22:22:57 -04:00
Jukka Laitinen 935253357a nuttx compilation: Don't assume "arm" to enable risc-v compilation
Replace "arm" by "${CONFIG_ARCH}"

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-28 22:22:57 -04:00
Jukka Laitinen 12f33524fa fix legacy data types again
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-28 17:55:02 -04:00
Peter van der Perk ed0b5a7c1a FMUK66 update socketcan configs 2021-05-28 08:03:58 -07:00
Jukka Laitinen 0de0709be3 Fix github url for uavcan_v1/legacy_data_types
The URL is spelled wrong, it should be capital "PX4"

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-28 10:36:30 -04:00
Julian Oes 1da4e2f441 vmount: fix param limit 2021-05-28 14:46:40 +02:00
Silvan Fuhrer 4b42a1639b TECS: in airspeed-less mode, set airspeed estimate to cruise airspeed
In airspeed-less mode, instead of the average of min/max airspeed, take the cruise
airspeed (from param) for current airspeed estimate. A diff of the airspeed setpoint
from this value results in increased enegery demand (incerase of throttle) even
in airspeed-less mode.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-28 14:25:53 +02:00
Nuno Marques f9fe0e3746 ROS2/microRTPS: Add support for ROS2 Galactic and ROS2 Rolling (#17664)
microRTPS: generate_microRTPS_bridge: add support for ROS2 versions
* Galactic
* Rolling
2021-05-27 09:32:16 -07:00
Daniel Agar ad534561d3 commander: only play safety change tunes if initialized 2021-05-27 10:13:49 +02:00
Daniel Agar af71b2e3ab commander: fix COM_DISARM_PRFLT parameter description typos 2021-05-26 21:48:41 -04:00
Jukka Laitinen 675a5a2b2c bootloader: change flash_cache addresses to uintptr_t
To fix comilation errors on 64 bit platforms

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-26 12:57:37 -07:00
Jukka Laitinen 071eaef884 Adjust paths to bootloader include files for boards
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-26 12:57:37 -07:00
Jukka Laitinen 64d264b49a bootloader: Move chip specific things under chip specific folders
- move systick.c under chip specific sources
- move do_jump into chip specific main.c as arch_do_jump
- wrap flash writes to "arch_flash_write" and implement in chip specific main.c
- add bootloader TOC check
- sync image_toc.h with the version currently in use with old bootloader

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-26 12:57:37 -07:00
David Sidrane 3e18fa12d6 px4_fmu-v5x:Remove vcm1193l 2021-05-26 13:41:10 -04:00
David Sidrane 2feb096fb9 vtrantech Rename to match V1.1 vcm5883->vcm1193l 2021-05-26 11:24:11 -04:00
Daniel Agar b264577daa sensors/vehicle_acceleration: require valid sample rate before running
- this fixes a minor edge case when you only have a single accelerometer and haven't made any parameter changes, the sensor sample rate (used for filtering) might not have been updated from default
2021-05-24 21:39:42 -04:00
Daniel Agar 22838f491a ekf2: replace mag missed error message with perf count
- this error is primarily useful when significant gaps in magnetometer are present, otherwise the occasional gaps at startup, etc are distracting in regular usage
2021-05-24 20:52:07 -04:00
PX4 BuildBot 187297653a Update submodule ecl to latest Mon May 24 12:39:12 UTC 2021
- ecl in PX4/Firmware (17da6293aa8e32a0e41c8fe10b8ffbf4e3e922b3): https://github.com/PX4/PX4-ECL/commit/e57af44d71dea2da62055076f186b3d15278ae7e
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/71fc1b81612fa9b5184d5abb93b69d109e9d0e4b
    - Changes: https://github.com/PX4/PX4-ECL/compare/e57af44d71dea2da62055076f186b3d15278ae7e...71fc1b81612fa9b5184d5abb93b69d109e9d0e4b

    71fc1b8 2021-05-20 bresch - airspeed fusion: use yaw from 312 sequence when pitch is close to 90deg
2021-05-24 18:59:56 -04:00
Daniel Agar 0fc98b2793 move IMU_GYRO_FFT_EN parameter to developer category
- these need more work and testing before we should encourage wider usage
2021-05-24 18:59:32 -04:00
Daniel Agar e18b1c0355 mpu9250: tolerate missing/mismatching FIFO samples if I2C slave mag active
- when the mpu9250 mag is active it disrupts IMU sampling
 - this change modifies the simple mpu9250 FIFO integrity checks (comparing duplicate accel samples) to tolerate these samples that don't match if the mag is active
 - fixes #17615
2021-05-24 11:22:13 -04:00
Daniel Agar 6549017993 navigator: GeofenceBreachAvoidance remove duplicate type alias 2021-05-23 17:51:08 -04:00
bresch 71fc1b8161 airspeed fusion: use yaw from 312 sequence when pitch is close to 90deg
This caused bad initialization of the wind estimate on tailsitters
2021-05-23 15:58:50 +10:00
Daniel Agar 8327335fa4 Update submodule mavlink v2.0 to latest Sat May 22 00:38:27 UTC 2021 2021-05-22 13:35:50 -04:00
PX4 BuildBot a6148d6320 Update submodule libcanard to latest Sat May 22 12:39:12 UTC 2021
- libcanard in PX4/Firmware (e2ba4858a3285fe7ff0f2888d8b1ce5dbda589a1): https://github.com/UAVCAN/libcanard/commit/38796831f9083c0f0674319543d8d10813429eb5
    - libcanard current upstream: https://github.com/UAVCAN/libcanard/commit/2a116170285fb47fcaae150ad21c2ccde0756a5f
    - Changes: https://github.com/UAVCAN/libcanard/compare/38796831f9083c0f0674319543d8d10813429eb5...2a116170285fb47fcaae150ad21c2ccde0756a5f

    2a11617 2021-05-20 Pavel Kirienko - Update the changelog
a1efa3a 2021-05-20 Peter van der Perk - Expose CanardRxSubscription fields for read-only use (#167)
2021-05-22 13:35:03 -04:00
PX4 BuildBot 142d6f3dbc Update submodule ecl to latest Sat May 22 12:39:15 UTC 2021
- ecl in PX4/Firmware (2a18b8feeb24dcb07c2dd141e6097e211f83e6bd): https://github.com/PX4/PX4-ECL/commit/85f5a935fe6095f585bfb12b584e0813126cbc2a
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/e57af44d71dea2da62055076f186b3d15278ae7e
    - Changes: https://github.com/PX4/PX4-ECL/compare/85f5a935fe6095f585bfb12b584e0813126cbc2a...e57af44d71dea2da62055076f186b3d15278ae7e

    e57af44 2021-05-18 Bazooka Joe - set parameters that doesn't change with const attribute, for clearification
2021-05-22 13:34:31 -04:00
PX4 BuildBot 68e386cf2d Update submodule sitl_gazebo to latest Sat May 22 00:38:23 UTC 2021
- sitl_gazebo in PX4/Firmware (61e972ba35): https://github.com/PX4/PX4-SITL_gazebo/commit/f10ccb7ec34e35842254fe969d49beea699a8ffb
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/5c248898524cb670df496149de5e4692e16e69dc
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/f10ccb7ec34e35842254fe969d49beea699a8ffb...5c248898524cb670df496149de5e4692e16e69dc

    5c24889 2021-05-20 Andrew Voznytsa - Use cmake to find and link to gstreamer-app-1.0
2021-05-22 06:48:03 +02:00
Daniel Agar 61e972ba35 px_uploader.py remove special pyserial checks that fail on some platforms 2021-05-21 08:56:12 +02:00
Julian Oes 518222bae4 navigator: fix home altitude feasibility check
This includes the following:
- Remove warning/throw_error flag as it is always !home_alt_valid.
- Remove impossible code path when home_alt_valid = false and
  throw_error = false.
- Add home_alt_valid check in second check before using home_alt.
- Only use warning for the second check to allow waypoints below home.
- Don't return early when only warning.
2021-05-20 10:50:54 -04:00
Julian Oes 90a33d59e4 commander: blink red on invalid mission
It doesn't make sense to blink green when something is not good.
2021-05-20 10:50:54 -04:00
Julian Oes 4ccc60e2b0 commander: neutral beep on mission with warning
When a mission is uploaded we should beep consistenly:
- valid -> positive
- warn -> neutral
- invalid -> negative

Before this, it was:
- valid -> positive
- warn -> negative
- invalid -> negative
2021-05-20 10:50:54 -04:00
Julian Oes b7890529b2 navigator: reset mission feasibility warning flag
Without reseting the warning flag commander would complain about a
warning but still allow arming and flying the mission which was weird.
2021-05-20 10:50:54 -04:00
Daniel Agar 9969edfabc mavlink: STATUSTEXT stream use perf count for missed messages
- don't send stale messages
 - process all queued messages until tx buffer is full
2021-05-20 10:39:11 -04:00
Bazooka Joe e57af44d71 set parameters that doesn't change with const attribute, for clearification 2021-05-20 18:19:33 +10:00
Julian Oes 1f40a65210 mavlink: improve command param5/6, x/y handling
This adds support to handle INT32_MAX for COMMAND_INT.x/y by converting
it to NAN internally.

It also adds paranoid checks to prevent:
- NAN being used sent by a COMMAND_INT by mistake.
- INT32_MAX being used sent by a COMMAND_LONG by mistake.
2021-05-20 09:26:30 +02:00
PX4 BuildBot 4bb53e2afc Update submodule libcanard to latest Wed May 19 00:39:15 UTC 2021
- libcanard in PX4/Firmware (7c7657e6a0254b62959ea6b908b89815f0cfee5a): https://github.com/UAVCAN/libcanard/commit/55938c51cf7da3096679933302693c9dae7a2b33
    - libcanard current upstream: https://github.com/UAVCAN/libcanard/commit/38796831f9083c0f0674319543d8d10813429eb5
    - Changes: https://github.com/UAVCAN/libcanard/compare/55938c51cf7da3096679933302693c9dae7a2b33...38796831f9083c0f0674319543d8d10813429eb5

    3879683 2021-05-18 Pavel Kirienko - Add canardRxAccept2(), fix #163 (#164)
2021-05-19 00:24:00 -04:00
CUAVcaijie ffe9f8a942 boards: CUAV Nora/X7Pro ICM20649 on SPI6 bus will be replaced by ICM20689 2021-05-18 18:49:25 -04:00
Daniel Agar 10f33cdd35 boards: px4_fmu-v6x_default re-enable top and free up flash 2021-05-18 16:22:02 -04:00
Daniel Agar e498023d0f ist8308: improve configuration
- disable noise suppression filter
 - select more appropriate dynamic range
 - carefully set and clear all ODR, DR, and OSRCNTL bits
 - retry in probe multiple times
2021-05-18 13:20:21 -04:00
David Sidrane 4acc18ca60 Add VCM5883 Magnetometer
Fix LSB/G
2021-05-18 12:57:46 -04:00
Daniel Agar 820a442fe3 drivers/imu/analog_devices/adis16448: minor fixes and compatibility with older model
- increase SPI stall time slightly
 - tolerate mag self test failure (could be due to local magnetic field)
 - register configuration compatible with older ADIS16448AMLZ
 - don't publish duplicate accel/gyro
 - only allocate CRC perf counter if using CRC
2021-05-18 12:44:37 -04:00
PX4 BuildBot eee08601af Update submodule sitl_gazebo to latest Tue May 18 00:50:37 UTC 2021
- sitl_gazebo in PX4/Firmware (c3884b5bc1): https://github.com/PX4/PX4-SITL_gazebo/commit/402897d22505a13505c19adca23c03a47224175f
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/f10ccb7ec34e35842254fe969d49beea699a8ffb
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/402897d22505a13505c19adca23c03a47224175f...f10ccb7ec34e35842254fe969d49beea699a8ffb

    f10ccb7 2021-05-17 grahamjamesaddis - Fix non unique name warning in tailsitter.sdf.jinja (#756)
05b8625 2021-05-13 Andrew Voznytsa - Fix gstreamer timestamps; Use push mode all the way; Avoid duplicated frame encoding; Cleanup a bit there and here
9ec04cc 2021-05-16 Graham James Addis - Tidy rotor colours Grey/Blue.
493c5dc 2021-05-16 Graham James Addis - Minimal conversion to jinja format.
2021-05-17 23:03:51 -04:00
Daniel Agar db3c89b1e3 Update submodule mavlink v2.0 to latest Tue May 18 00:50:40 UTC 2021 2021-05-17 21:53:36 -04:00
PX4 BuildBot 319cab6c2c Update submodule ecl to latest Tue May 18 00:50:43 UTC 2021
- ecl in PX4/Firmware (4668ea5c32075aca28fd813881a349f765ad8d2a): https://github.com/PX4/PX4-ECL/commit/29243ac5cbb5d27ac71744e88afcd786df6f748d
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/85f5a935fe6095f585bfb12b584e0813126cbc2a
    - Changes: https://github.com/PX4/PX4-ECL/compare/29243ac5cbb5d27ac71744e88afcd786df6f748d...85f5a935fe6095f585bfb12b584e0813126cbc2a

    85f5a93 2021-05-11 bresch - [AUTO COMMIT] update change indication
f7c687e 2021-05-11 bresch - GNSS yaw unit test: test fallback to non yaw aiding mode
a4fe2b1 2021-05-11 bresch - yaw_align: let the mag control logic do the alignement and resets
2cc0230 2021-05-11 bresch - mag control: select mag mode before doing the reset
fe943cf 2021-05-11 bresch - mag reset: force align in MC custom mode (aka. indoor mode)
cadcc58 2021-05-11 bresch - mag reset: do not stop the fusion from inside the reset function
6248646 2021-05-11 bresch - EV yaw: move EV yaw reset out of resetMagHeading function
48722a2 2021-05-07 bresch - control: inhibit EV yaw from restarting when GPS aid wants to start
a685987 2021-05-07 bresch - GNSS yaw: unset yaw_align if fusion stops before takeoff
7ee6970 2021-05-04 bresch - GNSS yaw: add test case when measurement jumps
7a11871 2021-05-04 bresch - GNSS yaw tests: adjust timing
51197a5 2021-05-03 bresch - GNSS yaw selection logic refactor
2021-05-17 21:52:00 -04:00
Daniel Agar c3884b5bc1 fake_imu (formally fake_gyro) updates for testing gyro filtering
- fake_imu now publishes sine sweeps over 10 seconds
 - accel is also published so that fake IMU can be selected when the only option
2021-05-17 20:26:25 -04:00
Daniel Agar 39c90c8fc9 Update submodule GPSDrivers to latest Mon May 17 12:38:15 UTC 2021 2021-05-17 19:25:45 -04:00
Daniel Agar 87b861d0f0 IMU_GYRO_CUTOFF and IMU_DGYRO_CUTOFF increase default slightly 2021-05-17 17:37:52 +02:00
Peter van der Perk 60a083b662 canbootloader clear pending systick interrupts 2021-05-17 05:05:24 -07:00
Daniel Agar 3a3cc33d69 drivers/optical_flow/paw3902: require >= 10 valid consecutive readings before deciding mode changes
- improve mode change requirements comments
 - reduce verified read/write retries (these are mostly wasting time)
2021-05-16 20:29:06 -04:00
PX4 BuildBot 9d54b7b64e Update submodule jMAVSim to latest Sun May 16 12:39:03 UTC 2021
- jMAVSim in PX4/Firmware (5f14ee2a97): https://github.com/PX4/jMAVSim/commit/2b610caab81726ab79019de0f2fa8cff5e341bd5
    - jMAVSim current upstream: https://github.com/PX4/jMAVSim/commit/0a816d8100e9860a031ccfccfb9941bcd6eedc81
    - Changes: https://github.com/PX4/jMAVSim/compare/2b610caab81726ab79019de0f2fa8cff5e341bd5...0a816d8100e9860a031ccfccfb9941bcd6eedc81

    0a816d8 2021-05-12 Beat Küng - mavlink: update message definitions to latest master
2021-05-16 17:23:40 -04:00
PX4 BuildBot 093854d29b Update submodule public_regulated_data_types to latest Sun May 16 12:39:17 UTC 2021
- public_regulated_data_types in PX4/Firmware (b0b812007a76a7d3cfb3e1d2d32f245a681800d7): https://github.com/UAVCAN/public_regulated_data_types/commit/1337b1c86fee5bd3f3c3c0f1027bcf19e5c08aae
    - public_regulated_data_types current upstream: https://github.com/UAVCAN/public_regulated_data_types/commit/0a773b93ce5c94e1d2791b180058cb9897fab7e1
    - Changes: https://github.com/UAVCAN/public_regulated_data_types/compare/1337b1c86fee5bd3f3c3c0f1027bcf19e5c08aae...0a773b93ce5c94e1d2791b180058cb9897fab7e1

    0a773b9 2021-05-10 Kalyan Sriram - reg/drone: remove redundant timestamp in Velocity3Var (#117)
2021-05-16 17:23:01 -04:00
PX4 BuildBot 723e803ab9 Update submodule public_regulated_data_types to latest Sun May 16 12:39:14 UTC 2021
- public_regulated_data_types in PX4/Firmware (b00f416229a5bcef2bdad4ec29c90e4846c701af): https://github.com/UAVCAN/public_regulated_data_types/commit/1337b1c86fee5bd3f3c3c0f1027bcf19e5c08aae
    - public_regulated_data_types current upstream: https://github.com/UAVCAN/public_regulated_data_types/commit/0a773b93ce5c94e1d2791b180058cb9897fab7e1
    - Changes: https://github.com/UAVCAN/public_regulated_data_types/compare/1337b1c86fee5bd3f3c3c0f1027bcf19e5c08aae...0a773b93ce5c94e1d2791b180058cb9897fab7e1

    0a773b9 2021-05-10 Kalyan Sriram - reg/drone: remove redundant timestamp in Velocity3Var (#117)
2021-05-16 17:22:40 -04:00
Daniel Agar 904f827df0 Jenkins: increase timeout and build history 2021-05-16 15:59:56 -04:00
AlexKlimaj 4a93f7cea1 Add ARK CAN GPS Board Config 2021-05-16 13:21:44 -04:00
Damien SIX e4f235001b fix timesync for timestamp sample (including SFINAE detection) 2021-05-16 13:15:37 -04:00
Daniel Agar ecf2cd3afb CAN node STM32F7 support and Freefly RTK GPS CAN node 2021-05-16 13:10:02 -04:00
Beat Küng 1ad25369e7 Makefile: ensure 'clean' does not fail if build directory does not exist 2021-05-16 13:01:20 -04:00
Beat Küng 5114158090 px4/fmu-v6x: disable dumpfile (reduce flash) 2021-05-16 13:01:20 -04:00
Beat Küng 9fbbcc9c73 mavlink ATTITUDE_TARGET: send also if vehicle_attitude_setpoint is not updated
This is the case in MC acro
2021-05-16 13:01:20 -04:00
Beat Küng 2a84afb6a2 mavlink: avoid 'stream xy not found' warnings on CONSTRAINED_FLASH targets
e.g.:
WARN  [mavlink] stream ADSB_VEHICLE not found
WARN  [mavlink] stream GIMBAL_DEVICE_ATTITUDE_STATUS not found
WARN  [mavlink] stream GIMBAL_MANAGER_STATUS not found
WARN  [mavlink] stream GIMBAL_DEVICE_SET_ATTITUDE not found
WARN  [mavlink] stream GPS2_RAW not found
WARN  [mavlink] stream UTM_GLOBAL_POSITION not found
ERROR [mavlink] configure_streams_to_default() failed
2021-05-16 13:01:20 -04:00
PX4 BuildBot 9e352e92bd Update submodule sitl_gazebo to latest Sun May 16 12:39:08 UTC 2021
- sitl_gazebo in PX4/Firmware (7cb3ed98b61c514d01fc9a68ba87445f8b9aa142): https://github.com/PX4/PX4-SITL_gazebo/commit/2496b85dd22d2f9c1c1281d5ef77dfb86ef604a3
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/402897d22505a13505c19adca23c03a47224175f
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/2496b85dd22d2f9c1c1281d5ef77dfb86ef604a3...402897d22505a13505c19adca23c03a47224175f

    402897d 2021-05-09 Jaeyoung-Lim - Update mavsdk version scripts
2021-05-16 12:55:28 -04:00
Jonas Vautherin 5f14ee2a97 busy -> invalid item 2021-05-13 12:22:16 +02:00
Daniel Agar ad0482155e ROMFS: reduce LOGGER_BUF default to 8 kB on older boards 2021-05-12 17:06:33 +02:00
bresch 85f5a935fe [AUTO COMMIT] update change indication 2021-05-12 08:33:07 +10:00
bresch f7c687e433 GNSS yaw unit test: test fallback to non yaw aiding mode 2021-05-12 08:33:07 +10:00
bresch a4fe2b1e72 yaw_align: let the mag control logic do the alignement and resets 2021-05-12 08:33:07 +10:00
bresch 2cc023038b mag control: select mag mode before doing the reset 2021-05-12 08:33:07 +10:00
bresch fe943cf104 mag reset: force align in MC custom mode (aka. indoor mode)
Checking the parameter is enough to decide if we want to force the yaw
alignment or not
2021-05-12 08:33:07 +10:00
bresch cadcc58415 mag reset: do not stop the fusion from inside the reset function
The start/stop is already handled in the dedicated mag control logic
The early return is not required as this case is handled just below
2021-05-12 08:33:07 +10:00
bresch 6248646bff EV yaw: move EV yaw reset out of resetMagHeading function
Also remove the unnecessary 2nd "manual reset" done in the start function
2021-05-12 08:33:07 +10:00
bresch 48722a2a92 control: inhibit EV yaw from restarting when GPS aid wants to start 2021-05-12 08:33:07 +10:00
bresch a685987082 GNSS yaw: unset yaw_align if fusion stops before takeoff
We do not want to rely on a potentially badly initialized heading as it
could lead to a flyaway directly after takeoff

Also remove the resetMagHeading() call from the GPS fusion control logic
as this is properly handled in mag_control.
2021-05-12 08:33:07 +10:00
bresch 7ee69706e8 GNSS yaw: add test case when measurement jumps 2021-05-12 08:33:07 +10:00
bresch 7a11871566 GNSS yaw tests: adjust timing
the starting condition needs more than 1 sample to determine if the data
comes regularly

the timeout on "no data" is defined by the fusion reset timeout
parameter (7 seconds)
2021-05-12 08:33:07 +10:00
bresch 51197a5d82 GNSS yaw selection logic refactor 2021-05-12 08:33:07 +10:00
Beat Küng d300a879f1 cmake: remove romfs content before tar extraction
This avoids incremental build errors when switching between branches with
a different set of airframes.

E.g:
Aborting due to missing @type tag in file: 'Firmware/build/px4_fmu-v5_default/etc/init.d/airframes/13030_generic_vtol_quad_tiltrotor'
2021-05-11 13:14:42 -04:00
Beat Küng e77b4418a5 fix logger: use free() instead of 'delete[]' for _buffer
The allocation got changed to px4_cache_aligned_alloc
2021-05-11 18:12:56 +02:00
Igor Mišić 05a2d4d5a9 gps: updated submodule to fix for heading 2021-05-11 08:34:23 +02:00
Igor Mišić d9e31d67aa gps: Updated timeout time for the rover with moving base
The MB rover will wait as long as possible to compute a navigation solution, possibly lowering the navigation rate all the way to 1 Hz while doing so.
2021-05-11 08:34:23 +02:00
Silvan Fuhrer b7e563bdbe Airspeed selector: fix in_air_fixed_wing condition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-10 13:43:05 +02:00
Silvan Fuhrer 596da5b7d3 Airspeed selector: use module params for FW_AIRSPD_STALL
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-10 13:43:05 +02:00
Silvan Fuhrer 2f73115b54 translate ASPD_STALL to FW_AIRSPD_STALL
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-10 13:43:05 +02:00
Silvan Fuhrer bf311ed77d addressed review comments (fixes in error message and comments)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-10 13:43:05 +02:00
Silvan Fuhrer 63a53d48e7 FW Position controller: improve parameter sanity checks (provide more feedback)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-10 13:43:05 +02:00
Silvan Fuhrer c8ec6b3d08 Airspeed selector: remove ASPD_STALL and replace by FW_AIRSPD_STALL
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-10 13:43:05 +02:00
RomanBapst 3b27864e53 vehicle_status: added field for geofence violation
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-10 10:46:49 +03:00
RomanBapst 3ac8c23dd0 commander: added prearm check for geofence violation
- if geofence action is not none, then don't allow arming outside of geofence

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-10 10:46:49 +03:00
RomanBapst 6215e6c7ec navigator: do not emit geofence warnings if system is not armed
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-10 10:46:49 +03:00
David Sidrane e87a6c755d px4_fmu-v5x:Add support for Revision 2 FMUM HW using ICM20649 not BMI088 2021-05-10 09:11:50 +02:00
David Sidrane 69e0c2fc10 px4:platform support SPI configuration selection on HW REV 2021-05-10 09:11:50 +02:00
Julian Oes e4ee7c7d98 sitl_gazebo: update submodule
This fixes the simulation stalling after 30mins due to an int overflow.
2021-05-09 15:17:25 +02:00
David Sidrane 541697d193 NuttX Backports Fixing SDIO/SDMMC Data Timeouts
stm32, F7 and H7
2021-05-08 04:40:54 -07:00
Daniel Agar c49c8932de commander: mag_calibration fail immediately if no mags available 2021-05-08 13:03:42 +02:00
Peter van der Perk 0c926250a2 UAVCANv1 cleanup and uORB over UAVCANV1 move to own subclass 2021-05-08 13:03:02 +02:00
Daniel Agar dfb4ec56b1 Makefile: clean and distclean updates
- update clean to recurse all build directories and use build system clean
 - git clean is used to remove submodule generated build artifacts that
are left in the source tree
 - distclean now discards all build directories and any gitignored
filess that were generated in source directories (but not top level)
2021-05-08 12:29:16 +02:00
Daniel Agar f15eefcc95 ekf2: selector increase status rate before potential instance change 2021-05-07 22:38:47 -04:00
Julian Oes 29730e30fa ekf2: don't timeout in HITL mode
Otherwise ekf2 might not start if HITL isn't started within 30 seconds.
2021-05-07 22:38:03 -04:00
Julian Oes ac97b5520c commander: assume power is fine for HITL
This means that the preflight check indicator in QGC is green for HITL.
2021-05-07 22:38:03 -04:00
Julian Oes 648a21f11d commander: ignore calibration in HITL
The calibration is not found in HITL mode. Therefore, I suggest to
ignore this step and assume the calibration is fine.

This mostly fixes the preflight check indicator in QGC, arming was (for
some reason?) already possible.
2021-05-07 22:38:03 -04:00
Hamish Willee d3fd03a014 airspeed calibration: instruct to blow into front of pitot
... rather than across it
2021-05-07 21:34:53 -04:00
David Sidrane b1e0702657 px4_fmuv2:Save Flash CONFIG_LIBC_STRERROR=n 2021-05-07 11:50:38 -07:00
David Sidrane 8d82560308 NuttX Backports
[BACKPORT] binnfmt:Fix return before close ELF fd
   stm32h7: serial: use dma tx semaphore as resource holder
   [BACKPORT] stm32h7:Serial Add RX and TX DMA
   [BACKPORT] drivers/serial: fix Rx interrupt enable for cdcacm
   [BACKPORT] stm32h7:Allow for reuse of the OTG_ID GPIO
   [BACKPORT] stm32f7:Allow for reuse of the OTG_ID GPIO
2021-05-07 11:50:38 -07:00
PX4 BuildBot e265ebabc5 Update submodule ecl to latest Thu May 6 12:39:12 UTC 2021
- ecl in PX4/Firmware (a300d32523e24df3f366a0d564b764261e1c1909): https://github.com/PX4/PX4-ECL/commit/a7b8afe420f438554ad90bcba0f1f4872325e75b
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/29243ac5cbb5d27ac71744e88afcd786df6f748d
    - Changes: https://github.com/PX4/PX4-ECL/compare/a7b8afe420f438554ad90bcba0f1f4872325e75b...29243ac5cbb5d27ac71744e88afcd786df6f748d

    29243ac 2021-05-05 bresch - yaw_reset: reduce minimum vector length to compute yaw error
aad4840 2021-05-02 Kabir Mohammed - EKF: increase allowed difference between flow and gyro ODRs
2021-05-06 13:53:40 -04:00
Daniel Agar 9419f9c5e8 Update submodule mavlink v2.0 to latest Thu May 6 12:39:02 UTC 2021 2021-05-06 13:52:43 -04:00
bresch 29243ac5cb yaw_reset: reduce minimum vector length to compute yaw error
A value of 1m/s was too conservative and the EKF takes too much time to
trigger a yaw reset. The value can be safely reduced because the
threshold is computed using the accuracy of the measurement and estimate
before being limited by this value.
2021-05-06 19:13:54 +10:00
Silvan Fuhrer 08dab18a8b vtol_type: in FW, set min PWM to PWM_DEFAULT_MIN instead of PWM_MOTOR_OFF
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-06 10:20:24 +02:00
benjinne 099c2d13f6 dshot: add 3D capability 2021-05-06 08:12:07 +02:00
Daniel Agar 177ee4cbca drivers/optical_flow/paw3902: properly discard samples after mode change
- respect mode 2 shutter requirements from datasheet (should not operate with Shutter < 0x01F4 in Mode 2)
 - sensor reset is handled by mode change
2021-05-05 21:48:01 -04:00
Daniel Agar b1ebd16c61 ekf2: improve selector reset handling
- handle reset count rollover (uint8_t)
 - compute full reset delta if primary estimator instance has changed or if we missed a reset
2021-05-05 21:45:13 -04:00
Alessandro Simovic d1d5eba320 follow-me: log follow_target msg 2021-05-05 16:13:50 -04:00
Alessandro Simovic 48f3bd4078 follow-me: formatting 2021-05-05 16:13:50 -04:00
Alessandro Simovic 5f19eeaaa5 follow_target: copy also velocity fields from uorb 2021-05-05 16:13:50 -04:00
Alessandro Simovic 2d6bc9b6e0 follow_target: use actual velocity measurement 2021-05-05 16:13:50 -04:00
Alessandro Simovic 5d9b3504f7 follow-target: correctly set "updated" flag 2021-05-05 16:13:50 -04:00
Alessandro Simovic f1fca0939f follow-target: name variable correctly 2021-05-05 16:13:50 -04:00
David Sidrane 3702140e24 PWMOut:Arm once all channels are initalized. 2021-05-05 20:48:06 +02:00
David Sidrane 3d166d3279 PWM:Add Channel mask to up_pwm_servo_arm & up_pwm_servo_deinit 2021-05-05 20:48:06 +02:00
David Sidrane 19fa5cfe25 px4_fmu-v6x: Disable OTG_ID_GPIO 2021-05-05 20:48:06 +02:00
David Sidrane baa37c1143 px4_fmu-v5x: Disable OTG_ID_GPIO 2021-05-05 20:48:06 +02:00
David Sidrane 0385245ae1 px4_fmu-v5: Disable OTG_ID_GPIO 2021-05-05 20:48:06 +02:00
David Sidrane 1f61dcfb06 modalai_fc-v1: Disable OTG_ID_GPIO 2021-05-05 20:48:06 +02:00
David Sidrane 3779ff3690 holybro_pix32v5: Disable OTG_ID_GPIO 2021-05-05 20:48:06 +02:00
David Sidrane 21cf26a69f holybro_durandal-v1: Disable OTG_ID_GPIO 2021-05-05 20:48:06 +02:00
David Sidrane a654c37306 cuav_x7pro: Disable OTG_ID_GPIO 2021-05-05 20:48:06 +02:00
David Sidrane 07e38563ba cuav_nora: Disable OTG_ID_GPIO 2021-05-05 20:48:06 +02:00
David Sidrane d5b60f7002 NuttX with WIP OTG_ID 2021-05-05 20:48:06 +02:00
David Sidrane 923af2c65b spracing_h7extreme: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 2d3800fa25 px4_fmu-v6x: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 4f8c1ccfe8 px4_fmu-v6u: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 7dd57d55f6 px4_fmu-v5x: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 69bf437e9a px4_fmu-v5: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 633fbe147a nxp_fmuk66-v3: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 118839e75c nxp_fmuk66-e: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 3f5a0e49a4 mro_pixracerpro: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 86360d076c mro_ctrl-zero-h7: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 3820f761b1 mro_ctrl-zero-h7-oem: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 50d3af1ba1 mro_ctrl-zero-f7: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 867aa9d4bc mro_ctrl-zero-f7-oem: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 310d166899 modalai_fc-v1: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 9c761d9ae5 holybro_pix32v5: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane b3b74eaaf6 holybro_kakutef7: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 4c8dca738c holybro_durandal-v1: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 4da1ec1146 cubepilot_cubeyellow: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 1a5741f984 cubepilot_cubeorange: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 4d4d8ed887 cuav_x7pro: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane eae01a06e7 cuav_nora: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane d6a54910b4 av_x-v1: Initalize PWM as input with Pull Downs 2021-05-05 20:48:06 +02:00
David Sidrane 362db92515 Define PX4_MAKE_GPIO_INPUT_PULL_DOWN 2021-05-05 20:48:06 +02:00
David Sidrane dd4ffb3c0c PWMOut:Fix pwm status 2021-05-05 20:48:06 +02:00
David Sidrane 44cdc52ef8 PWMOut:Use rates from single instance & init all instances channels 2021-05-05 20:48:06 +02:00
David Sidrane dcbfc9de2d io_timer:Fixed imposible logic 2021-05-05 20:48:06 +02:00
Peter van der Perk 9a085126fd FMUK66 free up some RAM 2021-05-05 18:52:56 +02:00
Jukka Laitinen ac6e7a1c6c FlightTaskManualAltitude: Fix double->float conversion in initialization
This gives an error on some new compilers, e.g. riscv64-unknown-elf 10.2.0

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-05 09:31:07 +02:00
Jukka Laitinen 532f370e7d Fix implicit float to double conversions
The both results of ?: should be of same type, and some compilers give error
on this:
	" implicit conversion from 'float' to 'double' to match other result of conditional"

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-05 09:31:07 +02:00
Peter van der Perk 62dc926891 Add support for UCANS32K146B board revision 2021-05-04 22:13:24 -04:00
Daniel Agar c1d3be4258 Makefile: keep git clean for submodules to resolve incomplete dependency problems 2021-05-04 21:22:56 -04:00
Daniel Agar 68a9e981b1 boards: px4_fmu-v5_optimized disable temperature_compensation to save flash 2021-05-04 21:20:32 -04:00
Daniel Agar f5b6656a6c cmake: set MAX_CUSTOM_OPT_LEVEL to -O3 if Release 2021-05-04 21:20:32 -04:00
Daniel Agar 3b7ce61901 px4_work_queue: increase wq:rate_ctrl stack slightly 2021-05-04 17:40:56 -04:00
Daniel Agar 3ec40a5956 collision_prevention: fix CP_GO_NO_DATA parameter type 2021-05-04 16:41:32 -04:00
Peter van der Perk 24c2967511 legacy_data_types specify branch 2021-05-04 13:23:14 -04:00
Matthias Grob ee87257a8d FlightModeManager: move velocity control feedback into FlightTask
This was only handled outside because FlightTaks lived in the
multicopter position controller which produces the data that was
needed but now it doesn't make sense anymore to handle this
subscription separately.

It's better to have it inside the base task to have the data available
on task activation sucht that e.g. Altitude mode can take over smoothly
from Position mode.
2021-05-04 16:47:48 +02:00
Matthias Grob c28533677d MulticopterLandDetector: use setpoint generation to infer decend intent
For any normal use case where a downwards velocity setpoint is set
this works exactly the same as before.
E.g. autonomous landing, landing in Altitude or Position mode

The advantage is that the very common case where a vehicle tries
to hold a constant altitude but fails to do so e.g. during a hard brake
with too much lift the resulting downwards velocity was interpreted
as descend intent and since the vehicle already struggled to hold altitude
with low thrust and was not moving fast anymore because it was braking
this lead to a lot more false positives on certain vehicle types.

The disadvantage is that not setting a downwards velocity setpoint but
just moving the position setpoint into the ground does not result in
land detection anymore. We do not use this method of landing anymore for
quite a while. It's not recommended and I wonder if there's some rare use
case like offboard where this is done.

We could add an additional case for the specific case to land with a
position setpoint only.
2021-05-04 16:43:33 +02:00
Matthias Grob 2e292abfff MulticopterLandDetector: Make land detection time configurable
The tree stages used arbitrary 350, 250 300ms totally 900ms
So this changes it to each stage to a third of the parameter.
Default it is 1 second -> 333ms per stage.
2021-05-04 16:43:33 +02:00
RomanBapst 269ce07cb5 land detector: log more states in order to facilitate debugging ground contact state
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-04 16:43:33 +02:00
Daniel Agar 3348869ae1 Makefile: git clean properly preserve project files (.project, .cproject, etc) 2021-05-04 09:49:50 -04:00
Jari Nippula 04b7ee43bc protocol_splitter: Sp2Header defined as union (#17511)
Aligned with agent_protocol_splitter to make byte access easier
for checksum generation

Co-authored-by: Nuno Marques <n.marques21@hotmail.com>
2021-05-04 10:09:24 +02:00
Mikołaj Grzybek 4e69952ee4 arch.sh: Syntax error fix
Script failed for me with following error
PX4-Autopilot/Tools/setup/arch.sh: line 159: syntax error near unexpected token `else'
PX4-Autopilot/Tools/setup/arch.sh: line 159: `			else'
Seems like there is nothing to do in case of positive if case.
Changed code should maintain logic
2021-05-04 10:06:39 +02:00
RomanBapst cd4378b8c6 vtol: init boolean consistently
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-03 18:58:26 -04:00
Thomas ab10e68a40 update Quadchute trigger from mavlink PR 1569 2021-05-03 21:44:27 +03:00
Thomas bf9758247b add VEHICLE_VTOL_STATE_QC and remove hardcoding 2021-05-03 21:44:27 +03:00
Thomas d3ddbe8db5 Allow quadchute from external command 2021-05-03 21:44:27 +03:00
Peter van der Perk ecc5154a44 Reflect dynamically allocate block pointers instead of using heap 2021-05-03 14:04:02 -04:00
David Sidrane cd2aceb363 stm32_common:board_reset Fix reboot -b broke by canbootloader 2021-05-03 05:21:25 -07:00
Kabir Mohammed aad48407c2 EKF: increase allowed difference between flow and gyro ODRs
In the normal and lowlight mode for the PAW3902/3 sensor, the ODR is 66Hz, while in super lowlight mode it is 50Hz.

The IMU ODR vs flow ODR mismatch threshold was too conservative for the 66Hz ODR, since https://github.com/PX4/PX4-ECL/pull/928. The EKF would keep waiting for the data to line up and never fuse measurements.
2021-05-03 11:08:16 +02:00
Silvan Fuhrer 2c6b3eeb02 Navigator: NAV_CMD_DO_VTOL_TRANSITION: accept once in correct vtol state
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-03 08:40:54 +02:00
Silvan Fuhrer 5579a1d789 Navigator: remove WORK_ITEM_TYPE_CMD_BEFORE_MOVE
It was used to make the vehicle needing to accept the waypoint after a VTOL transition in the new VTOL mode

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-03 08:40:54 +02:00
Silvan Fuhrer 3c4b0c1b8c tiltrotor: only allow increasing tilt during first part of transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-02 21:51:09 -04:00
Jukka Laitinen fa9fdce6e6 sensors/vehicle_gps_position: Fix raw_dt and present_dt calculation in gps_blending
If the GPS data is passed from companion computer, there may be inaccuracies
with timesync. This may cause time deltas to overflow.

Make the time delta calculation using floats directly, wich results in negative
numbers in case there are such inaccuracies.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-02 13:59:50 -04:00
Daniel Agar e78a4287f9 parameters: attempt import multiple times 2021-05-02 13:48:16 -04:00
Daniel Agar 3b24abaa1b Makefile: clean use git clean to delete all gitignore files recursively 2021-05-02 13:47:54 -04:00
Daniel Agar feebb24106 logger: skip multi-EKF logging if CONSTRAINED_MEMORY 2021-05-02 13:47:28 -04:00
Femtomes 783a780207 drivers/gps: add femtomes gps driver protocol 2021-05-02 13:46:39 -04:00
Julian Oes abee13df1a mavlink: improve rx stats printf 2021-05-02 13:45:39 -04:00
Julian Oes d96ba2d88a mavlink: use 4s for HITL
This is more inline with SITL.
2021-05-02 13:45:39 -04:00
Julian Oes e9a1599355 mavlink: clang-tidy fix 2021-05-02 13:45:39 -04:00
Julian Oes aa0752ad86 mavlink: fix pthread usage 2021-05-02 13:45:39 -04:00
Julian Oes 5784f1d951 mavlink: add detailed stats about rx messages 2021-05-02 13:45:39 -04:00
Julian Oes 370d9ee409 mavlink: use px4::atomic instead of volatile 2021-05-02 13:45:39 -04:00
Julian Oes 4498509426 mavlink: move thread handling into MavlinkReceiver
In my opinion this makes it much cleaner and will allow mavlink main to
directly call the receiver.
2021-05-02 13:45:39 -04:00
Julian Oes 71bd35fcaa mavlink: keep track of seq for any component
Instead of only keeping track of the sequence ID of specific "supported"
components, we now keep track of any sysid/compid of an incoming
message. Before this change, unknown components (such as jMAVSim) would
completely screw up the mavlink message stats and create confusion (at
least in my case).

With this change we currently keep track of up to 8 other components.
Once we reach the limit, we will print a warning.
2021-05-02 13:45:39 -04:00
Julian Oes 6ae23e7b7b mavlink: fix HITL battery status publication
Without these fields the pre-arm check would complain and fail.

Also, the voltage is adjusted to be at around 70% rather than 30% which
would almost start to trigger warnings.
2021-05-02 13:45:39 -04:00
Julian Oes cfcc074e9d mavlink: remove unused methods 2021-05-02 13:45:39 -04:00
Daniel Agar b4e0a8396e Tools/process_sensor_caldata.py - median filter sensor data
- this makes it a bit easier to see what's going on now that the raw sensor data (sensor_accel, sensor_gyro) is completely unfiltered
2021-05-02 13:42:09 -04:00
Daniel Agar 5ec5a12f5e Tools/setup: update ubuntu.sh with current NuttX dependencies 2021-05-02 13:10:47 -04:00
TSC21 18dc0e4900 update submodule micro-CDR 2021-05-02 13:05:16 -04:00
Daniel Agar 6e2343a485 Jenkins: fix new px4io/px4-dev-nuttx-focal container tag 2021-05-02 12:34:48 -04:00
SalimTerryLi 514d4fd57b drivers/distance_sensor: GY-SR04 sonar range finder driver 2021-05-02 12:09:35 -04:00
PX4 BuildBot 32d354e5fe Update submodule ecl to latest Sun May 2 12:39:08 UTC 2021
- ecl in PX4/Firmware (cb999f37d4891ebfbbc21b4ce9b3851888b39ad4): https://github.com/PX4/PX4-ECL/commit/5d34d7a24ef72b826c320a3259ee0ec68b1936df
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/a7b8afe420f438554ad90bcba0f1f4872325e75b
    - Changes: https://github.com/PX4/PX4-ECL/compare/5d34d7a24ef72b826c320a3259ee0ec68b1936df...a7b8afe420f438554ad90bcba0f1f4872325e75b

    a7b8afe 2021-04-30 Eike - Allow rangefinder fusion in vision height mode (Fix for #994) (#999)
4ac57d3 2021-04-25 Daniel Agar - EKF: increase fault flags value size to fit current flag bits (> 16)
2021-05-02 11:47:36 -04:00
Daniel Agar 92dc1a71a6 github actions delete MAVROS avoidance tests
- these aren't currently running properly on github actions, but continue to use build resources
2021-05-02 11:44:06 -04:00
Daniel Agar 165420598e Update submodule mavlink v2.0 to latest Sat May 1 00:38:27 UTC 2021 2021-05-01 19:17:28 -04:00
PX4 BuildBot 8ef10c9b38 Update submodule public_regulated_data_types to latest Sat May 1 12:41:36 UTC 2021
- public_regulated_data_types in PX4/Firmware (bb5225ddae32f3a85f6c01fa5957f1b30cb73a14): https://github.com/UAVCAN/public_regulated_data_types/commit/309b251a7e8d713d6bf428e18e28d91d5f07b73e
    - public_regulated_data_types current upstream: https://github.com/UAVCAN/public_regulated_data_types/commit/1337b1c86fee5bd3f3c3c0f1027bcf19e5c08aae
    - Changes: https://github.com/UAVCAN/public_regulated_data_types/compare/309b251a7e8d713d6bf428e18e28d91d5f07b73e...1337b1c86fee5bd3f3c3c0f1027bcf19e5c08aae

    1337b1c 2021-04-23 Pavel Kirienko - Update the `nominal_voltage` in battery parameters (#114)
2021-05-01 19:17:02 -04:00
PX4 BuildBot 199db72d5f Update submodule public_regulated_data_types to latest Sat May 1 12:41:39 UTC 2021
- public_regulated_data_types in PX4/Firmware (d052cf4a6963d576e0e108b6c95b6fa4fab57584): https://github.com/UAVCAN/public_regulated_data_types/commit/309b251a7e8d713d6bf428e18e28d91d5f07b73e
    - public_regulated_data_types current upstream: https://github.com/UAVCAN/public_regulated_data_types/commit/1337b1c86fee5bd3f3c3c0f1027bcf19e5c08aae
    - Changes: https://github.com/UAVCAN/public_regulated_data_types/compare/309b251a7e8d713d6bf428e18e28d91d5f07b73e...1337b1c86fee5bd3f3c3c0f1027bcf19e5c08aae

    1337b1c 2021-04-23 Pavel Kirienko - Update the `nominal_voltage` in battery parameters (#114)
2021-05-01 19:16:42 -04:00
mcsauder 4eb758edf0 Alphabetize flight_mode_manager CMakeLists.txt list, and group/format types in FlightTask.cpp/hpp. 2021-05-01 10:46:27 -04:00
Yannick Fuhrer 759a60ac82 Update rc.vtol_defaults
based on our experience with VTOL it makes sense to change the yaw mode default. You always want your VTOL to yaw in transition direction before starting the transition.
2021-05-01 10:45:14 -04:00
PX4 BuildBot dd0465070c Update submodule jMAVSim to latest Sat May 1 12:41:22 UTC 2021
- jMAVSim in PX4/Firmware (d2a118ee86): https://github.com/PX4/jMAVSim/commit/358b6cca4093646eb96e0cb075e45efa8f4a0c48
    - jMAVSim current upstream: https://github.com/PX4/jMAVSim/commit/2b610caab81726ab79019de0f2fa8cff5e341bd5
    - Changes: https://github.com/PX4/jMAVSim/compare/358b6cca4093646eb96e0cb075e45efa8f4a0c48...2b610caab81726ab79019de0f2fa8cff5e341bd5

    2b610ca 2021-04-21 Julian Oes - Merge pull request #126 from PX4/pr-forwarding
75f2aa3 2021-04-21 Julian Oes - Serial/TCP/UDP ports: mark messages as forwarded
2021-05-01 10:31:43 -04:00
Daniel Agar 186bc2bda4 Update submodule GPSDrivers to latest Sat May 1 00:38:31 UTC 2021 2021-05-01 10:31:09 -04:00
PX4 BuildBot d2a118ee86 Update submodule sitl_gazebo to latest Sat May 1 00:38:24 UTC 2021
- sitl_gazebo in PX4/Firmware (283138e87d46e573ce101033e01a59b273430928): https://github.com/PX4/PX4-SITL_gazebo/commit/05e2cd9c03ffa77f0c0d5bd3e788d33e06480b25
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/4c27fc7dd659c262257abeea2308e2f1c54e9029
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/05e2cd9c03ffa77f0c0d5bd3e788d33e06480b25...4c27fc7dd659c262257abeea2308e2f1c54e9029

    4c27fc7 2021-04-20 JaeyoungLim - Update mavsdk versions for firmware SITL tests (#741)
2021-04-30 21:04:25 -04:00
David Sidrane 92344b96b3 CI Update to 2021-04-29 2021-04-30 14:32:40 -04:00
Eike a7b8afe420 Allow rangefinder fusion in vision height mode (Fix for #994) (#999)
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-04-30 14:17:39 -04:00
Julian Oes 4f52c0b6da mavsdk_tests: unused var and index fix 2021-04-29 21:08:33 -04:00
Julian Oes f16913c175 mavsdk_tests: fix timeout at 1x speed 2021-04-29 21:08:33 -04:00
Julian Oes e7fcfbf658 mavsdk_tests: use global position instead of local
We are currently not testing with flow only anyway, so we might as well
remove this for now.
2021-04-29 21:08:33 -04:00
Julian Oes 43fccece61 mavsdk_tests: check installed version
Starting with MAVSDK 0.39.0 we can specify the version required. This
way we can fail at configure time instead of later during compilation or
linking.
2021-04-29 21:08:33 -04:00
Julian Oes 14e51098e5 workflows: use MAVSDK_VERSION in sitl_tests 2021-04-29 21:08:33 -04:00
Julian Oes 7384bd2675 mavsdk_tests: specify required MAVSDK version
This way it can be better picked up by CI scripts.
2021-04-29 21:08:33 -04:00
Daniel Agar 64688b04d8 boards: mro pixracerpro set BOARD_SUPPORTS_RC_SERIAL_PORT_OUTPUT instead of RC_SERIAL_SINGLEWIRE 2021-04-29 21:06:39 -04:00
Peter van der Perk 96bc58f0eb CMake Bloaty add static ram usage breakout 2021-04-29 10:16:43 -04:00
TSC21 4f098a01bc drivers: protocol_splitter: some style updates 2021-04-29 11:57:35 +02:00
Jari Nippula 9980d2a556 Utilize header struct instead of control bytes directly 2021-04-29 09:37:48 +02:00
Jari Nippula 757f1df068 Protocol_splitter: 4-byte header with checksum 2021-04-29 09:37:48 +02:00
korotkoves d62204856c ROMFS/px4fmu_common/init.d-posix/rcS: split and source data from files in PATH 2021-04-28 09:00:47 +02:00
CUAVcaijie b898aabfed Fix the repeated configuration of PWM rate after initialization 2021-04-28 00:22:07 +02:00
Kalyan Sriram b2d73dca26 uavcan_v1: cmake: nunavut generation message 2021-04-27 10:30:33 -04:00
Kalyan Sriram 925213db8f requirements: bump nunavut minimum version 2021-04-27 10:30:33 -04:00
Beat Küng 38c1ec6a9c ekf2: check if ChangeInstance succeeded 2021-04-27 10:29:09 -04:00
Beat Küng 0a98c5a7f4 Subscription: fix ChangeInstance 2021-04-27 10:29:09 -04:00
Beat Küng 1a89f165fd fix bmi088: set correct accel scale
This affected the clipping limit, which was set too low
2021-04-27 10:27:57 -04:00
RomanBapst 171c26373b land_detector: robustify land detection by using distance to ground info
- if distance to the ground is available then hysteresis times will be increased
by a factor of 3 if vehicle is higher than 1m above ground

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-04-27 08:19:19 +02:00
RomanBapst f6a34e1e80 vtol_type: reset accel to pitch integrator
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-04-27 07:43:38 +03:00
Alex Mikhalev cbf34109d1 paw3902: Default to using SENS_FLOW_ROT rotation
This restores the behavior to what it was previous to #16338 (74083d6).

Signed-off-by: Alex Mikhalev <alex@corvus-robotics.com>
2021-04-26 15:14:17 -04:00
Daniel Agar c266c3e43a parameters: remove unnecessary param_get_system_default_value() locking 2021-04-26 09:49:15 +02:00
benjinne 3664d9e4ce rover: publish actuator controls with rate of gyro
Some ESC's with DShot don't initialize otherwise (as the 200Hz of the vehicle attitude rate is too low).
2021-04-26 08:53:20 +02:00
JacobCrabill cc81c7d49e poor-mans-profiler: Add documentation
Now sets the GDB serial device to the path of a DroneCode Probe by
default, with option command-line option override.

A few usage instructions added to the top of the file.
2021-04-26 08:47:49 +02:00
Daniel Agar 4ac57d3bde EKF: increase fault flags value size to fit current flag bits (> 16) 2021-04-25 17:05:09 -04:00
Daniel Agar 6e9e503ee6 sensors/vehicle_imu: accel clipping warning minor improvements
- no warning if accel is disabled
 - threshold increased 100 -> 1000 (only warn if severe ongoing clipping)
 - more generic warning message (vehicle isn't necessarily in air flying)
2021-04-25 17:03:43 -04:00
Daniel Agar 8478d1ea37 sensors/vehicle_angular_velocity: properly handle filter reset on FIFO data scale changes
For the sake of efficiency (at 8 kHz) all filtering is performed on the raw data before the calibration and rotation is applied to only the final output. As a result we have to be a bit more careful when switching between sensors or in cases where the gyro scale factor changes (eg icm42688p 20 bit data rescaled to fit in int16 output).
2021-04-25 14:20:32 -04:00
Daniel Agar ed0fa99198 icm42688p: limit to 8 kHZ for now 2021-04-24 20:23:19 -04:00
Daniel Agar 59b70a881d commander: temporarily increase worker thread stack substantially 2021-04-23 22:13:12 -04:00
Matthias Grob 5416679735 check_code_style_all.sh: remove ignored xargs parameter
to suppress the warning message:
`xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value`
when running make format.
2021-04-23 22:09:16 -04:00
Matthias Grob 6df299738e FlightTask: reactivate tasks on ground with empty setpoint
Such that they properly reset and don't try to take over smoothly from
their own setpoints generated in the last loop iteration.
2021-04-23 21:57:27 -04:00
Matthias Grob 9e2375ab91 FlightTaskManualAcceleration: change reset order, check all components for NAN
Just cleanup and completeness.
2021-04-23 21:57:27 -04:00
Matthias Grob 5e75f17680 StickAccelerationXY: fix acceleration reset using x component instead of y
This entire feature only has an impact if the last mode set
a huge acceleration and we have to take over as smooth as possible.
But it's stil lworth fixing.
2021-04-23 21:57:27 -04:00
Matthias Grob fee4728b1f StickAccelerationXY: change function name feasibility limit -> jerk limit
for clarity because it's more accurate.
2021-04-23 21:57:27 -04:00
Daniel Agar c71a228f15 Tools/setup: macos use pip as python3 module 2021-04-23 16:47:49 -04:00
bazooka joe 112fc5c9cd log battery status every 0.2sec instead of 0.3sec
Battery status is logged every 0.3Sec.
but BMS data published every 0.25Sec, so there are many drops of data.
2021-04-23 16:46:02 -04:00
Beat Küng 51f527d845 param: update 'param show-for-airframe' to use set-default 2021-04-23 16:44:55 -04:00
Beat Küng 1730cd1971 param: avoid warning for 'param show -c' or 'param show -a' 2021-04-23 16:44:55 -04:00
Igor Mišić d631a5d39f Commander: checking COM_ARM_CHK_ESCS param for ESCs telemetry
COM_ARM_CHK_ESCS set to 0. The user will need to enable it manually.
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2021-04-22 13:46:08 +02:00
Claudio Micheli bff99f9794 Commander:esc_checks minor improvements
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-04-22 13:46:08 +02:00
Claudio Micheli 371fa98579 Commander/preflight checks: Add monitoring to ESC failures
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-04-22 13:46:08 +02:00
Thies Lennart Alff 1c624d20f5 srcparser support for vectored 6 dof uuv airframe added 2021-04-22 08:30:11 +02:00
Matthias Grob 789d91900d commander_params: lower COM_DISARM_PRFLT but disable for fixed-wing 2021-04-21 14:55:04 +02:00
Daniel Agar f9d8c613b0 px4_work_queue: increase nav_and_controllers stack 2021-04-21 07:34:13 +02:00
Peter van der Perk 8b3aa46c01 [UAVCANv1] Publisher default timeout, has to be tuned further for all publishers 2021-04-20 21:44:40 +02:00
Peter van der Perk 1804cea92c [UAVCANv1] TX deadline fix and other fixes 2021-04-20 21:44:40 +02:00
Peter van der Perk 02a4d93c74 [UAVCANv1] snprintf and cleanup ram usage ~4KB 2021-04-20 21:44:40 +02:00
Peter van der Perk 399815469f [UAVCANv1] Subscriber multi topic subscription
reg.drone.bms full support
legacy.equipment.bms support
2021-04-20 21:44:40 +02:00
Matthias Grob 5e7ebbe47c FlightTask: correct comment about setpoints 2021-04-20 18:18:21 +02:00
Matthias Grob 45ada2dd4c MulticopterLandDetector: remove unnecessary newline 2021-04-20 18:18:21 +02:00
Matthias Grob 4865d027f9 StickAccelerationXY: factor in stricter tilt limit on takeoff 2021-04-20 18:18:21 +02:00
Matthias Grob 29e07b1e52 MulticopterPositionControl: publish stricter tilt limit during takeoff 2021-04-20 18:18:21 +02:00
Matthias Grob ff67da1bb4 SlewRate: add getter for current state without update 2021-04-20 18:18:21 +02:00
Lorenz Meier 3d8a35288e Rename Snapdragon Spektrum RC
The previous name was confusing because it did not clarify that this driver was specific to the Snapdragon platform.
2021-04-18 18:35:03 +02:00
Daniel Agar 38bc46fd1a re-add RC_MAP_RATT_SW (unused) and mark active for QGC 2021-04-16 13:07:02 -04:00
mcsauder 3b72f3b641 Create publish_status() method in the heater driver, add a status field to indicate if the temperature setpoint has been met within 2.5C, breakout update_params() method from the Heater::Run() method and simplify logic. 2021-04-16 08:09:51 -04:00
benjinne 3dad16bc40 RTPS client remove redundant baudrate check 2021-04-16 14:01:27 +02:00
benjinne 42108eb4af Fix microRTPS_client_main.cpp format 2021-04-16 14:01:27 +02:00
benjinne 76e15b4a21 RTPS client get baudrate parameter if requested, and mark the device baud rate parameter as used so it shows up in QGC 2021-04-16 14:01:27 +02:00
Daniel Agar 2492fb35e4 rc_update: require consecutive valid input_rc before publishing 2021-04-15 16:40:54 -04:00
PX4 BuildBot 96c7fe4978 Update submodule matrix to latest Thu Apr 15 12:39:10 UTC 2021
- matrix in PX4/Firmware (501b463b36b07481181c15b734861704d9f27020): https://github.com/PX4/PX4-Matrix/commit/1d0e7f1ca1187c90c70a9dac92ca6294a320b1d3
    - matrix current upstream: https://github.com/PX4/PX4-Matrix/commit/b8568a89db8455d0ab2e2e391e2149ba2e5e10dd
    - Changes: https://github.com/PX4/PX4-Matrix/compare/1d0e7f1ca1187c90c70a9dac92ca6294a320b1d3...b8568a89db8455d0ab2e2e391e2149ba2e5e10dd

    b8568a8 2021-04-14 Daniel Agar - Euler: improve quaternion constructor
2021-04-15 13:27:07 -04:00
Daniel Agar 5c4582ccce rc: dsm allow full range 2021-04-15 18:27:33 +02:00
Igor Mišić bd4839e855 commander: changed msg "connection to GCS lost" from critical to info
update
2021-04-15 11:29:02 -04:00
Beat Küng 2219e096d7 cmake: embed param metadata if not CONSTRAINED_FLASH and not "test" LABEL 2021-04-15 08:16:51 +02:00
PX4 BuildBot 592dc65bae Update submodule matrix to latest Thu Apr 15 00:39:06 UTC 2021
- matrix in PX4/Firmware (d9ebf2a842f611976d7ba5078d3f31ad8cde55a7): https://github.com/PX4/PX4-Matrix/commit/3679f7fd5160c7d2a8271b1134ca1e601f1a4254
    - matrix current upstream: https://github.com/PX4/PX4-Matrix/commit/1d0e7f1ca1187c90c70a9dac92ca6294a320b1d3
    - Changes: https://github.com/PX4/PX4-Matrix/compare/3679f7fd5160c7d2a8271b1134ca1e601f1a4254...1d0e7f1ca1187c90c70a9dac92ca6294a320b1d3

    1d0e7f1 2021-04-14 Daniel Agar - Matrix: use naive per element copy instead of memcpy call
1344ce0 2021-04-14 Daniel Agar - Euler: simplify DCM constructor
2021-04-14 23:11:41 -04:00
Daniel Agar b8568a89db Euler: improve quaternion constructor 2021-04-14 22:56:03 -04:00
Daniel Agar 1d0e7f1ca1 Matrix: use naive per element copy instead of memcpy call 2021-04-14 15:44:18 -04:00
Daniel Agar 1344ce06fd Euler: simplify DCM constructor
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2021-04-14 15:40:24 -04:00
Jukka Laitinen b99e597a73 flashparams: Fix a null-pointer dereference crash
Fix a potential crash caused by calling erase_sector with a null
sector_descriptor (current_sector == 0).

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-04-14 07:55:33 -07:00
Daniel Agar 58b40fbbb9 boards: move testing to dedicated test variants 2021-04-14 09:21:31 +02:00
Daniel Agar 047fb13922 IMU_GYRO_RATEMAX: enforce reasonable constraint and update metadata 2021-04-13 20:26:57 -04:00
Barcis, Michal 7053919a9f fixed micrortps_agent usage description 2021-04-13 21:28:27 +02:00
Daniel Agar 2d15c96b9b ekf2: Multi-EKF let new instance schedule itself immediately on successful init
- this is to minimize missed sensor data (and unnecessary error output) between EKF2 construction and once it actually starts running
2021-04-13 14:24:46 -04:00
Daniel Agar 6a4c589c62 examples/work_item: add ModuleParams and more uORB::Subscription example usage 2021-04-13 14:23:36 -04:00
Lorenz Meier bf09089a26 PWM out: Collect settings for all outputs
There are settings that have to be the same for a split output across multiple instances, like for example the PWM mask and rate configurations. This change collects them for all outputs of the same underlying driver structure and applies the complete set.
2021-04-13 18:39:27 +02:00
Lorenz Meier 6bc11596fe VTOL mixer: Correct alt rate channels
The baby shark config did mark main rate outputs (50 Hz) as alt rate, resulting in the alt rate being set to 50 Hz.
2021-04-13 18:39:27 +02:00
Daniel Agar aa22407d87 drivers/pwm_out: only print rates if changed 2021-04-13 09:55:21 +02:00
Daniel Agar a07bccc046 boards: modalai simplify defaults with new parameter defaults mechanism (AUTOCNF replacement) 2021-04-12 21:27:53 -04:00
Daniel Agar f44f497e3f parameters: better handle export failures and retry 2021-04-12 21:26:50 -04:00
Daniel Agar edc445a1b2 parameters: tinybson fill total document length for bson compatibility 2021-04-12 21:26:50 -04:00
PX4 BuildBot b9e0a16594 Update submodule public_regulated_data_types to latest Mon Apr 12 12:45:35 UTC 2021
- public_regulated_data_types in PX4/Firmware (9101f5707a251c33048289249bd565eba5d3a848): https://github.com/UAVCAN/public_regulated_data_types/commit/53a7dbbf85554e11517c13ad91b9efb871599ad1
    - public_regulated_data_types current upstream: https://github.com/UAVCAN/public_regulated_data_types/commit/309b251a7e8d713d6bf428e18e28d91d5f07b73e
    - Changes: https://github.com/UAVCAN/public_regulated_data_types/compare/53a7dbbf85554e11517c13ad91b9efb871599ad1...309b251a7e8d713d6bf428e18e28d91d5f07b73e

    309b251 2021-04-11 Peter van der Perk - reg.drone Battery parameters add nominal voltage (#113)
2021-04-12 19:51:35 -04:00
Lorenz Meier 991c07eef9 Global: Allow users to arm with USB
This change reflects the medium-term experience with users using USB as data link or power source in R&D setups. While we still discourage this for volume products, not allowing it seems like a major hurdle and blocker in R&D setups.
2021-04-12 19:11:22 -04:00
Lorenz Meier 3a004ffd68 PWM Out: Simplify startup logic
The simpler logic is more robust towards future refactoring.
2021-04-12 19:11:22 -04:00
PX4 BuildBot 5f6b8fcb9f Update submodule sitl_gazebo to latest Mon Apr 12 12:45:32 UTC 2021
- sitl_gazebo in PX4/Firmware (8acdb8ca3f): https://github.com/PX4/PX4-SITL_gazebo/commit/5761bd66cd36ded2d0dccf8127e30a1522fe1ac6
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/05e2cd9c03ffa77f0c0d5bd3e788d33e06480b25
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/5761bd66cd36ded2d0dccf8127e30a1522fe1ac6...05e2cd9c03ffa77f0c0d5bd3e788d33e06480b25

    05e2cd9 2021-04-10 Manuel Galliker - Removed unused computation of CoG (#737)
2021-04-12 14:22:14 -04:00
Daniel Agar f0f16b9cc5 mavlink: streams fix SCALED_IMU size reporting 2021-04-12 13:02:10 -04:00
Beat Küng faaee0f077 fix pwm_out: avoid race condition when setting mode
Bootup failed in some cases with:
ERROR [mixer] can't reset mixers on /dev/pwm_output1

The reason was the mode change was not applied yet.
2021-04-12 18:39:51 +02:00
PX4 BuildBot 18f17dcb96 Update submodule public_regulated_data_types to latest Mon Apr 12 12:45:37 UTC 2021
- public_regulated_data_types in PX4/Firmware (9f25ac4175fd81259b11cfe79f0f875a21562d3d): https://github.com/UAVCAN/public_regulated_data_types/commit/53a7dbbf85554e11517c13ad91b9efb871599ad1
    - public_regulated_data_types current upstream: https://github.com/UAVCAN/public_regulated_data_types/commit/309b251a7e8d713d6bf428e18e28d91d5f07b73e
    - Changes: https://github.com/UAVCAN/public_regulated_data_types/compare/53a7dbbf85554e11517c13ad91b9efb871599ad1...309b251a7e8d713d6bf428e18e28d91d5f07b73e

    309b251 2021-04-11 Peter van der Perk - reg.drone Battery parameters add nominal voltage (#113)
2021-04-12 09:58:48 -04:00
Silvan Fuhrer 381c97d3c6 Commander: baro check: only report failure of mandatory instances
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-04-12 09:27:12 -04:00
tututu123-tu 8acdb8ca3f Update .gitmodules 2021-04-12 08:18:16 -04:00
CUAVmengxiao 45b9e18195 UAVCANv0: add CUAV smart battery support 2021-04-11 21:27:31 -04:00
David Sidrane 96d0755afd NuttX with SDMMC Backport 2021-04-09 15:53:26 -04:00
Tarik Agcayazi 1520805a20 README: remove redundant autogyro, add High altitude balloons 2021-04-09 08:48:17 +02:00
Daniel Agar 39c96a8884 gps add device_id 2021-04-08 08:27:07 +02:00
Alex Mikhalev 1f4960d480 boards: cubeorange enable pwm_input
Signed-off-by: Alex Mikhalev <alex@corvus-robotics.com>
2021-04-07 21:34:44 -04:00
alexklimaj 0c3e64a7f5 Fix support for Cube Black Heater 2021-04-07 10:23:02 -04:00
benjinne 9b7eae4043 rc: enable crsf and ghst telemetry on supported boards
Co-authored-by: Benjamin Linne <benjamin.linne.civ@mail.mil>
2021-04-07 08:51:49 +02:00
Hamish Willee 6fbb409e43 Param markdown - fix sensor param table 2021-04-07 08:46:11 +02:00
alessandro b46e505b0d Handle velocity fields in follow_target message
The mavlink message FOLLOW_TARGET has additional
fields that are not being parsed here. See
https://mavlink.io/en/messages/common.html#FOLLOW_TARGET
for more details.
2021-04-06 22:11:23 -04:00
Hamish Willee aa94a60043 COM_ARM_WO_GPS - values round the wrong way 2021-04-06 22:10:02 -04:00
obicons a7e920d276 Updated MavlinkReceiver::handle_message_landing_target to warn users when they provide a landing target with an unsupported coordinate frame.
Updated Simulator::handle_message_landing_target to warn users when they provide a landing target that is not relative to a captured image.
2021-04-06 16:02:54 -04:00
Daniel Agar 31b9efdaeb sensors/vehicle_imu: increase threshold for clipping warning 2021-04-06 15:42:26 -04:00
Daniel Agar f33fee99c1 ROMFS: init.d-posix/airframes migrate EKF2_GPS_MASK -> SENS_GPS_MASK 2021-04-06 13:48:40 -04:00
Julian Oes bb0fe9ee61 mavsdk_tests: losen time limit for VTOL mission 2021-04-06 11:35:18 -04:00
Julian Oes 2eaf677de3 mavsdk_tests: correctly locate plan 2021-04-06 11:35:18 -04:00
Julian Oes cd66a79747 mavsdk_tests: move waypoints to vehicle position
This way it shouldn't matter where the test is run.
2021-04-06 11:35:18 -04:00
Julian Oes 9eadabcb02 sitl_tests: update MAVSDK to v0.38.0 2021-04-06 11:35:18 -04:00
Julian Oes d714c2faec mavsdk_tests: add VTOL mission tests
This adds VTOL mission tests to the CI integration tests.
This depends on MAVSDK v0.38.0.
2021-04-06 11:35:18 -04:00
Julian Oes 1e88939605 mavsdk_tests: report speed factor every second
This helps in debugging slow CI.
2021-04-06 11:35:18 -04:00
Daniel Agar e05a4badf8 ROMFS: rcS start uavcan earlier
- starting this earlier is a minor improvement for things like lights and buzzers on UAVCAN or parameter sync over mavlink
2021-04-06 09:48:11 -04:00
Daniel Agar 4189eb11f5 simulator: GPS populate all sensor_gps fields (alt_ellipsoid, etc) 2021-04-06 09:44:18 -04:00
Daniel Agar 015849b402 mathlib: LowPassFilter2p and NotchFilter add magnitude response getter 2021-04-05 22:47:30 -04:00
Daniel Agar f9460107d0 cleanup PWM param naming inconsistencies 2021-04-05 22:41:06 -04:00
PX4 BuildBot f741606c60 Update submodule sitl_gazebo to latest Tue Apr 6 00:39:03 UTC 2021
- sitl_gazebo in PX4/Firmware (2a0a747598): https://github.com/PX4/PX4-SITL_gazebo/commit/e703e2726a4cd82cf3c57614e9c33d6354310885
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/5761bd66cd36ded2d0dccf8127e30a1522fe1ac6
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/e703e2726a4cd82cf3c57614e9c33d6354310885...5761bd66cd36ded2d0dccf8127e30a1522fe1ac6

    5761bd6 2021-04-05 Jaeyoung-Lim - Switch tailsitter sdf version to 1.6
2021-04-05 22:28:47 -04:00
Daniel Agar 436a6fce38 Update submodule mavlink v2.0 to latest Tue Apr 6 00:39:07 UTC 2021 2021-04-05 22:28:10 -04:00
PX4 BuildBot 997abf382d Update submodule public_regulated_data_types to latest Tue Apr 6 00:39:10 UTC 2021
- public_regulated_data_types in PX4/Firmware (5e242d366f2e266e8226f7baa33e5973783e2045): https://github/commit/7f5489e6e916cc8b13db0582dcf9930e225594b9
    - public_regulated_data_types current upstream: https://github/commit/53a7dbbf85554e11517c13ad91b9efb871599ad1
    - Changes: https://github/compare/7f5489e6e916cc8b13db0582dcf9930e225594b9...53a7dbbf85554e11517c13ad91b9efb871599ad1

    53a7dbb 2021-03-31 Pavel Kirienko - Change wording in uavcan.pnp.NodeIDAllocationData to reflect the less static nature of UAVCAN v1 (#111)
c3aa82f 2021-03-23 Pavel Kirienko - Update Readiness as discussed at the DS-015 call
fcc1062 2021-03-16 Pavel Kirienko - Doc amendment for uavcan.register.Access: mapping between registers and environment variables (#109)
342f358 2021-02-22 Pavel Kirienko - Remove misleading comment in battery.Status.0.2
1baa9cb 2021-02-22 Pavel Kirienko - Add link to Nunaweb and synchronize the description with the front page (#108)
2021-04-05 21:23:06 -04:00
Benjamin Linne 2a0a747598 boards: modalai-fc-v1 add rtps.cmake add to ci 2021-04-05 17:01:35 -04:00
Benjamin Linne a1bc520df8 boards: modalai-fc-v1 add rtps.cmake add to ci 2021-04-05 17:01:35 -04:00
Benjamin Linne 3261118538 boards: modalai-fc-v1 add rtps.cmake 2021-04-05 17:01:35 -04:00
Daniel Agar 54438140e1 ROMFS: posix airframes update to new parameter defaults mechanism (AUTOCNF replacement) 2021-04-05 15:29:34 -04:00
Daniel Agar 565c644b2e boards: CUAV keep Nora and X7pro in sync 2021-04-05 12:54:41 -04:00
Daniel Agar 695adbc037 Jenkins: hardware skip AUTOCNF, don't force px4io update, show configured parameters 2021-04-05 12:30:55 -04:00
Daniel Agar 357b322eb5 ROMFS: tune_control stop if px4io update fails 2021-04-05 11:49:55 -04:00
PX4 BuildBot 74e848d57e Update submodule public_regulated_data_types to latest Mon Apr 5 12:40:16 UTC 2021
- public_regulated_data_types in PX4/Firmware (1557f3a23461a144dd75edae4595665e5684597d): https://github.com/UAVCAN/public_regulated_data_types/commit/7f5489e6e916cc8b13db0582dcf9930e225594b9
    - public_regulated_data_types current upstream: https://github.com/UAVCAN/public_regulated_data_types/commit/53a7dbbf85554e11517c13ad91b9efb871599ad1
    - Changes: https://github.com/UAVCAN/public_regulated_data_types/compare/7f5489e6e916cc8b13db0582dcf9930e225594b9...53a7dbbf85554e11517c13ad91b9efb871599ad1

    53a7dbb 2021-03-31 Pavel Kirienko - Change wording in uavcan.pnp.NodeIDAllocationData to reflect the less static nature of UAVCAN v1 (#111)
c3aa82f 2021-03-23 Pavel Kirienko - Update Readiness as discussed at the DS-015 call
fcc1062 2021-03-16 Pavel Kirienko - Doc amendment for uavcan.register.Access: mapping between registers and environment variables (#109)
342f358 2021-02-22 Pavel Kirienko - Remove misleading comment in battery.Status.0.2
1baa9cb 2021-02-22 Pavel Kirienko - Add link to Nunaweb and synchronize the description with the front page (#108)
2021-04-05 11:26:01 -04:00
Daniel Agar e8d98c1f8a uavcan: skip beep if CBRK_BUZZER circuit breaker set 2021-04-05 11:25:37 -04:00
Daniel Agar 8e8826c516 Makefile: uorb_graphs exclude src/lib from graph_full 2021-04-05 11:03:43 -04:00
Daniel Agar 186e987efb Jenkins: fetch all tags before generating Airframe & Parameter documentation (master only) 2021-04-05 09:51:18 -04:00
Daniel Agar 2e390009f0 Jenkins: fetch all tags before make documentation (master only) 2021-04-05 09:24:21 -04:00
Julian Oes 8720655683 sitl_gazebo: update submodule
This fixes the airspeed sensor orientation for tailsitter.
2021-04-05 14:14:31 +02:00
Silvan Fuhrer 8400f2c9bc FW attitude controller: add protection against division by zero in airspeed scaling
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-04-04 21:22:28 -04:00
Beat Küng 436258c1c5 config: cleanup ethernet configuration 2021-04-04 21:20:36 -04:00
Daniel Agar ad934b4911 icm20948 i2c passthrough driver for ak09916 magnetometer (Here+ GPS/compass)
- include icm20948 on most boards by default
 - create more test variants for default boards near flash limit (cuav_nora_test, cuav_x7pro_test, holybro_durandal-v1_test)
2021-04-04 21:18:16 -04:00
Daniel Agar c6a0161047 commander: COM_PREARM_MODE disable by default 2021-04-03 20:15:05 +02:00
Daniel Agar bbf27d6960 boards: mro pixracerpro Add remaining SRAM4 & DTCM to heap 2021-04-03 14:13:23 -04:00
Daniel Agar 43da43ddc6 boards: cubepilot cubeorange Add remaining SRAM4 & DTCM to heap 2021-04-03 14:13:23 -04:00
Daniel Agar fffa10ade4 boards: px4_fmu-v6u sync with other stm32h7 boards 2021-04-03 14:13:23 -04:00
Daniel Agar 825d81dd57 boards: px4_fmu-v6x sync with other stm32h7 boards 2021-04-03 14:13:23 -04:00
David Sidrane dcfa3c97ba px4 fmu-v6x:Add remaining SRAM4 & DTCM to heap 2021-04-03 14:13:23 -04:00
David Sidrane 38485a5d41 px4 fmu-v6u:Add remaining SRAM4 & DTCM to heap 2021-04-03 14:13:23 -04:00
David Sidrane 961bac759a mro pixracerpro:Add remaining SRAM4 & DTCM to heap 2021-04-03 14:13:23 -04:00
David Sidrane 2f9a57c604 mro ctrl-zero-h7:Add remaining SRAM4 & DTCM to heap 2021-04-03 14:13:23 -04:00
David Sidrane 5c7a9204a2 mro ctrl-zero-h7-oem:Add remaining SRAM4 & DTCM to heap 2021-04-03 14:13:23 -04:00
David Sidrane f63f1f3969 holybro durandal-v1:Add remaining SRAM4 & DTCM to heap 2021-04-03 14:13:23 -04:00
David Sidrane 55ed76522e cuav x7pro:Add remaining SRAM4 & DTCM to heap 2021-04-03 14:13:23 -04:00
David Sidrane df201342bb cuav nora:Add remaining SRAM4 & DTCM to heap 2021-04-03 14:13:23 -04:00
David Sidrane 5e73fe588e NuttX with SRAM4-heap-bp 2021-04-03 14:13:23 -04:00
Jaeyoung-Lim 01083cecfc Enable adis16448 with parameter
This commit adds enabling adis16448 with a parameter
2021-04-03 13:58:25 -04:00
Nidhish Raj 01d8c3da3d vtol_att_control: occasional tailsitter forward transition failure issue solved
Tailsitter VTOLs very occasionally gets stuck with zero roll and pitch angle in multicopter mode after
a forward transition command is issued.
This very rare behavior is triggered by the following events:
1> a forward transition is triggered either in auto or manual mode.
2> in the vtol_att_control main loop, if multicopter and fixed wing attitude setpoints are not updated, transition state is not updated
3> the commander changes the vehicle status to transition mode.
4> multicopter pos controller initiated  Transition flight task. This results in zero roll and pitch setpoint due to zero acceleration setpoint
5> now vtol_att_control executes and updates the transition state. Specifically, _q_trans_start and _q_trans_sp are set with zero roll and pitch sp
6> tilt is evaluated to be NaN, despite _q_trans_sp being normalized. This happens for 25% of all yaw angles when using float datatype. This can be
   verified using the matrix library
7> once tilt is evaluated to be NaN, _q_trans_sp is never updated again and is stuck in this state for ever.

This has been fixed by constraining the cos(tilt) within +1 to -1 range
Further, _q_trans_start and _q_trans_sp are immedietly initialized after a transition event is triggered.
2021-04-03 19:19:48 +02:00
Daniel Agar b30f3917d3 sensors/vehicle_imu: periodically send mavlink critical message if clipping 2021-04-03 10:32:16 -04:00
Daniel Agar 588883f663 uavcan: quiet server output
- remove verbose UAVCAN command bridge prefix
 - disable many normal PX4_INFO messages entirely (kept as PX4_DEBUG)
 - properly exit when arming (silently)
2021-04-03 10:07:50 -04:00
David Sidrane 2fcdadfbd1 holybro_durandal-v1:Enable UAVCAN 2021-04-03 12:47:20 +02:00
David Sidrane 003ef59019 px4_fmu-v6x:Enable UAVCAN 2021-04-03 12:47:20 +02:00
Lorenz Meier c96ca0434e Update README.md
Sort autopilot generations according to relevance to potential users (latest first)
2021-04-03 12:21:02 +02:00
PX4 BuildBot 9a02141d0d Update submodule ecl to latest Fri Apr 2 12:39:10 UTC 2021
- ecl in PX4/Firmware (744cd1182e183b62a0ab4b2f3e4e3c4aa6f5c15f): https://github.com/PX4/PX4-ECL/commit/6f2dec726adeedcb53aad9a77a8fcdfc8f7b3054
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/5d34d7a24ef72b826c320a3259ee0ec68b1936df
    - Changes: https://github.com/PX4/PX4-ECL/compare/6f2dec726adeedcb53aad9a77a8fcdfc8f7b3054...5d34d7a24ef72b826c320a3259ee0ec68b1936df

    5d34d7a 2021-03-31 Eike - Height source vision: Fallback to rangefinder if available (#994)
da06f25 2021-03-28 PX4BuildBot - [AUTO COMMIT] update change indication
85fcf93 2021-03-28 PX4 BuildBot - Update geo_lookup WMM  to latest Sun Mar 28 11:48:06 UTC 2021
2021-04-02 11:46:19 -04:00
Lorenz Meier 1ec8ce58c7 Commander: Increase auto-disarm timeout to 25 seconds after arming 2021-04-02 09:37:40 +02:00
Daniel Agar 278633c980 boards: cuav x7pro include correct adis IMU 2021-04-01 17:13:54 -04:00
Daniel Agar c017f76a36 github actions add all NuttX builds 2021-04-01 10:21:14 -04:00
Lorenz Meier 82f319a84a Commander: Add support for pairing via commandline 2021-04-01 09:56:09 -04:00
斯东Stone e789124bd9 Remove duplicated line in 50003_aion_robotics_r1_rover 2021-04-01 09:36:20 -04:00
Beat Küng 369d375417 holybro_can-gps-v1_debug: disable ekf & listener due to flash overflow 2021-04-01 08:35:36 -04:00
Daniel Agar 9171a84324 IMU_DGYRO_CUTOFF increase default 10 -> 20 Hz 2021-04-01 08:30:09 -04:00
Jaeyoung-Lim 19c4fdd7c5 Add support for 3D body thrust setpoint for offboard attitude control
This adds support for filling up the 3D thrust setpoint using SET_ATTITUDE_TARGET message
Update mavlink submodule
2021-04-01 13:58:04 +02:00
Nico van Duijn 8d3335906a v5x: use low bandwidth mavlink mode
This changes the default mavlink message set from onboard to
onboard_low_bandwidth, which drastically reduces the bandwidth required to get a
usable connection.
2021-04-01 07:28:43 +02:00
Daniel Agar 846695f986 ekf2: replace vehicle_imu lost error message with perf count 2021-03-31 22:07:32 -04:00
Daniel Agar 00f86eb895 drivers/uavcan: silence redundant exit message 2021-03-31 22:01:35 -04:00
Chris Lovett 292a66ce41 Add support for simulators running on a different host than the PX4 instance 2021-03-31 20:56:38 -04:00
RomanBapst b66ae5f2d4 tecs: use raw inertial acceleration for true airspeed complementary filter
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-03-31 20:12:40 -04:00
Beat Küng 9dd6bef7f9 autostart scripts: remove SYS_PARAM_VER
With the airframe defaults there's no use for that anymore
2021-03-31 20:12:05 -04:00
Beat Küng aec63eacbe mavlink_receiver: avoid spamming 'unsupported component id' 2021-03-31 20:10:15 -04:00
Matthias Grob 5f4802a239 SlewRate: add back dummy file for mac build 2021-03-31 15:50:16 +02:00
Matthias Grob 8fec39ad39 MulticopterPositionControl: readd takeoff ramp fix
added in #14821 and accidentally removed in #14665
2021-03-31 15:21:42 +02:00
Eike 5d34d7a24e Height source vision: Fallback to rangefinder if available (#994) 2021-03-31 14:24:38 +02:00
Bastian Jäger 752bc9ebce startup scripts: fix rc.mavlink_override 2021-03-31 14:05:24 +02:00
Julian Kent 5c5ec1a0ea Receive telemetry_status, send vehicle_trajectory_waypoint_desired 2021-03-31 13:26:00 +02:00
Julian Kent b5a64f957e Update RTPS messages to match what is needed for PX4/Avoidance 2021-03-31 13:26:00 +02:00
Julian Kent c1cb964c2a RTPS timesync don't use MONOTONIC_RAW 2021-03-31 13:25:27 +02:00
Julian Kent 1011382098 Clamp RTPS -> uorb timestamps to system time 2021-03-31 13:25:27 +02:00
TSC21 eca4d90a91 init.d-posix: adjust COM_OBC_LOSS_T when using PX4_SIM_SPEED_FACTOR 2021-03-31 13:25:01 +02:00
TSC21 7abce87ae4 commander: add COM_OBC_LOSS_T for setting onboard computer loss time-out 2021-03-31 13:25:01 +02:00
Beat Küng e9370c658a nuttx cmake: include upload.cmake if it exists (same as on posix) 2021-03-31 11:25:11 +02:00
RomanBapst 5b08362ba3 position_controller_status message: added comments regarding NAN
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-03-31 11:23:33 +02:00
Matthias Grob c06b5a1de9 MulticopterPositionControl: improve tilt limit readability and scope
according to @bresch's review comment.
2021-03-31 10:03:08 +02:00
Matthias Grob 94469d84ae MulticopterPositionControl: fix twitch on tilt limit relaxation 2021-03-31 10:03:08 +02:00
Matthias Grob 34a5948692 Adapt SlewRate includes to convention 2021-03-31 10:03:08 +02:00
Matthias Grob c16b937221 Takeoff: switch internally to use a ramp progress 2021-03-31 10:03:08 +02:00
Matthias Grob 8ca76feaba Takeoff: remove updateRamp() early return 2021-03-31 10:03:08 +02:00
Matthias Grob b7600f4e4d Commander: check_posvel_validity use return value 2021-03-30 22:33:01 -04:00
Matthias Grob 29e1e0905c Commander: switch main_state functions to pass by reference 2021-03-30 22:33:01 -04:00
Matthias Grob 531de5c588 Commander: switch all state_machine_helper functions to pass by reference 2021-03-30 22:33:01 -04:00
Matthias Grob d97fba67e5 Commander: switch helper functions to pass by reference 2021-03-30 22:33:01 -04:00
Daniel Agar 0fa91f7cb0 commander: centralize main_state strings and simplify main state change attempts
* commander: centralize main_state strings and simplify main state change attempts
2021-03-30 17:56:28 +02:00
Daniel Agar 18be1bacdc state_machine_helper: automatically initialize to assist mode if using mavlink manual control 2021-03-30 17:56:28 +02:00
Claudio Micheli b001865e5c Commander: clean up logic for flight mode transitions and add joystick mode initialization
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-03-30 17:56:28 +02:00
Daniel Agar 9a35756cd1 ekf2: enable range aid by default
- this is to help more users get the benefit (by default) and perhaps circumvent the common mistake of setting EKF2_HGT_MODE to range sensor
 - this should be safe to enable as the range aid defaults are fairly conservative (max horizontal velocity 1 m/s, and range aid gate 1 SD)
2021-03-30 10:23:18 -04:00
Daniel Agar 6874e9fba0 boards: NuttX disable all NSH memory debug commands (mb, mh, mw) by default
- closes https://github.com/PX4/PX4-Autopilot/issues/17062
2021-03-30 09:23:43 -04:00
Michael Schaeuble f9af1bbe2d PreFlightCheck: Check if SD card is present only once and store the result
statfs accesses the file-system and can be blocking for an extended period. Since the SD card check is part of the preflight checks in the main thread of commander, it could block its execution and cause various issues. The SD card is only mounted in rcS during boot so the state will not change after the first check.
2021-03-30 08:20:49 +02:00
Daniel Agar c2350c06c1 commander: ManualControl avoid unnecessary copy 2021-03-30 08:19:07 +02:00
Beat Küng 416a663d11 params: add build dependency for *parameters.c
Makes sure changes to these files trigger metadata rebuild
2021-03-30 08:18:49 +02:00
Beat Küng 42a865f349 param json: ensure category is set to Standard if not set
For xml this was previously done on the QGC side.
2021-03-30 08:18:49 +02:00
Beat Küng 2d2799b739 IMU_GYRO_CUTOFF: add 800 (used by SITL) 2021-03-30 08:18:49 +02:00
Beat Küng 346f269d8f IMU_INTEG_RATE: add 250 (used by SITL) 2021-03-30 08:18:49 +02:00
Beat Küng 6a7688cbca component_information: rework to reflect mavlink message changes 2021-03-30 08:18:49 +02:00
Daniel Williams 0f29b87101 [uorb-graph][squash][refactor] Rework of uorb-graph script -- Greatly expands handled test cases
- Source processing now happens on original source files:
    - processing to line-by-line
    - required overhaul of regex match patterns + processing
    - pros:
        - enable tracing of ambiguous parsing sites -- reports (module, file, line-number, line-contents)
        - simplifies code
        - reduces computational complexity
    - cons:
        - certain declarations are harder to parse: multiline declarations
- refactors:
    - added specific subclasses for each: Publications, Subscriptions, Ambiguities
    - added a "Scope" class to represent either a module ('ModuleScope') or a library ('LibraryScope')
- regexes:
    - added cases for C++-style classes
    - expanded C++-style regex cases to accommodate templates
    - `ORB_ID::` is accepted wherever `ORB_ID(` is accepted
    - adds 'orb_copy' regex to the subscription cases
    - emit ambiguous-line warning for declarations with `ORB_ID` on the same line
    - emit ambiguous-line warning for `ORB_ID` with a declaration on the same line
- changed 'module whitelist' to 'scope-whitelist'
    - whitelist may now apply to libraries
    - libraries are optionally merged with their depending modules (but not by default)
    - may be merged with their depending modules with the `--merge-depends` cli flag
    - eliminates some redundant 'special-case' handling code
- debug output
    - raises exception and aborts if a topic is found outside of a scope
    - debug output is now printed & filtered with the python 'logging' standard module
    - alphabetizes topic output in debug logging
    - fixes debug output if package dependencies are missing
    - now warns on ambiguous matches
    - prints a list of ambiguous source sites (aka warnings) on completion
    - (still) emits a warning if we find ORB_ID outside of a scope
    - adds warnings if any of the source paths are invalid
    - do not emit debug output for modules outside of the module/scope whitelist
- Expand script's CLI parameters
    - added 'none' output options: undocumented debugging option to silence file output while debugging
    - added the `--merge-depends` cli flag -- merges output of modules & their dependee libraries
2021-03-29 09:36:34 +02:00
PX4BuildBot da06f25216 [AUTO COMMIT] update change indication 2021-03-28 21:22:25 -04:00
PX4 BuildBot 85fcf9393d Update geo_lookup WMM to latest Sun Mar 28 11:48:06 UTC 2021 2021-03-28 21:22:25 -04:00
Daniel Agar 3d667b1675 delete unused drivers/lights/blinkm 2021-03-28 19:21:29 -04:00
Daniel Agar 631d1647d3 boards: minimize unnecessary differences in default variants 2021-03-28 14:46:47 -04:00
Daniel Agar fcc4153c26 drivers/gps: explicitly link libm
- needed on stripped down builds
2021-03-28 12:39:22 -04:00
Daniel Agar 7314b69adc cmake: fix jlink_flash_uavcan_bin helper 2021-03-28 12:39:22 -04:00
Daniel Agar f5c7f89a76 vscode add holybro can-gps-v1 variants 2021-03-28 12:39:22 -04:00
Daniel Agar e58af90bac boards: holybro can-gps-v1 create separate default and debug variants 2021-03-28 12:39:22 -04:00
Daniel Agar 86b831b019 Update submodule GPSDrivers to latest Sun Mar 28 12:39:06 UTC 2021 (#17253)
- devices in PX4/Firmware (22b74424d42fa89ebc4df84422ca7ea633843878): https://github.com/PX4/PX4-GPSDrivers/commit/e7f0b23f47d65490b72e9bacaff191bda2d99496
    - devices current upstream: https://github.com/PX4/PX4-GPSDrivers/commit/f2eb62c2c78a2ec47bccfe993ff59acc94155e7e
    - Changes: https://github.com/PX4/PX4-GPSDrivers/compare/e7f0b23f47d65490b72e9bacaff191bda2d99496...f2eb62c2c78a2ec47bccfe993ff59acc94155e7e

    f2eb62c 2021-02-21 chenhui.yu - sbf: fix #430 longitude judgement bug

Co-authored-by: PX4 BuildBot <bot@px4.io>
2021-03-28 11:13:58 -04:00
Daniel Agar f65781025e boards: mRo x21 enable mpu9250 mag (only internal)
- fixes #17244
2021-03-26 21:02:30 -04:00
Daniel Agar b1c913244f boards: CUAV X7pro restore lights 2021-03-26 18:25:39 -04:00
Daniel Agar e77bffe582 boards: STM32H7 remove CONFIG_MM_REGIONS=3 2021-03-26 17:40:44 -04:00
Daniel Agar a260ddd8ff posix-configs: rpi multi-EKF defaults
- the ekf2 frontend typically runs in the background for up to 30 seconds waiting for all instances to appear, but this isn't supported by the legacy posix launcher
2021-03-26 14:24:34 -04:00
Daniel Agar a9b47558b1 magnetometer/lsm9ds1_mag: fix register typo and refactor to new style with state machine and configuration monitoring 2021-03-26 14:23:25 -04:00
bresch a124426541 ecl: apply same GNSS speed accuracy for EKF2 and yaw estimator 2021-03-25 12:57:36 -04:00
bresch ace6f81c93 commander: report estimator mag fault detection to ground station 2021-03-25 12:57:36 -04:00
bresch 2c5342acd4 commander: increase nav_test_failed hysteresis time
This is to avoid race condition with the yaw emergency estimator having
the same trigger delay of 1 second. Commander will now give more time to
EKF2 to reset itself before switching to altitude mode.
2021-03-25 12:57:36 -04:00
Serhat Aksun beadae6dfc process_sensor_caldata.py: Fix 2nd barometer plot
fixed the figure numbers to avoid plot conflicts
2021-03-25 09:53:15 -04:00
bresch 6f2dec726a gps sacc: apply same minimum for EKF2 and yaw estimator 2021-03-25 09:54:30 +01:00
Daniel Agar 5a1eb3f9ef Update submodule GPSDrivers to latest Thu Mar 25 00:41:54 UTC 2021 2021-03-25 00:25:29 -04:00
PX4 BuildBot 98e1e25d93 Update submodule sitl_gazebo to latest Thu Mar 25 00:41:48 UTC 2021
- sitl_gazebo in PX4/Firmware (7f2566dd8a): https://github.com/PX4/PX4-SITL_gazebo/commit/1f339cdf5c5da27097e58ec2beb2793bf6057c7d
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/3e5fed04d8e574b10e17e446d2938346bc6152ca
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/1f339cdf5c5da27097e58ec2beb2793bf6057c7d...3e5fed04d8e574b10e17e446d2938346bc6152ca

    3e5fed0 2021-03-22 JaeyoungLim - Multiple airspeed sensors in SITL with multi HIL_SENSOR instances (#731)
2021-03-24 23:54:49 -04:00
David Sidrane 7f2566dd8a NuttX STM32H7 16 bit SPI fixes + ADIS16470 updates for proper 16 bit mode in burst 2021-03-24 19:29:40 -04:00
Daniel Agar 92910de81d gyro_fft: silence initial sensor selection attempt
- early in startup the selected gyro may not be published yet
2021-03-24 18:58:18 -04:00
David Sidrane d9d832c568 NuttX with BACKPORT libc/stdio: Preallocate the stdin, stdout and stderr 2021-03-24 18:27:30 -04:00
Daniel Agar 2d6deb4f1c drivers/rc_input: don't accept RX_PAIR cmd when armed 2021-03-24 15:13:38 -04:00
Lorenz Meier 435ef38eda RC Input: Reset lock state when switching to a new protocol 2021-03-24 15:13:38 -04:00
Daniel Agar 3502ba53ba Update submodule mavlink v2.0 to latest Wed Mar 24 12:38:18 UTC 2021 2021-03-24 11:25:00 -04:00
Beat Küng c4ae667157 generate_board_targets_json.py: exclude uavcanv1 for now
px4_fmu-v4_uavcanv1 fails to build:
../../src/drivers/uavcan_v1/Uavcan.cpp: In static member function 'static int UavcanNode::start(uint32_t, uint32_t)':
../../src/drivers/uavcan_v1/Uavcan.cpp:140:29: error: 'interface' was not declared in this scope
  140 |  _instance = new UavcanNode(interface, node_id);
2021-03-24 10:08:41 -04:00
Beat Küng c46c6e63ae px4/fmu-v4/uavcanv1: remove non-existing tap_esc module & gyro_fft example 2021-03-24 10:08:41 -04:00
Beat Küng f528c5d206 github ci: push parameter metadata to s3 2021-03-24 10:08:41 -04:00
Beat Küng c3985709e4 version: add optional oem version tag (ext/oem-<version>) and log it 2021-03-24 10:08:41 -04:00
Beat Küng be3849f0b2 px4_mkfw.py: fix byte to string conversion 2021-03-24 10:08:41 -04:00
Beat Küng bac2a02a65 git: ignore git tags starting with 'ext/' when getting the version tag
Allows for external/extra tags
2021-03-24 10:08:41 -04:00
Daniel Agar ae010ea55c sensors/vehicle_angular_velocity: unify filtering for both FIFO and regular use cases 2021-03-24 09:23:40 +01:00
PX4 BuildBot 8c173b2e7f Update submodule ecl to latest Wed Mar 24 00:38:46 UTC 2021
- ecl in PX4/Firmware (a730f0f5ce7a2cc909cb3d0dfab5f0106a9b3aeb): https://github.com/PX4/PX4-ECL/commit/bb950a1550ba55de36ed66877817ec7f2f47b349
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/e3d1ade66092d47478488c89e4a6f6d21f0435a4
    - Changes: https://github.com/PX4/PX4-ECL/compare/bb950a1550ba55de36ed66877817ec7f2f47b349...e3d1ade66092d47478488c89e4a6f6d21f0435a4

    e3d1ade 2021-03-12 Daniel Agar - EKF: use flow for vel test ratio if only active source of horizontal aiding
2021-03-23 22:17:11 -04:00
Daniel Agar b2faea7f43 pwm_out: check PWM_OUT_MAX_INSTANCES with conditional
- PWM_OUT_MAX_INSTANCES is a constant (static constexpr) not available to the preprocessor
2021-03-23 22:13:18 -04:00
Silvan Fuhrer 3983f0b833 ROMFS: add new VTOL config and mixer (generic quadplane tiltrotor VTOL) 2021-03-23 19:55:19 -04:00
Beat Küng 2dace0c9ea param: limit short description lenght to 150 for existing, 70 for yaml 2021-03-23 12:55:11 -04:00
Beat Küng 629f7ba15b params: ensure short description is only a single line
So a UI can display it properly
2021-03-23 12:55:11 -04:00
Julian Oes 2ab276f5ca ROMFS: disable MAVLink broadcast by default
I don't think we should be broadcasting by default as we haven't done
that in the past. This suddenly spams the network with a lot of
messages, and leads to confusing situations in offices where there are
multiple PX4 SITL and QGC intances are open.
2021-03-23 12:54:46 -04:00
Daniel Agar ea902e7f38 systemcmds/tests: split out individual module test commands 2021-03-23 11:39:14 -04:00
Daniel Agar e3d1ade660 EKF: use flow for vel test ratio if only active source of horizontal aiding 2021-03-23 15:56:22 +01:00
Daniel Agar 9b1cf98474 drivers/pwm_out: fix launch for non-multi case
- skip _objects[1] access if only 1 possible instance
 - command line request new mode via atomic
2021-03-23 10:40:22 -04:00
David Sidrane 06cd3eded5 Revert "boards: CUAV Nora don't start icm20649 on SPI6 by default"
This reverts commit bcae99e34a.
2021-03-23 05:52:27 -07:00
David Sidrane 644794d134 Revert "boards: CUAV x7pro disable SPI6 IMU until NuttX BDMA is fixed"
This reverts commit 0b4006ae86.
2021-03-23 05:52:27 -07:00
David Sidrane 817d21bb39 px4 fmu-v6x:Properly configure BDMA 2021-03-23 05:52:27 -07:00
David Sidrane 5f28ea10c0 px4 fmu-v6u:Properly configure BDMA 2021-03-23 05:52:27 -07:00
David Sidrane bbdb671dd2 mro pixracerpro:Properly configure BDMA 2021-03-23 05:52:27 -07:00
David Sidrane a8ece584e5 mro ctrl-zero-h7-oem:Properly configure BDMA 2021-03-23 05:52:27 -07:00
David Sidrane 4eabee00d6 holybro durandal-v1:Properly configure BDMA 2021-03-23 05:52:27 -07:00
David Sidrane e813385f12 cuav x7pro:Properly configure BDMA 2021-03-23 05:52:27 -07:00
David Sidrane 344be233cf mro ctrl-zero-h7:Properly configure BDMA 2021-03-23 05:52:27 -07:00
David Sidrane ba3a099775 cuav nora:Properly configure BDMA 2021-03-23 05:52:27 -07:00
David Sidrane 3581099c09 Revert "boards: disable BDMA on STM32H7 for now"
This reverts commit f0d1f1d679.
2021-03-23 05:52:27 -07:00
David Sidrane 55abe48925 NuttX with BDMA enable fix backpork 2021-03-23 05:52:27 -07:00
Peter van der Perk 8c5e51dba6 Add nxp_ucans32k146_canbootloader to CI archive to distribute UCANS32K146 bootloader 2021-03-23 04:43:56 -07:00
Mohamed Moustafa 5802dce699 mavlink: ignore self published UTM_GLOBAL_POSITION msgs in simulation using sys id (#17193) 2021-03-23 10:32:21 +01:00
Daniel Agar 5f6832e101 px4_work_queue: increasae UART stack 2021-03-22 22:48:58 -04:00
Beat Küng e2cd39bf6c micro_hal: use inline methods instead of #define's
Fixes errors in the form of 'error: statement has no effect'
2021-03-22 15:38:21 -04:00
Daniel Agar e57aaaaa5e rotate accel/gyro FIFO before publish and fix angular velocity filter resets
- rotates accel & gyro FIFO data before publication both to simplify downstream usage (including log review) and fix other issues
     - to best handle int16_t data rotations are now either performed with swaps if possible, otherwise promoted to float, rotated using the full rotation matrix, then rounded back to int16_t
 - fix sensors/vehicle_angular_velocity filter reset both with proper rotation and new calibration uncorrect helper
      - in FIFO case filtering is done before calibration is applied, but we need to handle a possible reset from a completely different sensor (vehicle body angular velocity -> sensor frame uncorrected data)
2021-03-22 12:01:12 -04:00
Star Simpson d4dd019578 removing hardcoded units from parameter descriptions throughout land_detector_params 2021-03-22 11:39:53 +01:00
Dongoo Lee 32012cb3ee for cmake option GENERATE_ROS_MODELS to make ROS sdf models 2021-03-22 08:59:48 +01:00
Star Simpson 48219ab1e6 fixed typo in description of RWTO_PSP parameter 2021-03-22 00:37:18 -04:00
Daniel Agar 7563438558 sensors/vehicle_angular_velocity: fix dynamic notch ESC in FIFO case
- last timestamp sample must be set in FIFO case for ESC RPM dynamic filter update
 - slightly relax thresholds for dynamic notch FFT apply or reset
2021-03-21 20:46:54 -04:00
PX4 BuildBot 1e507f41ca Update submodule sitl_gazebo to latest Sun Mar 21 12:39:01 UTC 2021
- sitl_gazebo in PX4/Firmware (6e9f745809): https://github.com/PX4/PX4-SITL_gazebo/commit/b195315b869a5e86e31bcb934ca85172d4f5f33f
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/1f339cdf5c5da27097e58ec2beb2793bf6057c7d
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/b195315b869a5e86e31bcb934ca85172d4f5f33f...1f339cdf5c5da27097e58ec2beb2793bf6057c7d

    1f339cd 2021-03-20 Dongoo Lee - Pass ros_distro in CMakeLists.txt instaed of checking it in jinja_gen.py (#712)
1b1afca 2021-03-18 David Jablonski - gst camera: add RTMP streaming and nvidia encoding (#727)
2021-03-21 10:43:26 -04:00
PX4 BuildBot e79b3930f3 Update submodule ecl to latest Sun Mar 21 12:39:12 UTC 2021
- ecl in PX4/Firmware (81e811997b8e611aff08fa25c81322e4b956425f): https://github.com/PX4/PX4-ECL/commit/4df005487379436dcdde10402d3cea7b78d76c19
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/bb950a1550ba55de36ed66877817ec7f2f47b349
    - Changes: https://github.com/PX4/PX4-ECL/compare/4df005487379436dcdde10402d3cea7b78d76c19...bb950a1550ba55de36ed66877817ec7f2f47b349

    bb950a1 2021-03-10 Morten Fyhn Amundsen - Expose terrain vpos reset counter
ab69681 2021-03-10 Morten Fyhn Amundsen - Add parameter for terrain timeout
2021-03-21 10:42:43 -04:00
Lorenz Meier 6e9f745809 PWM out: Robustify initialization
This ensures that all PWM outputs get correctly inialized on targets that only support one.
2021-03-21 00:21:10 +01:00
Daniel Williams f6eae08597 [uorb_graph][fix][doc] FIxes type around regex definition
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2021-03-20 08:11:41 +01:00
Daniel Williams e7b1ffbd4c [uorb_graph][fix] broadens regex for ambiguous subscription arrays
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2021-03-20 08:11:41 +01:00
Daniel Williams 1dce38a8fe [uorb_graph][fix] fixes typo in Graph class __init__
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2021-03-20 08:11:41 +01:00
Daniel Williams 711422d755 [uorb-graph][squash][refactor] Rework of uorb-graph script -- Greatly expands handled test cases
- debug output is now printed & filtered with the python 'logging' standard module
- changed 'module whitelist' to 'scope-whitelist'
    - whitelist may now apply to libraries
    - libraries are not included by default
    - may be merged with their depending modules with the `--merge-depends` cli flag
    - eliminates redundant 'special-case' handling code
- greatly expands debugging output
    - fixes debug output if package dependencies are missing
    - still crashes on error matches
    - now warns on ambiguous matches
    - prints a list of ambiguous source sites (aka warnings) on completion
    - adds warnings if any of the source paths are invalid
    - do not emit debug output for modules outside of the module/scope whitelist
- Expand script's CLI parameters
    - added 'none' output options: undocumented debugging option to silence file output while debugging
    - added the `--merge-depends` cli flag -- merges output of modules & their dependee libraries
- Source processing now happens on original source files:
    - processing to line-by-line
    - required overhaul of regex match patterns + processing
    - pros:
        - enable tracing of ambiguous parsing sites -- reports (module, file, line-number, line-contents)
        - simplifies code
        - reduces computational complexity
    - cons:
        - certain declarations are harder to parse (multiline arrays)
- refactors:
    - added specific subclasses for each: Publications, Subscriptions, Ambiguities
    - added a "Scope" class to represent either a module ('ModuleScope') or a library ('LibraryScope')
2021-03-20 08:11:41 +01:00
Daniel Williams 8c87ef4272 [refactor][uorb-graph] add a pythonic __main__ idiom to the uorb-graph tool script 2021-03-20 08:11:41 +01:00
Daniel Agar aef3c474e2 cmake: add install_python_requirements helper
- this is useful because it installs the python requirements using the
python interpreter found and used by cmake
2021-03-19 23:58:16 -04:00
Julian Oes a13459858d commander: improve logic for ekf2 preflight check
With this change we prevent the case where arming silently fails within
the first 10 seconds after boot.

Also, we now set the sensors as healthy as soon as the ekf is healthy,
and don't wait 10 seconds without actually checking.
2021-03-19 15:58:14 -04:00
Julian Oes 2f024a9a8a commander: pass in correct time since boot
This fixes the case where the preflight check fail right after the start
and report "sensors unstable".
2021-03-19 15:58:14 -04:00
Morten Fyhn Amundsen 19533377b3 drv_hrt: Fix hrt_abstime literal argument names
The user-defined literals for milli- and microseconds
should have argument names matching their units. The
current argument names 'seconds' is probably an oversight.
2021-03-19 16:36:36 +01:00
David Sidrane 0d4f48a8d2 spracing h7extreme:Enable ADC3 in support of temperature sensing 2021-03-19 15:48:47 +01:00
David Sidrane cdcff35760 cubepilot cubeorange:Enable ADC3 in support of temperature sensing 2021-03-19 15:48:47 +01:00
David Sidrane 2373ba47a2 mro pixracerpro:Enable ADC3 in support of temperature sensing 2021-03-19 15:48:47 +01:00
David Sidrane 6780428a9d mro ctrl-zero-h7:Enable ADC3 in support of temperature sensing 2021-03-19 15:48:47 +01:00
David Sidrane fa5dfb29cb mro ctrl-zero-h7-oem:Enable ADC3 in support of temperature sensing 2021-03-19 15:48:47 +01:00
David Sidrane 216959e221 holybro durandal-v1:Enable ADC3 in support of temperature sensing 2021-03-19 15:48:47 +01:00
David Sidrane 7bc2393936 cubepilot cubeorange:Enable ADC3 in support of temperature sensing 2021-03-19 15:48:47 +01:00
David Sidrane a67edf229a cuav x7pro:Enable ADC3 in support of temperature sensing 2021-03-19 15:48:47 +01:00
David Sidrane 4f3d74b9d3 cuav nora:Enable ADC3 in support of temperature sensing 2021-03-19 15:48:47 +01:00
David Sidrane 833501dee6 stm32h7:adc fix temperature sensing 2021-03-19 15:48:47 +01:00
David Sidrane cc098f9dff netman:Fix setting on first boot 2021-03-19 15:48:25 +01:00
Daniel Agar 19fc33a66e boards: ark/can-flow add debug build and reduce default 2021-03-19 15:44:57 +01:00
bresch 6fda6e43af StickAcceleration: synchronize XY acceleration profiles 2021-03-19 13:51:15 +01:00
Matthias Grob c8c3f57ba1 mc_pos_control_params: correct cruise speed description
It is used in autonomous modes only and has no influence
on Position mode.
2021-03-19 13:35:17 +01:00
Daniel Agar 2360c50713 boards: spracing/h7extreme remove temperature_compensation and differential_pressure sensors to save flash 2021-03-18 19:34:51 -04:00
Daniel Agar b74bdb0250 sensors/vehicle_angular_velocity: RPM filter add harmonics 2021-03-18 19:34:51 -04:00
Daniel Agar 8f242ec444 cmake: add jlink_flash_uavcan_bin helper 2021-03-18 19:33:19 -04:00
Daniel Agar a86e854a3b boards: CUAV CAN GPS enable safety button
- the circuit breaker was changed to set by default (disabling the safety button)
2021-03-18 19:33:19 -04:00
David Sidrane e9409e59e6 NuttX with flexcan CTRL1 fixes backports 2021-03-18 21:38:56 +01:00
David Sidrane 395519ac66 uavcan_stm32h7:can driver preserve ordering
Refering to the refernece manual:

     Tx queue operation is configured by programming FDCAN_TXBC.TFQM to 1. Messages
     stored in the Tx queue are transmitted starting with the message with the lowest message
     ID (highest priority). **In case that multiple queue buffers are configured with the same
     message ID, the queue buffer with the lowest buffer number is transmitted first**

    Tx FIFO operation is configured by programming FDCAN_TXBC.TFQM to 0. Messages
    stored in the Tx FIFO are transmitted starting with the message referenced by the get index
    FDCAN_TXFQS.TFGI. After each transmission the get index is incremented cyclically until
    the Tx FIFO is empty. The Tx FIFO enables transmission of messages with the same
    message ID from different Tx buffers in the order these messages have been written to the
    Tx FIFO

    The issue will be cancelation:

    The FDCAN supports transmit cancellation. To cancel a requested transmission from a
    dedicated Tx buffer or a Tx queue buffer the Host has to write a 1 to the corresponding bit
    position (= number of Tx buffer) of register FDCAN_TXBCR. Transmit cancellation is not
    intended for Tx FIFO operation.

    But there is nothing preventing it. This seems to indicate it will
    work. When a transmission request for the Tx buffer referenced by the get index is canceled, the
    get index is incremented to the next Tx buffer with pending transmission request and the Tx
    FIFO free level is recalculated. When transmission cancellation is applied to any other Tx
    buffer, the get index and the FIFO free level remain unchanged.
2021-03-18 18:31:05 +01:00
David Sidrane 52a29ac6cf uavcan_stm32h7:can driver add proper timeouts 2021-03-18 18:31:05 +01:00
Morten Fyhn Amundsen bb950a1550 Expose terrain vpos reset counter 2021-03-18 14:25:07 +01:00
Morten Fyhn Amundsen ab69681744 Add parameter for terrain timeout 2021-03-18 14:25:07 +01:00
dinomani 4bf894a35d Update platforms/nuttx/src/px4/stm/stm32h7/include/px4_arch/micro_hal.h
Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
2021-03-18 06:13:24 -07:00
dino 44b2e0b729 As David request 2021-03-18 06:13:24 -07:00
dino 7c8b7fa44d Fixed typo and added support for H7 temperature sense on ADC3 2021-03-18 06:13:24 -07:00
dino 6d04a67b02 Moving define to microhal.h files, for each ST architecture. Correct channels were verified with ST_CUBE header files. For the H7 its a simplification for the current used H7x3. Other devices in that family expect the temperarture on channel 18.
F1: channel 16
F3: channel 16
F4: channel 18
F7: channel 18
H7: channel 17, on STMf32Hx3
2021-03-18 06:13:24 -07:00
dino 528dc41822 changed #elif to #else, to build on all targets 2021-03-18 06:13:24 -07:00
dino 3c77ef7eb3 Fixed adc config, to read internal reference to get cpu temperature 2021-03-18 06:13:24 -07:00
Daniel Agar 7c2b945c21 ROMFS: posix rcS add gyro_fft and gyro_calibration start 2021-03-18 10:04:04 +01:00
Daniel Agar 8000e6feba gyro_fft: reduce default max
- we're mainly looking for lower frequencies that may be an issue for control
2021-03-18 10:04:04 +01:00
Daniel Agar c7c6122bfd gyro_fft: manually inline subset of arm_rfft_init_q15 to save flash 2021-03-18 10:04:04 +01:00
Daniel Agar 1429423876 gyro_fft: support sensor_gyro (non-fifo) 2021-03-18 10:04:04 +01:00
alexklimaj 69e57b22ac Add LEDs to ARK Can Bootloader 2021-03-17 18:10:22 -04:00
alexklimaj 38ce892582 ARK Flow sensor rotations 2021-03-17 18:06:38 -04:00
Dima Ponomarev e660b50021 uavcan: add IMU sensor support 2021-03-17 18:04:12 -04:00
Lorenz Meier d35ce21594 PWM out: Ensure correct loading on single-bank targets 2021-03-17 22:03:18 +01:00
Lorenz Meier 9490c64ad4 PWM out: provide running state
Important to know if the app is running.
2021-03-17 22:03:18 +01:00
Lorenz Meier 33c5f4210a X7 disable FFT
This depends on the IMU driver supporting queue
2021-03-17 22:03:18 +01:00
Lorenz Meier 935cc05c47 FMU PWM OUT: Start driver in interface 2021-03-17 22:03:18 +01:00
Lorenz Meier dd400e9562 Modal: Fix tabs in start script 2021-03-17 22:03:18 +01:00
Lorenz Meier 8cc3247d21 PWM command: Switch default to status, leave info 2021-03-17 22:03:18 +01:00
Lorenz Meier 0efa7556fe VTOL airframe: Remove spurious tab 2021-03-17 22:03:18 +01:00
Lorenz Meier 595b3a05fb Draco airframe: Remove tabs 2021-03-17 22:03:18 +01:00
Lorenz Meier 4af42be3f3 IFO-S airframe: Remove tabs 2021-03-17 22:03:18 +01:00
Lorenz Meier e887aa902f IFO airframe: Remove tabs 2021-03-17 22:03:18 +01:00
Lorenz Meier 06f7c49d3a Baby-shark airframe: Remove spurious tabs 2021-03-17 22:03:18 +01:00
Lorenz Meier 3c19853f6c ROMFS pruner: Detect spurious tabs
This is necessary to make sure that users cannot insert tabs into shell commands.
2021-03-17 22:03:18 +01:00
Lorenz Meier 21f5f9fba0 Param: Print failing param name
This is important for any sort of boot logs to know which parameter failed.
2021-03-17 22:03:18 +01:00
Lorenz Meier c4e86f69c6 X7: Correct RGB led configuration
This removes unused modules and keeps the currently used ones in place.
2021-03-17 22:03:18 +01:00
Lorenz Meier dc1e7335a3 UAVCAN: Lower debug print level 2021-03-17 22:03:18 +01:00
Lorenz Meier 9fe2f84db5 CUAV X7 Pro: Remove unneeded drivers. 2021-03-17 22:03:18 +01:00
Lorenz Meier 13e0b74782 MAVLink: Increased stack size
This is needed for MAVLink shell and UAVCAN.
2021-03-17 22:03:18 +01:00
Lorenz Meier c904767f1d Always start airspeed
This ensures we get readings in the log and in the telemetry even if the sensor is disabled.
2021-03-17 22:03:18 +01:00
Lorenz Meier 891b231215 Ensure that AUX mixer is loaded when 2nd bank is present 2021-03-17 22:03:18 +01:00
Lorenz Meier 38f306908d Remove PWM14 VTOL airframe 2021-03-17 22:03:18 +01:00
Daniel Agar e7722b11eb pwm_out multi-instance support
PX4 uses banks of 8 outputs as a logical structure. Boards that have
more outputs than 8 get multiple instances. This is an arbitrary choice
that helps with overall structure and enables the mixing of different
device classes (like FMU, IO or UAVCAN).
2021-03-17 22:03:18 +01:00
Daniel Agar c1c0a62be5 drivers/gps: log automatic gain control (AGC) monitor 2021-03-17 15:11:43 -04:00
Daniel Agar 385512aead uORB: test multi timestamp requirement only applies per topic instance 2021-03-17 12:35:53 -04:00
Daniel Agar 205beb9526 boards: revert remaining CONFIG_ARMV7M_LAZYFPU 2021-03-17 09:58:23 -04:00
Matthias Grob 25dd12382a FlightTaskOrbit: default center at exact vehicle location 2021-03-17 09:50:11 -04:00
Matthias Grob ef774578e1 FlightTaskOrbit: NACK command if coordinates could not get applied 2021-03-17 09:50:11 -04:00
Ryan Johnston bffa83bd47 Reverting LAZYFPU for v1.12 beta1 Compatibility
Without reverting this a constant boot loop occurs.

Prior to merging, why this occurs on some F7 boards and not this one should be looked at.

With LazyFPU enabled, v1.12.0 beta1 will not boot but without it removed it works fine.
2021-03-17 06:10:02 +01:00
David Sidrane ccee36bb68 sd_bench and logger use aligned buffers 2021-03-17 05:27:53 +01:00
David Sidrane 45d0603627 micro_hal:Fixed DCACHE_LINESIZE abuse 2021-03-17 05:27:53 +01:00
garfieldG e9725a5fa7 Merge pull request #17089 from garfieldG/pr-safety_switch_status
send safety switch status to ground
2021-03-17 05:23:31 +01:00
PX4 BuildBot 5ad8ed6994 Update submodule devices to latest Wed Mar 17 00:38:33 UTC 2021
- devices in PX4/Firmware (dd479f9cca): https://github.com/PX4/PX4-GPSDrivers/commit/d7100ddc3dfdbe9702d0d21542a9ca3f4ea42652
    - devices current upstream: https://github.com/PX4/PX4-GPSDrivers/commit/0acaf6185245382389f7f6019cee6537d8f5a8e6
    - Changes: https://github.com/PX4/PX4-GPSDrivers/compare/d7100ddc3dfdbe9702d0d21542a9ca3f4ea42652...0acaf6185245382389f7f6019cee6537d8f5a8e6

    0acaf61 2021-02-26 Beat Küng - output mode: add GPS+RTCM output for PPK
2021-03-17 05:21:20 +01:00
Daniel Agar dd479f9cca drivers/imu/analog_devices/adis16470: Analog Devices ADIS16470 IMU driver for CUAV x7pro 2021-03-16 18:00:06 -04:00
Daniel Agar 4092f87390 paw3902: fixes and improvements
- fully respect datasheet quality and shutter metrics for mode changes
 - use MOTION pin for scheduling if available
 - log light mode
 - refactor common enable LED code
 - respect read and write time delays
2021-03-16 15:52:03 -04:00
Daniel Agar 34ea056bd2 Update submodule mavlink v2.0 to latest Tue Mar 16 12:39:08 UTC 2021 2021-03-16 15:50:23 -04:00
PX4 BuildBot c368aa180a Update submodule sitl_gazebo to latest Tue Mar 16 12:39:03 UTC 2021
- sitl_gazebo in PX4/Firmware (00016e53fa): https://github.com/PX4/PX4-SITL_gazebo/commit/6b6f4749a74215b9a4fb81cfaa99a3950f13464d
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/b195315b869a5e86e31bcb934ca85172d4f5f33f
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/6b6f4749a74215b9a4fb81cfaa99a3950f13464d...b195315b869a5e86e31bcb934ca85172d4f5f33f

    b195315 2021-03-16 JaeyoungLim - Revert "Pr liftdrag coefficients (#690)" (#730)
2021-03-16 15:49:58 -04:00
David Sidrane 243adf5250 NuttX with SDMMC back ports 2021-03-16 15:37:41 -04:00
Fabrizio Romanelli 853459c21b Tools/setup/ubuntu.sh: Update to allow multiple host architectures 2021-03-16 13:33:48 -04:00
Daniel Agar 00016e53fa boards: holybro/kakutef7 disable CONSTRAINED_FLASH to increase optimization 2021-03-16 10:30:32 +01:00
Inhwan Wee c67d85945b [commander] more detailed print_status 2021-03-16 01:00:55 -04:00
Daniel Agar 29d4ad1848 fw_pos_control_l1: OFFBOARD fully populate position_setpoint_triplet 2021-03-16 00:58:04 -04:00
Ryan Johnston bcf93304c7 Board ID Update
Needed for updating firmware (due to boot loader).
2021-03-16 00:51:17 -04:00
Ryan Johnston 8e6987d480 Board ID update
Needed for firmware to update.
2021-03-16 00:51:17 -04:00
Daniel Agar 5d63306427 Update submodule GPS drivers to latest Tue Mar 16 00:40:31 UTC 2021 2021-03-16 00:50:13 -04:00
Daniel Agar be58db1ec9 boards: cubepilot_cubeorange_console add gyro_fft 2021-03-16 00:49:45 -04:00
Daniel Agar 8261ee5fd7 boards: px4_fmu-v5_stackcheck add gyro_fft 2021-03-16 00:49:45 -04:00
Daniel Agar ed8f6aa8fe gyro_fft: fix bucket_index size
- needed for larger FFT lengths (eg 1024, 2048, etc)
2021-03-16 00:49:45 -04:00
Daniel Agar 0eac534b80 geo: purge globallocal_converter 2021-03-15 16:16:19 -04:00
Daniel Agar 4df0054873 geo: purge old globallocal_converter 2021-03-15 14:43:53 -04:00
Daniel Agar ae67c53b1e boards: px4_fmu-v6u_default address flash shortage
- create separate px4_fmu-v6u_test variant for onboard testing code
2021-03-15 14:19:00 -04:00
Daniel Agar 4b99bd2077 boards: remove optional external ADIS IMUs to save flash 2021-03-15 13:37:24 -04:00
Daniel Agar b20949e664 mission feasibility: Fix first wp too far message overflow
Co-authored-by: Sander Smeets <sander@droneslab.com>
2021-03-15 12:40:52 -04:00
Daniel Agar 6cdc034f08 camera_trigger: cleanup
- add copyright headers and update year
 - move initializers to header
 - add PX4_DEBUG messages
2021-03-15 12:35:41 -04:00
Sander Smeets 517a1d0116 battery_status: factor in total current consumption in battery remaining estimation 2021-03-15 12:32:45 -04:00
RomanBapst 82a2126f97 TECS: add feedforward gain for total energy balance rate
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-03-15 11:47:07 -04:00
Daniel Agar edd42cfa86 boards: px4/fmu-v5x disable optional external IMU drivers 2021-03-15 11:16:38 -04:00
Daniel Agar 0b4006ae86 boards: CUAV x7pro disable SPI6 IMU until NuttX BDMA is fixed 2021-03-15 10:54:43 -04:00
Daniel Agar 20d8de2dca gyro_fft: reduce run frequency (still consuming all queued data) 2021-03-15 09:42:35 -04:00
Daniel Agar 3c80db9796 boards: stm32f7 run gyro_fft by default 2021-03-15 09:42:35 -04:00
Lorenz Meier a5151f92ea Merge pull request #17065 from PX4/pr/fix-mavlink-shell
MAVLink shell: Ensure that nothing is written to the file handles during shell creation.
2021-03-15 09:47:58 +01:00
Daniel Agar 2257c3767e simple gyro auto calibration module 2021-03-15 09:46:47 +01:00
jciberlin 01c9a4f24d ghst: fix warning generated on PR (Clang Tidy)
Fix warning generated on PR (Clang Tidy).
2021-03-15 09:42:53 +01:00
jciberlin 6f5efbeab5 ghst_telemetry: send battery status
Send battery status (ghst_telemetry). Apply factors to show correct values of volts, amps and mAh. Change ghost protocol code to follow more MISRA C++ guidelines.
2021-03-15 09:42:53 +01:00
Daniel Agar af3573e464 gyro_fft: log peak frequency magnitudes 2021-03-15 09:42:08 +01:00
Daniel Agar 3665f9a3c4 gyro_fft: increase default range and length to improve test data 2021-03-14 20:17:41 -04:00
Daniel Agar 893eee4cb8 logger: double sensor_gyro_fft logging rate 2021-03-14 20:17:41 -04:00
Daniel Agar cfb3099870 boards: mRo pixracer pro restore USART6, but RX only 2021-03-14 16:32:22 -04:00
Lorenz Meier 72ca6902f0 Updated README - general refresh 2021-03-14 14:56:24 +01:00
Jaeyoung-Lim 6b4ccaa53e Handle invalid yaw rate setpoints 2021-03-14 00:01:57 +01:00
Jaeyoung-Lim 06e3d38bbd Fix yaw rate ignore flag for attitude setpoints
This PR fixes the yaw rate ignore case handling for offboard control using the SET_ATTITUDE_TARGET message
2021-03-14 00:01:57 +01:00
David Sidrane 28681405ae nxp_fmuk66-v3:Disable CONFIG_MMCSD_MULTIBLOCK (_DISABLE=y) 2021-03-12 20:45:45 +01:00
David Sidrane 3e443f7dcc nxp_fmuk66-e:Disable CONFIG_MMCSD_MULTIBLOCK (_DISABLE=y) 2021-03-12 20:45:45 +01:00
CarlOlsson 528127c372 fw_att_ctrl: remove unused variable 2021-03-12 12:19:29 -05:00
romain-chiap f150e1e7aa sih: time constant added on thrusters, and minor cleanup 2021-03-12 12:04:14 -05:00
ArkadiuszNiemiec 1d8c55db4a mavlink: fix yaw and yaw_rate ignore mask check 2021-03-12 16:34:41 +01:00
Daniel Agar 7fb43559f8 gyro_fft: run by default on STM32H7 2021-03-12 07:50:31 -05:00
Beat Küng 9ceef80e06 param: remove set-default print's during bootup 2021-03-12 13:44:10 +01:00
Beat Küng af8c3215f2 logger: add airframe and system-wide default parameters
- adds new ulog message & compatibility flag
- separately add airframe and system-wide defaults
- log only non-volatile defaults that are different from the current value
- additional size is ~3KB for 100 params
2021-03-12 13:44:10 +01:00
Beat Küng b512a3d8f7 param: add param_get_system_default_value 2021-03-12 13:44:10 +01:00
Daniel Agar c356181f90 px4_work_queue: increase wq:rate_ctrl stack 2021-03-11 22:35:25 -05:00
Daniel Agar 0079cb708c gyro_fft: don't update FFT length while running
- this is used for the length of dynamically allocated buffers that
aren't resized while running
2021-03-11 21:53:59 -05:00
Daniel Agar ee7b6c0e9f mavlink: delete fake CAMERA_CAPTURE stream 2021-03-11 23:00:00 +01:00
Daniel Agar d98e1ded6b mavlink: mavlink main report lost vehicle_command_ack 2021-03-11 15:04:53 -05:00
Daniel Agar b0a4f35024 mavlink: mavlink main vehicle_commands only handled in iridium mode 2021-03-11 15:04:53 -05:00
Daniel Agar eef304110d uavcan: uavcan_servers only acknowledge supported commands 2021-03-11 15:04:53 -05:00
Julian Oes c13266ad26 Tools: add env variable to disable follow mode
This adds the env variable PX4_NO_FOLLOW_MODE to disable the follow mode
in Gazebo.
2021-03-11 20:02:16 +01:00
Daniel Agar 4a7b2c490a mavlink: messages cleanup remaining headers 2021-03-11 11:46:14 -05:00
Daniel Agar 3f872ebf20 mavlink: move HEARTBEAT to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 0c138b7e03 mavlink: move CAMERA_TRIGGER to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar b955c41a63 mavlink: move COMMAND_LONG to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 801202f208 mavlink: move BATTERY_STATUS to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar dc1418a3b4 mavlink: move SYS_STATUS to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 5a025cfa28 mavlink: move SMART_BATTERY_INFO to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar ec6758f5af mavlink: move HIGHRES_IMU to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 248978b25e mavlink: move SCALED_PRESSURE to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 477d8c3738 mavlink: only include HIGH_LATENCY2 stream on non flash constrained builds 2021-03-11 11:46:14 -05:00
Daniel Agar c6311324d2 mavlink: move VFR_HUD to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar d46ae7983f mavlink: move GPS_RAW_INT to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 67a204206a mavlink: move GPS2_RAW to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar e2f7427679 mavlink: move AUTOPILOT_STATE_FOR_GIMBAL_DEVICE to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 462d67f2b6 mavlink: move TIMESYNC to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 849000ebeb mavlink: move SYSTEM_TIME to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar af06adecd3 mavlink: move ADSB_VEHICLE to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar ecfbd79a90 mavlink: move UTM_GLOBAL_POSITION to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar e04252151c mavlink: move GIMBAL_DEVICE_ATTITUDE_STATUS to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar c9d44d5741 mavlink: move GIMBAL_MANAGER_INFORMATION to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar aaf7b41dda mavlink: move GIMBAL_MANAGER_STATUS to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 581e28eb33 mavlink: move GIMBAL_DEVICE_SET_ATTITUDE to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar ddca669852 mavlink: move CAMERA_IMAGE_CAPTURED to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 50bd757037 mavlink: move GLOBAL_POSITION_INT to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar ede01e8f1a mavlink: move ODOMETRY to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 7daa97f279 mavlink: move LOCAL_POSITION_NED to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 5f7d577e04 mavlink: move ESTIMATOR_STATUS to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar a1a557cfe3 mavlink: move VIBRATION to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 239ed19827 mavlink: move ATT_POS_MOCAP to separate stream header
- now only available on non flash constrained boards
2021-03-11 11:46:14 -05:00
Daniel Agar 3964cfb3a7 mavlink: move HOME_POSITION to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar f7ee6b3c5e mavlink: move SERVO_OUTPUT_RAW to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 5eef9358d9 mavlink: move ACTUATOR_CONTROL_TARGET to separate stream header 2021-03-11 11:46:14 -05:00
Daniel Agar 7d78cf8505 parameters: param_value_is_default() add note about params_changed bitset usage 2021-03-11 11:30:43 -05:00
Daniel Agar a991e78e18 parameters: fix runtime default edge case 2021-03-11 11:30:43 -05:00
Matthias Grob ceb445caa0 Run mc_pos_control for acceleration control mode flag 2021-03-11 10:37:03 -05:00
Daniel Agar 6a6352577c cmake: nuttx error if GCC <= 7 2021-03-11 03:36:34 -08:00
Daniel Agar f725813128 add bootloader flash helper target (jlink_flash_bootloader) 2021-03-11 09:03:42 +01:00
Matthias Grob 8816601efb FlightTaskManualAcceleration: fix velocity setpoint initialization 2021-03-11 00:40:27 +01:00
Matthias Grob 89b502b9a0 FlightModeManager: remove switching out of a task for every mode change
This was an idea to be able to reinitialize on mode change e.g. from
Holde mode to Land mode which are currently all still handled by
FlightTaskAuto and don't require a task switch.

But I found out it leads to issues because the last setpoint and the
ekf reset counter state from the previous task are lost and as a result
the setpoint transition cannot be handled consistently anymore.
2021-03-11 00:40:27 +01:00
Matthias Grob 63a35ccabd StickAccelerationXY: fix losing the internal velocity setpoint state
because of a failing position unlock with NAN velocity setpoint feedback.
2021-03-11 00:40:27 +01:00
Matthias Grob 54fe0ae98c FlightModeManager: rename updateVelocityController{IO} to {Feedback} 2021-03-11 00:40:27 +01:00
David Jablonski 02abb760a3 SITL: add iris with fog-simulating lidar 2021-03-11 00:39:09 +01:00
Daniel Agar f8eaa6e46b ROMFS handle bl_update generically
- include all available legacy bootloaders
2021-03-11 00:38:18 +01:00
Daniel Agar 3ad0da51c4 Makefile: wipe incomplete ninja build generation 2021-03-10 17:16:19 +01:00
mohamed.moustafa 6914ebef4e added messages required by offboard_control example 2021-03-10 08:42:33 -05:00
Jaeyoung-Lim 1d66b033a4 Append mixer with aux outputs 2021-03-10 07:15:53 +01:00
Jaeyoung-Lim 0db29866f1 Add standard_vtol drop 2021-03-10 07:15:53 +01:00
PX4 BuildBot d2b63f137e Update submodule ecl to latest Wed Mar 10 00:59:16 UTC 2021
- ecl in PX4/Firmware (557d8f65d89cd3da4a0e88af2a7bb1a16ebf3ff9): https://github.com/PX4/PX4-ECL/commit/4bad2a272cfbcfd2ef2c77bb4af788f5b569aaaa
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/b3c1bd6d40952a9d467497162f91f28400ae0a3d
    - Changes: https://github.com/PX4/PX4-ECL/compare/4bad2a272cfbcfd2ef2c77bb4af788f5b569aaaa...b3c1bd6d40952a9d467497162f91f28400ae0a3d

    b3c1bd6 2021-03-09 Paul Riseborough - EKF: Remove un-used code
2021-03-09 23:19:22 -05:00
Daniel Agar 684424bf73 parameters: delete unused BSON_BINDATA handling 2021-03-09 19:29:42 -05:00
Daniel Agar 4d288512b5 add board architecture specific init defaults 2021-03-09 19:59:41 +01:00
Silvan Fuhrer e53e001de1 Airspeed Selector: do not run checks during landing
Stall speed check would otherwise trigger during landing if airspeed falls below
stall speed before landing is detected.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-03-09 19:23:48 +01:00
Daniel Agar 440e72e697 boards: cuav nora/x7pro don't have low speed external (LSE) oscillator 2021-03-09 10:49:57 -05:00
Daniel Agar a11d2207e4 commander: simplify failure detector is attitude stabilized check 2021-03-09 10:47:00 -05:00
Daniel Agar dff975698e mc_rate_control: delete unused _landing_gear_pub 2021-03-09 10:47:00 -05:00
Daniel Agar cc3c6f63e5 mc_rate_control: simplify manual_control_setpoint update 2021-03-09 10:47:00 -05:00
Daniel Agar bb12fce66c delete RATTITUDE flight mode 2021-03-09 10:47:00 -05:00
Daniel Agar d37510a43d update UUV and rover controllers to use trajectory_setpoint and cleanup unused position_setpoint fields 2021-03-09 10:36:34 -05:00
Daniel Agar a0b9b44ff6 boards: stm32h7 set CONFIG_SDMMC1 consistently 2021-03-09 09:37:05 -05:00
Daniel Agar bd1c575ce8 lib/sensor_calibration: add simple offset and scale sanity checks 2021-03-09 09:27:21 -05:00
Peter van der Perk c4ab2797eb Added the notion of BaseSubscriber which allows to
subsscription for services responses and request and helps the usage of fixed
port subscribers Furthermore move register autconfigure logic from Uavcan.cpp
to NodeManager
2021-03-09 14:35:50 +01:00
Paul Riseborough b3c1bd6d40 EKF: Remove un-used code 2021-03-09 21:23:38 +11:00
CUAVcaijie 9f9b01504d Modify the way to clear Data 2021-03-09 11:00:03 +01:00
David Jablonski 063bb75891 simulator: fix lidar sensors 2021-03-08 21:27:39 -05:00
Matthias Grob c96d9a79b8 mc_att_control_params: remove frequency unit from attitude gains 2021-03-08 11:14:01 -05:00
David Sidrane c792879612 Nuttx: PX4 Contrib Ethernet Hardening 2021-03-08 10:37:08 -05:00
Daniel Agar cbb2fa440b sensors/vehicle_angular_velocity: only allocate dynamic notch perf counters if enabled (IMU_GYRO_DYN_NF) 2021-03-08 10:35:48 -05:00
Daniel Agar 68c171fd4f land_detector: continue respecting hover thrust throughout descent 2021-03-08 11:33:36 +01:00
Jaeyoung-Lim 1fa08c3997 Fix actuator controls timestamps for MAV_CMD_DO_SET_ACTUATOR
Fix actuator controls timestamps for MAV_CMD_DO_SET_ACTUATOR
2021-03-07 20:31:24 -05:00
Paul Riseborough 4465c4fbf6 ekf2: Publish and log EKF warning and information events (NEW msg estimator_event_flags)
* msg: Add estinator information and warning events message (estimator_event_flags)
 * ekf2: publish information and warning events
 * logger: log estimator_event_flags
 * update ecl submodule to latest

Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-03-07 16:16:48 -05:00
Peter van der Perk 18a8d89fa4 PNP fixed allocation scheme
Fixed register scheme
Incrased wq:uavcan stack since it overflowed when sending register response
2021-03-07 21:49:05 +01:00
Peter van der Perk 28c76663cd UAVCANv1 Move PNP from UAVCAN.cpp to NodeManager.cpp 2021-03-07 21:49:05 +01:00
Kevin Dominic Merkel d5e468a19e change typhoon_h480 roll-/pitchrate P gain to reduce oscillations (#17044) 2021-03-07 18:18:00 +01:00
Daniel Agar 35488337d3 mc_pos_control: add OFFBOARD takeoff intent 2021-03-07 11:04:17 +01:00
Daniel Agar 22abe1619b Update submodule mavlink v2.0 to latest Sat Mar 6 00:39:07 UTC 2021 2021-03-05 21:00:39 -05:00
PX4 BuildBot 1eff1aa83c Update submodule sitl_gazebo to latest Sat Mar 6 00:39:04 UTC 2021
- sitl_gazebo in PX4/Firmware (263b00b65f): https://github.com/PX4/PX4-SITL_gazebo/commit/bebb9a95f0b61bf9e4c3de345fab70985c1329b3
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/c7524aa977539d8cc972d9336355bc82e2f2cfa5
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/bebb9a95f0b61bf9e4c3de345fab70985c1329b3...c7524aa977539d8cc972d9336355bc82e2f2cfa5

    c7524aa 2021-02-28 Jaeyoung-Lim - Fix MAVSDK SITL tests
f4d5594 2021-02-28 JaeyoungLim - Increase rover model realtime factor (#715)
2021-03-05 21:00:07 -05:00
Paul Riseborough 4bad2a272c EKF: Use debug prints for NuttX builds 2021-03-05 19:06:59 -05:00
Daniel Agar 0f47cae1e1 remove ECL_{INFO,WARN,ERN}_TIMESTAMPED macros
- we already have mechanisms to print these messages timestamped
2021-03-05 19:06:59 -05:00
Paul Riseborough c1f1415696 EKF: Add usage warning comment 2021-03-05 19:06:59 -05:00
Paul Riseborough c2b86cdb20 EKF: Provide external reset of event records 2021-03-05 19:06:59 -05:00
Paul Riseborough 9d51ab079a EKF: Remove duplicated event recording 2021-03-05 19:06:59 -05:00
Paul Riseborough 140ca3f48f EKF: Add external monitoring of warning and information events 2021-03-05 19:06:59 -05:00
Paul Riseborough 90a445ddbc EKF: upgrade some events from into to warning status 2021-03-05 19:06:59 -05:00
Daniel Agar 263b00b65f ekf2 support SET_GPS_GLOBAL_ORIGIN and remove globallocalconverter usage
- vehicle_command cmd extended from uint16 to support PX4 internal commands that don't map to mavlink
2021-03-05 18:25:14 -05:00
David Sidrane 12a4b0334f px4_fmu-v6u:Use Auto LSE Drive setting 2021-03-05 15:40:09 -05:00
David Sidrane 2af106d888 px4_fmu-v6x:Use Auto LSE Drive setting 2021-03-05 15:40:09 -05:00
David Sidrane d94ff14e6b px4_fmu-v5x:Use Auto LSE Drive setting 2021-03-05 15:40:09 -05:00
David Sidrane f44a299e3b px4_fmu-v5:Use Auto LSE Drive setting 2021-03-05 15:40:09 -05:00
David Sidrane c2a5b5ed88 holybro_durandal-v1:Use Auto LSE Drive setting 2021-03-05 15:40:09 -05:00
Ryan Johnston 9d0a8928bd Update chip type
Update chip type from NI to II.
2021-03-05 21:28:36 +01:00
Ryan Johnston 0958b30804 Fix i2c4 bus
Fix i2c4 bus (and subsequent CI errors)
2021-03-05 21:28:11 +01:00
Ryan Johnston 2bf508061a Update i2c bus
Change internal bus 2 to external.
2021-03-05 21:28:11 +01:00
Ryan Johnston 17b48102f4 Update i2c mapping and i2c clock source
i2c4 was mapped incorrectly and i2c4 clock source wasn't present.
2021-03-05 21:28:11 +01:00
bbworld 7525722b1a Add support for specifying spawn location in Gazebo multi sim
This commit adds support for specifying the spawn location of vehicles
in the Gazebo multi-vehicle simulator script (frame:number:x:y).
Behavior when x and y are not specified remains the same as before.
2021-03-05 21:26:54 +01:00
Ryan Johnston daf744c678 MRO Control Zero F7 OEM Fixes (#16977)
* Update i2c 4 pinmap on F7 OEM

Update i2c 4 pinmap

* Fix i2c Internal to External on F7 OEM

Fix i2c Internal to External on F7 OEM

* Add Can2 Silent Pin

Add Can2 Silent Pin
2021-03-05 21:26:15 +01:00
Nicolas MARTIN 66beffa2f3 Enable pre-arm checks in HIL modes
by airframe parameters HIL mode will still disable:
 - usb check
 - power checks
 - safety switch
2021-03-05 21:23:31 +01:00
CarlOlsson b4b424bf7d tecs: also fix the bug in update_vehicle_state_estimates() 2021-03-05 19:44:20 +01:00
CarlOlsson 0f461f7f60 TECS: Fix internal state init if dt is large 2021-03-05 19:44:20 +01:00
Matthias Grob 114e85d260 MultiCopterPositionControl: hotfix emergency failsafe
that prevents the vehicle from crashing with invalid setpoints or
states.

This broke with #16869 when the scheduling of the position control module
and the setpoint generation got independent. The failsafe mechanism assumed
the setpoint is overwirtten by the possibly infeasible input on every loop
iteration which is not the case anymore. As a result the failsafe reset its
histeresis based on the failsafe setpoint from the last loop iteration.

Keeping the failsafe_setpoint separate solves this issue. Note that
these setpoints to the bare minimum to keep the vehicle safely in the air
and do not suffer from sideffects ignoring the EKF reset.
2021-03-05 11:29:36 -05:00
Daniel Agar fddcb73802 sensors/vehicle_angular_velocity: dynamic notch filter support ESC RPM (untested) 2021-03-05 10:56:54 -05:00
Daniel Agar 573034aa8e Jenkins hardware print ORB_ID(sensor_selection) 2021-03-05 10:56:54 -05:00
Daniel Agar d5d5b7d82e sensors/vehicle_angular_velocity: add perf counters 2021-03-05 10:56:54 -05:00
Daniel Agar 19de1e57e3 gyro_fft promote to modules and include on all boards 2021-03-05 10:56:54 -05:00
Daniel Agar 00b3b3678b sensors/vehicle_angular_velocity: gyro dynamic notch filters updated from onboard FFT 2021-03-05 10:56:54 -05:00
David Sidrane ed6269b9a5 STMx7 LSE backports 2021-03-05 10:10:19 -05:00
Daniel Agar 077afdf9aa commander: extend reliant on opt flow to ALTCTL (degraded from POSCTL)
If you're flying in manual position control mode and lose position the state machine will put you in altitude control mode. Extending the reliant on optical flow relaxed position validity thresholds allows you to potential get back into position control mode with flow alone.
2021-03-05 10:07:36 -05:00
Daniel Agar d0c9a5fc93 OFFBOARD mode architecture overhaul (#16739)
- handle SET_POSITION_TARGET_LOCAL_NED and SET_POSITION_TARGET_GLOBAL_INT with ORB_ID(trajectory_setpoint)
 - FlightTaskOffboard not needed at all
 - bypass position_setpoint_triplet entirely (start removing extraneous fields)
 - simplify offboard_control_mode to map to supported control modes
2021-03-05 09:39:46 -05:00
David Jablonski 5233737a86 adjust some limits to prevent divide-by-zero 2021-03-05 10:42:19 +01:00
Gonçalo Atanásio 9f6c882d2a boards: crazyflie v2.1 Default to EKF2 with no MAG
Co-authored-by: TheLegendaryJedi <goncalo.atanasio@gmail.com>
2021-03-04 19:30:17 -05:00
Matthias Grob 5bbc66f3af ManualControl: name, message, comment, const qualifier improvements
addressing review from @bresch, @julianoes and @JonasVautherin
2021-03-04 10:41:21 +01:00
Matthias Grob 2f39651f77 ManualControl: use current sample for timeout check 2021-03-04 10:41:21 +01:00
Matthias Grob a43a829fdf Commander: gate manual control setpoint processing on new data 2021-03-04 10:41:21 +01:00
Matthias Grob 935423b563 ManualControl: start to distinguish rc arming methods 2021-03-04 10:41:21 +01:00
Matthias Grob c16b48fd2c Commander: Replace manual_control_setpoint use 2021-03-04 10:41:21 +01:00
Matthias Grob 49c240f49e Commander: simplify rc arming disabling logic 2021-03-04 10:41:21 +01:00
Matthias Grob ca3bfb5ea1 ManualControl: simplify multicopter manual thrust logic 2021-03-04 10:41:21 +01:00
Matthias Grob a796903e21 ManualControl: fix arm button use case 2021-03-04 10:41:21 +01:00
Matthias Grob 37ea78a7ff Commander: move rc arming to ManualControl class
Separating the different arming methods is the next step.
2021-03-04 10:41:21 +01:00
Matthias Grob 00a4133042 ManualControl: make members private again 2021-03-04 10:41:21 +01:00
Matthias Grob ee2d408edc Commander: move rc availability to ManualControl 2021-03-04 10:41:21 +01:00
Matthias Grob 0e1f1a9f57 Commander: use parameters directly in ManualControl 2021-03-04 10:41:21 +01:00
Matthias Grob dda895c94b Commander: split out rc override logic into ManualControl 2021-03-04 10:41:21 +01:00
Matthias Grob a4da15edf5 Commander: RC override back to stick change
Instead of deflection mainly because:
- Spring loaded throttle -> bad user experience
- Stale RC data -> Vehicle not savable
2021-03-04 10:41:21 +01:00
Matthias Grob 3d87982bba Commander: reintroduce last stick position 2021-03-04 10:41:21 +01:00
Julian Kent cdadfabccc Bring back RC throttle override with a parameter to disable it 2021-03-04 10:41:21 +01:00
bresch cb8367026c [AUTO COMMIT] update change indication 2021-03-04 19:43:01 +11:00
bresch 93dd4e5754 fix unit tests 2021-03-04 19:43:01 +11:00
bresch 5d441d65e1 Accelerate tilt fine alignment by reducing obs noise when at rest
Fine tilt alignment is accomplished by fusing fake position data after
a coarse tilt leveling. The observation noise can be reduced if the
vehicle is at rest to speed up the process.
2021-03-04 19:43:01 +11:00
SungTae Moon b7ff54b034 add label option for various airframes using same model (#17003) 2021-03-04 09:29:38 +01:00
Ryan Johnston bc8d9af23e Add Lazy FPU
Reported that LAZYFPU  interact with the MTD (FRAM) driver.

https://github.com/PX4/PX4-Autopilot/issues/16548
2021-03-03 14:43:40 -05:00
Ryan Johnston 0047e518aa Add Lazy FPU to Defconfig
Reported that LAZYFPU interacts with the MTD (FRAM) driver.
2021-03-03 14:43:17 -05:00
Matthias Grob 28b89b024f MulticopterPositionControl: fix Takeoff ramp use
- guard against NAN speed_up limit as input to ramp see #14339
- allow negative speed_up limit for ramp to work
2021-03-03 18:53:56 +01:00
Daniel Agar 0eb327743e move min/max distance to ground limits to FlightTask ManualAltitude 2021-03-03 18:53:56 +01:00
Daniel Agar ecd5e57ab5 remove debug 2021-03-03 18:53:56 +01:00
Daniel Agar 0ada59e57b ekf reset remove NAN checks 2021-03-03 18:53:56 +01:00
Daniel Agar 7a7d316a32 Update src/modules/mc_pos_control/PositionControl/CMakeLists.txt
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2021-03-03 18:53:56 +01:00
Daniel Agar 87f835710b Update src/modules/flight_mode_manager/FlightModeManager.hpp
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2021-03-03 18:53:56 +01:00
Daniel Agar c891db19f9 Update src/modules/flight_mode_manager/tasks/FlightTask/FlightTask.cpp
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2021-03-03 18:53:56 +01:00
Daniel Agar 266ea377da move takeoff state machine flight_mode_manager -> mc_pos_control 2021-03-03 18:53:56 +01:00
David Sidrane 823c6078d9 Add rtps build to workflows 2021-03-03 04:55:53 -08:00
David Sidrane 72a3c05ffc nxp_fmuk66-e:Add rtps build 2021-03-02 15:49:03 -05:00
David Sidrane 6542c6e58b nxp_fmuk66-e:Add rtps build 2021-03-02 15:49:03 -05:00
Daniel Agar c9a2d0ed34 IMU_GYRO_RATEMAX set system default to 400 Hz
- MC default is still 800 Hz
2021-03-02 10:08:49 -05:00
Nico van Duijn 16af63e99c v6x: fix icm20649 rotation 2021-03-02 05:27:31 -08:00
Kalyan Sriram b257f9d1fd actuator: add support for MAV_CMD_DO_SET_ACTUATOR
Adds support for using the MAVLink command MAV_CMD_DO_SET_ACTUATOR to
update the actuator values on control group 3 aux{1, 2, 3}. A simple
deconfliction with rc_update is implemented: when a MAVLink command is
sent, RC is disabled for that channel until a major stick movement is
detected.
2021-03-02 12:41:02 +01:00
Beat Küng ada05165f1 mc_pos_control_params: fix param descriptions for negative values 2021-03-02 08:29:58 +01:00
Daniel Agar 4d9e88141e px4_work_queue: increase wq:nav_and_controllers stack 2021-03-02 00:03:17 +01:00
Daniel Agar 0ba1bc0ce1 MPC_POS_MODE remove old metadata and explicitly handle invalid configuration 2021-03-01 09:10:11 +01:00
Alex Mikhalev d01806a0c6 lib/battery: Fix cell voltages with >10S
Signed-off-by: Alex Mikhalev <alex@corvus-robotics.com>
2021-02-28 22:10:23 -05:00
Daniel Agar 9d0c966b15 sensors: publish sensor_selection initially regardless of SENS_IMU_MODE
- in multi-EKF mode the EKF selector becomes repsonsible for sensor
selector rather than the sensors module
 - this updates the sensors module to still make the initial primary IMU
selection on startup before the EKF selector (including if the
estimators never fully initialize)
2021-02-27 20:19:05 +01:00
Daniel Agar 9d47f7ecda simulator: make first accel/gyro simulated FIFO 2021-02-26 18:40:37 -05:00
Daniel Agar 0e796fc17b boards: emlid navio2 enable ADIS16448 2021-02-26 17:56:14 -05:00
Daniel Agar 6b1e7ffdb8 rc_input: fix possible string truncation (-Werror=stringop-truncation) 2021-02-26 17:56:14 -05:00
Daniel Agar e0ade94d25 platforms: add px4_udelay and px4_mdelay
- NuttX: up_udelay and up_mdelay
 - Linux: usleep and msleep
2021-02-26 17:56:14 -05:00
Daniel Agar f1f396e338 uORB: PublicationMulti get_instance() advertise if not already advertised
- fixes UAVCANv0 sensor bridge uORB usage, but also a reason thing to do in general
2021-02-26 17:55:30 -05:00
Daniel Agar 33d12db580 cmake: sitl_target sort lists and trim a few options 2021-02-26 16:14:19 -05:00
David Sidrane da61938792 Jenkinsfile-compile:Fix breakage 2021-02-26 15:15:45 -05:00
Benjamin Perseghetti 52bb99688f Optimize number of logical cores used during sitl builds. 2021-02-26 14:14:52 -05:00
bresch be9b3404a2 lpf test: test several sampling frequencies 2021-02-26 14:06:45 -05:00
bresch 3277648959 lpf test: move to common function 2021-02-26 14:06:45 -05:00
bresch 844602c961 Add unit tests for Butterworth 2nd order low-pass filter 2021-02-26 14:06:45 -05:00
David Sidrane 2345d3ac4a NuttX:FlaxCan Backports 2021-02-26 09:48:14 -08:00
Matthias Grob c2151cb4fa Commander: remove unused arm mode command residue 2021-02-26 07:38:02 -05:00
Daniel Agar 94bcda7c57 navigator: poll mission to run feasibility checks immediately 2021-02-26 10:28:49 +01:00
Daniel Agar 7393d5d761 delete aerotenna ocpoc 2021-02-26 08:38:45 +01:00
Igor Mišić 5f9a98e316 drivers/gps: update RTC only if time drift for 5s
Add interrupt pause comment to help future code archeologists
2021-02-26 08:36:41 +01:00
Daniel Agar 143ebbad98 Update submodule mavlink v2.0 to latest Fri Feb 26 00:40:09 UTC 2021 2021-02-25 21:25:47 -05:00
Daniel Agar fd1fff89d4 dataman: remove flash backend 2021-02-26 00:28:48 +01:00
Daniel Agar 321df7ed84 delete remaining intel aero references 2021-02-25 17:46:18 -05:00
Daniel Agar 3bed87e4bd platforms/posix: try increasing sitl_gazebo build parallelism
- this was limited to single threaded due to CI issues and even
developer machines with limited resources
2021-02-25 16:57:24 -05:00
Daniel Agar ac5167b459 init.d-posix: delete rc.mavlink_override 2021-02-25 13:44:19 -08:00
Daniel Agar a63e25f581 mavlink: GPS_GLOBAL_ORIGIN on by default, but only send on change or when requested 2021-02-25 12:43:30 -05:00
garfieldG 8db37225d6 Added rc.mavlink_override to test the new parameters with sitl 2021-02-25 08:52:38 -08:00
garfieldG 3cd9b3c2cf Added support in Mavlink Ethernet channel parameters
Mavlink Ethernet channel settings such as udp port, remote port and broadcast mode now can be changed dynamically via parameters.
2021-02-25 08:52:38 -08:00
Daniel Agar b66a9629e0 ekf2: update to latest ecl with new global origin helpers 2021-02-25 10:43:07 -05:00
斯东Stone e5b689e33c Add TCBP001TA Barometer Driver (#14774) 2021-02-25 07:11:58 -08:00
Daniel Agar 6482120d9a sensors/vehicle_angular_velocity: use full raw FIFO data (sensor_gyro_fifo) if available 2021-02-25 10:06:17 -05:00
Daniel Agar 8f625e5744 Revert "cmake: Limit color output to terminals"
This reverts commit c1da999748.
2021-02-25 09:34:02 -05:00
Beat Küng 0e8c73f4af drivers: remove snapdragon_pwm_out
- it would need to be refactored to use mixer_module
- rather than having a separate driver it should use linux_pwm_out
2021-02-25 09:28:37 -05:00
Beat Küng 3fa825bf88 boards: remove intel/aerofc-v1
it's discontinued
2021-02-25 09:28:37 -05:00
Beat Küng 7e33d03470 drivers: remove tap_esc
- it's not used anymore
- it would need a refactoring to use mixer_module
2021-02-25 09:28:37 -05:00
Beat Küng 8986264feb airframes: remove aerofc as it's discontinued 2021-02-25 09:28:37 -05:00
Beat Küng f0cc8a344b linux_pwm_out: refactor to run on a work queue and use mixer_module 2021-02-25 09:28:37 -05:00
Beat Küng 439fb00aed linux_pwm_out: move protocols to board-specific directories
This also removes the pca9685 output, which was unused, and there's also
pca9685_pwm_out.
2021-02-25 09:28:37 -05:00
斯东Stone b0a5d431d3 optical_flow/thoneflow: update the data timespan 2021-02-24 21:28:29 -05:00
Daniel Agar 45ba9d1dd5 add all mRo ctrl zero variants to CI 2021-02-24 13:23:21 -05:00
Jacob Crabill 4cca86b5d6 uavcan_v1: Apply feedback from Pavel Kirienko
Co-authored-by: Pavel Kirienko <pavel.kirienko@gmail.com>
2021-02-24 19:22:11 +01:00
JacobCrabill a7a7e33614 uavcan_v1: Rename Subscription --> Subscriber 2021-02-24 19:22:11 +01:00
JacobCrabill b5ac6f1eb8 uavcan_v1: Refactor Pub/Sub class constrctors
Each class now sets the 'subject name', and the base class looks for a
parameter following the format uavcan.pub/sub.SUBJECT_NAME.INSTANCE.id
2021-02-24 19:22:11 +01:00
JacobCrabill c8e66a2f5c uavcan_v1: Rename Publication --> Publisher 2021-02-24 19:22:11 +01:00
JacobCrabill d1eda5ee84 uavcan_v1: Add missing uavcanv1.cmake for fmu-v4 2021-02-24 19:22:11 +01:00
JacobCrabill e654fe71f5 uavcan_v1: Fix 'unset' port ID (use 65535) 2021-02-24 19:22:11 +01:00
JacobCrabill 935bf75b61 uavcan_v1: Fix bugs in MixingOutput / EscClient
Also add commented-out code for use with PR-16808
(MixingOutput + output_control)
Bench-tested PWM output on a Pixracer via UAVCANv1 ESC commands from a
Pixhawk 4.
2021-02-24 19:22:11 +01:00
JacobCrabill 04ea1cf5c6 uavcan_v1: Add to EscClient implementation
Add outline of EscServer implementation
Add some comments and cleanup
2021-02-24 19:22:11 +01:00
JacobCrabill 4b73566b76 uavcan_v1: Add Publisher base; Gnss Publisher 2021-02-24 19:22:11 +01:00
JacobCrabill 216a66b535 uavcan_v1: Remove unused vars 2021-02-24 19:22:11 +01:00
JacobCrabill 35f822fca6 uavcan_v1: Working ESC setpoint pub/sub 2021-02-24 19:22:11 +01:00
JacobCrabill 170345040a uavcan_v1: Add rough ESC Client; Reorg Subscribers 2021-02-24 19:22:11 +01:00
JacobCrabill 00814815f4 uavcan_v1: Reorganize uavcan params and Subscriber 2021-02-24 19:22:11 +01:00
JacobCrabill 088014c2e1 uavcan_v1: Basic subscriber working 2021-02-24 19:22:11 +01:00
JacobCrabill b88e8b6684 uavcan_v1: Increase stack size
Also increases stack frame size limit, which was what the compiler was
throwing an error on.
2021-02-24 19:22:11 +01:00
JacobCrabill 70ff6703b7 uavcan_v1: More work on subscribers and reg access
Now running into issues with running out of stack frame memory
For now I'm going to leave the relevant code in so it's at least
readable, but in its current state it will not compile
2021-02-24 19:22:11 +01:00
JacobCrabill 7d2a6afb79 uavcan_v1: More work on Subscriber class 2021-02-24 19:22:11 +01:00
JacobCrabill c5184f3b46 uavcan_v1: Update UAVCANv1 DSDL submodule 2021-02-24 19:22:11 +01:00
JacobCrabill e267dc0206 uavcan_v1: Start adding framework for Subscribers 2021-02-24 19:22:11 +01:00
JacobCrabill e5cf92f20d uavcan_v1: Refactor RX handling into functions
Cleans up the main transfer-handling loop
2021-02-24 19:22:11 +01:00
David Sidrane 9fd7eb5944 canbootloader:Per UAVCAN call display Percentage not KB 2021-02-24 19:20:15 +01:00
David Sidrane a1be559978 canbootloader:Remove Rate limiting on FW update 2021-02-24 19:20:15 +01:00
David Sidrane fd0494555c canbootloader:stm32_boarddeinitialize->board_deinitialize 2021-02-24 19:20:15 +01:00
David Sidrane 944536fa50 canbootloader:Remove duplicated file from bring it back to repo 2021-02-24 19:20:15 +01:00
David Sidrane 500fe5c98c uavcannode_gps_demo:Add UAVCAN bootloader AppDescriptor 2021-02-24 19:20:15 +01:00
David Sidrane dd3c3098f2 nxp_ucans32k146:Add Can Bootloader build
nxp_ucans32k146:Relocation for Bootloader

nxp_ucans32k146:can_boot enable CAN

nxp_ucans32k146:Save Space use Non Optimize memcpy

nxp_ucans32k146:Increase to 24K

nxp/ucans32k146:Canbootloader LED Driver

nxp_ucans32k146:Can bootloader shut down CAN

nxp_ucans32k146:Use NVMEEPROM for Paramaters

nxp_ucans32k146:Use bootloader AppDescriptor

px4 mtd:Support onchip emulated eeprom
2021-02-24 19:20:15 +01:00
David Sidrane 62c0c96749 canbootloader:Use Micro hal and arch selection
nxp/s32k14x:board_identity: Return length of mfguid

nxp/s32k14x:CAN driver

nxp/s32k14x:Drver Added ABORT on error

canbootloader:Use N words for first word

canbootloader:Ensure the up_progmem API always defined
2021-02-24 19:20:15 +01:00
David Sidrane ea255234da nuttx:[BACKPORT] s32k1xx:Support ramfunc 2021-02-24 19:20:15 +01:00
Beat Küng 46b9acac6d mag_calibration: fix typo 2021-02-24 17:27:31 +01:00
Beat Küng 558fe18dfe sitl: add 'commander takeoff' to history 2021-02-24 17:27:31 +01:00
Beat Küng 836c7c6575 StickAccelerationXY: brake a bit faster
The drag is based on max_acc/max_vel, which means that increasing the
maximum velocity leads to slower braking (at the same starting speed).

Especially a combination of small max_acc (slow responsiveness) with high
max_vel led to an exceedingly high braking distance.
This improves that while still being smooth.
2021-02-24 17:27:31 +01:00
Beat Küng 1be4163506 mc_pos_control_params: increase velocity limits a bit
I hit those on my vehicle
2021-02-24 17:27:31 +01:00
Beat Küng ad9688e63c mc: remove unused param definitions MPC_JERK_MIN and MPC_DEC_HOR_SLOW 2021-02-24 17:27:31 +01:00
Matthias Grob a637f282ce FunctionsTest: cover lerp 2021-02-24 17:27:31 +01:00
Beat Küng 14bf9cf753 mc: add SYS_VEHICLE_RESP param to configure vehicle responsiveness 2021-02-24 17:27:31 +01:00
Beat Küng 2a0a82fd90 param: add commit_no_notification(T val) API 2021-02-24 17:27:31 +01:00
David Sidrane 3ef93823f4 srgbled:Fix warning 2021-02-24 08:05:39 -08:00
Daniel Agar 5f3e883f2c sensors/vehicle_imu: vehicle_imu_status include accel/gyro full raw FIFO sample rate 2021-02-24 08:13:53 -05:00
Ryan Johnston cec31fd685 Remove mkblctrl from default.cmake
Mkblctrl needs to be removed for the build to now succeed.
2021-02-24 08:54:22 +01:00
Ryan Johnston 45dde177ee Remove mkblctrl from default.cmake
Mkblctrl needs to be removed for the build to succeed.
2021-02-24 08:53:35 +01:00
David Sidrane dd736f8540 holybro_can-gps-v1:Ensure yeild is used for FLASH programing 2021-02-23 17:45:25 -05:00
David Sidrane 84b3f51c6b ark_can-flow:Ensure yeild is used for FLASH programing 2021-02-23 17:45:25 -05:00
David Sidrane d8b9def3f8 cuav_an-gps-v1:Ensure yeild is used for FLASH programing 2021-02-23 17:45:25 -05:00
Daniel Agar 6c3262c54b cmake cleanup src/drivers/imu 2021-02-23 15:58:36 -05:00
Daniel Agar 11ad41f7cb delete old imu/mpu6000 driver 2021-02-23 15:58:36 -05:00
Daniel Agar 4364e23633 delete unused imu/bmi160 2021-02-23 15:58:36 -05:00
Daniel Agar f9705c96f7 delete unused imu/bma180 2021-02-23 15:58:36 -05:00
Daniel Agar e38560b928 sensor_calibration: increase threshold for updating calibration offsets or scale
- this is to minimize needlessly writing negligible parameter changes and triggering unnecessary estimator bias resets
2021-02-23 13:32:00 -05:00
Nicolas MARTIN d65d06f82d SIH/gps: express gps position noise in meters and reduce noise value
Previous horizontal position noise was a white Gaussian noise with std=0.8m
It results in a noise with high frequencies too high making some ekf
position tests fail (test ratio to allow arming).

The new noise values are below real GPS errors but as theses errors are
generally low frequency, so they cannot be modeled with a white noise.
2021-02-23 13:27:28 -05:00
Daniel Agar 6cf06319d2 boards: nxp_fmurt1062-v1 remove irlock and lights/blinkm to save flash 2021-02-23 13:23:36 -05:00
Nicolas MARTIN 80a73ab5b5 SIH: add distance sensor fault simulation 2021-02-23 12:57:40 -05:00
Nicolas MARTIN ab41319009 SIH: add distance sensor 2021-02-23 12:57:40 -05:00
Daniel Agar 69bd3ecf95 sensor_calibration: respect board rotation even if uncalibrated
- fixes https://github.com/PX4/PX4-Autopilot/issues/16873
2021-02-23 15:24:14 +01:00
Daniel Agar e2563388eb Jenkins compile removed deleted variant 2021-02-22 20:33:03 -05:00
Daniel Agar cd7713eba2 boards: delete unused variants 2021-02-22 20:08:36 -05:00
Daniel Agar 4a65ad9148 github actions decrease max ccache size
- lower compression level to 5 as recommended by ccache manual
2021-02-22 18:59:35 -05:00
brad112358 d53fcb0bab mavlink: use RADIO_STATUS to regulate parameter sending 2021-02-22 18:57:29 -05:00
Daniel Agar bcae99e34a boards: CUAV Nora don't start icm20649 on SPI6 by default
- waiting on NuttX SPI6 BDMA to be fixed
2021-02-22 12:11:16 -05:00
Daniel Agar 7cc4aa6fe2 vtol_att_control: fix code style 2021-02-22 12:09:39 -05:00
Nicolas MARTIN 50ec809fdf SIH: add mag offset from parameters
An absolute value superior to 10000 block mag publication
2021-02-22 11:56:16 -05:00
Nicolas MARTIN 8f54dc402d SIH: add baro offset (or pressure change) from parameters
An absolute value superior to 10000 block barometer publication
2021-02-22 11:56:16 -05:00
Nicolas MARTIN 1df63cb6b1 SIH: add gps fix loss simulation from parameters
A new parameter allows to change the SIH number of gps satellites used
If it is below 4, fix is lost
2021-02-22 11:56:16 -05:00
Daniel Agar 098d5ce5c0 EKF allow range aid without horizontal aiding
- skip range aid velocity check when horizontal aiding isn't active
2021-02-22 11:55:56 -05:00
Sander Smeets a8a9832b59 Allow new modes for forward thrust 2021-02-22 11:18:49 -05:00
Lorenz Meier 1b8a3079e6 Update commander_params.c
Better documentation boolean settings, removed duplicate boolean.
2021-02-22 11:17:16 -05:00
Lorenz Meier 90f5d7338c Commander: Relax pre-arm check for EKF
The previous testing ratios could lead to extremely tight pre-arm acceptance.
2021-02-22 11:17:16 -05:00
Lorenz Meier f12d368a64 Commander: Document arming check params 2021-02-22 11:17:16 -05:00
Lorenz Meier 87f98f096f Commander: Respect position circuit breaker
This ensures that commander respects the position check circuit breaker and allows arming without position.
2021-02-22 11:17:16 -05:00
Daniel Agar 382e0cbaec px4_work_queue: increase wq:nav_and_controllers stack 1760->1824 2021-02-22 11:15:01 -05:00
David Jablonski ed7a5314d8 rtl: head towards home location after descend 2021-02-22 16:37:08 +01:00
David Jablonski aeccb621c5 rtl: added loiter radius for descending 2021-02-22 16:37:08 +01:00
Nicolas MARTIN 29943a2c09 EKF test ratio status return current height source test ratio 2021-02-22 09:22:45 -05:00
Daniel Agar 30e8a14be3 logger: update SDLOG_PROFILE comment to reflect current default
- closes https://github.com/PX4/PX4-Autopilot/issues/16904
2021-02-22 08:45:10 +01:00
Ryan Johnston 410ca51a4a boards: MRO Control Zero F7 OEM minor update
- Updating Serial port mapping to be the same across all Control Zero boards
 - CAN2 Silent Pin Update
2021-02-21 21:08:38 -05:00
Ryan Johnston a1fa6a72ea boards: MRO Control Zero H7 Board Support 2021-02-21 21:07:36 -05:00
Ryan Johnston 5376178987 boards: MRO Control Zero H7 OEM Board Support 2021-02-21 21:06:27 -05:00
Lorenz Meier aacbc04730 PX4IO: Robustify upgrade process
These changes remove the two code paths to updates (forceupdate and update) and try to reboot and bootload IO independent of its state, wether it is in bootloader mode already, safety switch is off or if it is in "nominal state" (running and safety on). This ensures that there are no conditions where user error or boot sequence can prevent a successful upgrade. The only state where an upgrade will not be done is if the system is fully armed.
2021-02-21 19:56:16 -05:00
Daniel Agar 82200fab9e mavsdk_tests: relax MC "Fly straight" speed threshold 2021-02-21 22:51:51 +01:00
Daniel Agar bbc721917c mavlink: mission ignore takeoff pitch error
- this mission rejection was only added recently in https://github.com/PX4/PX4-Autopilot/pull/16792
 - causing QGC compatibility issues https://github.com/mavlink/qgroundcontrol/pull/9464
2021-02-21 16:40:38 -05:00
Daniel Agar bfc019364a Update submodule mavlink v2.0 to latest Sun Feb 21 12:42:06 UTC 2021
- mavlink  v2.0 in PX4/Firmware (414f9f81d9): https://github.com/mavlink/c_library_v2/commit/4e25dfa47b28adc177ea7badad837d8b84173712
    - mavlink  v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/bf7df5c01d856f174c3b98e5b6527e777b173935
    - Changes: https://github.com/mavlink/c_library_v2/compare/4e25dfa47b28adc177ea7badad837d8b84173712...bf7df5c01d856f174c3b98e5b6527e777b173935

Co-authored-by: PX4 BuildBot <bot@px4.io>
2021-02-21 15:28:22 -05:00
Daniel Agar 1956cd8ff1 cmake: add px4io binary as ExternalProject build byproduct
- needed for incremental px4io changes to actually make it all the way through to the ROMFS
2021-02-21 14:04:26 -05:00
Daniel Agar 414f9f81d9 move fake GPS to standalone module 2021-02-20 14:13:36 -05:00
Silvan Fuhrer 0ea8104344 select single system-wide wind estimate message (current best)
- publish wind estimate only from EKF, and wind speeds from airspeed selector to new separate topic (airspeed_wind)
 - rename message wind_estimate to wind
 - publish wind from currently used ekf instance (ekf2selector)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-02-20 13:15:01 -05:00
jciberlin 9d65e9a980 ghst: keep the previous values for channels that are not updated
Keep the previous values for channels that are not updated (ghost protocol). Add new test data for ghost protocol.
2021-02-20 11:29:57 +01:00
jciberlin 96c72a5657 RCTest: add tests for ghost protocol
Add tests for ghost protocol
2021-02-20 11:29:57 +01:00
jciberlin ca192a98c5 ghst: add test data
Add test data for ghost protocol
2021-02-20 11:29:57 +01:00
Juraj Ciberlin c0f7429f8c ghst: use memcpy instead of for loop
PR review, ghost protocol, use memcpy instead of for loop

Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2021-02-20 11:29:57 +01:00
jciberlin 64342f568d Ghost protocol
ghst: add ghost protocol
2021-02-20 11:29:57 +01:00
Daniel Agar 711a69854b uthash: move remaining utarray usage to parameters and delete unused
- this is to discourage further use until utarray can be dropped entirely
2021-02-20 11:28:22 +01:00
Daniel Agar 9ed959402e mavlink: store instances in array
- simplify mavlink header writes that go back through the mavlink module
 - add locking around mavlink command line usage (start, stop, status, etc)
2021-02-20 11:28:22 +01:00
Lorenz Meier 4984c19700 PX4 IO: Retry upgrades of IO
This adds robustness to system timing and bad link.
2021-02-20 11:07:53 +01:00
alexklimaj ed20bc92c3 Fix uavcannode build 2021-02-20 10:49:08 +01:00
Beat Küng 9d11d94e7e px4iofirmware: guard against parsing multiple RC protocols
It was for example possible that DSM got parsed, and in the next iteration
SBUS got parsed, leading to multiple PX4IO_P_STATUS_FLAGS_RC_ flags set.
input_rc::input_source was then incorrectly set to DSM.

Partially guarding was already done: if SBUS got parsed, DSM and others
were skipped.

The IO will still clear all PX4IO_P_STATUS_FLAGS_RC_* flags on RC loss.
2021-02-19 09:28:46 -05:00
Daniel Agar 5c27c47746 Jenkins hardware limit px4_fmu-v5 to generic quadcopter at default rates
- the same boards are used for stackcheck and debug builds which are cpu constrained
2021-02-19 09:27:38 -05:00
mcsauder 164e53bad3 Add unit tests and update ekf_helper setEkfGlobalOrigin() method to allow for condition when current position is unitialized. 2021-02-19 08:59:47 -05:00
Daniel Agar 63f64b57c1 EKF: set global origin method
EKF: add convergence after global origin reset test
2021-02-19 08:59:47 -05:00
PX4 BuildBot c863d6a346 Update submodule ecl to latest Fri Feb 19 12:39:03 UTC 2021
- ecl in PX4/Firmware (5be2f2c8f835fde0ce648561636cf565d95f5741): https://github.com/PX4/PX4-ECL/commit/310f41517590165a82f807562b3cbb9a76e4c7d8
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/81937370ac5234a4c318d838acee4d9bb4bfa697
    - Changes: https://github.com/PX4/PX4-ECL/compare/310f41517590165a82f807562b3cbb9a76e4c7d8...81937370ac5234a4c318d838acee4d9bb4bfa697

    8193737 2021-02-18 bresch - [AUTO COMMIT] update change indication
04844a0 2021-02-16 bresch - ekf control: move time_last_in_air/on_ground out of GPS control logic
b00d4a9 2021-02-16 bresch - mag fusion: improve on ground forced mag fusion logic
2021-02-19 08:34:17 -05:00
Daniel Agar 5dc5ebc0a1 boards: cleanup uavcan test targets (v1 and v0 embedded peripherals) 2021-02-18 11:54:41 -05:00
Daniel Agar 5e188b3cd7 ekf2: populate local_position dist_bottom_sensor_bitfield 2021-02-18 10:37:02 -05:00
Alex Mikhalev 06e2bca3a6 batt_smbus: Use orb_publish_auto 2021-02-18 07:52:26 -05:00
Alex Mikhalev 6bd4dff51f drivers/smbus: Increase max block size to 34
batt_smbus for BQ40Z80 transfers up to 34 bytes (32 byte block + 2 byte
address), but this was overflowing and failing the PEC check.
So increase the buffer size

Signed-off-by: Alex Mikhalev <alex@corvus-robotics.com>
2021-02-18 07:52:26 -05:00
Alex Mikhalev 93b1a148b7 batt_smbus: Pass device address to base class
Fixes a warning printed at runtime

Signed-off-by: Alex Mikhalev <alex@corvus-robotics.com>
2021-02-18 07:52:26 -05:00
bresch 81937370ac [AUTO COMMIT] update change indication 2021-02-18 10:11:51 +01:00
bresch 04844a04ed ekf control: move time_last_in_air/on_ground out of GPS control logic 2021-02-18 10:11:51 +01:00
bresch b00d4a9237 mag fusion: improve on ground forced mag fusion logic
While a yaw test ration > 1 rejects the mag data in air, the fusion is
forced with a limited innovation on ground to fix gyro bias and local
magnetic effects problems pre-takeoff. However, the same logic is
applied after landing and immediately after the land detector detects
landing. In some cases, this can disturb the other EKF states which can
lead to a state change of the land detector.
To avoid such a loop, the start of this forced yaw fusion is delayed by
5 seconds after landing.
2021-02-18 10:11:51 +01:00
Daniel Agar 4678201da4 update libuavcan to latest 2021-02-17 22:47:35 -05:00
Daniel Agar 46eb790188 boards: new uavcan board variants remove delete mkblctrl driver 2021-02-17 22:47:35 -05:00
David Sidrane e0e796a2b9 ROMFS:Bake in UAVCAN FW with builds that end in _uavcan
The configuration are mostly for testing now.
2021-02-17 22:47:35 -05:00
David Sidrane 8c2678bca1 uavcan_servers:Reworked file naming and use ROM fs as fall back
Supporting direct down loads from ROMFS with preferece give to the
   files fould on the SD card first. This will allow a user to provide
   an updated uavcan firware on the SD card, and there is no overhead
   of coping files from the ROM FS to the SD card.
2021-02-17 22:47:35 -05:00
David Sidrane 57195843bf cuav_can-gps-v1:Use for ALT Bootloader an Option 2021-02-17 22:47:35 -05:00
David Sidrane 5ea56af5f0 canbootloder:Make support for ALT Bootloader an Option 2021-02-17 22:47:35 -05:00
David Sidrane 174f2624df holybro_can-gps-v1:board_id uses as Uavcan HW version 2021-02-17 22:47:35 -05:00
David Sidrane d1cadb6441 ark_can-flow:Assign board_id 2021-02-17 22:47:35 -05:00
David Sidrane 070db73e91 holybro_can-gps-v1:Use common uavcan board identity 2021-02-17 22:47:35 -05:00
David Sidrane 51a5c63bac ark_can-flow:Use common uavcan board identity 2021-02-17 22:47:35 -05:00
David Sidrane 3f6388f9a1 uav_can-gps-v1:Use common uavcan board identity 2021-02-17 22:47:35 -05:00
David Sidrane 51b54c025b canbootloader:Send number of KB written while updating FW 2021-02-17 22:47:35 -05:00
David Sidrane d426dd771f canbootloader:Ensure common crc is set valid after autobaud 2021-02-17 22:47:35 -05:00
David Sidrane 58e5c8fbca canbootloader:Prefer bootloader_app_shared over bootloader_alt_app_shared 2021-02-17 22:47:35 -05:00
David Sidrane 05c0deae14 UavcanNode:Only write alt id not booted by PX4 2021-02-17 22:47:35 -05:00
David Sidrane 71c4f5a05b UavcanNode:Support Dynamic Node ID allocation 2021-02-17 22:47:35 -05:00
David Sidrane e4b519aca0 UavcanNode:Add support for the Alternate bootloader app shared 2021-02-17 22:47:35 -05:00
David Sidrane b27beac50c UavcanNode:Add feed back to bootloader that the App ran 30S 2021-02-17 22:47:35 -05:00
David Sidrane 8943644566 board_common:Add board_configure_reset and board_booted_by_px4 API 2021-02-17 22:47:35 -05:00
David Sidrane 7a6ed0281b uavcan bootloader:Add support alt boot_alt_app_shared 2021-02-17 22:47:35 -05:00
David Sidrane 28030e96e2 cuav_can-gps-v1:UavcanNode app ensure IWDG off in debuger 2021-02-17 22:47:35 -05:00
David Sidrane 6ea06892ac Fix case were descriptor has no or bad length 2021-02-17 22:47:35 -05:00
David Sidrane 5c80b2d3dd cuav_can-gps-v1:canbootloader - enable SWD and Pause IWDT whils stepping 2021-02-17 22:47:35 -05:00
David Sidrane da67537291 Uavcan Node Pets the watchdog 2021-02-17 22:47:35 -05:00
David Sidrane ef29ed7db3 Uavcan bootloader Starts Watchdog for Application 2021-02-17 22:47:35 -05:00
David Sidrane 77d0eae40b Add SMT32F4xxx Watchdog driver 2021-02-17 22:47:35 -05:00
David Sidrane 8747b343d9 Non-compliant nodes support
WorkQueueManager:Increase UAVCAN stack size
2021-02-17 22:47:35 -05:00
David Sidrane c7182d5453 cuav_can-gps-v1:CMakeList remove .h files 2021-02-17 22:47:35 -05:00
David Sidrane 878baabce8 cuav GPS use appdes 2021-02-17 22:47:35 -05:00
David Sidrane 760e47bbf9 uavcan bootloader use new AppDes 2021-02-17 22:47:35 -05:00
Daniel Agar bfdc6cd675 Update submodule sitl_gazebo to latest Wed Feb 17 12:42:47 UTC 2021 (#16862)
- sitl_gazebo in PX4/Firmware (51dd141c86): https://github.com/PX4/PX4-SITL_gazebo/commit/4f26815d4127e3af84e01bbc1f8683c4fe30521f
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/bebb9a95f0b61bf9e4c3de345fab70985c1329b3
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/4f26815d4127e3af84e01bbc1f8683c4fe30521f...bebb9a95f0b61bf9e4c3de345fab70985c1329b3

bebb9a9 2021-02-11 Dongoo Lee - Add depth camera model for ROS2 environment (#707)
54e1a19 2021-02-10 TSC21 - gazebo_mavlink_interface: generate subscribers for nested models with sensors
97c167d 2021-02-10 Julian Oes - Implement gimbal controller as MAVLink gimbal v2 device (#703)

Co-authored-by: PX4 BuildBot <bot@px4.io>
2021-02-17 21:17:13 -05:00
Daniel Agar cff7a01d5e ekf2: estimator_status log reset counts 2021-02-17 21:16:34 -05:00
Daniel Agar 6d42fe28bf Update submodule GPS drivers to latest Wed Feb 17 12:42:56 UTC 2021 2021-02-17 21:14:56 -05:00
Daniel Agar 2a47583be5 boards: nxp/fmurt1062-v1 disable vmount 2021-02-17 13:54:34 -05:00
Julian Oes 1493ebf350 mavlink: reset MAVLink version to auto-detect 2021-02-17 13:54:34 -05:00
Julian Oes b812763a5a mavlink: no gimbal messages on constrained flash 2021-02-17 13:54:34 -05:00
Julian Oes 20bc924668 boards: disable vmount for fmu-v2 2021-02-17 13:54:34 -05:00
Julian Oes a2d419c91a vmount: use copyTo to copy quaternions 2021-02-17 13:54:34 -05:00
Julian Oes f39216b9c3 vmount: use math functions instead of macros 2021-02-17 13:54:34 -05:00
Julian Oes 6672be040a mavlink: limit mavlink channels based on memory 2021-02-17 13:54:34 -05:00
Julian Oes 10add72b00 sitl_gazebo: update submodule
This includes the new gimbal controller which implements the MAVLink
gimbal v2 device protocol.
2021-02-17 13:54:34 -05:00
Julian Oes 7633b119f7 gimbal: merge fixes 2021-02-17 13:54:34 -05:00
Julian Oes fecd96dc28 ROMFS: add remote port for gimbal mavlink instance
Previously, we did not set a remote port which meant that the default
remote port 14550 was used. This meant that the mavlink instance
talking to the gimbal was interfering with the connection to the ground
station (on 14550).
2021-02-17 13:54:34 -05:00
Julian Oes 3a2e4db309 vmount: mute gimbal manager ignoring messages 2021-02-17 13:54:34 -05:00
Julian Oes db09a1386f vmount: fix regression around stabilize flags
We use the stabilize param to set the input. Like this the input flags
can be changed using the configure message later, and then eventually
used in the output.
2021-02-17 13:54:34 -05:00
Julian Oes 086c45d406 vmount: fix POI for gimbal v2
This includes several changes to fix POI when used with MAVLink gimbal
v2 input:
- Correctly set capability flag that POI is supported.
- Keep lat/lon and calculate attitude on each cycle, instead of only
  once on init.
- Always publish gimbal manager information, with or withoug gimbal v2
  device.
2021-02-17 13:54:34 -05:00
Julian Oes b0d7d19bab vmount/mavlink: update gimbal information message
We should be using gimbal_manager_information and not
gimbal_device_information. Plus, this updates the fields and flags
according to the MAVLink changes.
2021-02-17 13:54:34 -05:00
Julian Oes cb3ad39406 vmount: add comment about possible NAN values 2021-02-17 13:54:34 -05:00
Julian Oes cd0509d2ef vmount: fix AUX gimbal output for v2 mavlink input
This should fix the case where AUX gimbals don't work anymore when
gimbal input is mavlink gimbal v2.

The fix is mostly to take care against NAN inputs.
2021-02-17 13:54:34 -05:00
Julian Oes 17dce18b32 mavlink: reduce GIMBAL_MANAGER_STATUS message rate
This was way too fast.
2021-02-17 13:54:34 -05:00
Julian Oes 6561b07caf vmount: support legacy gimbal v1 mission commands
This is a hotfix to restore gimbal functionality for SITL set-ups that
are set to MNT_MODE_IN 4 (gimbal protocol v2) but still need to accept
gimbal v1 commands that might be part of a mission, e.g. uploaded by
MAVSDK.
2021-02-17 13:54:34 -05:00
Julian Kent a3e0e2e84f Fix RTPS builds 2021-02-17 13:54:34 -05:00
Julian Oes 6f56797f3d mavlink: hack to forward messages from gimbal
This is a hack to make sure the messages from the gimbal arrive at other
links (e.g. the ground station). It means that the gimbal does not get
flooded with all other messages that would get forwarded but messages
from the gimbal will still make it through.
2021-02-17 13:54:34 -05:00
Julian Oes b8ad7092dc mavlink: use Mavlink 2 by default 2021-02-17 13:54:34 -05:00
Julian Oes 8da3a490af ROMFS: use gimbal v2 protocol with typhoon_h480 2021-02-17 13:54:34 -05:00
Julian Oes 642adbead8 if750a: use MAVLink gimbal v2 device 2021-02-17 13:54:34 -05:00
Julian Oes e6b1775bb6 vmount/navigator/mavlink: gimbal v2 changes
This is a collection of commits all having to do with changes in the
Mavlink gimbal v2 protocol as described in:
https://mavlink.io/en/services/gimbal_v2.html
2021-02-17 13:54:34 -05:00
Julian Oes 422bac4bfd mavlink: add gimbal mode to talk to gimbal device 2021-02-17 13:54:34 -05:00
Julian Oes 2a0ddf9f44 mavlink: enable 6 instead of 4 instance 2021-02-17 13:54:34 -05:00
Julian Oes a16939f47e ROMFS: start mavlink instance for gimbal 2021-02-17 13:54:34 -05:00
Martina Rivizzigno 48b00ff678 Support for gimbal v2 protocol
- add command to request a message
- add gimbal attitude message

mavlink_receiver handle GIMBAL_MANAGER_SET_ATTITUDE

first implementation of new vmount input MavlinkGimbalV2
- setup class
- decode gimbal_manager_set_attitude in ControlData

add gimbal information message

add gimbal manager information and vehicle command ack

mavlink messages: add stream for GIMBAL_MANAGER_INFORMATION

mavlink_receiver: handle GIMBAL_DEVICE_INFORMATION

remove mavlink cmd handling from vmount input MavlinkGimbalV2

complete gimbal manager:
- send out fake gimbal_device_information for dummy gimbals
- complete ROI handling with nudging

small fixes

fix typos

cleanup
- gimbal device information
- flags lock
- check sanity of string

add support for CMD_DO_GIMBAL_MANAGER_ATTITUDE

stream GimbalDeviceAttitudeStatus for dummy gimbals
- add uROB gimbal_attitude_status
- fill status in vmount output_rc for dummy gimbals not able to send the
status themselves
- stream mavlink GimbalDeviceAttitudeStatus

better handle the request for gimbal infomation request

clean up

bring gimbal information back on vmount init

add new gimbal message to mavlink normal stream

fix publication of gimbal device information

rename gimbal_attitude_status to gimbal_device_attitude_status

stream gimbal_manager_status at 5Hz

mavlink: send information only on request

Sending the information message once on request should now work and we
don't need to keep publishing it.

mavlink: debug output for now

make sure to copy over control data

mavlink: add missing copyright header, pragma once

mavlink: address review comments

mavlink: handle stream not updated

Our answer does not just depend on whether the stream was found but
whether we actually were able to send out an update.

mavlink: remove outdated comment

vmount: add option for yaw stabilization only

The stabilize flag is used for gimbals which do not have an internal IMU
and need the autopilot's attitude in order to do stabilization. These
gimbals are probably quite rare by now but it makes sense to keep the
functionality given it can e.g. be used by simple servo gimbals for
sensors other than highres cameras.

The stabilize flag can also be re-used for gimbals which are capable of
stabilizing pitch and roll but not absolute yaw (e.g. locked to North).
For such gimbals we can now set the param MNT_DO_STAB to 2.

We still support configuring which axes are stabilized by the
MAVLink command DO_MOUNT_CONFIGURE, however, this is generally not
recommended anymore.

vmount: fix incorrect check for bit flag

mavlink_messages: remove debug message

Signed-off-by: Claudio Micheli <claudio@auterion.com>

use device id

remove debug print

gimbal attitude fix mistake

clang tidy fix

split:
- gimbal_attitude -> gimbal_device_set_attitude, gimbal_manager_set_attitude
- gimbal_information -> gimbal_device_informatio, gimbal_manager_information

add gimbal protocol messages to rtps msg ids

support set attitude for gimbal directly speaking mavlink

clean up gimbal urob messages

vmount: address a few small review comments

vmount: split output into v1 and v2 protocol

This way we can continue to support the MAVLink v1 protocol. Also, we
don't send the old vehicle commands when actually using the new v2
protocol.

vmount: config via ctor instead of duplicate param

vmount: use loop to poll all topics

Otherwise we might give up too soon and miss some data, or run too fast
based on commands that have nothing to do with the gimbal.

typhoon_h480: use gimbal v2 protocol, use yaw stab

Let's by default use the v2 protocol with typhoon_h480 and enable yaw
lock mode by stabilizing yaw.
2021-02-17 13:54:34 -05:00
Julian Oes 46e75ebddb mavsdk_tests: remove leftover debug line 2021-02-17 18:13:14 +01:00
Julian Oes 2703a34900 mavsdk_tests: add link back to github action 2021-02-17 18:13:14 +01:00
Daniel Agar ab0d0fd0be uORB move to PX4 platform layer 2021-02-17 11:25:56 -05:00
TSC21 6bbb2faf8a CI: fix colcon build 2021-02-17 15:03:47 +01:00
Ildar Sadykov 51dd141c86 RTPS: adjust timestamp_sample in urtps_agent 2021-02-17 13:19:05 +01:00
Daniel Agar e48a869160 boards: mRo pixracer pro disable USART6 (conflicts with SPI6) 2021-02-16 22:28:13 -05:00
Daniel Agar 2702306849 boards: mRo pixracer pro fix incorrect SPI2 sck 2021-02-16 22:28:13 -05:00
PX4 BuildBot 0edee1e2e9 Update submodule ecl to latest Wed Feb 17 00:39:16 UTC 2021
- ecl in PX4/Firmware (a5a1d4caa0d04cb79ba29e98ba0af04e20c53de9): https://github.com/PX4/PX4-ECL/commit/d4258cc66d24c6871688ae83f42de3b46c96d033
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/310f41517590165a82f807562b3cbb9a76e4c7d8
    - Changes: https://github.com/PX4/PX4-ECL/compare/d4258cc66d24c6871688ae83f42de3b46c96d033...310f41517590165a82f807562b3cbb9a76e4c7d8

    310f415 2021-02-16 Daniel Agar - EKF add const state reset status access
0c5291d 2021-02-16 isidroas - Heading reset to magnetometer from GPS or EV (#969)
2021-02-16 22:00:12 -05:00
Daniel Agar a416731656 drivers/heater: add logging and minor improvements
- new heater_status logging message
 - run continously at low rate until configured sensor is found
 - fix px4io fd bugs (fd open/close/ioctl must be same thread)
2021-02-16 15:16:19 -05:00
Daniel Agar 5abf29d93c commander: auto TAKEOFF to LOITER/MISSION minor fix to avoid failsafe confusion
- base on nav_state rather than main_state
2021-02-16 13:02:14 -05:00
Julian Oes 64d0ce43b6 mavsdk_tests: upload to logs.px4.io in test_runner
By doing the upload directly inside the mavsdk_test_runner.py we have
more context such as the model, case, etc.
2021-02-16 17:07:21 +01:00
Julian Oes 18281eee29 workflows: more meta information to log upload
This adds a little bit more information but still lacks the one to one
mapping between test and uploaded file.
2021-02-16 17:07:21 +01:00
Julian Oes 2315618b85 mavsdk_tests: use autopilot timestamps to sleep
This way we should be able to avoid some of the timeouts happening on
the PX4 side if MAVSDK doesn't send setpoints in time.
2021-02-16 17:07:21 +01:00
Julian Oes 6c26387e85 mavsdk_tests: try to prevent auto-disarm
We should not spend too much time sending RC init messages because if it
takes too long, we might auto-disarm in the meantime.
2021-02-16 17:07:21 +01:00
Julian Oes c1de27acf7 mavsdk_tests: use more conservative speed_factor 2021-02-16 17:07:21 +01:00
Julian Oes 0ebb8c6981 mavsdk_tests: use microseconds to avoid sleep(0) 2021-02-16 17:07:21 +01:00
Julian Oes b6b9ce5f11 mavsdk_tests: robustify test by climbing longer 2021-02-16 17:07:21 +01:00
Julian Oes b79553862e mavsdk_tests: remove timeout for mission upload
Just use what is MAVSDK internal.
2021-02-16 17:07:21 +01:00
Daniel Agar 310f415175 EKF add const state reset status access 2021-02-16 10:33:43 -05:00
isidroas 0c5291d194 Heading reset to magnetometer from GPS or EV (#969) 2021-02-16 14:37:34 +01:00
PX4 BuildBot cf2ffb1086 Update submodule ecl to latest Tue Feb 16 12:39:08 UTC 2021
- ecl in PX4/Firmware (4de4b8012999a53b3401701fe63fafb4056fa58f): https://github.com/PX4/PX4-ECL/commit/ffab483504a6c2eb3b61ae10d612cb35c8fbc550
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/d4258cc66d24c6871688ae83f42de3b46c96d033
    - Changes: https://github.com/PX4/PX4-ECL/compare/ffab483504a6c2eb3b61ae10d612cb35c8fbc550...d4258cc66d24c6871688ae83f42de3b46c96d033

    d4258cc 2021-02-15 Mathieu Bresciani - yaw emergency: check angle between vel observation and estimate (#975)
2021-02-16 08:34:02 -05:00
Daniel Agar 44df0fb7a2 Analog Devices ADIS16448 rewrite
- new IMU driver structure with state machine (no sleeps in bus thread)
 - verify all configured registers and trigger reset on failure
 - detect if DIO1 or DIO2 are actually connected for data ready interrupt usage
 - don't use CRC-16 on burst transfers except for verified lots
2021-02-16 10:29:07 +01:00
mcsauder 59b31e3c5b Minor cleanup/error checking, static_casts, print_status() additions, and formatting in the heater driver. 2021-02-16 08:20:14 +01:00
Ramon Roche 15392f8e53 silent success and log failures
Co-authored-by: Nuno Marques <n.marques21@hotmail.com>
2021-02-15 20:28:19 +01:00
CAI Dongcai 2ad1cb24cc fix empty log file "micrortps_bridge.log" 2021-02-15 20:28:19 +01:00
Tim 540e4f9464 Uuv position control extension (#16688)
* Commit for the Integration of a position controller for the a Underwater vehicle.
This module is an extension of the uuv_att_control to control an Underwater vehicle to any position, given by the SET_POSITION_TARGET_LOCAL_NED which includes x y z yaw.
Since the position control is designed for a 6DOF Robot, the roll and pitch angle are controlled to be 0.
Additionally there is a stabilization control, which holds the robot at a defined depth, and not move in any direction.

In general the idea is to have this position module to control the position of the uuv. The position module reseives the desired position of the uuv and sends appropriate attitude setpoints to the uuv_attitude_control module.

Additionally the mixer file is adapted, to include the 6 different inputs(x y z roll pitch yaw).

* Commit for the Integration of a position controller for the a Underwater vehicle.
This module is an extension of the uuv_att_control to control an Underwater vehicle to any position, given by the SET_POSITION_TARGET_LOCAL_NED which includes x y z yaw.
Since the position control is designed for a 6DOF Robot, the roll and pitch angle are controlled to be 0.
Additionally there is a stabilization control, which holds the robot at a defined depth, and not move in any direction.

In general the idea is to have this position module to control the position of the uuv. The position module receives the desired position of the uuv and sends appropriate attitude setpoints to the uuv_attitude_control module.

Additionally the mixer file is adapted, to include the 6 different inputs(x y z roll pitch yaw).

Currently not solved/missing:
 - Problem with gazebo model(propeller moving chaotically).
 - Mixer correct gazebo vs real life (has to be tested in the future)
 - correct integration in uuv.apps (when choose which module)
 - very basic controller chosen (could be improved a lot in the future)

* Remove error caused by unused variables and a different build error

* added better description of the parameter. Additionally the group is changed.

* added better description of the parameter. Additionally the group is changed.
Fixed bug about parameter

* Added EOF to the files.

* Removed parameter for direct position control for safety reasons.

* small bugfix
2021-02-15 18:40:28 +01:00
Daniel Agar 0618f048f2 commander: use control mode flags and cleanup arm_disarm
- keep `vehicle_control_mode` last state in commander and use appropriate flags in place of various main_state and nav_state checks
 - consolidate scattered arming requirements in `arm_disarm()`
   - there were a number of different requirements from arming via RC vs Mavlink that don't make any sense
        - if geofence enabled require valid home before arming
        - throttle requirements for manual modes
 - remove unnecessary mavlink feedback that differs between arming interfaces (mavlink vs RC)
      - let the preflight/prearm checks respond directly in most cases 

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2021-02-15 12:03:21 -05:00
Jari Nippula 37f78537c3 protocol-splitter: Additional protocol layer added 2021-02-15 14:00:39 +01:00
Mathieu Bresciani d4258cc66d yaw emergency: check angle between vel observation and estimate (#975)
use thresholds based on state and obs variance

* [AUTO COMMIT] update change indication
2021-02-15 10:31:16 +01:00
Daniel Agar 40a452dcd2 ekf2: selector improve timeout handling and reporting
- relax estimator_status timeout unless attitude hasn't published recently
2021-02-14 21:08:56 -05:00
Lorenz Meier 4c5d2363d4 Rover control: Use roll sticks
It is more intuitive to use the roll stick as lateral control input given that drones defined this category, plus this is how consumer car / rover radio controls have been working already.
2021-02-14 11:17:28 +01:00
Lorenz Meier 4c9b2c65b5 Support v5X build variants
This adds support for the different implementation variants of the v5X standard.
2021-02-14 11:17:28 +01:00
Lorenz Meier 2be482c5ae Sensors: New parameter for baro priority
This allows to give external barometers priority if they are present.
2021-02-14 11:17:28 +01:00
Jaeyoung-Lim fdd9b3ea51 Add support for stabilized flight mode for rovers
This commit adds support for stabilized flight mode for rovers, which enables the rover tracking a fixed heading that is set with a manual input
2021-02-14 11:17:28 +01:00
Jaeyoung-Lim 3c12573e93 Use uORB::Subscription for rover_pos_control
Modernize rover position control
2021-02-14 11:17:28 +01:00
Lorenz Meier 8d78b8a01d Change wording in GPS failure handling
This matches better the different platforms that are using this functionality.
2021-02-14 11:17:28 +01:00
Lorenz Meier cc11fb2818 Multicopter rate controller: Protect for full throttle scaling
PX4 supports -1 to 1 as input and this module was not protected against the input range.
2021-02-14 11:17:28 +01:00
Lorenz Meier 66d86aae2e Flight mode manager: Protect for full throttle scaling
PX4 supports -1 to 1 as input and this module was not protected against the input range.
2021-02-14 11:17:28 +01:00
Lorenz Meier ec2cf70276 Rover position controller: Modernize implementation
This commit moves the steering output from yaw to the roll channel to better reflect the lateral control input / reaction mapping. It also removes old unused parameters and modernizes the mainloop to remove unnecessary polling.
2021-02-14 11:17:28 +01:00
Lorenz Meier bb0b4db028 ROMFS: Better defaults for rover 2021-02-14 11:17:28 +01:00
Lorenz Meier 3135e4d31a SITL: Set correct L1 period 2021-02-14 11:17:28 +01:00
Lorenz Meier 15219fbfe5 MC att control: Robustify for throttle scaling
PX4 can support negative (reverse) throttle and the multicopter controller is not expecting this input range. This hardens it against it.
2021-02-14 11:17:28 +01:00
Lorenz Meier 548e070b91 FW pos control: Robustify for throttle scaling
PX4 can support negative (reverse) throttle and the fixed wing controller is not expecting this input range. This hardens it against it.
2021-02-14 11:17:28 +01:00
Lorenz Meier 6d489a4b4d FW att control: Robustify for throttle scaling
PX4 can support negative (reverse) throttle and the fixed wing controller is not expecting this input range. This hardens it against it.
2021-02-14 11:17:28 +01:00
Lorenz Meier 0d3676e5b0 Safety switch: Default to safety off
90% of all real-world vehicle configs default to this and it is something that users stumble over if they configure a new system. There are valid cases where this would not be desired - for these it can be still switched off.
2021-02-14 11:17:28 +01:00
Lorenz Meier 8a448718b9 RC update: Do not constrain throttle
If the user calibrated to negative throttle, enable them to use it.
2021-02-14 11:17:28 +01:00
Lorenz Meier 9d20dea3b8 Rover: remove unused parameter 2021-02-14 11:17:28 +01:00
Daniel Agar fb2a199621 delete unmaintaned mkblctrl driver 2021-02-14 10:38:15 +01:00
Lorenz Meier c04d23645c IO: Fix reverse mapping
The reverse mapping was off-by-one in the IO driver.
2021-02-13 15:21:10 -05:00
Ryan Johnston 5a58f25d6a boards: MRO Control Zero F7 OEM Support 2021-02-13 11:16:55 -05:00
Daniel Agar ce552a3364 navigator: RTL don't get invalid params 2021-02-13 00:34:56 +01:00
Daniel Agar 1981519aad L1 position controller: use double precision floating point for all lat/lon 2021-02-12 21:59:56 +01:00
Silvan Fuhrer 31a6edff07 Fixed-wing: remove roll offset param (FW_RSP_OFF)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-02-12 13:57:15 -05:00
Silvan Fuhrer a70cf950f4 fw_pos_control_l1: apply pitch setpoint offset centrally
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-02-12 13:57:15 -05:00
Daniel Agar f61d8539cb fw_pos_control_l1: add takeoff minimum pitch parameter
- remove mavlink mechanism for setting minimum pitch
2021-02-12 13:57:15 -05:00
PX4 BuildBot 89f19fd657 Update submodule v2.0 to latest Fri Feb 12 12:42:14 UTC 2021
- v2.0 in PX4/Firmware (c76477963097ac72b7bd2f165a845a493ffb724e): https://github.com/mavlink/c_library_v2/commit/43f2f3180a49720804c5f006377889a164fabadb
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/4e25dfa47b28adc177ea7badad837d8b84173712
    - Changes: https://github.com/mavlink/c_library_v2/compare/43f2f3180a49720804c5f006377889a164fabadb...4e25dfa47b28adc177ea7badad837d8b84173712

    4e25dfa4 2021-02-12 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/e4269aaf680b0797ba594b130d4e92dda889100c
82dcec27 2021-02-12 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/08e57d08ad17f1218334b74fa3766a0177783ea6
2021-02-12 16:31:28 +01:00
Daniel Agar 15e76ad993 PWM12 mode for pwm_out and dshot 2021-02-12 09:19:18 -05:00
Daniel Agar 0614789db3 tests: add simple parameter custom default testing 2021-02-12 08:27:47 -05:00
Daniel Agar e6bc6438e8 ROMFS: airframes use new param default mechanism 2021-02-12 08:27:47 -05:00
Daniel Agar b67aa77d29 ROMFS: use new param default mechanism 2021-02-12 08:27:47 -05:00
Daniel Agar a257120e8d boards: use new param default mechanism 2021-02-12 08:27:47 -05:00
Daniel Agar ce64951578 parameter_update.msg: add basic status info 2021-02-12 08:27:47 -05:00
Daniel Agar b8b13bb882 parameters runtime defaults 2021-02-12 08:27:47 -05:00
Daniel Agar da1a38b44e parameters: merge generated files ito single static constexpr header
- store parameter type and if volatile separately (saves kilobytes of flash)
 - use Bitset for tracking active and changed parameters
 - use atomic for autosave_enabled flag
 - compile at ${MAX_CUSTOM_OPT_LEVEL} (-O2 on non flash constrained boards)
2021-02-12 08:27:47 -05:00
PX4 BuildBot 71c7c69c9d Update submodule ecl to latest Fri Feb 12 12:42:24 UTC 2021
- ecl in PX4/Firmware (2292cf3ed4f8c4391131870936881331bc870260): https://github.com/PX4/PX4-ECL/commit/602e65146c975c12482560fafab7e05bf43b0029
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/ffab483504a6c2eb3b61ae10d612cb35c8fbc550
    - Changes: https://github.com/PX4/PX4-ECL/compare/602e65146c975c12482560fafab7e05bf43b0029...ffab483504a6c2eb3b61ae10d612cb35c8fbc550

    ffab483 2021-02-11 Loic Dubois - Waiting for the filter to be initialized to set global origin
2021-02-12 08:26:10 -05:00
Daniel Agar c3172a91d9 ekf2: try reselecting distance_sensor on timeout 2021-02-12 08:25:27 -05:00
Matthias Grob a002a07ed5 sdcardCheck: minor refactor
I was late for the review.
2021-02-12 00:17:43 -05:00
Daniel Agar 5db906314a uavcan: stm32h7 driver silence debug output 2021-02-11 23:08:17 -05:00
Daniel Agar dcb35e9a8c Update submodule mavlink v2.0 to latest Fri Feb 12 00:38:48 UTC 2021 2021-02-11 23:06:40 -05:00
Daniel Agar 8a0bf15b9e boards: CUAV X7Pro fix BMI088 orientation 2021-02-11 23:05:48 -05:00
Daniel Agar 7f76666fe9 Jenkins: hardware avoid unnecessary checkout 2021-02-11 23:04:26 -05:00
Daniel Agar c63107bb57 uORB: tests increase priorities to minimize failures with stackcheck/debug enabled
- also relax the maximum mean by 50%
2021-02-11 22:58:57 -05:00
Daniel Agar cb7aabf932 fw_pos_control_l1: cleanup body velocity and acceleration usage
- minimize storing unnecessary state (msg copies)
2021-02-12 00:41:39 +01:00
Jaeyoung-Lim 9ebf783214 Use smaller loiter radius for rovers 2021-02-11 23:24:34 +01:00
Julian Oes aca1e85da4 mavsdk_tests: don't forget to check for rootfs dir 2021-02-11 22:25:07 +01:00
Julian Oes 4184c204c4 autopilot_tester: don't poll mission progress
Instead use subscription here as well in order not to miss an update.
2021-02-11 22:25:07 +01:00
Julian Oes 2971ce8664 mavsdk_tests: don't clear logs 2021-02-11 22:25:07 +01:00
bresch 9d3ff12a94 commander: reword nav failure message 2021-02-11 16:20:30 -05:00
bresch 5726e8e0a3 commander: do not fail nav check on GPS position glitch
In case of a diverge of the nav filter, both position and velocity test
ratios are large. If only one of them is too large, the nav filter is
most likely not diverging but is encountering a GNSS position reset and
it is still safe to fly in position mode.
2021-02-11 16:20:30 -05:00
bresch b1b032d6e1 commander: rework nav failure check
Allows to recover from a failed test with a stricter test
2021-02-11 16:20:30 -05:00
Lorenz Meier 80b8e6a48f v5X: Register board variants
This is needed to properly identify new variants.
2021-02-11 22:14:02 +01:00
Daniel Agar 5b44bd67bb ist8310: fix 16 times average configuration 2021-02-11 13:18:13 -05:00
Loic Dubois ffab483504 Waiting for the filter to be initialized to set global origin 2021-02-11 12:55:25 -05:00
Daniel Agar 7e18cffc5f Update submodule mavlink v2.0 to latest Thu Feb 11 12:41:13 UTC 2021 2021-02-11 12:51:22 -05:00
Daniel Agar 3679f7fd51 add double precision alias declarations and remove typedefs 2021-02-11 12:40:54 -05:00
Julian Oes 176d932f23 mavsdk_tests: prevent missing updates
It seems like we are often missing updates from topics like flight mode
or in air state, both topics that are sent out infrequenctly e.g. at 1
Hz. Therefore, instead of polling for that data we should probably
subscribe to the updates and that way get notified of each an every
update.

For instance this should prevent the case where we miss the mode change
from mission to descend and back to mission once landed and disarmed.
2021-02-10 16:37:02 -05:00
Jaeyoung-Lim 3d9cde885d Add comment for reserve autostartIDs
This commit adds a comment where the autostart IDs 22000-22999 should be reserved for custom models
2021-02-10 16:34:01 -05:00
Matthias Grob 82d6cc3dba FlightTasks: use .xy() where possible
to take the first two elements of a Vector3f.
2021-02-10 15:56:58 +01:00
Matthias Grob 7686533abb FlightTaskManualAcceleration: adapt position reset to new structure
The mapping itself was seprated out into a calls because it was reused
for the experimental nudging implementation.
The position resets which were handled correctly before now
change the wrong setpoints and I adjusted.

The nudging has to be before any filtering, then these member setpoints
which are essentially copies are not needed anymore.
2021-02-10 15:56:58 +01:00
Julian Oes c524e61b97 airspeed_selector: fix timeout check
I think this check was the wrong way round which meant that we would end
up with an unsigned int overflow and trigger a reset.
2021-02-10 12:58:23 +01:00
Igor Mišić 236975c56c astyle: excluded libcanard for uavcannode_gps_demo 2021-02-10 03:05:02 -08:00
Daniel Agar a76e429b1a calibration parameters volatile (offsets and scale factors)
- anything set vehicle side should be volatile and excluded from the
param hash
2021-02-10 09:01:47 +01:00
PX4 BuildBot bf29ec2da2 Update submodule ecl to latest Wed Feb 10 00:39:35 UTC 2021
- ecl in PX4/Firmware (afb692ecffccc3ba7ade39c5906c8c5660066121): https://github.com/PX4/PX4-ECL/commit/cd38621dd6a4ef0f42eb29a2b4145f58023e7910
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/602e65146c975c12482560fafab7e05bf43b0029
    - Changes: https://github.com/PX4/PX4-ECL/compare/cd38621dd6a4ef0f42eb29a2b4145f58023e7910...602e65146c975c12482560fafab7e05bf43b0029

    602e651 2021-02-05 Paul Riseborough - EKF: Remove unnecessary initialisation
6f664ab 2020-07-20 Paul Riseborough - EKF: Non functional changes arising from review
b87778e 2020-06-30 Paul Riseborough - EKF: Make clip detection logic easier to follow
9aa8d93 2020-06-30 Paul Riseborough - EKF: Use isRecent function
e948b35 2020-06-29 Paul Riseborough - EKF: Don't reject vertical aiding data if inertial solution is bad
c566318 2020-06-23 Paul Riseborough - EKF: misc improvements to handling of accel clipping
9c89fa3 2020-06-02 Paul Riseborough - EKF: Use IMU clipping to adjudicate bad accel data check
2021-02-10 00:16:42 -05:00
David Sidrane 3570e1b4da nxp_fmuk66-e: Sync defconfig with latest V3 changes 2021-02-09 23:53:38 -05:00
David Sidrane df3e94bcff nxp_fmuk66-e:Disabled icm42688p until load issue is resolved 2021-02-09 23:53:38 -05:00
David Sidrane 4610692813 nxp_fmuk66-e:Set CONFIG_CDCACM_PRODUCTSTR 2021-02-09 23:53:38 -05:00
David Sidrane b4c17cc8e7 nxp_fmuk66-e:Set Rotation of bmi88 2021-02-09 23:53:38 -05:00
David Sidrane 8c8f48530e nxp_fmuk66-e:Fix missing line rc.board_defaults 2021-02-09 23:53:38 -05:00
David Sidrane 264efde0c9 nxp_fmuk66-v3:SD enable Multi block 2021-02-09 23:50:58 -05:00
David Sidrane ef444da689 BUGFIX Hardfault Commander Calibration 2021-02-09 15:20:50 +01:00
Julian Oes 2772022785 mavsdk_tests: disable mag stuck test
The estimator sometimes diverges in vz after landing which makes the
test fail. This needs to be dealt with first before we can enable the
test again.
2021-02-09 11:32:41 +01:00
Julian Oes e592bed7d3 mavsdk_tests: use timestamp from attitude field
The flight_information field was not updated often enough which lead
to timeouts.
2021-02-09 11:32:41 +01:00
Julian Oes f08804da07 workflows: update to MAVSDK 0.36.0
This is required for the timestamp that comes with the attitude
information.
2021-02-09 11:32:41 +01:00
Julian Oes 397fa84cd0 mavsdk_tests: add time in front of debug lines 2021-02-09 11:32:41 +01:00
Matthias Grob dec353219d FlightTaskManualAcceleration: smooth position unlock
The velocity setpoint of the position controller
does a jump when unlocking position with a non-zero position error.

This is solved by using the velocity setpoint feedback to smoothly
take over.
2021-02-09 11:31:35 +01:00
Matthias Grob c9eac29d25 StickAccelerationXY: access member setpoints directly
This is a leftover from before converting the logic into
a completely separate class.
2021-02-09 11:31:35 +01:00
Matthias Grob 79739c5676 StrickAccelerationXY: name setpoints unambiguous 2021-02-09 11:31:35 +01:00
Benjamin Perseghetti ab03cd8bb9 Unified tool for launching advanced configurations of HITL or SITL in Gazebo with gz_sim.sh, works with PX4-SITL_gazebo PR 651. 2021-02-09 10:29:23 +01:00
Paul Riseborough 602e65146c EKF: Remove unnecessary initialisation 2021-02-09 19:55:32 +11:00
Paul Riseborough 6f664abc4a EKF: Non functional changes arising from review 2021-02-09 19:55:32 +11:00
Paul Riseborough b87778e61d EKF: Make clip detection logic easier to follow 2021-02-09 19:55:32 +11:00
Paul Riseborough 9aa8d93efc EKF: Use isRecent function 2021-02-09 19:55:32 +11:00
Paul Riseborough e948b3505f EKF: Don't reject vertical aiding data if inertial solution is bad
Also reduce clipping count threshold
2021-02-09 19:55:32 +11:00
Paul Riseborough c566318db5 EKF: misc improvements to handling of accel clipping 2021-02-09 19:55:32 +11:00
Paul Riseborough 9c89fa3b29 EKF: Use IMU clipping to adjudicate bad accel data check 2021-02-09 19:55:32 +11:00
Beat Küng b0abc0c111 airframes: exclude from 1100, 4018 and 6003 px4_fmu-v2 2021-02-09 09:44:50 +01:00
Beat Küng 5a1c60b5a1 component_information: switch from gzip to xz
Improves compression, e.g. current params file: 62KB to 51KB

There's also a PRESET_EXTREME option, which reduces by another 2KB.
We can revisit that once needed, as it increases mem usage as well.
2021-02-09 09:44:50 +01:00
Beat Küng cedfae9e46 jenkins: upload params.json.gz to S3 2021-02-09 09:44:50 +01:00
Beat Küng f8989fe5aa mavlink: speed up ftp transfers on POSIX
Around 900 KB/s - not fast, but should be fast enough for the use-cases.
2021-02-09 09:44:50 +01:00
Beat Küng d0e35efe3a parameters: remove uid from json output
Got removed from the spec
2021-02-09 09:44:50 +01:00
Beat Küng 4ca883f843 parameters: fix JSON output types
All types were previously output as strings
2021-02-09 09:44:50 +01:00
Beat Küng 5a244888cd Tools: add validate_json.py
Can be used to validate the schemas under
https://github.com/mavlink/mavlink/tree/master/component_information
2021-02-09 09:44:50 +01:00
Beat Küng 1f8e7de824 mavlink: implement COMPONENT_INFORMATION
- implement COMP_METADATA_TYPE_VERSION & add component_version.json.gz to
  ROMFS for all targets.
- implement COMP_METADATA_TYPE_PARAMETER (only enabled for SITL currently)
2021-02-09 09:44:50 +01:00
Daniel Agar 9f00fd2796 move PWM params to lib 2021-02-09 08:57:00 +01:00
PX4 BuildBot 8a047c8965 Update submodule ecl to latest Tue Feb 9 04:48:03 UTC 2021
- ecl in PX4/Firmware (24abafdfc91875020fd9ecc792f6989cf2058a77): https://github.com/PX4/PX4-ECL/commit/46251db4a11e1f80ce1cce226c7664f875260832
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/cd38621dd6a4ef0f42eb29a2b4145f58023e7910
    - Changes: https://github.com/PX4/PX4-ECL/compare/46251db4a11e1f80ce1cce226c7664f875260832...cd38621dd6a4ef0f42eb29a2b4145f58023e7910

    cd38621 2021-02-08 bresch - flow terrain: use dedicated variable for last fusion time
9521e81 2021-02-08 PX4BuildBot - [AUTO COMMIT] update change indication
ae0c054 2021-02-08 PX4 BuildBot - Update geo_lookup WMM  to latest Mon Feb  8 11:48:14 UTC 2021
5aaa6c6 2021-01-28 bresch - lpos accuracy: bump variance if deadreckon time exceeded
2021-02-09 00:50:36 -05:00
bresch cd38621dd6 flow terrain: use dedicated variable for last fusion time
This avoids confusion with the flow "for velocity" fusion in the main
EKF
2021-02-08 23:26:33 -05:00
Daniel Agar 8f0918a16b boards: remove unused linker __param section 2021-02-08 23:22:48 -05:00
PX4BuildBot 9521e81b09 [AUTO COMMIT] update change indication 2021-02-08 09:43:53 -05:00
PX4 BuildBot ae0c054d75 Update geo_lookup WMM to latest Mon Feb 8 11:48:14 UTC 2021 2021-02-08 09:43:53 -05:00
bresch 5aaa6c6dde lpos accuracy: bump variance if deadreckon time exceeded 2021-02-08 09:01:51 -05:00
Beat Küng 76a447ed0f fix StickAccelerationXY: avoid setpoint oscillations around 0
With a higher responsiveness, after centering the stick, the velocity and
acceleration setpoints could oscillate around 0 and never reach 0, due to
discretization.
This also prevented position lock engagement.
2021-02-08 13:51:36 +01:00
Mathieu Bresciani 77884bdd34 SITL boat: tune L1 and speed controllers (#16784) 2021-02-08 07:18:49 +00:00
PX4 BuildBot 8d0f96f22c Update submodule libcanard to latest Mon Feb 8 00:39:35 UTC 2021
- libcanard in PX4/Firmware (0c6cf6cb99): https://github.com/UAVCAN/libcanard/commit/cde670347425023480a1417fcd603b27c8eb06c1
    - libcanard current upstream: https://github.com/UAVCAN/libcanard/commit/55938c51cf7da3096679933302693c9dae7a2b33
    - Changes: https://github.com/UAVCAN/libcanard/compare/cde670347425023480a1417fcd603b27c8eb06c1...55938c51cf7da3096679933302693c9dae7a2b33

    55938c5 2020-12-29 Pavel Kirienko - Merge pull request #160 from UAVCAN/readme-fix
1c91c49 2020-12-29 Pavel Kirienko - Improve the example in README, fix #159
2021-02-07 21:42:30 -05:00
PX4 BuildBot 05164d0a6a Update submodule libcanard to latest Mon Feb 8 00:39:43 UTC 2021
- libcanard in PX4/Firmware (fef2f1c150ee15ba430c2da74fb432483fd888d8): https://github/commit/cde670347425023480a1417fcd603b27c8eb06c1
    - libcanard current upstream: https://github/commit/55938c51cf7da3096679933302693c9dae7a2b33
    - Changes: https://github/compare/cde670347425023480a1417fcd603b27c8eb06c1...55938c51cf7da3096679933302693c9dae7a2b33

    55938c5 2020-12-29 Pavel Kirienko - Merge pull request #160 from UAVCAN/readme-fix
1c91c49 2020-12-29 Pavel Kirienko - Improve the example in README, fix #159
2021-02-07 20:27:59 -05:00
Lorenz Meier 0c6cf6cb99 Revert "boards: px4/fmu-v5 disable px4io in rc.board_defaults"
This reverts commit d7b89ecc86.
2021-02-08 00:21:32 +01:00
Lorenz Meier d03d46b8a3 Initialize MAVLink on v5X variants
This will ensure that the different baseboard configurations are properly accounted for depending on HW variants.
2021-02-07 17:23:13 +01:00
Peter van der Perk 8242968b2b UAVCAN v1 GPS demo with MAVCAN autoconfigure 2021-02-07 17:18:45 +01:00
Peter van der Perk 5f8ad65c40 FMUK66 NuttX 10 SocketCAN initialization 2021-02-07 17:18:45 +01:00
Peter van der Perk 8b2d20df34 "MAVCAN" PNP & Register example implementation 2021-02-07 17:18:45 +01:00
Peter van der Perk e5d29d4079 UAVCANv1 demo UAVCAN146 <-> BMS-722 is working
Fixed UAVCAN146 linker script that caused CXX initalization to wrong
Enabled uORB listener command
Updated UAVCANv1 msg definition

Known isssue: PX4 params are not working on the UAVCAN146
2021-02-07 17:18:45 +01:00
Daniel Agar 58ca575871 UAVCAN v1 bridge
- NuttX stm32f4/stm32f7 uses character device driver
 - NuttX kinetis and s32k uses socketcan
2021-02-07 17:18:45 +01:00
Daniel Agar 1848ac3bc7 mavlink: receiver accept ODOMETRY MAV_ESTIMATOR_TYPE_UNKNOWN for legacy support 2021-02-07 09:51:05 -05:00
Daniel Agar f461481548 Revert "mavlink: ODOMETRY handler accept all other estimator_types for now"
This reverts commit b216714d56.
2021-02-07 09:51:05 -05:00
Daniel Agar b216714d56 mavlink: ODOMETRY handler accept all other estimator_types for now 2021-02-06 22:32:20 +01:00
Daniel Agar d67a84d941 boards: holybro can-gps-v1 fix bosch bmm150 path 2021-02-06 15:56:11 -05:00
Daniel Agar 41b0f83c0c drivers/magnetometer: Bosch BMM150 rewrite
- same pattern as other new drivers (state machine, checked register mechanism, no sleeps, etc)
 - self test has been rolled into regular startup sequence
 - still I2C only, but will be expanded in the future
 - configure to high accuracy preset
2021-02-06 12:50:23 -05:00
bazooka joe 8834741be8 gps blending make test to work without templated gps_blending class 2021-02-06 12:59:04 +01:00
bazooka joe 8087fac3fc gps_blending add protection against accessing non-exist array item 2021-02-06 12:59:04 +01:00
bazooka joe a0d500b30a changing gps_blending to be non-template class
because there is no multiple instance types on singular machine
2021-02-06 12:59:04 +01:00
PX4 BuildBot 80d9f1c5fb Update submodule sitl_gazebo to latest Sat Feb 6 00:38:25 UTC 2021
- sitl_gazebo in PX4/Firmware (9e69b16c3c): https://github.com/PX4/PX4-SITL_gazebo/commit/e580bbcd1eb6902c658ed3ece3b3b28dfd57eb17
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/4f26815d4127e3af84e01bbc1f8683c4fe30521f
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/e580bbcd1eb6902c658ed3ece3b3b28dfd57eb17...4f26815d4127e3af84e01bbc1f8683c4fe30521f

    4f26815 2021-02-05 Julian Oes - workflows: fix macOS build
2021-02-05 21:28:41 -05:00
PX4 BuildBot b9034dbb5d Update submodule ecl to latest Sat Feb 6 00:38:38 UTC 2021
- ecl in PX4/Firmware (1e079d0142b813c3c65c6796576e79d5662a217b): https://github.com/PX4/PX4-ECL/commit/b919f3ddf41ab422d09af91eaea2b2f9729fab13
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/46251db4a11e1f80ce1cce226c7664f875260832
    - Changes: https://github.com/PX4/PX4-ECL/compare/b919f3ddf41ab422d09af91eaea2b2f9729fab13...46251db4a11e1f80ce1cce226c7664f875260832

    46251db 2021-02-05 Daniel Agar - geo: explicitly link libm
2021-02-05 20:38:49 -05:00
Daniel Agar 61e935105f Update submodule mavlink v2.0 to latest Sat Feb 6 00:38:29 UTC 2021 2021-02-05 20:20:50 -05:00
PX4 BuildBot df66c8580c Update submodule CMSIS_5 to latest Sat Feb 6 00:38:34 UTC 2021
- CMSIS_5 in PX4/Firmware (6f03b880f05d0a1d4015f5040054b61012725794): https://github.com/ARM-software/CMSIS_5/commit/4ed5730787a0f98e8858c9998e406c608ab10b28
    - CMSIS_5 current upstream: https://github.com/ARM-software/CMSIS_5/commit/20285262657d1b482d132d20d755c8c330d55c1f
    - Changes: https://github.com/ARM-software/CMSIS_5/compare/4ed5730787a0f98e8858c9998e406c608ab10b28...20285262657d1b482d132d20d755c8c330d55c1f

    202852626 2021-02-01 Christopher Seidl - Updated CMSIS-Pack documentation
2021-02-05 20:18:25 -05:00
David Sidrane 8167023dfb holybro_can-gps-v1: Reorder Sensor Startup for reliabiltiy 2021-02-05 19:55:16 -05:00
David Sidrane 9e834d26f8 holybro_can-gps-v1:Add Flash Based Parameters 2021-02-05 19:55:16 -05:00
David Sidrane 7b3ce832d6 holybro_can-gps-v1: Add UAVCAN CAN2 Support 2021-02-05 19:55:16 -05:00
David Sidrane fe732930d2 holybro_can-gps-v1:Fix ver HW NAME 2021-02-05 19:55:16 -05:00
David Sidrane caba734d26 PR review AIs 2021-02-05 19:55:16 -05:00
David Sidrane 6f78a5e201 holybro_can-gps-v1:Add to CI 2021-02-05 19:55:16 -05:00
David Sidrane 9e1b13683f Add hardware ver/rev to st32f4 2021-02-05 19:55:16 -05:00
David Sidrane 41c9f085ef holybro_can-gps-v1:Temparary LED support 2021-02-05 19:55:16 -05:00
David Sidrane 0554755ed2 holybro_can-gps-v1:Added Support for holybro can gps 2021-02-05 19:55:16 -05:00
Daniel Agar 46251db4a1 geo: explicitly link libm 2021-02-05 19:00:53 -05:00
Lorenz Meier 9e69b16c3c ROMFS: Add new VTOL standard airframe 13015 using all MAIN outputs
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-02-05 19:00:26 -05:00
David Sidrane c1435c744c px_uploader:Fixes breakage for real serial ports caused by 00e6d11
The code was pitching an exception. It was invaild. That then left
   the baud rate AFU
2021-02-05 20:15:20 +01:00
Claudio Micheli d4bea8323f PreFlightCheck: Detect missing FMU SD card
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-02-05 20:14:48 +01:00
bresch 72e34e02ef VTOL defaults: increase tracking tolerance for VTOL planes 2021-02-05 20:13:30 +01:00
bresch 44872807b3 MC auto: add parameter to set the trajectory slow-down
In some cases e.g.: (VTOL in wind) a good tracking cannot be
achieved. This condition then needs to be relaxed, otherwise the
drone cannot land properly.
2021-02-05 20:13:30 +01:00
Daniel Agar 9d90529e7f Jenkins hardware print vehicle_status and vehicle_status_flags 2021-02-05 20:11:13 +01:00
Daniel Agar 6633ff5089 commander: vehicle_status_flags add attitude and angular velocity 2021-02-05 20:11:13 +01:00
David Sidrane 168027ac3d NuttX apps with REJECTED commit 2021-02-05 10:07:03 -08:00
David Sidrane 3b25790b06 px4_fmu-v2:Make room 2021-02-05 08:27:28 -08:00
bresch a399bb9894 ekf2: fix mismatch between ecl and firmware flag definition 2021-02-05 14:30:09 +01:00
Matthias Grob f13c3a7d44 state_machine_helper: stop mission on RC loss
This allows to still fly missions completely without RC
but reacts if RC is lost during the mission because
the safety pilot expects to be able to take over.
2021-02-04 10:54:52 +01:00
Matthias Grob f87dbe57c2 state_machine_helper: don't finish mission if all links are lost except for when no reaction is configured 2021-02-04 10:54:52 +01:00
Matthias Grob cd51cf2996 state_machine_helper: handle zero failsafe_timestamp 2021-02-04 10:54:52 +01:00
Matthias Grob b44b770972 commander: RC loss delay renaming/reordering 2021-02-04 10:54:52 +01:00
Matthias Grob e2e5fc85f8 state_machine_helper: fix infinite delay with intermittent failsafes 2021-02-04 10:54:52 +01:00
Matthias Grob 1736be41cf state_machine_helper: only apply delay on manual piloted rc loss cases 2021-02-04 10:54:52 +01:00
Matthias Grob e65cc6bd6f state_machine_helper: do failsafe delay for all modes 2021-02-04 10:54:52 +01:00
Matthias Grob 26d74bf57d Commander: enable failsafe delay for position and mission mode
Instead of directly doing the link loss reaction which by default is RTL a delay
can be configured such that the drone first switches to hold and waits
for the link to be regained.
2021-02-04 10:54:52 +01:00
Antonio Sanjurjo Cortés fa45eacea3 Fix and unify the maximum allowed PDOP references 2021-02-04 10:20:22 +01:00
Julian Oes be3cdc0439 sensors: correct comment logic
By removing the no the comment matches the implementation (which I think
makes sense).
2021-02-04 10:14:44 +01:00
Matthias Grob 3ab4213314 IO safety button: cleanup disabling safety 2021-02-04 06:25:43 +01:00
Matthias Grob 3fbd008c4e FMU safety button: cleanup disabling safety 2021-02-04 06:25:43 +01:00
Lorenz Meier 867b006861 IO safety button: Latch to disabled state
As hardware buttons are not particularly reliable and the user flow is to disable safety then arm, then disarm via software / remote, it makes sense to make the button safety state itself sticky and require it to be reset via software.
2021-02-04 06:25:43 +01:00
Lorenz Meier 7157584fe1 FMU safety button: Latch to disabled state
As hardware buttons are not particularly reliable and the user flow is to disable safety then arm, then disarm via software / remote, it makes sense to make the button safety state itself sticky and require it to be reset via software.
2021-02-04 06:25:43 +01:00
Daniel Agar 3f1ca4dfc9 Update submodule mavlink v2.0 to latest Wed Feb 3 18:41:38 UTC 2021 2021-02-03 18:41:02 -05:00
JacobCrabill e6f1812bae ROMFS: Fix typo in S500 CtrlAlloc airframe 2021-02-03 15:29:10 -05:00
xdwgood 89878fcc88 clean up 2021-02-03 17:54:27 +01:00
Paul Riseborough 4b4a9a925b logger: Log takeoff_status 2021-02-03 17:44:12 +01:00
Paul Riseborough 9d1de3118f land_detector: Rework ground effect calculation for MC 2021-02-03 17:44:12 +01:00
Gerald 88c68914a9 update uorb_rtps_message_ids.yaml for id: 30
For some usecases like starting video recording on a companion computer or triggering a ROS based (offboard control) mission control execution the status of RC channel is needed in ROS(2). This allows the user to start/stop such functionalities from the RC transmitter.

Therefore InputRc to be changed accordingly.
add 'Set send: true' for id: 30
2021-02-03 08:52:44 -05:00
David Sidrane 9a08c0f48e NuttX: PX4 stm32f412 contrib 2021-02-03 05:22:04 -08:00
JaeyoungLim b2f0c149ec Set cruise trottle to non-zero (#16724) 2021-02-03 04:39:30 +00:00
Ian 4dc44688a7 Update current year in LICENSE
2020 now is in the past.
2021-02-02 23:05:48 +01:00
Andrew C. Smith 1a428aa5c2 boards: Add support for PX4 FMUv6U 2021-02-02 10:50:26 -05:00
TSC21 10d94e5981 update uorb_rtps_message_ids.yaml 2021-02-02 13:55:42 +01:00
TSC21 701a585a81 RTPS: add check for IDs on multi-topics/alias messages as well 2021-02-02 13:55:42 +01:00
CarlOlsson 835e3258ed uavcannode: use correct vertical position uncertainty 2021-02-02 11:56:07 +01:00
dino bb37fd2f29 Enabled LSE clock for RTC, set clk drive strength to 3. Else the quarzt on the fmuv5x does not socillate reliabel. 2021-02-02 09:58:47 +01:00
Daniel Agar a2442ffb48 board: enable UAVCAN sensors by default on F7/H7 2021-02-02 09:01:12 +01:00
Benoit Landry 8b0ec5a78e mavlink: ATTITUDE_TARGET thrust use thrust_body magnitude
- vehicle_attitude_setpoint thrust_body is a vector, but mavlink ATTITUDE_TARGET thrust is only a magnitude
 - this allows the stream to be correct for both MC & FW use cases
2021-02-01 21:31:36 -05:00
Lorenz Meier 13e875645c Revert "systemcmds/param: use PX4_INFO_RAW directly (delete qurt special case)"
This reverts commit 470f24037e.
2021-02-02 00:53:45 +01:00
Lorenz Meier cd148cda88 Revert "platforms: px4 log build string then print (fputs)"
This reverts commit 9e112dd48b.
2021-02-02 00:53:32 +01:00
Lorenz Meier 0a58482e51 Align message names to avoid CRC mismatch with deployed units
This will ensure that the CRCs will match with deployed units to avoid unnecessary incompatibilities while we are figuring out how to best standardize these between stakeholders.
2021-02-02 00:28:41 +01:00
Peter van der Perk 0c74028976 FMUK66 Decrease telnetd ram usage 2021-02-01 11:50:43 -05:00
Daniel Agar a9a8a95c44 drivers/distance_sensor: add drivers_rangefinder linking dependency
- fixes https://github.com/PX4/PX4-Autopilot/issues/16715
2021-02-01 09:25:23 -05:00
Silvan Fuhrer b9b9c55325 Navigator: change default of GF_ACTION to 2 (Hold)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-02-01 11:07:53 +01:00
Claudio Micheli c2154df2f6 ekf2checks: split GPS checks from AHRS checks - minor cleanup
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-02-01 09:02:19 +01:00
Daniel Agar 78dff6adcb boards: add CONSTRAINED_MEMORY build option
- currently the main change is that it reduces the max number of ORB multi instances to 4, but usage will be expanded as needed
 - limits number of EKF2 multi instances to 2.
 - enabled on all cortex m4 boards
2021-02-01 08:56:22 +01:00
Chungkyeong Lee 834ac38841 fix condition in ekf2Check 2021-02-01 08:55:41 +01:00
Daniel Agar d1a3590aac PWM: transition PWM_{MIN,MAX,DISARMED,RATE} -> PWM_MAIN 2021-02-01 08:53:33 +01:00
Daniel Agar 8b8adbf48e Jenkins hardware reduce IMU_GYRO_RATEMAX on some boards 2021-01-31 21:26:26 -05:00
Daniel Agar 3b71e8e62d boards: cubepilot fix BAT2_V_DIV param default typo 2021-01-31 21:16:42 -05:00
Daniel Agar b1e85b0b04 Jenkins hardware add CUAV X7 Pro 2021-01-31 19:48:00 -05:00
Daniel Agar 61d7be82cc Jenkins hardware add CubePilot CubeOrange 2021-01-31 18:51:32 -05:00
Lorenz Meier 27138578f0 Disable unmaintained MAVROS tests
The overhead of the MAVROS setup means that most developers are not using it, leading to tests that are not suitable for day-to-day workflows. We are replacing these with MAVSDK tests that can be run locally pre-commit.
2021-01-31 17:03:04 -05:00
Jaeyoung-Lim f833861fbb Cleanup unsused rover mixers
This PR cleansup unused rover mixers from the ROMFS
2021-01-31 19:17:38 +01:00
Lorenz Meier f19f93eedf MacOS: Disable OS tests
This is suboptimal but survivable since MacOS is not a deployment target. We still need to identify the root cause.
2021-01-31 10:45:43 -05:00
PX4 BuildBot afd50acce2 Update submodule sitl_gazebo to latest Sun Jan 31 12:39:22 UTC 2021
- sitl_gazebo in PX4/Firmware (bb7dd0cf00): https://github.com/PX4/PX4-SITL_gazebo/commit/46aef29718495d2f668c1648f4c0b0f43b9d9671
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/e580bbcd1eb6902c658ed3ece3b3b28dfd57eb17
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/46aef29718495d2f668c1648f4c0b0f43b9d9671...e580bbcd1eb6902c658ed3ece3b3b28dfd57eb17

    e580bbc 2021-01-30 JaeyoungLim - Use include model syntax for bluerov (#702)
663a553 2021-01-30 Tim - Added GPS and changed the Thruster config of the bluerov2 SDF file (#700)
4674826 2021-01-29 Thies Lennart Alff - increased ODE solver iterations to avoid deflection of the thrusters (#701)
2021-01-31 10:44:04 -05:00
Daniel Agar 5097d531bf mavlink: send LINK_NODE_STATUS 2021-01-31 15:02:30 +01:00
Daniel Agar 4cbbd0ebf3 mavlink: receiver estimate total lost messages 2021-01-31 15:02:30 +01:00
David Sidrane f9d4bd53ef Apply suggestions from code review
Co-authored-by: Beat Küng <beat-kueng@gmx.net>

Apply suggestions from code review use stdout

Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2021-01-31 14:42:09 +01:00
David Sidrane 39c6229c37 Netman:Data in network order 2021-01-31 14:42:09 +01:00
David Sidrane d22eb76187 Add a simple network manager
This system command will display, set and save the network
   settings.

   netman show   - Displays the current settings.

   netman update - Will check for a net.cfg file on the SD card.
                   If present, it will update the paramaters,
                   delete the file, and reboot. Using the new settings.

   netman save - Saves the current settings to net.cfg on the SD card.
                 This file shoulf be renamed to preserver it across
                 reboots or editited to chech networkin paramates.

   File format is name<space>value:

   echo DEVICE=eth0           > /fs/microsd/net.cfg
   echo BOOTPROTO=fallback    >> /fs/microsd/net.cfg
   echo IPADDR=192.168.0.4    >> /fs/microsd/net.cfg
   echo NETMASK=255.255.255.0 >>/fs/microsd/net.cfg
   echo ROUTER=192.168.0.254  >>/fs/microsd/net.cfg
   echo DNS=192.168.0.254     >>/fs/microsd/net.cfg

   Valid values for `proto` are `dhcp`, `static`, `falback`
   Both will try dhcp for CONFIG_NETINIT_FALLBACK times
   and fall back to the static address.

   NETMASK - is the network mask.
   IPADDR  - this nodes ip address for static or fall back.
   ROUTER  - The default route.
   DNS     - The address of the dns server.
2021-01-31 14:42:09 +01:00
David Sidrane ed996e2dd1 fmu-v5x:Add net monitoring an DHCP
px4_fmu-v5x:Use Bin Net settigns
2021-01-31 14:42:09 +01:00
David Sidrane e9dabfbe28 Nuttx apps with rejected Network Monitor add a polled option 2021-01-31 14:42:09 +01:00
Daniel Agar bb7dd0cf00 modules/sih: move to px4 work queue (wq:rate_ctrl)
- respect IMU_GYRO_RATEMAX for configured interval
 - optionally compile at higher optimization level per board (${MAX_CUSTOM_OPT_LEVEL})
2021-01-31 12:56:45 +01:00
Alexey Rogachevskiy c01d459011 Add support for STM32F42x/STM32F43x rev. 5/B (#15407)
* stm32_common: Add support for STM32F42x/STM32F43x rev. 5/B

According to ST, both 5 and B share the same REV_ID.

Signed-off-by: Alexey Rogachevskiy <sfalexrog@gmail.com>

* stm32_common: Change comment to match code, change enum names to match revisions
2021-01-31 12:34:16 +01:00
Daniel Agar 470f24037e systemcmds/param: use PX4_INFO_RAW directly (delete qurt special case) 2021-01-31 11:43:47 +01:00
Daniel Agar 9e112dd48b platforms: px4 log build string then print (fputs) 2021-01-31 11:43:47 +01:00
Daniel Agar 0c58d12216 mavlink: receiver estimate total lost messages 2021-01-31 11:41:56 +01:00
Matthias Grob fbd64fbdd8 FlightModeManager: publish takeoff status 2021-01-31 11:37:00 +01:00
Daniel Agar b30bd7f589 drivers: no longer any need to advertise immediately (baro, mag, rangefinder) 2021-01-31 11:35:46 +01:00
Igor Mišić f80a422f9c mavlink receiver: battery status - publish temperature 2021-01-31 11:20:42 +01:00
Igor Mišić 5f0a014595 mavlink receiver: battery status - publish cells voltage 2021-01-31 11:20:42 +01:00
Daniel Agar 6a4835bbcc sensors: vehicle_magnetometer combine extra _vehicle_magnetometer_pub 2021-01-30 21:50:01 -05:00
Daniel Agar ce76c84ce2 sensors: vehicle_magnetometer respect publication rate limit SENS_MAG_RATE 2021-01-30 21:50:01 -05:00
Daniel Agar 318c7e83b3 support up to PWM 14
- generate PWM_MAIN 1-14
 - generate PWM_AUX 1-8
 - generate PWM_EXTRA 1-8
 - px4io and pwm_out directly read configuration parameters
    - only available and active physical outputs are actually shown for configuration
 - overall saves flash despite adding many new parameters
2021-01-30 15:55:53 +01:00
bresch cdd6df4e27 VehicleGPSPosition: remove unused "using" 2021-01-30 11:32:47 +01:00
bresch 6abbbdeb4b gps blend: add parameter to select the primary instance 2021-01-30 11:32:47 +01:00
bresch 889602ed5e gps blend: always pass through GpsBlending class for selection 2021-01-30 11:32:47 +01:00
bresch b4051b62a3 gps blend: add failover logic and unit test
also remove dependency to hrt library
2021-01-30 11:32:47 +01:00
bresch 9bff7a1c41 gps blend: add selector unit tests 2021-01-30 11:32:47 +01:00
bresch 1dbf4957df vehicle gps pos: remove useless gps_updated array 2021-01-30 11:32:47 +01:00
bresch b60bfb920c gps blend: add initial working test 2021-01-30 11:32:47 +01:00
bresch 1cde5074ea gps blend: move definition to header file 2021-01-30 11:32:47 +01:00
bresch 1333664a14 gps blend: move blending logic to class 2021-01-30 11:32:47 +01:00
Roman Dvořák 075165699d Update CMakeLists.txt 2021-01-30 11:29:42 +01:00
Jakub Kákona 21e70381fe Update default parameters. 2021-01-30 11:29:42 +01:00
Roman Dvorak 42439829b0 use LPE estimator 2021-01-30 11:29:42 +01:00
Roman Dvorak 6c839f9b02 add balloon defaults 2021-01-30 11:29:42 +01:00
Roman Dvorak 1fea1a2822 Initial TF-B1 commit 2021-01-30 11:29:42 +01:00
Claudio Micheli c2a68debd9 add jamming_state to gps sensor module
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-01-30 11:26:42 +01:00
Claudio Micheli cadd2cf883 update gps submodule
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-01-30 11:26:42 +01:00
Claudio Micheli 5eb4ab6d73 vehicle_gps_position: add jamming_state
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-01-30 11:26:42 +01:00
Daniel Agar e7f2195a9b ekf2: error if unable to copy every sensor publication 2021-01-29 22:12:29 -05:00
CUAVcaijie e30b8495b8 Enable x7pro and nora spi4 DMA 2021-01-29 21:30:12 -05:00
Dan George c1da999748 cmake: Limit color output to terminals
VIm's Quickfix is useless with escape sequences embedded in
compiler output.
2021-01-29 17:52:32 -05:00
David Sidrane 1375221c56 srgbled_dma:Fix wrong timer init 2021-01-29 21:36:12 +01:00
Silvan Fuhrer 85d8e74609 Navigator: yaw error from param and pos_ctl_status.acceptence_rad checks before using
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-29 19:36:59 +01:00
Silvan Fuhrer 4d6749edc2 mission_block: change loiter handling logic
- add ability of "heading wait" for NAV_CMD_LOITER_TIME_LIMIT
- For both LOITER_TIME and LOITER_TO_ALT in fixed-wing flight, unify logic:
--> reach position --> start loitering --> reach altitude --> start timer (if applicable)
	--> reach exit heading (if applicable) --> declare mission item reached

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-29 19:36:59 +01:00
Silvan Fuhrer 5c9fac58c8 Mission: do not autocontinue if in multicopter mode and next wp has a hold time
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-29 19:36:59 +01:00
Silvan Fuhrer f3adf6d67f mission_block: rename altitude_amsl to mission_item_altitude_amsl to make clear it's a setpoint
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-29 19:36:59 +01:00
Silvan Fuhrer ab9d5498bc mavlink_mission: MAV_CMD_NAV_LOITER_TIME: set force_heading corresponding to param2
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-29 19:36:59 +01:00
Silvan Fuhrer 017567792b Navigator: for loiter position acceptance, use L1 distance and loiter radius
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-29 19:36:59 +01:00
Silvan Fuhrer acbada73dd RTL: VTOL: do the land delay loitering (RTL_LAND_DELAY) in fixed-wing flight
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-29 15:46:33 +03:00
Jaeyoung-Lim cc29754163 Update jsbsim bridge submodule 2021-01-29 09:41:32 +01:00
Daniel Agar f0d1f1d679 boards: disable BDMA on STM32H7 for now 2021-01-28 21:16:23 +01:00
alexklimaj 741c1da634 ARK Flow Basic Functionality 2021-01-28 08:56:10 -05:00
Ricardo Marques 19576c5db3 logger: Correct max instances of actuator_outputs.
Signed-off-by: Ricardo Marques <marques.ricardo17@gmail.com>
2021-01-28 14:22:55 +01:00
Julian Kent ce1157e398 Work around broken coverage interface 2021-01-28 12:02:06 +01:00
Julian Kent 14cb98a6b4 Increase corridor check thresholds for mission tests 2021-01-28 12:02:06 +01:00
Julian Kent 7fac2fe6cd Consolidate uploading of coverage info for unit tests 2021-01-28 12:02:06 +01:00
Julian Kent e014954c91 Remove old matrix inversion routines 2021-01-28 09:14:08 +01:00
Julian Kent e96e028327 Refactor LM mag calibration routines 2021-01-28 09:14:08 +01:00
Julian Kent a9fc104387 Add inline to avoid double definition errors 2021-01-28 09:14:08 +01:00
bresch c79bd033c0 mag test: add ellipsoid test 2021-01-28 09:14:08 +01:00
bresch 1da2cd5b4d mag test: add magnetometer calibration unit tests 2021-01-28 09:14:08 +01:00
bresch a8a8819060 mag cal: move sphere and ellipsoid regression algirithms 2021-01-28 09:14:08 +01:00
JacobCrabill bf4ae81995 Device: Add MAVLINK bus type 2021-01-28 09:09:11 +01:00
Peter Blom a4745c6825 Simulator: Fix for arg count increase breaking remote host option.
The number of arguments was increased by one, see: https://github.com/PX4/PX4-Autopilot/commit/1719ff9892f3c3d034f2b44e94d15527ab09cec6

Because the above commit was merged before https://github.com/PX4/PX4-Autopilot/pull/15443 . It broke support for the remote host option.

This has been fixed in this commit by increasing all argv's by one.

Signed-off-by: Peter Blom <peterblom.mail@gmail.com>
2021-01-28 08:32:14 +01:00
Daniel Agar cf43d07f70 uavcannode: refactor into separate publishers and subscribers 2021-01-27 20:57:23 -05:00
JacobCrabill 39ad84e069 drv_sensor.h: Add missing SRF05 devtype 2021-01-27 17:02:20 -05:00
JacobCrabill e49717513c simulator: Fix distance sensor device_id
Also add DRV_DIST_DEVTYPE_SIM
2021-01-27 17:02:20 -05:00
JacobCrabill a09e13631c distance_sensors: Fix assignment of serial bus ID 2021-01-27 17:02:20 -05:00
JacobCrabill 01462ce627 Device: Add missing SERIAL enum to bus_string function 2021-01-27 17:02:20 -05:00
JacobCrabill 153756b933 drivers: Add support for SF30/[B,C] rangefinders (Serial) 2021-01-27 17:02:20 -05:00
JacobCrabill 7f2f0a04f1 uavcan: remove unused variables in gnss bridge 2021-01-27 17:02:20 -05:00
JacobCrabill 85796fbd84 Drivers: Distance Sensors: Add proper device IDs
Add new DeviceBusType_SERIAL to Device::DeviceId union
Add DRV_DIST_DEVTYPE's for all distance sensors
Change distance_sensor_s.id to distance_sensor_s.device_id
Modify all distance_sensor drivers to apply 'proper' device_id
2021-01-27 17:02:20 -05:00
Daniel Duecker adf2d2f73a extend uuv_att_control module by thrust in y/z-direction (#16642)
* extend uuv_att_control
* add feedthrough thrust_y + thrust_z direction

* extend uuv_att_control
* add feedthrough thrust_y + thrust_z direction

* update formatting

* fix submarine sitl: indicate motor channel range 0..1 or -1..1 in simulation_mavlink.cpp (#16637)

change motor_count variable to 'pos_thrust_motor_count'
This is more specific to what is actually happening in the code.
'pos_thrust_motors_count' indicates number of motor channels which are configured with 0..1 range (positive thrust) all other motors are configured for -1..1 range

submarine only have motors with -1..1 range.
Thus, pos_thrust_motor_count = 0

Co-authored-by: Thies Lennart Alff <33184858+lennartalff@users.noreply.github.com>

* extend uuv_att_control
* add feedthrough thrust_y + thrust_z direction

* update formatting

Co-authored-by: Thies Lennart Alff <33184858+lennartalff@users.noreply.github.com>
2021-01-27 22:35:24 +01:00
Daniel Agar c033681c56 uavcannode: add parameter default value 2021-01-27 13:11:41 -05:00
Daniel Agar 1b9d68abd5 parameters: add new param_get_default_value() 2021-01-27 13:11:41 -05:00
Lorenz Meier 2308cb8a40 CUAV CAN GPS support UAVCAN standard/indication/Button.uavcan
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-01-27 10:46:49 -05:00
Jukka Laitinen 5e79773275 Add signing of px4 binary into makefiles
When an environment variable "SIGNING_TOOL" is defined, the make will
call this with two filename arguments: <input> and <output>.

The SIGNING_TOOL will read in the binary from input, and append
signature to the output. For example:

SIGNING_TOOL=${PWD}/Tools/cryptotools.py make px4_fmu-v5_default

Will use the example "cryptotools.py" to sign the px4_fmu-v5.bin

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-01-27 08:36:08 +01:00
Jukka Laitinen 0f80296340 Modify cryptotools.py
- Append signature in the end of the signee
- Add parameters for output file and rd certificate
- Add a default test key

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-01-27 08:36:08 +01:00
Jukka Laitinen 5c9e7c2581 Add table of contents structure for px4_fmuv5 targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-01-27 08:36:08 +01:00
Jukka Laitinen 15ab477e73 Add header file describing px4 image table-of-contents
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-01-27 08:36:08 +01:00
dino 642d20cebe Added cryptotools.py to support secure bootloader 2021-01-27 08:36:08 +01:00
PX4 BuildBot 124258fb18 Update submodule sitl_gazebo to latest Wed Jan 27 00:46:05 UTC 2021
- sitl_gazebo in PX4/Firmware (ab0f761e9f): https://github.com/PX4/PX4-SITL_gazebo/commit/4048ae60ae4e8bc84840b4878d13e0e685e21b9a
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/46aef29718495d2f668c1648f4c0b0f43b9d9671
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/4048ae60ae4e8bc84840b4878d13e0e685e21b9a...46aef29718495d2f668c1648f4c0b0f43b9d9671

    46aef29 2021-01-25 JaeyoungLim - Rename geotagged_images_plugin to camera_manager_plugin (#698)
38224fb 2021-01-25 Pieter-Jan Dewitte - Pr liftdrag coefficients (#690)
2021-01-27 06:24:22 +01:00
David Sidrane ab0f761e9f uavcan:Beep Repeated tunes are OK 2021-01-26 19:22:14 -05:00
Daniel Agar 53a14e847d drivers/rc_input: support RC_RSSI_PWM_CHAN 2021-01-26 18:19:52 -05:00
David Sidrane ab650373d6 cuav gps:Add Beep indication 2021-01-26 17:04:40 -05:00
Daniel Agar 3b26b7adaf sensors: magnetometer preserve original mag cal offset for status message 2021-01-26 16:04:10 -05:00
Daniel Agar 15cbe8c09a px4_work_queue: wq:nav_and_controllers increase stack 1730 -> 1760 bytes 2021-01-26 16:03:37 -05:00
Daniel Agar b422da45ec boot_app_shared automatically generate UAVCAN bootable image 2021-01-26 10:21:29 -08:00
Daniel Agar 347c185967 UAVCAN bootloader merge duplicate boot_app_shared 2021-01-26 10:21:29 -08:00
Daniel Agar e656c9c13f drivers/uavcannode: Add a simple parameter server (simpler version for merging) (#16649)
* drivers/uavcannode: Add a simple parameter server

Added a simple parameter server using the libuavcan ParamServer class.
The parameter server exposes a selection of PX4 parameters via UAVCAN.
Also, Increased the stack size of the uavcan work queue in order to
prevent a stack overflow.

* uavcannode: fetch all active PX4 parameters

Co-authored-by: Kenneth Thompson <ken@flyvoly.com>
2021-01-26 10:19:20 -08:00
David Sidrane 525361cbc7 uavcannode:Add Indication Controller 2021-01-26 12:05:18 -05:00
Daniel Agar d1dfa26903 consume all available queued vehicle_commands 2021-01-26 12:00:18 -05:00
Daniel Agar d5c7e243a9 vehicle_command: increase queue depth 4 -> 8
- prevent slower modules from missing commands
2021-01-26 12:00:18 -05:00
Daniel Agar 350ebf5a1f boards: CUAV CAN GPS flash based parameters 2021-01-26 08:06:54 -08:00
bazooka joe f45b67af59 re-add boolean attribute to the parameters xml
and small cleanup, make Volatile as bool in the internal variable
2021-01-26 08:24:59 +01:00
Daniel Agar 39ef2fd0b7 delete unused struct pwm_output_rc_config 2021-01-25 10:55:57 -05:00
Daniel Agar 75f02d64b6 delete unused PWM_SERVO_SET_SBUS_RATE 2021-01-25 10:55:57 -05:00
Daniel Agar 2b0a047f0c delete unused DSM_BIND_POWER_UP 2021-01-25 10:55:57 -05:00
Daniel Agar 439c573242 delete unused PWM_SERVO_SET_TRIM_PWM 2021-01-25 10:55:57 -05:00
Daniel Agar 2ff69a4456 delete unused PWM_SERVO_SET_COUNT 2021-01-25 10:55:57 -05:00
Daniel Duecker f9e07337f8 fix submarine sitl: indicate motor channel range 0..1 or -1..1 in simulation_mavlink.cpp (#16637)
change motor_count variable to 'pos_thrust_motor_count'
This is more specific to what is actually happening in the code.
'pos_thrust_motors_count' indicates number of motor channels which are configured with 0..1 range (positive thrust) all other motors are configured for -1..1 range

submarine only have motors with -1..1 range.
Thus, pos_thrust_motor_count = 0

Co-authored-by: Thies Lennart Alff <33184858+lennartalff@users.noreply.github.com>
2021-01-25 14:17:24 +01:00
David Sidrane 455f762516 px4_fmu-v6x:Support RC03 HW 2021-01-25 09:18:24 +01:00
honglang 43e1cda8ac uavcan: add tune_control/beep 2021-01-25 08:38:15 +01:00
PX4 BuildBot f571b29ae8 Update submodule matrix to latest Sun Jan 24 12:39:24 UTC 2021
- matrix in PX4/Firmware (92f2043d8b): https://github.com/PX4/PX4-Matrix/commit/054f8b12f4da79767df6e05bb1d2cc8d679b99f3
    - matrix current upstream: https://github.com/PX4/PX4-Matrix/commit/977cf52322ab3ca93125423a0f9e9b3eca0516d7
    - Changes: https://github.com/PX4/PX4-Matrix/compare/054f8b12f4da79767df6e05bb1d2cc8d679b99f3...977cf52322ab3ca93125423a0f9e9b3eca0516d7

    977cf52 2021-01-22 Julian Kent - Ignore debug line in code coverage
4837316 2021-01-22 Julian Kent - Fix small inconsistencies and compiler warnings
d540ca5 2021-01-13 Julian Kent - Coerce default epsilon values to Type
2021-01-24 09:21:02 -05:00
Silvan Fuhrer 92f2043d8b TECS: add EAS_sp to tecs_status.msg and rename other airspeeds to TAS
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-23 09:34:34 -05:00
Silvan Fuhrer 5e32e9be5a TECS: rename variables and methods to make clear which are EAS and which TAS
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-23 09:34:34 -05:00
Silvan Fuhrer 4922659ef4 FW Position controller: specify in params that the airspeed setpoints are for calibrated airspeed
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-23 09:34:34 -05:00
jinger26 8118886f63 updated roadmap link 2021-01-23 09:32:19 -05:00
David Sidrane 1414c02471 msg:led_control Extend to support 8 LEDS 2021-01-23 09:30:59 -05:00
David Sidrane 7800f94dcb cuav_can-gps-v1 Use SK6812 Serial PWM LED Driver 2021-01-23 09:30:59 -05:00
David Sidrane 2c4d1d8fe0 Add SK6812 Serial PWM LED DMA Driver 2021-01-23 09:30:59 -05:00
David Sidrane 64531c4521 Add SK6812 Serial PWM LED Driver 2021-01-23 09:30:59 -05:00
David Sidrane 0b85039882 Add Neopixel Driver 2021-01-23 09:30:59 -05:00
David Sidrane fdba8f1f23 cuav_can-gps-v1:Use corrected pinout 2021-01-23 09:30:59 -05:00
David Sidrane f7aea05b19 Nuttx with STM32F4412 corrected pinmap 2021-01-23 09:30:59 -05:00
Julian Kent 977cf52322 Ignore debug line in code coverage 2021-01-22 17:30:00 +01:00
Julian Kent 4837316f9b Fix small inconsistencies and compiler warnings 2021-01-22 17:30:00 +01:00
Jaeyoung-Lim fa5a6cf712 Add option for custom mavlink configuration
This commit enables a option for users to add a custom mavlink configuration through rc.mavlink_override
2021-01-22 17:03:09 +01:00
이충경 17ea6f68e2 fix variable name in EKF2Selector (#16621) 2021-01-22 15:32:32 +01:00
Silvan Fuhrer da7f6d06f3 AirspeedSelector: set default of ASPD_DO_CHECKS to 1 and ASPD_FS_INTEG to 5.
That enables the sensor checks by default
The default for the innovation check integral of 5 is rather conservative, thus
makeing it less likely to be triggered by accidnet (e.g. due to bad wind estimate).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer 28f9214e56 AirspeedSelector: parameter clean up and disable re-enabling if clear delay negative
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer 98d057b8c9 AirspeedValidator: change logic for innovation checks
Previously, the logic was not consistent with the description in the params.
It now, if the integral is enabled, declares innovation check failed if
integral is above threshold.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer 0c2099e788 AirspeedSelector: improve messaging on airspeed sensor switches
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer aecc0aa0c3 AirspeedSelector: do checks for data stopped in airspeed selector, not validator
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer 7132e674d6 AirspeedValidator: Simplify data missing check
The data_stopped check should be independent of the innovation
and load factor check.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer 083cd6f1c1 AirspeedValidator: remove unnecessary _checks_failing
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer 37a49dbb6a AirspeedValidator: improve readability
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer 061fb9ac07 AirspeedSelector: add const
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer cd2c366e22 AirspeedSelector: remove unnecessary reboot required and Experimental comments in params
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer 11dbc7e17f AirspeedSelector: improve description of ASPD_FALLBACK_GW
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer 0f1207dd7e AirspeedSelector: improve readability
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
PX4 BuildBot 1d8808183d Update submodule ecl to latest Thu Jan 21 17:04:02 UTC 2021
- ecl in PX4/Firmware (18bac6aff5): https://github.com/PX4/PX4-ECL/commit/99575d73e10aad06eb7d5b6415ea2db4151c5045
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/b919f3ddf41ab422d09af91eaea2b2f9729fab13
    - Changes: https://github.com/PX4/PX4-ECL/compare/99575d73e10aad06eb7d5b6415ea2db4151c5045...b919f3ddf41ab422d09af91eaea2b2f9729fab13

    b919f3d 2021-01-21 Paul Riseborough - EKF: Restore protection from extreme innovation values
efb78de 2021-01-21 Paul Riseborough - EKF: Set position fusion gate option false by default
556a195 2021-01-19 Paul Riseborough - EKF: Improve handling of non position mode large position innovations
2021-01-21 12:33:25 -05:00
Daniel Agar 18bac6aff5 ROMFS: posix rcS set EXTRA_MIXER_MODE 2021-01-21 11:26:23 -05:00
Daniel Agar e0b33ba842 mavlink: temporarily disable ACTUATOR_OUTPUT_STATUS stream by default
- the presence of this stream appears to be causing the MAVSDK tests to fail and needs to be investigated
2021-01-21 11:25:42 -05:00
Matthias Grob 7cdb9e9412 MulticopterPositionControl: altitude comment typo 2021-01-21 09:43:12 -05:00
Matthias Grob 4ce4fe05c5 BlockLowPass: initialize state in definition 2021-01-21 09:43:12 -05:00
ArthurLamberticus 82d32c7f3f mavlink: add ACTUATOR_OUTPUT_STATUS stream
Co-authored-by: Lise Prunier <lise.prunier@aerialcoboticus.com>
2021-01-21 09:30:43 -05:00
Matthias Grob 4becf74cbc .gitmodules: adapt submodule names to repo renaming 2021-01-21 11:52:14 +01:00
Paul Riseborough b919f3ddf4 EKF: Restore protection from extreme innovation values 2021-01-21 20:55:42 +11:00
Paul Riseborough efb78deef9 EKF: Set position fusion gate option false by default 2021-01-21 20:55:42 +11:00
Paul Riseborough 556a195320 EKF: Improve handling of non position mode large position innovations
These changes fix a bug that allowed IMU gyro errors that cause large tilt errors prior to start of aiding not resulting in large innovation test ratios.
2021-01-21 20:55:42 +11:00
Matthias Grob 65884960fa Remove ancient submodules
that were accidentally added back without URL in #16471
2021-01-21 10:46:29 +01:00
Hamish Willee bd00aec936 Parameter markdown use page css for layout 2021-01-21 09:08:26 +01:00
Daniel Agar 9a066959d4 delete empty src/lib/DriverFramework 2021-01-20 14:15:49 -05:00
TheLegendaryJedi 64c857562d Crazyflie v 21 (#16502)
Build model name fix.

Co-authored-by: TheLegendaryJedi <goncalo.atanasio@gmail.com>
2021-01-20 19:51:45 +01:00
TheLegendaryJedi dd9b0ded0f [UPDATE] - Remove duplicate syslink code 2021-01-20 19:51:45 +01:00
TheLegendaryJedi 641665f2e9 [UPDATE] - Workflows and Jenkins CI builds CF21 2021-01-20 19:51:45 +01:00
TheLegendaryJedi b3d9efedfa [UPDATE] - Code clean and format 2021-01-20 19:51:45 +01:00
TheLegendaryJedi e450c5a9d9 [UPDATE] - Crazyflie parameter config 2021-01-20 19:51:45 +01:00
TheLegendaryJedi 40f971c082 [NEW] - bmi088 i2c drivers and crazyflie 2.1 conf 2021-01-20 19:51:45 +01:00
bresch d7812f83f1 mag_cal: fix race condition causing invalid mag calibration
In some cases, the fitness of the optimizer does not shrink at each
iteration, causing the "decreasing fitness check" to fail. This stops
the optimization and returns with sub-optimal, or unrealistic results.
2021-01-20 10:50:35 -05:00
Beat Küng b190d98d6d Jenkinsfile: remove dev-guide metadata deployment
dev guide got merged with the user guide.
2021-01-20 10:03:00 -05:00
Mathieu Bresciani 8d8b58efc3 Add logging of mag calibration data (mag_worker_data)
Co-authored-by: Julian Kent <julian@auterion.com>
2021-01-20 09:44:45 -05:00
Jari van Ewijk 6a32301ed5 Add NXP FMUK66E build to CI
This build was not yet available in the CI. We just got the first hardware and are doing the first tests right now. So far most things seem to work.
2021-01-20 05:52:50 -08:00
Hamish Willee 59a1148aec Modify airframe gen to use html.escape 2021-01-20 00:22:30 +01:00
Hamish Willee d2eefbf2fb Escape < and > in maintainer field 2021-01-20 00:22:30 +01:00
AlexKlimaj 386b56fbce drivers/imu/bosch/bmi088: Add BMI090L accel ID 2021-01-19 15:49:53 -05:00
Ryan Johnston d22eef9396 boards: mRo Control Zero F7 fix for voltage/current sensing
* Rename GPIO_nVDD_BRICK1v to GPIO_VDD_BRICK1
2021-01-19 15:48:17 -05:00
CUAVcaijie bed77c2988 add notes 2021-01-19 20:42:58 +01:00
CUAVcaijie 297a428cc0 Fix the case where the flight controller is connected to the battery (charge 100), QGC shows no battery 2021-01-19 20:42:58 +01:00
Ryan Johnston cea8ad4236 Control Zero F7 - RSSI Fix - SBUS Only/PPM Partial
This fixes RSSI for the Control Zero F7 but I have noticed that while this works perfectly for SBUS receivers, for PPM receivers it does not decrease the RSSI visual value in QGC when removing the RC transmitter connection.

When a PPM receiver is connected and the connection is lost the autopilot goes into RC Scan Mode (in the RC Update Module) to determine what is connected (even though something already is connected).

The main issue with this is that PPM receivers don't go into RC Failsafe but I don't think it is an issue with this autopilot. It looks to be an issue with the RC Update Module and how it is handled at the module level for non I/O coprocessor autopilots. 


Tested with an X8R (SBUS) and a Dragonlink (PPM) as well as a Dragonlink set to SBUS as the output. SBUS worked as intended. See screenshots below.
2021-01-19 20:42:28 +01:00
Daniel Agar ac8f4e3c48 mc_pos_control: only update constraints if topic updated
- update failsafe constraints
2021-01-19 14:44:42 +01:00
Matthias Grob 39b0c7b2bf battery: report at least one cell for a connected battery 2021-01-18 17:53:17 +01:00
Matthias Grob d9954ecaf0 lib/magnetometer_bias_estimator: Add library for online magnetometer calibration on the ground
Co-authored-by: bresch <brescianimathieu@gmail.com>
2021-01-18 11:44:58 -05:00
Matthias Grob 36d15ada1c vscode: do not enable smart case search
in workspace settings. This comes down to user preference
and there's no particular reason to change this based on the workspace.
I found it confusing to have this non-default behavior
just for PX4 editing.
2021-01-18 11:33:21 -05:00
Daniel Agar 77b21680fb sync ctrlalloc boards and add to CI 2021-01-18 11:25:37 -05:00
Daniel Agar 311a2bd3e8 update ctrlalloc airframe location 2021-01-18 11:25:37 -05:00
Daniel Agar 3e5e5ab1d5 control_allocator and angular_velocity_controller throttle parameter_update subscription 2021-01-18 11:25:37 -05:00
Beat Küng c36340d29a ActuatorEffectivenessMultirotor: set effectiveness to zero when computing the matrix
Just to be on the safe side.
2021-01-18 11:25:37 -05:00
Beat Küng 212ec821b1 control_allocator: set unused actuators to trim instead of min 2021-01-18 11:25:37 -05:00
Beat Küng 3606f86518 control_allocator: ensure unused outputs are initialized to min
Mostly important in cases where the ouputs would change (e.g. param change)
2021-01-18 11:25:37 -05:00
Beat Küng 3dad79d8f5 control_allocator: inline one-line setters & getters 2021-01-18 11:25:37 -05:00
Beat Küng 164511a7b5 control_allocator: avoid vector copies and sqrt() 2021-01-18 11:25:37 -05:00
Beat Küng 0e66b0876b control_allocator: change SequentialDesaturation to existing MC mixer
And limit the operations to the number of configured outputs.

Only using the number of configured actuators reduces CPU load by ~2% on
F7 @1khz.
2021-01-18 11:25:37 -05:00
Beat Küng 308f614735 refactor control_allocator: directly get the effectiveness matrix when updated
Reduces stack + RAM usage
2021-01-18 11:25:37 -05:00
Beat Küng 38782029ad fix control_allocator: set _last_run at the correct place 2021-01-18 11:25:37 -05:00
Beat Küng 0e86ab47f6 fix control_allocator: use 'delete' instead of 'free', guard against out-of-memory 2021-01-18 11:25:37 -05:00
Beat Küng 066464c4e8 control_allocator: remove unused _task_start 2021-01-18 11:25:37 -05:00
Beat Küng 25f3fe8456 fix control_allocator_status: torque_setpoint_achieved and thrust_setpoint_achieved are bool 2021-01-18 11:25:37 -05:00
Julien Lecoeur 343cf5603e initial control allocation support
- control allocation module with multirotor, VTOL standard, and tiltrotor support
 - angular_velocity_controller
 - See https://github.com/PX4/PX4-Autopilot/pull/13351 for details

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Roman Bapst <bapstroman@gmail.com>
2021-01-18 11:25:37 -05:00
Julian Kent fc6b61dad1 Try 'min' for units 2021-01-18 16:26:53 +01:00
Julian Kent d99d52960e Fix default _rtl_xxx values 2021-01-18 16:26:53 +01:00
Julian Kent d965f1cbc0 Add rtl_flight_time message 2021-01-18 16:26:53 +01:00
Julian Kent 5a9fe312b5 Fix test failure on rebase: set lpos valid 2021-01-18 16:26:53 +01:00
Julian Kent af8d178ae5 Fix spurious RTL triggers
Two sources:
1. global to local conversion was sometimes giving issues, so do everything in global
2. on startup the RTL didn't check if the home position was valid before processing it
2021-01-18 16:26:53 +01:00
Julian Kent b5f0a7ea03 Fix RangeRTL test 2021-01-18 16:26:53 +01:00
Julian Kent 5500a84b6a Add timestamp to RTL message 2021-01-18 16:26:53 +01:00
Julian Kent f169247bc2 Add RTL topics to ulog default profile 2021-01-18 16:26:53 +01:00
Julian Kent 67082ccb2b Test the vehicle type parameter usage 2021-01-18 16:26:53 +01:00
Julian Kent 100c64c790 Test the navigator side, and fix another trig edge case 2021-01-18 16:26:53 +01:00
Julian Kent a736ba2435 Minor tweak in wind handling 2021-01-18 16:26:53 +01:00
Julian Kent e847ef1a4d Add trig tests for wind calculations, and fix bugs / edge cases 2021-01-18 16:26:53 +01:00
Julian Kent 7482413005 Add Range-based RTL 2021-01-18 16:26:53 +01:00
Ricardo Marques e817fb83f5 pwm_extra: Add PWM_EXTRA parameters.
Signed-off-by: Ricardo Marques <marques.ricardo17@gmail.com>
2021-01-18 15:43:28 +01:00
Ricardo Marques 7a8203bf19 Enable third mixer when using UAVCAN for main mixer. 2021-01-18 15:43:28 +01:00
Matthias Grob 02c0f08060 flashfs: fix alignment ambiguity
Instead of ignoring the warnings.
Thanks to @Ole2mail and @yuhaim for the suggestions.
2021-01-18 14:19:29 +01:00
TSC21 920d6d84b5 rtps: increase non-alias ID range by reducing the alias space ID 2021-01-18 09:33:14 +01:00
TSC21 54486b995e uorb_rtps_message_ids: add required topics to enable offboard control from DDS 2021-01-18 09:33:14 +01:00
Daniel Agar dab90f86a4 drivers/gps: limit to ublox only flash constrained targets 2021-01-18 09:30:01 +01:00
Ricardo Marques 78c05275d2 tailsitter: Fix differential thrust in FW mode.
Signed-off-by: Ricardo Marques <marques.ricardo17@gmail.com>
2021-01-18 09:04:27 +01:00
Daniel Agar e4d223f098 boards: CUAV Nora fix BMI088 orientation 2021-01-17 23:19:18 -05:00
Daniel Agar 1ec10bfcc6 boards: disable CONFIG_ARMV7M_LAZYFPU again (#16573)
- this was causing hard faults on the CUAV Nora and possibly other boards, disabling everywhere until we fully understand the root cause
2021-01-17 22:40:21 -05:00
Daniel Agar 3abe2e82d1 mpu9250: create dedicated i2c version and delete legacy driver
- update crazyflie and bbblue usage
 - eventually this should be merged with the SPI version after interface
changes are made
2021-01-17 16:11:19 -05:00
Daniel Agar c9a7894230 boards: bitcraze crazyflie fix boot
- add console to USART3 for now
2021-01-17 16:11:19 -05:00
David Jablonski 2ed48f041c mavlink: Templated SCALED_IMU mavlink stream 2021-01-17 12:32:51 -05:00
Matthias Grob 031bbb7f3e FlightModeManager: handle commands all the time
Moving the command handling to a separate function that gets called
whenever a vehicle command is available to always react on commands
and not just when already a task is running.

This solves e.g. commanding an Orbit when in Staibilized.
2021-01-17 15:46:30 +01:00
Matthias Grob df54f938ef FlightModeManager: correct setpoint struct initialization
It is important that setpoints get initialized with NAN and not overwritten
if specifically set by a successful flight task execution. It's then
clear if any setpoints were intentionally and successfully set.
Crucial for the position controller's emergency failsafe and the
seamless setpoint handover to the next flight task.
2021-01-17 15:46:30 +01:00
Matthias Grob 63db61a700 FlightModeManager: correct acceleration setpoint feedback naming
The variable was never renamed correctly in this in between layer when
we switched from normalized thrust to acceleration setpoints.
2021-01-17 15:46:30 +01:00
Daniel Agar 4d7b875ee2 flight_mode_manager: merge with flight_tasks 2021-01-17 15:46:30 +01:00
RomanBapst b1e442b830 vehicle_local_position: added bitfield for terrain estimate sensor info
- indicate how the distance to the bottom is estimated as this is important
to know in the context

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-17 12:06:59 +01:00
bresch eaa2ae9dc9 ekf2: add param to enable synthetic mag Z fusion mode 2021-01-17 12:06:59 +01:00
bresch 983234e29d ekf2: add param to set rng check hysteresis 2021-01-17 12:06:59 +01:00
Silvan Fuhrer 195a900ecf change default of RTL_LAND_DELAY to 0
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-17 12:05:30 +01:00
Silvan Fuhrer 037c821142 ROMFS: increase max distance between waypoints for VTOL and FW to 5km
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-17 12:05:30 +01:00
JacobCrabill 8e8497ff77 heater: px4io: Add support for heaters on IO MCU 2021-01-17 12:03:53 +01:00
Jaeyoung-Lim 653fef56de Update sitl_gazebo 2021-01-17 11:18:11 +01:00
Jaeyoung-Lim af1b4c473e Start user camera plugin
This commit starts the gazebo_user_camera_plugin together with the gzclient, so that it is always following the vehicle
2021-01-17 11:18:11 +01:00
Matthias Grob 8a7878f65c arch.sh: update zsh support, latest ARM GCC, gazebo AUR 2021-01-17 10:58:39 +01:00
Silvan Fuhrer cee4016665 Preflight checks: Airspeed checks update
-check for valid airspeed_validated (declared valid plus updated less than 1s ago)
-added param (COM_ARM_ARSP_EN) to enable/disable check for max airspeed for arming set max
airspeed limit to half of stall airspeed

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-16 10:26:55 -05:00
Can Berk Durmus ba9611621d Retune Typhoon H480 PID 2021-01-16 09:32:09 +01:00
David Sidrane 1c0ed74d6a platforms/nuttx/NuttX/nuttx net backports 2021-01-15 11:44:21 -08:00
Beat Küng ade3871bee adc: add support for multiple sensor voltage channels 2021-01-15 10:57:20 -05:00
Beat Küng e2337a34eb system_power: add comp_5v_valid and can1_gps1_5v_valid
And fill it in from the v5x GPIO expander.
2021-01-15 10:57:20 -05:00
Beat Küng 704a82aaa6 gpio: extend support for /dev/gp* GPIO's
Note that there's a small CLI interface change.
2021-01-15 10:57:20 -05:00
Beat Küng 88fe047556 px4/v5x: enable mcp23009 GPIO driver 2021-01-15 10:57:20 -05:00
Beat Küng 3e4b8763a5 nuttx: add mcp23009 gpio driver 2021-01-15 10:57:20 -05:00
Beat Küng e1983381e7 rcS: add SYS_PARAM_VER to param reset_all exception list
Avoids an extra reboot when resetting the airframe
2021-01-15 10:57:20 -05:00
Matej Frančeškin ba6a8080ea mavlink: don't respond to MAV_CMD_REQUEST_MESSAGE if component doesn't match
PX4 is responding with NACK to MAV_CMD_REQUEST_MESSAGE from a GCS to
payload-manager which confuses a GCS.
PX4 shouldn't respond to commands that are not broadcasted or specificaly
addressed to it.
2021-01-15 10:57:20 -05:00
Beat Küng 26e8c231b0 v5x,v6x: move mtd_caldata after mtd_id partition
to avoid losing factory calibration params on existing setups
2021-01-15 10:57:20 -05:00
Lorenz Meier a282f3df8d CLI test: Disable by default on NuttX
First target is to enable this for POSIX tests and then later to roll them out to NuttX.
2021-01-15 10:57:20 -05:00
Lorenz Meier 03e9e10847 Add CLI tests for basic soak testing
This is in no way a complete test suite but is intended as a starting point to get minimal
test coverage for CLI handling tests in. This is necessary to QA the CLI handling
(e.g. removal of commands) and to ensure that we are exercising these code paths in
stack check and alike tests.
2021-01-15 10:57:20 -05:00
Julian Oes 5ae5c03c66 mavlink: handle param4/5 from mission_item_int
It turns out that we did not properly handle param4 and param5 if they
are transferred using mission_item_int if the frame is
MAV_FRAME_MISSION.
2021-01-15 10:57:20 -05:00
Beat Küng 12ebbd995d bmp388: wait a bit longer to schedule first cycle after reset 2021-01-15 10:57:20 -05:00
Beat Küng 529c3112ac bmp388: quiet if startup fails (no sensor on bus) 2021-01-15 10:57:20 -05:00
David Sidrane 1e7dfe227a stm32_common:board_hw_rev_ver Use Analog resistor detection
When the VER_DRIVE and REV_DRIVE are the same GPIO
   we need to use Analog detection.
2021-01-15 10:57:20 -05:00
Jakub Kákona b87dd317d4 airframes: add new airframe for ThunderFly TF-G2 autogyro (#16551)
Co-authored-by: Roman Dvorak <romandvorak@mlab.cz>
2021-01-15 13:54:17 +01:00
Thomas df41c99b61 make failsafe handling consistent over all VTOL types 2021-01-15 09:19:07 +03:00
Thomas 38e46ff341 Rename VtolAttitudeControl::abort_front_transition(const char *reason) to VtolAttitudeControl::quadchute(const char *reason) 2021-01-15 09:19:07 +03:00
Thomas Stauber 40fbfdc054 Undo make format change
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2021-01-15 09:19:07 +03:00
Thomas 83ddb77a5f delete excess empty lines 2021-01-15 09:19:07 +03:00
Thomas b90fafd5cd Fix quadchute logic so that it also works during back transition 2021-01-15 09:19:07 +03:00
Daniel Agar 420ceb76fc cmake: NuttX generated vscode launch.json requires DEBUG_DEVICE found 2021-01-14 10:32:26 -05:00
SalimTerryLi 1ee98417f8 scumaker pilotpi updates
* replace default mag with qmc5883l
* fix rotation and quiet startup
* fixedwing script & Multi-EKF cfg
* set default params only when initial startup
2021-01-14 09:16:13 -05:00
Daniel Agar 52b07a932a github actions build and store cannode uavcan firmware 2021-01-14 08:52:38 -05:00
RomanBapst 96dfa7fc71 ROMFS: set cruise throttle correctly for all gazebo vtol configs
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-14 09:58:37 +03:00
Silvan Fuhrer 0633c3956f ROMFS: improve tuning of tailsitter VTOL SITL
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-14 09:58:37 +03:00
Silvan Fuhrer 6104fe8932 ROMFS: improve tuning of tiltrotor VTOL SITL
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-14 09:58:37 +03:00
Silvan Fuhrer 2ce310925c ROMFS: improve tuning of standard VTOL SITL
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-14 09:58:37 +03:00
Daniel Agar e96571b45d uavcannode: GPS working on cuav_can-gps-v1
- use sensor_gps directly from sensor rather than vehicle_gps_position (aggregated value)
2021-01-13 22:06:46 -05:00
Daniel Agar d8e8e23947 vscode: add cuav_can-gps-v1_canbootloader variant 2021-01-13 22:06:46 -05:00
Daniel Agar 58909b208d boards: cuav can-gps-v1 add safety button and LED 2021-01-13 22:06:46 -05:00
Daniel Agar a894ca30e8 cmake: add STM32F412CE debug helper 2021-01-13 22:06:46 -05:00
David Sidrane 529841ba7c make_can_boot_descriptor:Get padding math correct 2021-01-13 22:06:46 -05:00
David Sidrane 1ac70cc72f can-gps-v1:Correct Memory size used by app and bootloader size 2021-01-13 22:06:46 -05:00
David Sidrane d04216aa48 Nuttx with stmf412 fixes 2021-01-13 22:06:46 -05:00
David Sidrane 618bd5978a can-gps-v1:canbootloader SAFETY is GETNODEINFO_JUMPER 2021-01-13 22:06:46 -05:00
David Sidrane 2deef30d12 canbootloader:Add 48Mhz CAN Clock Settings 2021-01-13 22:06:46 -05:00
David Sidrane 177109a1af can-gps-v1:LED Trimming 2021-01-13 22:06:46 -05:00
David Sidrane 54abd997de canbootloader:Update to use NuttX 2021-01-13 22:06:46 -05:00
David Sidrane 271f87f8d2 canbootloader:Fixed Warning 2021-01-13 22:06:46 -05:00
David Sidrane 238c28d458 SK6812 Led driver 2021-01-13 22:06:46 -05:00
David Sidrane 85bd04f0c7 can-gps-v1:canbootloader Fixed 2021-01-13 22:06:46 -05:00
David Sidrane 3e08fd6682 can-gps-v1: Removed GPIO_CAN_CTRL 2021-01-13 22:06:46 -05:00
David Sidrane c2c92cb2c8 can-gps-v1: Added LED pin 2021-01-13 22:06:46 -05:00
David Sidrane cdae8bf168 can-gps-v1:Fixed Clock 2021-01-13 22:06:46 -05:00
Daniel Agar a0d8d5ac74 sensors/vehicle_gps_position: untangle and remove unnecessary state 2021-01-13 20:17:49 -05:00
Daniel Agar bc8ec5d1f5 uavcannode: support optical_flow 2021-01-13 19:35:28 -05:00
RomanBapst 47364ce8d6 updated tuning for gazebo plane airframe config
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst f05599caff tecs: use speed derivative provided by local position
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer b230bbfe88 ROMFS: remove outdated TECS parameter from configs
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
RomanBapst e546584555 tecs: moved trivial getter methods to header file
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Roman Bapst 701c105ab6 Update src/lib/tecs/TECS.cpp
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst fa559aef43 TECS: stop learing integrator if airspeed is not available, but don't zero it
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst d4d1c0fe01 TECS: some cosmetics
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst 97cc1e25dd TECS: hande pitch and throttle integrator saturation consistently
- don't decay integrator during saturation but prevent it from being learned
into the direction which causes more actuator saturation

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst 77627a08ca TECS: don't allow speed height weights to be larger than one
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer dca89763b3 TECS: apply FW_LND_THRTC_SC to altitude error time constant
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer 3d3ff75495 TECS: update some params to latest results from flight testing
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer 3102b9f071 TECS: remove throttle integral limits
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
RomanBapst 987c320825 TECS: removed unused parameter
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst 5c4c2c240c tecs: dot not clip throttle integrator during saturation but only allow
it to propagate into a direction which does not saturate

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer 2ca4269464 TECS: separate integral gains for throttle and pitch loops
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer 72dfb2078a TECS: adapt params to new control structure
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
RomanBapst 01f891618b TECS: move to new control loop architecture
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst 447e14906c TECS: log more TECS states to enable better analysis
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst 8823f5e1ec TECS: added method to get SKE weighting
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst d0e8b882a2 TECS: added alpha filter classes to energy rate and tas derivative
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
xdwgood cabb50a67b 13001_caipirinha_vtol:Ensure that the max/min pwm changes take effect 2021-01-13 11:32:01 +01:00
Julian Kent be0f5a7fe4 Fix implicit float->double conversions in tests 2021-01-13 10:26:10 +01:00
Julian Kent 2d6758a39d Cleanup of dataman mocks and check interval definition 2021-01-13 10:26:10 +01:00
Julian Kent a97a4d8bb8 Fix enum and param update 2021-01-13 10:26:10 +01:00
Julian Kent c745c8bb45 Small navigator refactor/cleanup 2021-01-13 10:26:10 +01:00
Julian Kent 04d859e36e Fix test failure from parameter autosave starting WQ 2021-01-13 10:26:10 +01:00
RomanBapst f97dcde4e2 GeofenceBreachAvoidanceTest: added tests for max dist to home
Signed-off-by: Julian Kent <julian@auterion.com>
2021-01-13 10:26:10 +01:00
RomanBapst 3fa15cec91 GeofenceBreachAvoidance: improve behavior when using max dist to home option
- ensure that the vehicle is loitering with sufficient clearance to the boundary

Signed-off-by: Julian Kent <julian@auterion.com>
2021-01-13 10:26:10 +01:00
Julian Kent a5dfa0c803 Add helper function for decel distances
Co-authored-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 10:26:10 +01:00
RomanBapst 0ac597fba8 Use new GeofenceBreachAvoidance from Navigator
Signed-off-by: Julian Kent <julian@auterion.com>
2021-01-13 10:26:10 +01:00
RomanBapst e536868104 Add GeofenceBreachAvoidance class
Signed-off-by: Julian Kent <julian@auterion.com>
2021-01-13 10:26:10 +01:00
Julian Kent 8622c21496 Move VelocitySmoothing to new motion_planning library
Co-authored-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 10:26:10 +01:00
Julian Kent d540ca5de2 Coerce default epsilon values to Type 2021-01-13 10:17:09 +01:00
Paul Riseborough 99575d73e1 EKF: Add bad accel bias checking for EV and range finder height use cases 2021-01-09 11:03:31 -05:00
Paul Riseborough ff3c0a6136 EKF: Fix bug preventing recovery from bad delta velocity bias estimates 2021-01-09 11:03:31 -05:00
priseborough c25c97f8b5 [AUTO COMMIT] update change indication 2021-01-09 11:03:31 -05:00
Paul Riseborough 96418101e1 test: Allow for larger vel variance growth due to dvel bias variance 2021-01-09 11:03:31 -05:00
Paul Riseborough 1b1c049e81 test: Update unit test to match expected behaviour 2021-01-09 11:03:31 -05:00
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
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
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
Kamil Ritz 78ce46f007 Removing Matlab derivation 2021-01-02 06:29:11 +11:00
Mathieu Bresciani 18f334f4db flow: add unit test for yaw motion (#950) 2020-12-25 09:47:14 +01:00
Kamil Ritz df7f261e03 Add missing const modifier 2020-12-20 14:04:29 +01:00
Julian Kent 15e54ceda1 Rework rank-detection tolerance in pseudoinverse 2020-12-18 12:07:19 +01:00
Julian Kent d9a5e3dec2 Add test for new cutoff threshold 2020-12-18 12:07:19 +01:00
JacobCrabill ea43303c1c test/vector3: Add test for scalar +/- operators 2020-12-17 18:05:46 +01:00
JacobCrabill 158409abce Vector3f: Add operator+/- for scalars 2020-12-17 18:05:46 +01:00
Daniel Agar a8e0e82858 EKF: update mag LPF immediately 2020-12-17 10:46:04 +01:00
Daniel Agar 398fe159ce EKF: allow initialising without mag depending on configuration
- reduce initial number of required mag and baro samples before init
2020-12-17 19:55:51 +11:00
Daniel Agar 1237087d70 AlphaFilter add constructor that takes alpha and use in EKF 2020-12-16 13:55:59 -05:00
Daniel Agar 37e84b763a README: fix zenodo badge (rename ecl -> PX4-ECL) 2020-12-16 10:47:21 -05:00
Mathieu Bresciani 5ccb8b457d fakePosFusion: reset _last_known_posNE to current state when starting (#943)
* [AUTO COMMIT] update change indication
2020-12-15 10:09:01 +01:00
bresch 9d22f140dd gps_alt: constrain var using 1.5 as a typical ratio of vacc/hacc 2020-12-13 14:39:50 +11:00
bresch b0cf45e2d2 gps_alt: rename getGpsAltVar -> getGpsHeightVariance 2020-12-13 14:39:50 +11:00
bresch 62f2e26c49 gps_alt: reset GPS alt variance usign helper function 2020-12-13 14:39:50 +11:00
bresch f7bddda3d5 gps_alt: do not scale up reported gps vertical accuracy
The comment said that the horizontal accuracy needs to be scaled up
using the typical epv/eph ratio but the epv (vacc) is already available,
so no scaling is required.
2020-12-13 14:39:50 +11:00
bresch 02369cd415 gps_alt: extract measurement variance computation and saturation 2020-12-13 14:39:50 +11:00
Daniel Agar 1541e4b414 EKF: update control status and fault status getters
- the fault status union exceeded 16 bits, but the getter was get_filter_fault_status(uint16_t *val)
2020-12-10 09:13:12 -05:00
zhaoxiaowei fbf67bdef9 reset gps height use vacc 2020-12-10 10:07:59 +01:00
Mathieu Bresciani 8f3df7a97b flow: restructure optical flow control logic (#928)
- extract motion checks performed on ground
- move all non-timing check to controlOpticalFlowFusion. This simplifies and standardirzes the setOpticalFlowData function. Furthermore, in some cases (SITL, PX4Flow), the dt is forced to 0 when the quality is 0 (which is usual on ground) so the ekf needs to ignore those values on ground to initialize properly the flow fusion.
- add filter convergence test
- move check for dt time max in setOpticalFlowData
- in the simulator, do not update dt as this is the sensor integration
period.
2020-12-09 11:33:00 +01:00
kritz 38358002bb Auto update change indication by github actions
Co-authored-by: kamilritz <kamilritz@users.noreply.github.com>
2020-12-08 18:05:28 -05:00
Daniel Agar 688a054bdb EKF: controlDragFusion() add parenthesis for readability 2020-12-08 18:03:04 -05:00
Paul Riseborough 944b18c63e EKF: Remove non useful status print
Local position is never valid when filter is initialised so there is no use printing the status.
2020-12-08 18:03:04 -05:00
Paul Riseborough ee94980a8f EKF: Clean up wind state activation logic
Ensure wind states are deactivated in one place and always when in a non-position mode.
Activate wind states separately for each observation method.
2020-12-08 18:03:04 -05:00
Paul Riseborough 44ebfb8c43 EKF: Don't report local position as valid when in a non-position mode 2020-12-08 18:03:04 -05:00
Daniel Agar da7d41e78a EKF: add mag bias reset helper and update IMU bias reset to match (#924) 2020-12-08 12:16:59 -05:00
Daniel Agar 03cfcb903e EKF: RingBuffer minor improvements
- allocate IMU and output buffers on construction according to defaults
 - determine buffer max time delay based on configuration parameters
 - reorder flowSample and extVisionSample to minimize padding
 - adjust parameter defaults to match PX4-Autopilot
2020-12-03 20:48:51 -05:00
PX4 BuildBot 67f13f7ede Update geo_lookup WMM to latest Wed Dec 2 11:48:25 UTC 2020 2020-12-02 19:47:46 -05:00
bresch da9f314b69 mag: use strength in Gauss 2020-11-10 20:25:09 +11:00
Claudio Micheli c4d162f9a0 EKF: range_finder parameterize range sensor quality hysteresis time
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Co-authored-by: bresch <brescianimathieu@gmail.com>
2020-11-04 12:35:39 -05:00
Mitchell-Lee-93 a504b6e881 precision of tol for float has been changed 2020-11-04 10:00:55 +01:00
Daniel Agar 6158d6d841 EKF: add const reference getters for status flags 2020-11-02 13:05:08 -05:00
Daniel Agar a21092804a EKF: remove virtual getters from estimator_interface 2020-11-02 09:35:47 -05:00
Daniel Agar 48a8992caf EKF: move small simple getters to header
- return by const reference where possible
2020-10-30 09:48:45 -04:00
Daniel Agar defb35d8f5 EKF: pass imuSample by const reference 2020-10-30 09:47:22 -04:00
Daniel Agar d85e24d3ca EKF: Ekf class is final 2020-10-27 08:53:58 -04:00
Daniel Agar 961b545da0 cmake: respect MAX_CUSTOM_OPT_LEVEL if set
- ignored for Debug and Coverage builds
2020-10-27 08:53:58 -04:00
Daniel Agar 5ea8824439 EKF: inline simple getters 2020-10-27 08:53:58 -04:00
Daniel Agar 6e99ebd928 EKF: add fault status bit for bad vertical accel data 2020-10-26 17:37:15 +01:00
Daniel Agar d936b85d71 EKF: add fault status bit for clipping 2020-10-26 17:37:15 +01:00
Mathieu Bresciani dd3ffc4192 Optical flow: compute velociy from corrected flow data for logging (#920)
This is really useful when debugging optical flow data
2020-10-26 13:27:52 +01:00
bresch 9126282c03 CI: update containers, sync with px4/Firmware 2020-10-26 11:07:13 +01:00
bresch e80a683981 CI: update change indicator of yaw emergency estimator
This was incorrectly uptated in 1a7c68ea72
2020-10-26 11:07:13 +01:00
Paul Riseborough f666ebb995 EKF: Code format fix - replace 1E-x with 1e-x 2020-10-06 20:50:52 +11:00
Paul Riseborough e82d0af6d2 EKF: Improve code clarity - non functional change 2020-10-06 20:50:52 +11:00
Paul Riseborough 1a7c68ea72 EKF: update change indicator 2020-10-06 20:50:52 +11:00
Paul Riseborough 759d217d5a EKF: Improve protection for GSF weight collapse 2020-10-06 20:50:52 +11:00
Paul Riseborough 7c81350c7a EKF: Don't yaw reset if not yaw induced nav failure 2020-10-06 20:50:52 +11:00
Paul Riseborough bf0d70fc90 EKF: Protect against collapse of GSF weights 2020-10-06 20:50:52 +11:00
Daniel Agar 4c2355a638 EKF: use GPS to lookup declination from WMM before full GPS checks pass 2020-09-28 08:43:32 +02:00
Daniel Agar 6b99ea2a60 ECL standalone build improve ECL_INFO/WARN/DEBUG
- ECL_{INFO,WARN,DEBUG} add newline
 - ECL_{INFO,WARN,DEBUG}_TIMESTAMPED add imu timestamp and newline
2020-09-25 09:33:50 -04:00
bresch 5879eaaf78 ekf: fix variable length array error
Even if the non_zeros() function is static constexpr, gcc (10.2) does not like it.
Using sizeof...(Idxs) fixes the error.
2020-09-25 11:33:29 +02:00
Daniel Agar 99aafbaa18 README: remove obsolete build status 2020-09-14 12:04:42 -04:00
Daniel Agar fab242a81f python generation add shebang, mark executable, ignore cache
- commit all current generated files
2020-09-07 09:20:41 +02:00
rjgritter a204c59990 WindEstimator: Fix incorrect _state accessing, clarify enums (#906) 2020-09-05 08:48:51 +02:00
Julian Oes ce6b10b99a Fix clang-tidy warnings
This comes from PX4 CI.
2020-08-27 17:42:42 +02:00
bresch 264c8c4e86 mag_fusion: mag heading and 3d modes are mutually exclusive
There is no need to check if 3d fusion is active when in mag heading
fusion mode since this is impossible
2020-08-27 15:48:40 +10:00
kamilritz 9797e4d28f updateYawInRotMat with hidden rotation sequence handling 2020-08-27 09:51:56 +10:00
kamilritz 419b70e4b5 Add tests for shouldUse321RotationSequence 2020-08-27 09:51:56 +10:00
kamilritz 4fb4e0ca01 Clean euler321 and euler312 code and comment 2020-08-27 09:51:56 +10:00
Kamil Ritz 2be738e806 Add helper function to alter heading in rotation matrices 2020-08-27 09:51:56 +10:00
Kamil Ritz fdc86c247a add functions to compute yaw (321 and 312 sequence)
from quaternion and rotation matrix
2020-08-27 09:51:56 +10:00
Kamil Ritz 15afa8ae17 shouldUse321RotationSequence(const Dcmf& R) 2020-08-27 09:51:56 +10:00
Kamil Ritz 13f092a30f sparse quadratic form 2020-08-26 19:45:05 +02:00
Julian Oes 3a5bfb2bd1 matrix: inline to prevent multiple definitions (#147)
Without inline we get multiple definitions during linking.
2020-08-25 12:58:04 +02:00
Julian Oes e101edc0e7 Matrix: fix warning if M == N (#146)
This fixes the warning appearing with GCC 10.2:

../../src/lib/matrix/matrix/Matrix.hpp:481:34: error: logical ‘and’ of equal expressions [-Werror=logical-op]
  481 |         for (size_t i = 0; i < M && i < N; i++) {
      |

I would prefered something with if constexpr but we don't have that yet
in because we're using C++14.
2020-08-24 14:19:43 +02:00
Kamil Ritz 4872f2a545 Remove not used code 2020-08-24 19:24:27 +10:00
Kamil Ritz 0fafd4d68b precompute cos and sin of yaw once before mutliple use 2020-08-24 19:24:27 +10:00
Kamil Ritz 114516b784 Use new added matrix functions 2020-08-24 19:24:27 +10:00
Kamil Ritz 1f637af7de Add const modifier 2020-08-24 19:24:27 +10:00
Morten Fyhn Amundsen cd8ad1584c Make wrap() work with integer types (#145)
* Make wrap() work with integers
2020-08-24 10:49:12 +02:00
kamilritz aa2c77f92d Small cleanup in velposfusion 2020-08-24 18:04:57 +10:00
kamilritz 644e903552 Apply measurementUpdate function 2020-08-24 18:04:57 +10:00
kamilritz 404edde7f3 Add measurementUpdate function 2020-08-24 18:04:57 +10:00
kamilritz f6252ff533 small cleanup in limitDeclination 2020-08-24 18:04:57 +10:00
Daniel Agar f62662ee46 update change_indication for newer WMM tables 2020-08-21 16:54:45 -04:00
PX4 BuildBot 802a6d99a0 Update geo_lookup WMM to latest Fri Aug 21 11:48:14 UTC 2020 2020-08-21 16:54:45 -04:00
kamilritz bd0c5fbb97 Update change indication for ekf gsf 2020-08-20 22:16:28 +02:00
kamilritz 3ae934544f Add change indication for ekf_gsf_reset 2020-08-18 17:13:46 +10:00
Paul Riseborough fd849e0578 EKF: Fix specific force observation noise variance
Also add protection for out of range value.
2020-08-18 17:05:59 +10:00
Paul Riseborough 76f393dcb0 EKF: Use const reference instead of local copy 2020-08-18 17:05:59 +10:00
Paul Riseborough c43307b8cf EKF: convert drag fusion from Matlab to SymPy generated auto-code 2020-08-18 17:05:59 +10:00
Paul Riseborough 1e6c6f2d3c EKF: update all output states when aligning output time horizon filter 2020-08-16 10:00:47 +10:00
kamilritz 3bd9415498 Make delayed output stayed not a member variable 2020-08-16 10:00:47 +10:00
kamilritz da9bfe4316 Update interface of applyCorrectionsToOuputStates 2020-08-16 10:00:47 +10:00
Paul Riseborough 64ab2b087a EKF: Only record successful sideslip fusion when states updated 2020-08-16 08:45:59 +10:00
Paul Riseborough 0fa7ef3517 EKF: Use ecl::powf for integer exponents 2020-08-16 08:45:59 +10:00
Paul Riseborough 168dbdf630 EKF: Convert sideslip fusion to use SymPy generated auto-code 2020-08-16 08:45:59 +10:00
Paul Riseborough 06aa78a291 EKF: Only record airspeed fusion event when states are updated 2020-08-16 08:45:26 +10:00
Paul Riseborough 486a461a5e EKF: airspeed fusion derivation test comparison cleanup 2020-08-16 08:45:26 +10:00
Paul Riseborough ede6204f85 EKF: airspeed fusion cleanup 2020-08-16 08:45:26 +10:00
Paul Riseborough a5a43dbc6c EKF: Convert airspeed fusion to use SymPy generated auto-code 2020-08-16 08:45:26 +10:00
Paul Riseborough 5907e81ef7 EKF: optflow fusion cleanup 2020-08-16 08:44:17 +10:00
Paul Riseborough 7fa9a1963b EKF: optflow fusion cleanup
Co-authored-by: kritz <kritz@ethz.ch>
2020-08-16 08:44:17 +10:00
Paul Riseborough 0e74f3ea9d EKF: optflow fusion cleanup
Co-authored-by: kritz <kritz@ethz.ch>
2020-08-16 08:44:17 +10:00
Paul Riseborough 6e992a18f6 EKF: optflow fusion cleanup
Co-authored-by: kritz <kritz@ethz.ch>
2020-08-16 08:44:17 +10:00
Paul Riseborough 1ad042da23 EKF: Use ecl::powf in comparison test 2020-08-16 08:44:17 +10:00
Paul Riseborough 274523bd98 EKF: Use ecl::powf for integer exponents 2020-08-16 08:44:17 +10:00
Paul Riseborough f20a5d814d EKF: Remove redundant tilt check
Also fix comment indent
2020-08-16 08:44:17 +10:00
Paul Riseborough 1592db8f34 EKF: Convert optical flow fusion to use SymPy generated equations 2020-08-16 08:44:17 +10:00
Paul Riseborough 1f386c1bb8 EKF: Add yaw estimate SymPy generated code files 2020-08-16 08:43:29 +10:00
Paul Riseborough 510d93858f EKF: move yaw estimator derivation into main filter derivation
Enables use of common components
2020-08-16 08:43:29 +10:00
Paul Riseborough f89c52e840 EKF: use ecl::powf for integer exponents 2020-08-15 08:40:59 +10:00
Paul Riseborough 0aa2f17562 EKF: Convert GPS yaw observation method to use SymPy generated code (#880)
* EKF: add test comparison program for GPS yaw fusion equations

* EKF: convert GPS yaw fusion method to use SymPy generated equations

* Replace if/else with simple if

* EKF: fix formatting of GPS yaw fusion auto-code comparison test

* EKF: Use  SparseVector type for GPS yaw fusion Jacobians

* EKF: Fix bug in GPS yaw derivation comparison check

* Add gps_yaw auto generated code file

Co-authored-by: kamilritz <kritz@ethz.ch>
2020-08-13 13:23:57 +10:00
Paul Riseborough 21cc46edd7 EKF: Convert magnetic field observation methods to use SymPy generated code (#879)
* EKF: Add comparison test for mag field fusion generated code

* EKF: convert mag field fusion to use SymPy generated code

* EKF: Add test comparison program for yaw fusion equations

* Stop setting 0 to 0

* Reduce if/else statement to only if

* EKF: more accurate implementation for sequential fusion of magnetometer data

* test: update change indicator

* Use matrix::SparseVector<float, 24, ...> for observation jacobian

* Adapt the auto code generation to allow for different bracket styles

* Add auto generated code for mag fusion

* Add generic computation of KHP

* Apply generic computation of KHP to mag fusion

* tests: update change indicator

* tests: update change indicator

Co-authored-by: kamilritz <kritz@ethz.ch>
2020-08-11 18:57:22 +10:00
kamilritz ec93490890 geo test change to arc length 2020-08-10 22:15:43 +02:00
kamilritz 98dec6afa6 add tests for waypoint_from_line_and_distance() 2020-08-10 22:15:43 +02:00
kamilritz 60388a8b6d Geo: Fix double correcting for negative distance 2020-08-10 22:15:43 +02:00
kamilritz 25c0455348 comply with Firmware style requirements 2020-08-10 10:13:40 +02:00
Paul Riseborough 6feb28c27d EKF: Convert EKF-GSF yaw estimator from matlab to sympy derived equations (#871)
* EKF: Add sympy derivation of equations for EKF-GSF yaw estimator

* EKF: Convert EKF-GSF yaw estimator to use sympy generated equations

* EKF: Add status prints for GSF-EKF yaw estimator cvode gen

* EKF: Move generated code for GSF-EKF yaw estinmator to generated directory

* Make it run with python3

* Cleanup yaw estimator code generation

* Improve and simplify gsf measurement update code generation

* Use improved auto generated measurement update code

& remove obsolete updateInnovCovMatInv function

* Delete generated ekf_derivation for the moment

Co-authored-by: kamilritz <kritz@ethz.ch>
2020-08-10 09:27:31 +02:00
kamilritz 9d7d502c56 std::sin -> sin 2020-08-09 15:28:35 -04:00
kamilritz 4ab364f0fd Make conversion from float to double explicite 2020-08-09 15:28:35 -04:00
Julian Kent 9ea3468091 Negative distances go in the opposite direction 2020-08-09 11:36:36 -04:00
kamilritz b7e49f20e4 Update change indication 2020-08-09 11:08:59 -04:00
kamilritz 497008811a Update matrix version 2020-08-09 11:08:59 -04:00
kritz f981cea2ae add possibility to iterate over SparseVector data at runtime (#143) 2020-08-09 09:44:49 +02:00
kamilritz e714a28c83 use size_t instead of int in sparseVector 2020-08-07 19:45:02 +02:00
kritz 18699416b0 SparseVector (#140)
* Add SparseVector

temp

* Add gtest

* Some reworking of the sparse concept

* Change type of M from int to size_t

* Add const modifier

* Add needed declaration for accessing elements of _indices

* Add norm_squared, norm, longerThan

* Add test for all sparse vector functions

* Add missing const to slice's norm_squared, norm and longerThan

* Construction from Vector<M> and carray[N]

* try to fix ci

Co-authored-by: Julian Kent <julian@auterion.com>
2020-08-07 18:44:48 +02:00
kamilritz d7568d55b4 extend firmware build checks 2020-08-07 11:42:13 +02:00
kamilritz 310b989c9a refactor start of gps into separate function 2020-08-07 10:02:47 +02:00
kamilritz 6ed5dbc2db Construct Vector from Slice<1,M> alias row() 2020-08-06 16:15:05 +02:00
kamilritz 7eb2b08eed Yaw measurement jacobian to Vector4f 2020-08-04 09:57:00 +02:00
kamilritz 15d360f446 saved_mag_ef_cov to Squarematrix2f 2020-08-04 09:57:00 +02:00
kamilritz 7609bc69b2 drag innov member variables to Vector2f 2020-08-04 09:57:00 +02:00
kamilritz 960b80ee71 Do not update output filter a second time after reset to flow. 2020-08-03 09:51:59 +02:00
Paul Riseborough 77b11129fa EKF: replacement of covariance prediction autocode with sympy generated output (#870)
* added python script with ekf derivation (WIP)

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* worked on c code auto-generation

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* save before variable name change

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* changed symbol names

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* added codegeneration class

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* improve 3D mag fusion derivation

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* EKF: Extend ekf sympy derivation to include all observation types

* EKF: Add custom ecl::powf function for integer powers

* EKF: Convert ekf covariance prediction to use sympy output

* EKF: Add test program to compare sympy and matlab covariance prediction

Also tests ecl::powf(x,exp) function

* EKF: simplify ecl::powf function

* Generate code to subfolder generated/

* Add printouts for showing code generation progress

* Move generated covariance code to generated folder

* Upgrade code generation to python3

* main.py: Remove unused create_symbols function

& making code more compact

* main.py: move main part into function

* Code generation: fix passing wrong rotation matrix to yaw_observation ()

* EKF: Amend generated code filename for consistency

* Move ecl::powf function test to unit tests

* EKF: Use updated ecl:powf functionality in test program

* Move ecl::powf to utils.hpp

* Update ecl::powf test

* Update output change indication

* test: update expected output for change indicator

* test: update expected output for change indicator again

Co-authored-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: kamilritz <kritz@ethz.ch>
2020-07-30 12:44:08 +10:00
Matthias Grob 0bffd951ec AlphaFilter: include float.h for FLT_EPSILON 2020-07-28 15:41:58 -04:00
kritz 88c52aba5e Refactor ev fusion start into helper functions (#872) 2020-07-27 11:42:52 +02:00
kamilritz 8c65ca29e4 Only run firmware build test on pull_request 2020-07-26 10:11:52 -04:00
kamilritz 049f59d7de Fix firmware-build-test 2020-07-26 10:11:52 -04:00
Daniel Agar 185f22b094 geo_lookup: copyright header consistency and minor update
Minor consistency fixes for the copyright header and update the tables to current. PX4Buildbot will periodically update the tables automatically from this point.
2020-07-20 13:01:56 -04:00
Matthias Grob a126be0882 attitude test: refactoring to avoid identity quaternion confusion 2020-07-20 18:44:08 +02:00
Matthias Grob 572bafb01f Quaternion: use template type for division by two 2020-07-20 18:44:08 +02:00
Matthias Grob 242b38ee9e Quaternion: remove deprecated axis_angle conversions 2020-07-20 18:44:08 +02:00
Matthias Grob 7a3009f7a3 Remove asserts for unsigned integer >= 0
GCC 10 gives a warning
"comparison of unsigned expression in ‘>= 0’ is always true"
for these asserts since checking if an unsigned integer cannot
be negative and hence the statement gets droped.
2020-07-20 15:10:49 +02:00
Daniel Agar 9aa7991654 geo_lookup: upgrade table size (2 bytes per element) and add testing
- updated table to 2 bytes (int16) per element and scaled the inclination/declination/strength tables to use most of the range without being too awkward
 - tables have been extended to include the full latitude range
 - expanded the API slightly to offer declination/inclination in both degrees/radians and the magnetic strength in Gauss and Tesla
 - generated some simple testing that verifies interpolation between points
2020-07-19 18:53:47 -04:00
kamilritz 3651ed37fb Do not update time_last_imu outside of setGpsData 2020-07-17 11:06:36 +02:00
Matthias Grob 0fd99c59f1 Switch operator() to return a const reference 2020-07-17 10:43:34 +02:00
kamilritz 8a59b463f2 Quaternion: Use template type instead of single hardcoded type 2020-07-17 10:37:18 +02:00
kamilritz 89bfcc2167 Introduce checkAndFixCovarianceUpdate(KHP) function 2020-07-16 18:25:06 +02:00
kamilritz 5c4a3d4576 Make observation jacobian a Vector24f when possible 2020-07-16 18:25:06 +02:00
kamilritz b5e1397c0f Add const modifier
const modifier


Add missing const modifier
2020-07-16 18:25:06 +02:00
kamilritz e357376797 Bring declaration and initialization together 2020-07-16 18:25:06 +02:00
kamilritz 796afd5f98 Rename yaw_use_inhibit -> is_yaw_fusion_inhibited
Temp
2020-07-16 18:25:06 +02:00
kamilritz 4cb2d1c645 Remove duplicated code snippets
by combining x and y ballistic coeff inverse a vector
2020-07-16 18:25:06 +02:00
kamilritz b0ad9f0226 Replace componentwise with matrix operation 2020-07-16 18:25:06 +02:00
kamilritz b5765eb3b4 Move variable declaration to better place &
remove airspeed_innov_var_temp variable. setting to global variable even when fusion is aborted is okay
2020-07-16 18:25:06 +02:00
kamilritz 05855b7fc1 Update time of last fusion event really only if fused
Except for the velpos fusion
2020-07-16 18:25:06 +02:00
kamilritz efd96db49d Avoid setting 0 to 0 2020-07-16 18:25:06 +02:00
kamilritz 5ef18f8823 Style improvement 2020-07-16 18:25:06 +02:00
kamilritz 01515b9a9c Replace min(max()) with constrain 2020-07-16 18:25:06 +02:00
kamilritz b0458fbded Refactor output buffer updates into separate functions 2020-07-16 18:25:06 +02:00
kamilritz 3d82d822ae Add const modifier 2020-07-16 18:25:06 +02:00
kamilritz 93011ed52c Use ternary operator 2020-07-16 18:25:06 +02:00
kamilritz 46a5e6e428 Replace divisions with multiplications 2020-07-02 15:55:24 +02:00
kamilritz 3e3a66e9e9 Remove unnecessary operations 2020-07-02 15:55:24 +02:00
kamilritz 079a699556 Random cleanup 2020-07-02 15:55:24 +02:00
kamilritz d18ddb3e92 Use ternary operator 2020-07-02 15:55:24 +02:00
kamilritz 122f58b94d Bug: stop overwriting fault status of index 0 with index 1 2020-07-02 15:55:24 +02:00
kamilritz 9e211d6ca1 Stop overwriting fault status with false if one component is true 2020-07-02 15:55:24 +02:00
kamilritz e5ddd912a4 Remove not needed else case 2020-07-02 15:55:24 +02:00
kamilritz 430497e2f7 Shift variable definition inside calculateOutputStates 2020-07-02 15:55:24 +02:00
kamilritz f59343b343 Remove misplaced comment 2020-07-02 15:55:24 +02:00
kamilritz 673b309c45 Fix bug: pos gain used instead of vel gain 2020-07-02 15:55:24 +02:00
kamilritz 2af2696b63 Revert if-else condition to get rid of unnecessary indentation 2020-07-02 15:55:24 +02:00
kamilritz fce4958d4f Random cleanup 2020-07-02 15:55:24 +02:00
kritz 9eea44f4ab Return type of resets (#859)
* Reset position/velocity return type is void

* Delete not needed comments
2020-07-02 14:53:59 +02:00
bresch 97e54df123 Gps control: add missing consts and reduce variable scope 2020-07-02 13:35:13 +02:00
bresch b0f79caf34 GPS yaw: Extract and refactor GPS yaw control logic
- Rename GPS yaw fusion functions:
resetGpsAntYaw -> resetYawToGps
fuseGpsAntYaw -> fuseGpsYaw

- Move last fusion time in reset function
2020-07-02 13:35:13 +02:00
bresch 7f4fedde6a GPS Yaw: fix heading initialisation and add unit tests
When the antennas are not parallel to the x body axis, the GPS message
contains the angular offset but the data is already corrected in the
driver. EKF2 should then not add this offset during the initialisation.
2020-07-02 13:35:13 +02:00
kamilritz 97225fcb74 Use matrix lib inside getState 2020-07-02 09:02:24 +02:00
kamilritz 16a00eae0b Make Kfusion a Vector24f 2020-07-02 09:02:24 +02:00
kamilritz 356b2f6ffe Stop setting zero to zero 2020-07-02 09:02:24 +02:00
kamilritz 552bf824ea Add typedef for Matrix 24 types 2020-07-02 09:02:24 +02:00
Julian Kent 9a30828a0a Add explicit matrix + scalar test 2020-06-30 10:37:10 -04:00
Julian Kent f3cf615023 Do += -= and scalar *= /= in place 2020-06-30 10:37:10 -04:00
kamilritz f529358e9a Add missing const modifier 2020-06-28 14:24:49 +02:00
kamilritz 5356077a32 Make flow_innov/-var a matrix Vector2f 2020-06-26 08:26:26 +02:00
kamilritz c2801eb488 Add const modifier and increase matrix library usage 2020-06-26 08:26:26 +02:00
kamilritz d9afc2f1e8 Remove repeated division by same value 2020-06-26 08:26:26 +02:00
kamilritz d16b43a2da Get rid of non functional piece of code 2020-06-26 08:26:26 +02:00
kamilritz c3653e68ca Add const modifier 2020-06-26 08:26:26 +02:00
kamilritz 48f0eb16da Remove uninformative comments 2020-06-26 08:26:26 +02:00
kamilritz 4a69b41015 Increase matrix library usage even more 2020-06-26 08:26:26 +02:00
kamilritz 630be60930 Increase matrix library usage 2020-06-26 08:26:26 +02:00
kamilritz 22274b1d30 Add const modifier 2020-06-26 08:26:26 +02:00
kamilritz 61c139ea95 Remove unused variable 2020-06-26 08:26:26 +02:00
kamilritz afd4f3f86b Fix typo 2020-06-26 08:26:26 +02:00
kamilritz a3706fdcef Make relative wind computation more compact 2020-06-26 08:26:26 +02:00
kamilritz b8f937666a Make mag_innov/-var a Matrix::Vector3f 2020-06-26 08:26:26 +02:00
Kamil Ritz 0ea7cd8360 Attempt to fix CI firmware build test 2020-06-26 07:38:25 +02:00
Daniel Agar 2927132954 clang-format set BreakBeforeBraces to Linux style
- this keeps things consistent with PX4/Firmware astyle
2020-06-25 13:23:52 -04:00
sevenbill b96c62ed8b Optionalized build dependency on git
Signed-off-by: Bill Morris <bill@sevendof.com>
2020-06-25 08:56:26 -04:00
Bill Morris 794e6ec3a5 Enforce tabs via editorcofig 2020-06-25 08:55:21 -04:00
PX4 BuildBot e4b44f704b Update geo_lookup WMM to latest Tue Jun 23 14:15:04 UTC 2020 2020-06-23 10:41:59 -04:00
bresch 4b746a3fca GPS Yaw: add consts and remove fusion starting message
The fusion status is captured in the status flags; the message is
superfluous, uses flash space and can impact real-time performance
2020-06-23 08:43:48 +02:00
bresch 2bafe9df08 GPS Yaw: wait to fuse at yaw at least once before declaring it faulty
This fixes the cases where the yaw message from the GNSS receiver would
take more time than the vel/pos. The estimator should wait and not
immediately fall back to an other aiding source after 5sec.
If it never comes, it will never fall back, but this is ok since the
user wants to fly with GPS aiding an not with something else.
2020-06-23 08:43:48 +02:00
bresch 51cd63d626 GPS Yaw: fall back to other yaw aiding source in case of bad data
If the user selects GPS yaw fusion but that there is no GPS yaw data in
the GPS message or if the fusion is rejected for some time, the GPS yaw
data is declared faulty and the fusion is stopped to allow an other
source of yaw aiding to start.
2020-06-23 08:43:48 +02:00
bresch fe2a9d3018 GPS Yaw: move isfinite checks in control.cpp 2020-06-23 08:43:48 +02:00
bresch 3c6790f5d5 GPS Yaw: Always reset Yaw when GPS Yaw fusion is starting
Also avoid fusing fake mag data when an other source of yaw aiding
is active, even if in MAG_TYPE_NONE mode.
2020-06-23 08:43:48 +02:00
kamilritz ff8b5ec69d Extract general functions into utils 2020-06-23 08:18:34 +02:00
Daniel Agar fda30d8cec geo_lookup: expand latitude to +-80 degrees 2020-06-22 09:45:22 -04:00
Daniel Agar 109eca5200 geo_lookup: create simple python script to update tables 2020-06-22 09:45:22 -04:00
Daniel Agar 41b9e4f628 geo_lookup: move tables to separate file 2020-06-22 09:45:22 -04:00
Daniel Agar a8bb8ea99f move TECS, L1, and validation to PX4/Firmware 2020-06-18 18:48:36 -04:00
Matthias Grob a296fe7d8c Move AlphaFilter out of EKF 2020-06-15 13:07:51 -04:00
Matthias Grob daec5ae608 AlphaFilter: replace isfinite with positive denominator check 2020-06-15 13:07:51 -04:00
Kamil Ritz e835bc34c4 remove inline modifier 2020-06-12 15:11:16 +02:00
Kamil Ritz 74780aa512 Refactor gps fusion commencing 2020-06-12 15:11:16 +02:00
kamilritz 674bd99f3b Add operator* and operator/ for slice with type 2020-06-12 11:34:09 +02:00
Nicolas MARTIN 38b3acce96 fix conjugate_inversed comment 2020-06-11 16:17:28 +02:00
Matthias Grob 38cbd1a182 AlphaFilter: prevent setParameters division by zero 2020-06-09 16:32:24 -04:00
RomanBapst b7d54b5477 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

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-06-08 16:19:38 +02:00
bresch 8f533cb878 terrain_estimator: fix sensor aid selection 2020-06-05 20:44:30 +02:00
bresch 821e1fa8fc terrain_estimator: add unit tests 2020-06-05 20:44:30 +02:00
bresch aa96fa6d9e Random style fixes in the code 2020-06-05 20:44:30 +02:00
bresch 5d6a72e383 sensor_simulator: add possibility to set GPS position rate
one can set the position rate = velocity to obtain consistent gps data
2020-06-05 20:44:30 +02:00
Roman Bapst b3dc06d0cb Added height above ground source bitmask indicating which sensor is used 2020-06-04 09:44:19 +02:00
bresch 62e15cbacf sensor_simulator: set IMU rate to 200Hz as this is the new value
used in the Firmware
2020-06-03 17:09:20 +02:00
bresch 6126c190b2 sensor_simulator: update EKF at IMU rate
This is how it is also done in ekf2_main. Otherwise, this leads to
multiple integration of the same IMU data due to asynchronous sensor
updates triggering a prediction step between IMU updates.

Fix unit tests that broke because of this fix
2020-06-03 17:09:20 +02:00
Paul Riseborough 59183f70ba EKF: Reduce EKF-GSF vulnerability to large yaw gyro bias errors (#831)
* EKF: Reduce EKF-GSF vulnerability to large yaw gyro bias errors

* Update EKF/ekf_helper.cpp

* EKF: Fix comment typo

Co-authored-by: Roman Bapst <bapstroman@gmail.com>

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
Co-authored-by: Roman Bapst <bapstroman@gmail.com>
2020-06-02 17:42:54 +10:00
Matthias Grob d0ddda8917 tecs: fix typo init(i)alized 2020-05-29 20:03:22 +03:00
Kamil Ritz 86fc94b75a Remove tilt align from position innovation check 2020-05-25 11:12:24 +02:00
Mathieu Bresciani b024cdd282 unit test: check that the accel bias is only learned when observable (#827) 2020-05-25 11:10:01 +02:00
Paul Riseborough c91c78dcf6 EKF: Allow reset of yaw to EKF-GSF later in flight 2020-05-22 13:05:10 +03:00
Daniel Agar 600240d95f EKF: resetGpsAntYaw() fix double promotion 2020-05-20 12:44:18 -04:00
kamilritz 39c09b8092 add basic gps yaw fusion test 2020-05-20 08:52:52 +02:00
Kamil Ritz 21f49c22dc Use resetQuatStateYaw during gps yaw reset 2020-05-20 08:52:52 +02:00
Carl Olsson 7f21364844 EKF: use initial wind uncertainty with no airspeed sensor (#823) 2020-05-20 08:38:58 +02:00
kritz bf78044bcd EKF: fix initialization of local position validity 2 (#820)
The `_deadreckon_time_exceeded` flag is used in
`local_position_is_valid()`. This means that
`_params.valid_timeout_max` after startup, in my observed case 5
seconds, the local position switche from valid to invalid and then after
a while back to valid again.

With this fix, the local position is flagged invalid from boot and gets validated after the first aiding event.

Co-authored-by: Julian Oes <julian@oes.ch>
2020-05-20 08:24:23 +02:00
kritz 716caa5168 Refactor position resets (#822) 2020-05-19 21:53:46 +02:00
Mathieu Bresciani 37d9cef262 ekf: disable xy accel bias learning before takeoff (#818)
* ekf: disable xy accel bias learning before takeoff

As those biases are usually poorly observable before takeoff because
they are almost perpendicular to the gravity vector, learning is often
driven by noise and numerical issues. This results in incorrect bias
learning before takeoff when the drone is static on ground for a long
period of time.

* ekf: update unit test and change indicator
2020-05-19 18:02:40 +10:00
Mathieu Bresciani 9788c3bdf2 ekf: split accel bias learning in independant xyz components (#817)
This is a non-functional change required to select accel bias estimation
per axis selection. The intent is then to disable the learning before
takeoff of the components that are poorly observable.
2020-05-15 09:20:27 +02:00
Paul Riseborough 19bbea75c0 Fix GPS altitude not fused if GPS checks fail and GPS is primary height source (#813)
* EKF: Fix failure to select a height sensor

* EKF: Remove unnecessary check and improve documentation
2020-05-14 19:26:16 +10:00
kritz 24f2e60b7e Reduce stored strings, to save flash space (#815) 2020-05-13 08:09:26 +02:00
kritz 98801ad17b Support vision velocity expressed in body frame too (#708)
* Support vision velocity expressed in body frame

* Use switch statement for vision velocity frame

* Robustify vision velocity frame test

* Increase lower bound on vision velocity noise to 0.05 m/s
2020-05-12 16:03:35 +02:00
kritz c3de452e8e Remove duplicate code during vision yaw reset (#810) 2020-05-12 08:44:39 +02:00
Kamil Ritz b40adf3dec Refactor velocity resets 2020-05-12 08:05:32 +02:00
kritz 03191847f9 Fix ev_pos_obs_var(1) entry (#809) 2020-05-11 10:44:05 +02:00
Kamil Ritz 440383f039 Increase matrix library usage and remove white line 2020-05-11 09:09:52 +02:00
bresch 97b437233e ekf: remove unused function 2020-05-08 16:55:23 +02:00
bresch 26d4fbc000 EKF: reduce scope of variable and remove redeclaration of member 2020-05-08 16:55:23 +02:00
bresch edc8a88c24 yaw_fusion: remove useless initialization 2020-05-08 16:55:23 +02:00
bresch 75c49b2082 ekf_helper: fuse double if 2020-05-08 16:55:23 +02:00
bresch 0e3bf2872c EKFGSF_yaw: cleanup initialization of member variables 2020-05-08 16:55:23 +02:00
Matthias Grob 2bee0d078c Quaternion: refactor multiplication to matrix multiplication style
Most often the multiplication in convention descriptions and papers is
described in matrix multiplication style like this:
q · p := Q(q)p

Q(q) :=
[q0 −q1 −q2 −q3]
[q1 q0 −q3 q2]
[q2 q3 q0 −q1]
[q3 −q2 q1 q0]

I'm just rearanging the terms such that it's easily comparable with
these definitions additional to it being clearly described by
documenting we use the hamilton convention.
2020-05-06 13:17:02 +02:00
Daniel Agar 12835b999e cmake update CXX standard 11 -> 14
- this doesn't really change anything, just staying in sync with PX4/Firmware
2020-05-01 13:33:49 -04:00
Paul Riseborough cda7486897 EKF: Prevent yaw reset to GPS caused by loss of GPS data (#805) 2020-04-30 17:50:26 +10:00
kamilritz 8b6d665a13 Avoid subtraction of two uint 2020-04-27 10:17:01 +02:00
kamilritz 70d65ea55f Test:Increase GPS jump need for rejection 2020-04-25 10:11:01 +02:00
Kamil Ritz c19f40e574 Add reset position test for GPS and VISION 2020-04-25 10:11:01 +02:00
Kamil Ritz 78a6b9f7a8 SensorSimulator: Fix GPS horizontal position step 2020-04-25 10:11:01 +02:00
Kamil Ritz 050298f6c1 Improve matrix library usage 2020-04-25 10:11:01 +02:00
Kamil Ritz 5749273d19 refactor resetPosition 2020-04-25 10:11:01 +02:00
Paul Riseborough 8a9d961f0d EKF: Improve covariance prediction stability (#795)
* EKF: Improve covariance prediction stability

Eliminates collapse of vertical velocity state variance due to rounding errors that can occur under some operating conditions.

* EKF: Fix typo

* test: Fix initialisation test cases

Provide sufficient time for variances to stabilise and fix calculation of reference quaternion for alignment.

* test: Allow for accumulated rounding error in IMU sampling test

* test: Allow sufficient time for quaternion variances to reduce after initial alignment

* test: Increase allowance for tilt alignment delay and inertial nav errors

* test: Increase allowance for tilt alignment delay and inertial nav errors

* adpat reset velocity test

* test: update change indication file

* test: Adjust tests to handle alignment time and prediction errors

* README.md: Add documentation for change indicator test
2020-04-23 14:38:09 +02:00
Matthias Grob 65a4ca9d65 AlphaFilter: merge with PX4 implementation
I made a separate implementation of the same filter for PX4. Now
that I know it's duplicate I merge the two into one and reuse it.
2020-04-20 09:30:07 +02:00
Matthias Grob 1e033c4719 camke ctest: enable gtest colors 2020-04-20 09:30:07 +02:00
Kamil Ritz adacca099d test recording of velocity reset 2020-04-19 12:43:37 +02:00
bresch 30d69aa45b Ekf: extract baro height offset computation 2020-04-19 12:38:13 +02:00
bresch 6b64cf0770 Ekf: centralize GPS height fusion startup 2020-04-19 12:38:13 +02:00
bresch 61763544b6 Ekf: centralize baro fusion startup 2020-04-19 12:38:13 +02:00
kamilritz 6f383248ca update change indication 2020-04-13 20:34:41 +02:00
Kamil Ritz e52482501a Expand standalone mathlib double precision functions' usage 2020-04-13 20:34:41 +02:00
Kamil Ritz 1fa6870cd6 Perform geo.cpp's mathlib calls in double point precision 2020-04-13 20:34:41 +02:00
Kamil Ritz a013bb9314 Add test for gps projection & reprojections 2020-04-13 20:34:41 +02:00
kritz fa5a00d871 Refactor velocity reset (#788)
* Refactor velocity reset

* Add unit tests for velocity resets

* Expand updates to vertical buffer to velocity resets outside of resetHeight

* Improve matrix library usage

* Improve naming of vertical output samples

* Fix update of output_vert_new during reset

* Improve naming of vertical output samples 2
2020-04-08 16:39:15 +02:00
Daniel Agar 47624a0f02 EKF increase delta velocity process noise per axis if clipping (#663) 2020-04-08 08:51:51 +10:00
kamilritz d613055462 Add more assignment operators for slices 2020-04-07 09:12:17 +02:00
Kamil Ritz d6b6276cdc change naming from tiltOffset to pitchOffset 2020-04-04 12:48:52 +02:00
bresch 572ad2df0a SensorRangeFinder: add distBottom function to get the vertical distance 2020-04-03 11:01:23 +02:00
bresch a998da1781 terrain_estimator: initialize with valid delayed measurement 2020-04-03 11:01:23 +02:00
Mathieu Bresciani 0623b2b02d Range check cleanup (#782)
* EKF: centralize range finder tilt check

* Ekf-control: do not double check for terrain estimate validity

isRangeAidSuitable can only return true if the terrain estimate is valid
so there is no need for an additional check

* range_finder_checks: restructure the checks to avoid early returns

There is now only one clear path that can lead to the validity being
true.
Furthermore, if the _rng_hgt_valid is true, we can trust it and we don't
need for additional checks such as tilt.

The case where we need to provide fake measurements because the drone is
on the ground and the range finder data is bad is already handled
in "controlHeightFusion" so there is no need to hack the range finder
checks with that.

* Add Sensor and SensorRangeFinder classes

The purpose is to encapsulate the checks for each sensor in a dedicated
class with the same interface

* SensorRangeFinder: encapsulate in estimator::sensor namespace

* EKF: rename _sensor_rng to _range_sensor

* Range checks: include limits in valid range

* RangeChecks: update comment in the continuity checks

* RangeChecks: move more low-level checks in functions

Also move setTilt out of the terrain estimator, this is anyway protected internally
to not compute cos/sin if the parameter did not change.

* Sensor: remove unused virtual functions

Those are not required yet but can still be added later

* SensorRangeFinder: re-organise member variables

Also rename getRangeToEarth to getCosTilt

* SensorRangeFinder: split setSensorTilt and setCosMaxTilt functions

* SensorRangeFinder: Add a few unit tests

- good data
- tilt exceeded
- max range exceeded

* SensorRangeFinder: set hysteresis in us instead of ms

* SensorRangeFinder: Add more tests

* SensorRangeFinder: update continuity, hysteresis and stuck tests

* SensorRangeFinder: rename variables

* SensorRangeFinder: get rid of "delayed" specification

From the SensorRangeFinder class point of view, it's not relevant to
know if the data is delayed or not

* SensorRangeFinder: move time_last_valid out of stuck check

* SensorRangeFinder: rename file names to sensor_range_finder

* SensorRangeFinder: address Kamil's comments

* SensorRangeFinder: Add more tilt tests

* SensorRangeFinder: store current tilt offset

This is to avoid recomputing cos/sin functions at each loop
2020-04-03 08:28:07 +02:00
Paul Riseborough 544385fd8c EKF: Simplify centripetal accel correction (#789) 2020-04-01 13:36:56 +11:00
bresch 027db4bdbd Github Actions: update firmware docker repo 2020-03-30 13:25:00 +02:00
kamilritz 2fa43419d2 Interface: output vector quantities by "return-by-value" 2020-03-30 13:07:00 +02:00
kamilritz 72d8f91b4d Innovation getters: Add const modifier 2020-03-30 13:07:00 +02:00
Paul Riseborough 89b5c77d5d EKF: Enable GPS flight without magnetometer (#770)
* EKF: Enable GPS flight without magnetometer

Enables takeoff in a non-GPS flight mode with mag fusion type set to MAG_FUSE_TYPE_NONE. After sufficient movement the EKF will reset the yaw tot he EKF-GSF estimate. After that GPS fusion will commence.

* EKF: Fix unconstrained yaw and yaw variance growth when on ground

* EKF: Ensure first yaw alignment can't be blocked

* EKF: Increase yaw variance limit allowed for alignment

Flight test data indicates that an uncertainty value of 15 deg still provides a reliable yaw estimate and enables an earlier alignment/reset if required.

* EKF: Remove unexecutable code

* EKF: Restructure heading fusion

* EKF: parameterise quarter variance check and retune default value

* EKF: Pass by reference instead of pointer

* EKF: Clarify reset logic

* EKF: Remove incorrect setting of mag field alignment flag

* EKF: Non-functional tidy up

* EKF: Fix non-use of function argument

The updateQuaternion function was using the _heading_innovation class variable instead of setting it using the innovation argument.

* EKF: Fix undefined variable

* EKF: Use single precision atan2

* EKF: remove unnecessary timer reset and unwanted execution of reset function

* EKF: Don't declare a mag fault when non-use is user selected

Doing so produces unnecessary user alerts.
2020-03-30 20:05:38 +11:00
Mathieu Bresciani 3bd09fdcd3 EKF: fix range height sensor offset (#787)
The offset needs to be updated directly when switching to range height
2020-03-26 20:22:32 +11:00
Matthias Grob 976ada411b Matrix: min max comments and test style 2020-03-23 09:46:07 +01:00
Matthias Grob fa7153ecfb Matrix: omit min max nan case with same result
I observed this during review in
https://github.com/PX4/Matrix/pull/105/files#r348386226
2020-03-23 09:46:07 +01:00
TSC21 870ec380f1 elk_helper: use ISFINITE macro instead of isfinite() 2020-03-20 22:42:46 +01:00
bresch 20c3db69e4 Terrain Est: Add sensor aiding bitmask
This adds the ability to select range finder and/or optical flow fusion for
terrain estimate.
2020-03-19 17:53:30 +01:00
bresch f38388cdab YawEst: simplify AHRS accelerometer gain computation
Replace the multiple if-else statements by a generic equation.
- For a multicopter, the attenuation factor is 2 and symmetrical
- For a fixedwing, the attenuation factor is 1 if the acceleration is
positive and that centripetal correction is available and 2 otherwise.

Note that the function "sq" needs to be const in order to be used in a
const function.
2020-03-18 17:45:13 +01:00
CarlOlsson ee5e3c479b ekfgsf: fix formatting 2020-03-18 08:34:02 +01:00
Mathieu Bresciani f20fc08b7d ekf2: centralize mag covariance reset (#693)
* ekf2: centralize mag covariance reset. A complete and clean reset of the
mag states covariances is now performed through the "resetMagCov"
function only. This avoid having slight differences of implementations
across the code.

* Ekf: reset quat cov with initial uncertainty instead of zero
2020-03-17 20:07:20 +11:00
Daniel Agar f1aa53db8a delete attitude_fw (merged into PX4/Firmware)
- this was never maintained as a separate standalone project
 - https://github.com/PX4/Firmware/pull/14284
2020-03-15 13:36:27 -04:00
Matthias Grob a32892926c Matrix: capture stdout for print() test
I want to switch the print() function back to use printf()
such that it's fully compatible with all (embedded) platforms.

To still test the print function I'm capturing stdout into a file
such that the print() function can stay unchanged and the result of
the printf()s can be evaluated.
2020-03-12 13:24:08 +01:00
Matthias Grob c6db357c92 Matrix: correct print buffer size prediction
Apparently printf of %8.8g can result in
8 significant digits + dot + scientific notation e.g. "e+12" = 14 bytes
2020-03-12 10:08:04 +01:00
Matthias Grob 2cca35c8fe AxisAngle: call q.imag().norm() for conversion
This is important depending on the platform because norm()
calls matrix::squrt() which dispatches correctly to the implementation
for the used type. Otherwise float squrt()s can get calculated as
double.
2020-03-12 07:35:44 +01:00
kamilritz 975060d108 Add missing const modifier 2020-03-11 16:46:16 +01:00
kamilritz 7e20d9df14 Small style cleanup 2020-03-11 16:46:16 +01:00
Daniel Agar 580118e366 EKFGSF_yaw::updateEKF() R_prev copy safely (#775)
* EKFGSF_yaw::updateEKF() R_prev copy safely

* only copy required values (first 3)
2020-03-11 15:49:45 +01:00
kritz 9390d2065b Run github actions also on master branch (#774) 2020-03-10 20:24:29 +01:00
bresch d09473da89 Ekf control: do not set hgt mode if already set
If we are in a certain height mode and that we do a reset to the
same mode, there is no need to set the mode again.
2020-03-09 20:22:57 +01:00
bresch 13a7d53295 Ekf: correct wrong indentation 2020-03-09 20:22:57 +01:00
bresch 684737eab1 Ekf control: replace individual by global check of baro/GPS health
Use _gps_data_intermittent and _baro_hgt_faulty to know is the sensors
provide fresh data
2020-03-09 20:22:57 +01:00
bresch 320a90d146 EKF control: extract checkVerticalAccelerationHealth logic
This is done to reduce the size of the controlHeightSensorTimeouts
function and to clarify the logic
2020-03-09 20:22:57 +01:00
bresch 975afa6560 EKF: update csv for change indicator 2020-03-09 19:10:07 +01:00
CarlOlsson 93be6ea49a EKF: dont print wrong reset message on baro timeout
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2020-03-09 09:06:49 +01:00
kritz bcd3869ca2 CleanUp of the EKFGSF (#769)
* Add const modifiers

* Pass imu data as sampe

* Remove emergency reset request counter

* Improve matrix library usage

* Indentation fix

* Do not store innovation matrix for each model

* Make weights a separate vector

* EKF: Add missing alignment transfer to AHRS solutions

* EKF: Replace #define constants with static constexpr

* EKF: Move declaration for weights into GSF section

* EKF: Fix documentation error

Co-authored-by: Paul Riseborough <p_riseborough@live.com.au>
2020-03-06 19:37:35 +11:00
Paul Riseborough 4669aa6312 EKF: Add Emergency yaw recovery using EKF-GSF estimator (#766)
* EKF: Use common rate vector calculation for offset corrections

* EKF: Remove duplicate matrix entry calculations

* EKF: Create a EKF-GSF yaw estimator class

* EKF: add emergency yaw reset functionality

* EKF: remove un-used function

* EKF: Ensure required constants are defined for all builds

* EKF: Fix CI build error

* Revert "EKF: remove un-used function"

This reverts commit 93005309c7f3794414ad99c86218b3062e00bbd3.

* EKF: Replace in-lined Tait-Bryan 312 conversions with function call

Also remove unnecessary operations

* EKF: Remove unnecessary update of external vision rotation matrix

* EKF: Use const

* EKF: use const

* EKF: don't use class variable as a temporary variable

* EKF: update comments

* EKF: Improve efficiency of yaw reset

Use conversion from rotation matrix to Euler angles instead of quaternion to euler angles.

* EKF: use const

* EKF: remove un-used struct element

* EKF: more descriptive function name

* EKF: use existing matrix row operator

* EKF: remove unnecessary rotation matrix update

* EKF: Use square matrix type

* EKF: Improve protection for bad innovation covariance

* EKF: Use matrix library operations

* EKF: Replace memcpy with better alternative

memcpy bypasses compiler sanity checks and is unnecessary in this instance.

* EKF: Split EKF-GSF yaw reset function

Adds a common function to support yaw reset that can be used elsewhere.

* EKF: Use common function for quaternion state and covariance yaw reset

* EKF: Replace inlined matrix operation

* EKF: Use const

* EKF: Change accessor function name

* EKF: Use const

* EKF: Don't create unnecessary duplicate variable locations

* EKF: Remove duplicate covariance innovation inverse

* EKF: Don't create unnecessary duplicate variable locations

* EKF: Rely on geo library to provide gravity

* EKF: Improve protection from bad updates

* EKF: Reduce effect of vibration on yaw estimator AHRS

* EKF: Improve yaw estimator AHRS accuracy during manoeuvre transients
2020-03-05 21:50:52 +11:00
Paul Riseborough 8ce285cdfa EKF: Don't allow tilt alignment if vehicle is moving excessively (#768)
Also remove unnecessary update of the _accel_lpf after alignment.
2020-03-05 21:42:45 +11:00
Mathieu Bresciani 230c865fa9 EKF: do not fuse multiple times the same height (#767)
* EKF: do not fuse multiple times the same height

The _fuse_height flag was never set to zero, hence the fusion was called
at each iteration, even if no new data is available.
The effects were: high CPU usage and virtually less measurement noise
due to multiple fusion of the same sample

Also remve unused variables
2020-03-04 10:31:22 +01:00
kritz 4873dc1c1e Analytic inverse implementation (#122)
* Add analytic 2x2 matrix inverse

* Add analytical 3x3 matrix inverse
2020-03-04 09:14:04 +01:00
Paul Riseborough b4ecfb7723 EKF: Fix sign error in earth rotation rate correction (#763)
* EKF: Fix sign error in earth rotation rate correction

Addresses issue https://github.com/PX4/ecl/issues/759

* Update change indication output

Co-authored-by: kritz <kritz@ethz.ch>
2020-03-03 20:16:49 +01:00
Daniel Agar 4fab6057a7 EKF control height fusion add switch statement for all dist sensor types 2020-03-03 11:29:07 +01:00
Kamil Ritz 7c179b39b8 Make test with Clang 2020-03-03 11:23:45 +01:00
Carl Olsson 3fa5f501ae EKF: dont check gps_check_fail_status in velocity reset (#761)
In a velocity reset we only used the GPS measurement if _gps_check_fail_status.value was equal to zero. The value of this flag is independent of EKF2_GPS_CHECK so checks can fail even if they are not configured to have any effect.
2020-02-27 11:59:38 +01:00
Julian Kent 649c837b6b Use faster but less accurate average 2020-02-25 15:08:17 +01:00
Daniel Agar 71d4d22ae4 EKF: covariances() helper return const reference and fix code style
- PX4 astyle puts the reference with the name.
2020-02-21 11:28:44 -05:00
bresch 8b918563a2 ekf: fix angle wrapping in realignYawGPS
To obtain the correct difference between two angles, we need to wrap
the result between -pi and pi. Otherwise, the difference between two
angles close to 180 degrees but with opposite signs will produce a large
error.
For example if a = -179 and b = 179, b - a = 258 instead of -2 degrees
2020-02-21 13:08:30 +01:00
Daniel Agar 00872fcaa3 EKF: ImuDownSampler pass imuSample as const reference
- inline ImuDownSampler::getDownSampledImuAndTriggerReset()
 - minor formatting and initialization cleanup
2020-02-18 13:20:52 -05:00
bresch 81c6d6655f ekf: clean uncorrelateQuatStates function
As the name can be ambiguous, it gets renamed
"uncorrelateQuatFromOtherStates".
Also replace the loops storing the values and reapplying them by simply
zeroing two slices (this also saves 130B of flash).
2020-02-13 14:33:32 +01:00
Julian Kent c6d5a74685 Update change indicator 2020-02-12 22:34:44 +01:00
bresch 05d391c785 Update test csv after functional fix 2020-02-12 22:03:22 +01:00
bresch 90ca012705 ekf_helper: restore oridinal quaternion decorrelation
The intent of the function "uncorrelateQuatStates()" is to uncorrelathe quaternions from the other states but not between each other as they are and should remain linked alltogether.
Clearing the quaternions to quaternion covariances introduced unstabilities in other states (especially accel biases).
2020-02-12 22:03:22 +01:00
CarlOlsson b6420d0b79 ekf: add vehicle at rest to flags 2020-02-12 18:58:24 +01:00
Paul Riseborough 89bcebd631 EKF: Prevent covariance initialisation overwriting yaw variance
Also typo fix
2020-02-05 15:20:34 +01:00
Paul Riseborough a3347b7e06 EKF: Use more conservative value for delta velocity bias process noise
Smaller values have resulted in bias estimation divergence under some conditions
2020-02-05 15:20:34 +01:00
Paul Riseborough 21054a4236 EKF: Fix bug causing incorrect covariance initialisation
The covariance initialisation should not be performed before the quaternion states are initialised.
2020-02-05 15:20:34 +01:00
Daniel Agar ed260c4f1d validation: remove unused vibration metric 2020-02-04 23:37:05 -05:00
kritz e52e2b88ed Sensor Replay (#717)
* Add primitive logging for Ekf

* Add python script to extract sensor data from ULog

* Add primitive sensor replay

* Add iris_gps data for sensor replay

* Add CI for functional change indication

* Update sensor replay flow data type

* update iris_gps_change indication

* test: Update EKF replay test documentation

Co-authored-by: Paul Riseborough <priseborough@users.noreply.github.com>
2020-02-01 20:41:12 +11:00
kamilritz da752c9e30 Hot flow fusion fix 2020-01-28 17:19:51 +01:00
kritz ee859e092a Robustify timestamp checks (#729)
* Robustify timestamp checks

* Remove lowerbound on sensor timestamp

* Add tests for fusion timeouts

* Inline and const time check functions

* Rename dead_reckoning time variable
2020-01-28 20:33:16 +11:00
kamilritz f20726d47f Expand auto-format coverage and tiny style changes 2020-01-27 16:54:25 +01:00
kritz fbdd75da2e Update CONTRIBUTING.md
Co-Authored-By: Roman Bapst <bapstroman@gmail.com>
2020-01-27 10:42:17 +03:00
kamilritz 5d38b73072 Update description of Firmware build tests 2020-01-27 10:42:17 +03:00
bresch e3af91c9ce Ekf: use helper functions to centralize the checks of horizontal aiding (gps, flow, ev_pos, ev_vel) 2020-01-24 17:22:50 +04:00
kamilritz a3e1eb9d50 Checkout to matching firmware if possible 2020-01-24 16:18:42 +03:00
kamilritz f3d790a664 Update optical flow interface 2020-01-24 16:18:42 +03:00
RomanBapst cafb1400fb estimator_interface: bugfix, set range sample correctly
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-01-24 13:03:04 +01:00
kamilritz df37c9bf1d First draft of the contribution guidelines 2020-01-24 09:31:49 +01:00
kamilritz 4b0e7b2cff Remove filtering on external vision alignment 2020-01-24 08:23:12 +01:00
kamilritz 2fe16c4ffe Update build instructions in readme 2020-01-24 09:03:48 +03:00
kamilritz d63e4edfd8 Fix github actions 2020-01-23 16:31:42 +01:00
kamilritz de33885658 Update setExtVisionData interface 2020-01-23 14:50:43 +01:00
kritz ed916c8006 Auto Formatting with clang-format-6.0 (#727)
* Add clang-format

* Auto-format AlphaFilter and RingBuffer

* Update to tab=8spaces

* Allow for 120 width
2020-01-23 20:56:10 +11:00
CarlOlsson dbf0bd43e8 EKF: update wind covariance initialization
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2020-01-23 10:27:54 +11:00
kamilritz 37201fb071 Remove legacy imu interface 2020-01-23 09:34:07 +11:00
kamilritz 7c3a2f839b Update range finder interface 2020-01-23 09:34:07 +11:00
kamilritz 4fb2d1b02e Update range finder interface 2020-01-23 09:34:07 +11:00
kamilritz 9f0d8ed59e Update mag interface 2020-01-23 09:34:07 +11:00
kamilritz 856961ba85 Update airspeed interface 2020-01-23 09:34:07 +11:00
kamilritz b8a3ed5f09 Update baro interface 2020-01-23 09:34:07 +11:00
kamilritz 74ec80cdc7 Update gps interface 2020-01-23 09:34:07 +11:00
Paul Riseborough a19c29e708 EKF: Rework yaw fusion to remove singularity at +-90 deg yaw 2020-01-23 09:23:56 +11:00
kamilritz fc7e8b848b Run github actions also on PRs from forks 2020-01-22 09:47:19 +01:00
kamilritz 29cf7884c3 Test baro downsampling 2020-01-21 10:09:48 +03:00
kamilritz b51ea4fe39 Test dynamic pressure compensation
(cherry picked from commit b3d9334b5abe02f1d123519cfc74a875225eb0bd)
2020-01-21 10:09:48 +03:00
kamilritz 83b2abe434 protect against overflow 2020-01-21 10:09:48 +03:00
kamilritz 4be9ae8029 Compute the timestamp of average sample correctly 2020-01-21 10:09:48 +03:00
kamilritz 29c5954690 Move baro downsampling and dynamic pressure comp to ECL 2020-01-21 10:09:48 +03:00
kamilritz d7d7b56519 Move mag down sampling to ECL lib 2020-01-21 09:36:02 +03:00
Matthias Grob 950e75e484 EKF_ringbuffer: minor missing space for style 2020-01-18 13:00:36 -05:00
kamilritz 26125c245d Switch from jenkins to github actions 2020-01-17 11:02:57 -05:00
Dusan Zivkovic 011b4c2e4e data_validator_group: add a method to get the state of the sensor with the provided index 2020-01-15 12:20:47 -05:00
bresch 0f4439d281 optical flow: inhibit flow fusion only when the terrain estimate gets invalid 2020-01-15 16:07:17 +11:00
bresch d06dc33ded range_finder_checks: do not override range_hgt_valid flag with rng_stuck flag
Thif fixes the issue where the range finder data is always set to valid
if not stuck.
2020-01-15 16:07:17 +11:00
bresch d0fe1f032a mag_fusion: re-introduce delay between mag reset and fusion, this was
dropped during the mag fusion refactor PR #662
2020-01-15 14:40:06 +11:00
Daniel Agar 250d5b8acc TECS: remove height rate complementary filter 2020-01-15 14:28:36 +11:00
kamilritz 8f70a10565 Added missing variable initializations 2020-01-14 15:16:25 +03:00
kamilritz 5b02310f43 Test Airspeed fusion 2020-01-14 15:16:25 +03:00
kamilritz 7ed6a437c7 Add airspeed sensor to sensor_simulator 2020-01-14 15:16:25 +03:00
kamilritz a37b91c96a Type cast remaining integer 2020-01-13 12:21:18 +01:00
Tom Wang 4044abdd20 fixed output state variable name state_variance to state_variances 2020-01-10 19:57:39 +05:30
kamilritz cd9e81539c Expand IMU Down Sampling tests 2020-01-09 19:43:29 +11:00
kamilritz de58ab9167 inline newly added function save 60Bytes 2020-01-09 19:43:29 +11:00
kamilritz be11516dd6 Refactor IMU downsampling into its own class 2020-01-09 19:43:29 +11:00
kamilritz c7e074276f Save flash space
This commit saves roughly 400-500 Bytes in flash space
2020-01-09 19:43:29 +11:00
kamilritz 94484f01ce save flash space 2020-01-08 14:36:03 +01:00
kamilritz 1b0e137b8a Test external vision 2020-01-08 14:36:03 +01:00
kamilritz 84dcb32bd8 Extend auxVel interface to support 3d velocity 2020-01-08 14:36:03 +01:00
kamilritz 07e8e88e88 Support full vision variance 2020-01-08 14:36:03 +01:00
kamilritz 4ab3dd50c9 pass Vector by const reference 2020-01-08 09:00:31 +01:00
kamilritz 2657e4fc0c Improve naming and white space 2020-01-08 09:00:31 +01:00
kamilritz db73a06620 Use robust AxisAngle constructor 2020-01-08 09:00:31 +01:00
kamilritz 1fcfd394dd Various small non-functional improvements 2020-01-08 09:00:31 +01:00
kamilritz deeac03d6a Clean up height reset logic booleans 2020-01-08 09:00:31 +01:00
kamilritz cec6d76577 Raise awareness for drag variance(!=stdDev) bug 2020-01-08 09:00:31 +01:00
kamilritz 0b18143745 Improve readibility 2020-01-08 09:00:31 +01:00
kamilritz 3daf25763e Remove unnecessary comments 2020-01-08 09:00:31 +01:00
kamilritz 36da8d82c8 Clean up white space 2020-01-08 09:00:31 +01:00
kamilritz 48787c0160 Improve Matrix library usage 2020-01-08 09:00:31 +01:00
kamilritz a21a7cd5b9 Remove output argument from calcEarthRateNed 2020-01-08 09:00:31 +01:00
kamilritz 9e6d27fafb Add missing const qualifier 2020-01-08 09:00:31 +01:00
kamilritz 066392ef02 Improve naming 2020-01-07 08:14:59 +11:00
kamilritz f99dbd8ca3 Improve naming and brackets 2020-01-07 08:14:59 +11:00
kamilritz 1c68709949 Rename mag ambiguous mag abbreviations with magnitude 2020-01-07 08:14:59 +11:00
kamilritz a24aaad861 CleanUp GPS drift checks 2020-01-07 08:14:59 +11:00
kamilritz c6e3f389d2 Replace calculation of earth NED rotation vector 2020-01-07 08:14:59 +11:00
kamilritz 9f053cb8c1 Simplify covariance getters 2020-01-02 19:26:57 +11:00
Paul Riseborough 0d0f46ec1c EKF: Don't run unnecessary makeRowColSymmetric operation
This operation is expensive when done to the whole covariance matrix and unnecessary after covariance prediction because we calculate the upper diagonal and copy across so it is already symmetric.
2020-01-02 19:26:57 +11:00
Paul Riseborough 166d260058 EKF: Provide auto-code output that uses (row, col) syntax for covariance matrix 2020-01-02 19:26:57 +11:00
kamilritz 92ba618f57 Improve on flash memory usage 2020-01-02 19:26:57 +11:00
kamilritz 459b76f9fd Make covariance matrices of type matrix::SquareMatrix
and use functions from Matrix to reset covariances.
2020-01-02 19:26:57 +11:00
Lorenz Meier a4a694dd87 Disable Coverage option until GCC9 is default
This would simplify coverage builds, but is not widely available yet.
2020-01-01 17:03:04 +01:00
Lorenz Meier 3b581fb599 Update .travis.yml
Bring Ubuntu and Mac OS toolchains to latest.
2020-01-01 15:53:50 +01:00
Lorenz Meier efa5580a67 Update CMakeLists.txt
Remove non-compatible compile option.
2020-01-01 15:53:50 +01:00
Lorenz Meier 3d3267ed1f Fix CMake configuration for coverage tests on Mac OS 2020-01-01 13:50:25 +01:00
Daniel Agar 57144beb98 gitignore update for in tree cmake builds 2019-12-31 11:18:53 -05:00
Lorenz Meier 20a9e91d44 Fix CMake configuration for coverage tests on Mac OS 2019-12-31 15:54:51 +01:00
kritz d18be0d0fa Fix AngleAxis constructors (#117) 2019-12-28 17:18:15 -05:00
kritz e81483a808 Catch quaternion canonical corner cases (#116) 2019-12-18 14:12:47 +01:00
kamilritz 490c749f80 Revert if statement swap in resetMagHeading 2019-12-18 10:06:31 +01:00
kamilritz a6bbafc7b0 Remove unnecessary initialiseCovariance
It is already called in reset()
2019-12-18 09:46:32 +01:00
kamilritz ef9f1053d0 Random improvements 2019-12-18 09:46:32 +01:00
kamilritz 7d3814b1d8 Add orientation initialization tests 2019-12-18 09:46:32 +01:00
kritz 01495ede97 Clean initialiseFilter function (#687)
* Clean initialiseFilter

* Add const qualifiers
2019-12-17 13:36:28 +01:00
kritz 532c9abd4a Expand test framework and test cases (#685)
* Fix comment

* Ekf wrapper for testing

Add utility function for accessing information in the ekf object

* Add step function for Gps sensor

* Add RangeFinder and Flow to simulated sensors

* Add first fusion logic tests

* Add units to function name

* Use EXPECT_TRUE

* Adding missing qualifiers

* Improve EXPECT_ calls

* Improve naming
2019-12-17 11:35:45 +01:00
kritz 6c25ac5731 Tilt Initialisation: Average Filter -> LowPass Filter (#686)
* Tilt Initialisation: Average Filter -> LowPass Filter

* Add _is_first_imu_sample variable

* Remove not needed comments
2019-12-17 11:01:25 +01:00
Daniel Agar 98a1aae494 EKF: use Matrix cross product 2019-12-17 09:35:08 +01:00
kamilritz 0831c158f2 Move time update to sensor base class 2019-12-16 13:40:01 +01:00
kamilritz 1832bedd13 run_seconds 2019-12-16 13:40:01 +01:00
kamilritz 39b369d90b make ekf a shared pointer 2019-12-16 13:40:01 +01:00
kamilritz f13f2f8452 use shared pointer 2019-12-16 13:40:01 +01:00
kamilritz 00cd720a66 Change folder name 2019-12-16 13:40:01 +01:00
kamilritz b9dd1e54c5 Change file names 2019-12-16 13:40:01 +01:00
kamilritz 2d2edd90e3 ECL Unit Test Clean Up 2019-12-16 13:40:01 +01:00
kamilritz 6b25dbd6c7 SensorSimulator 2019-12-16 13:40:01 +01:00
kamilritz 85e0e6e89c Remove resetStates(AndCovariances) function 2019-12-13 16:50:56 +01:00
kamilritz 64652f523b Improve quality of comments 2019-12-12 08:48:10 +01:00
kamilritz 1bf09fd370 Remove EKF prefix from logged messages 2019-12-12 08:48:10 +01:00
kamilritz 88c4929c96 Use helper function to switch to gps height 2019-12-11 17:23:45 +02:00
kamilritz 042d9b6615 Remove dangerous _primary_hgt_source variable 2019-12-11 17:23:45 +02:00
kamilritz 66f707ede0 Remove non enterable if statement 2019-12-11 17:23:45 +02:00
kamilritz cd030e7cd2 Remove switch to ev hgt during filter initialization 2019-12-11 17:23:45 +02:00
kamilritz 4bc6ae69ae Remove if statement that can not be entered 2019-12-11 17:23:45 +02:00
kamilritz 6941777e17 Remove obsolete vision sample counter during initialization 2019-12-11 17:23:45 +02:00
kritz 4f3565da94 Add asserts (#115)
* Add asserts

* Type cast literals

* asserts for indexing vectors

* include assert

* Fix accessing elements outside of slice
2019-12-09 10:21:27 +01:00
kritz 2f6398168d Add several functions that are useful for coavriance matrices: (#114)
* uncorrelateCovariance
	* uncorrelateCovarianceSetVariance
	* makeBlockSymmetric
	* makeRowColSymmetric
	* isBlockSymmetric
	* isRowColSymmetric
2019-12-06 12:03:26 +01:00
kritz 5cbcf6035a Set Matrix's col amd row to single value (#113) 2019-12-05 18:16:14 +01:00
kritz ef442fab92 Getter function for the diag elements of slice (#112) 2019-12-05 11:39:21 +01:00
kamilritz 181303488c Log height innovation sensor specific 2019-12-05 20:09:34 +11:00
kamilritz f32fce28a3 Fix gps vertical observation variance 2019-12-05 20:09:34 +11:00
kamilritz ecd199d5d0 Fix vel pos test ratio 2019-12-05 20:09:34 +11:00
kamilritz 2df2dede2f Fix variance vs stdDev bug
(cherry picked from commit 0faea89da2a3326d070a6ecca93ec52ec3e29591)
2019-12-05 20:09:34 +11:00
kamilritz 3923c5fecb Add get*innovation* functions as overide 2019-12-05 20:09:34 +11:00
kamilritz 07e804676c Rename IMU biases 2019-12-05 20:09:34 +11:00
kamilritz dae8c2f8dc Group velocity and position as a 3d vector 2019-12-05 20:09:34 +11:00
kamilritz beedf1ce4f Add print statement to reset vel or pos function 2019-12-05 20:09:34 +11:00
kamilritz 5c038a3b43 Add stop*Fusion function 2019-12-05 20:09:34 +11:00
kamilritz d5dc6bb8ea Clean get*innov* interface 2019-12-05 20:09:34 +11:00
kamilritz 86b9079bdc Refactoring velPos fusion 2019-12-05 20:09:34 +11:00
kritz de6a2d31ff Slice assign value (#111)
* Assign value to slice

* Readme for formatting
2019-12-04 14:33:33 +01:00
Daniel Agar a8009a36a3 Quaternion multiply inline return 2019-11-29 14:40:11 -05:00
Daniel Agar dba84236cb Vector3f cross product directly return result (#109) 2019-11-28 10:36:13 +01:00
Matthias Grob de85dcff97 Vector: switch read only functions to const (#108) 2019-11-26 13:46:45 +01:00
bresch 6b5f011bc2 ekf: use PDOP instead of GDOP as the TDOP (part of GDOP) is usually not available
PDOP is the position dillution of precision and is given by sqrt(VDOP^2+HDOP^2)
2019-11-25 17:18:40 -05:00
Daniel Agar 362a2dfa08 remove unnecessary <cmath> include 2019-11-22 11:16:51 -05:00
RomanBapst 33a2bd0292 added python script for derivation of initial wind covariance matrix
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-11-20 16:28:34 +11:00
Julien Lecoeur a172c3cdac Add implementation of pseudo-inverse (#102)
* Fix compilation error

* Add implementation of pseudo-inverse

The implementation is based on this publication:
Courrieu, P. (2008). Fast Computation of Moore-Penrose Inverse Matrices, 8(2), 25–29. http://arxiv.org/abs/0804.4809
It is a fully templated implementation to guaranty type correctness.

* Add tests for pseudoinverse

* Apply suggestions from code review

Co-Authored-By: Mathieu Bresciani <brescianimathieu@gmail.com>

* Adapt fullRankCholesky tolerance to type

* Add pseudoinverse test with effectiveness matrix

* Fix coverage

* Fix rebase issue

* Fix SquareMatrix test, add null Matrix test
2019-11-18 14:36:30 -08:00
Daniel Agar cd185c995b add braces around statements and cleanup formatting (#107) 2019-11-13 10:41:38 -08:00
kritz 38e966cea1 Add min, max, constrain function for Matrix (#105)
* Add min, max, constrain function for Matrix

* Set individual elements to nan in constrain

* Deal with NANs
2019-11-12 18:57:12 +01:00
bresch 811ec81246 parameters: change check_mag_strength from bool to int32_t to comply with the standard interface 2019-11-11 15:29:52 +01:00
kritz 93d42947b6 Add test for setting Quaternion to Identity (#104) 2019-11-08 17:27:33 +01:00
Mathieu Bresciani c7bdf25663 [ekf] controlMagFusion refactor and mag field strength check (#662)
* ekf_control: Inhibit mag fusion when field magnitude is large
Move mag inhibition check in separate function

* ekf_control: pull out of functionalities out of controlMagFusion
- yaw abd mag bias observability checks
- mag 3D conditions
- load mag covariances
- set and clear mag control modes

* ekf_control: refactor mag heading/3D start/stop.
Move mag declination, mag 3d and mag heading fusion out of the main function

* ekf_control: extract mag yaw reset and mag declination fusion requirements

* ekf_control: use WMM in isStronMagneticField for mag fusion inhibition
- Correct units of WMM strength table

* ekf_control: extract mag_state_only functionality of AUTOFW (VTOL custom)
Also split inAirYawReset from onGroundYawReset

* ekf_control: extract mag automatic selection
- transform if-else into switch-case for parameter fusion type selection

* ekf_control: extract run3DMagAndDeclFusion, reorganize functions, fix
flag naming in Test script

* ekf_control: do not run mag fusion if tilt is not aligned.
Reset some variables on ground even if mag fusion is not running yet. It
could be that it runs later so we need to make sure that those variables
are properly set.

* ekf_control: move controlMagFusion and related functions to mag_control.cpp

* ekf control: check for validity of mag strength from WMM and falls back
to average earth mag field with larger gate if not valid

* ekf control: remove evyaw check for mag inhibition

* ekf control: change nested ternary operator into if-else if

* Ekf: create AlphaFilter template class for simple low-pass filtering
0.1/0.9 type low-pass filters are commonly used to smooth data, this
class is meant to abstract the computation of this filter

* ekf control: reset heading using mag_lpf data to avoid resetting on an outlier
fixes ecl issue #525

* ekf control: replace mag_states_only flag with mag_field_disturbed and
add parameter to enable or disable mag field strength check

* ekf control: remove AUTOFW mag fusion type as not needed This was implemented for VTOL but did not solve the problem and should not be used anymore

* ekf control: use start/stop mag functions everywhere instead of setting the flag

* ekf control: Run mag fusion depending on yaw_align instead of tilt_align
as there is no reason to fuse mag when the ekf isn't aligned

* AlphaFilter: add test for float and Vector3f
2019-11-08 16:02:59 +01:00
bresch a6840655e8 ekf: Extract resetState from main reset and reinitialize
the covariances in the init function
2019-11-05 09:07:25 +01:00
bresch bf48004fb9 ekf: move "reset" part of the init function into a separate function
add getter for the vehicle at rest flag
2019-11-05 09:07:25 +01:00
Julian Kent 9f46483951 Fix GCC-4.8 bug 2019-11-04 11:11:30 -05:00
TSC21 7eb9118673 Jenkins: update container tags; use px4-dev-base-bionic 2019-11-03 10:29:15 -05:00
kamilritz d76b704225 Only inlcude gtest if standalone build 2019-11-02 09:46:18 -04:00
Julian Kent 445f58d484 Fix weird C preprocessor conflicts (#101) 2019-11-01 14:23:35 +01:00
kamilritz 7c1e38d3ad Make it build with Firmware 2019-10-28 11:04:38 +01:00
kamilritz d79199c863 Remove swig and python test related things 2019-10-28 11:04:38 +01:00
kamilritz d88e242a60 pytest are replaced in gtests 2019-10-28 11:04:38 +01:00
kamilritz 71be26efc6 Port RingBuffer Test to GTests 2019-10-28 11:04:38 +01:00
kamilritz cac5f3fd6d GTest and Coverage cleanup and Basic EKF GTest 2019-10-28 11:04:38 +01:00
Martina Rivizzigno fcea13eef8 add gtest, temp disable swig
(cherry picked from commit 4008d163d77f503e6acbd7ddc1d87ac6d479c897)
2019-10-28 11:04:38 +01:00
RomanBapst 9b4b24ee71 removed unused definition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-10-24 07:55:37 +11:00
RomanBapst 0e3a0b8659 range_finder_checks: parametrised signal quality hysteresis duration
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-10-24 07:55:37 +11:00
RomanBapst 16d1e15b51 addressed review comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-10-24 07:55:37 +11:00
RomanBapst 6bc6f26043 range_finder_checks: set range height to valid if signal quality is non-zero
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-10-24 07:55:37 +11:00
RomanBapst 6299d8199c ekf_helper: use latest validated range sample to reset height
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-10-24 07:55:37 +11:00
RomanBapst 00f49e62c2 cleanup checks of range finder data
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-10-24 07:55:37 +11:00
Paul Riseborough 4d37065f1b EKF: Make use of inverse rotation function consistent with name
The quaternion to inverse rotation matrix function has been updated so that the rotation it produces is the inverse to that produced by the matrix library and the the inverse of the quaternion is uses. This function is now used to directly calculate an inverse rotation matrix rather than calculating the forward rotation and then transposing it.
2019-10-23 14:44:08 +03:00
Paul Riseborough 36de2b3dc1 EKF: Use matrix library for quaternion to rotation matrix conversion 2019-10-23 14:44:08 +03:00
Julian Kent 215203fc6f Automatic Differentiation 'Dual' Type (#100)
* Dual numbers initial implementation

* Add test coverage, with partial derivative example

* Add Jacobian test, fix small issues

* Improve test to demonstrate non-square jacobian

* Better naming for collectReals/Derivatives

* Improve comments

* Potential GCC 4.8 bug workaround

* Add fallback workaround for non-IEEE float platforms
2019-10-23 12:07:51 +02:00
bresch 1a4ab069c9 rate controller: add override specifiers whenever needed 2019-10-22 09:12:19 -04:00
bresch 29f71fff96 ekf: Add override specifier for all functions that override virtual functions of the estimator interface class 2019-10-22 09:12:19 -04:00
bresch 50167bfbcf estimator interface: add deprecated functions for backward compatibility 2019-10-22 20:19:56 +11:00
bresch b38458c2ab Terrain estimator: formatting and remove redundant comments 2019-10-22 20:19:56 +11:00
bresch 0aef0eda59 terrain_estimator: remove dead code. Since the terrain estimator is
constantly reset on ground, it is not necessary anymore to fuse fake
measurements on ground if the range measurements are bad.
2019-10-22 20:19:56 +11:00
bresch 370e04ee60 terrain_est: Continuously reset terrain height on ground using known
clearance. This is the best estimate as we should not rely on a distance
sensor while on the ground. This also helps when the drone is carried
over as it avoids starting with a crazy downward distance for optical
flow scaling.
2019-10-22 20:19:56 +11:00
bresch e09e3e17a1 control: rename _range_aid_enabled to _is_range_aid_suitable
rename rangeAidConditionsMet to checkRangeAidSuitability
2019-10-15 11:10:36 +02:00
bresch fac69d07a3 control: refactor rangeAidConditionsMet function 2019-10-15 11:10:36 +02:00
Paul Riseborough eae6e8f19c EKF: Fix on ground yaw drift when using EKF2_MAG_TYPE = 4 2019-10-08 20:08:42 +11:00
RomanBapst 4e946d5bcb implemented synthesized magnetometer Z measurement
- calculate a theoretical value based on the knowledge of the direction
and strength of the magnetic field vector and X/Y sensor measurements
- needs knowledge about location on earth to work
2019-10-08 20:02:16 +11:00
Julian Kent 92d1c8761e More features: longerThan, norm, copyTo and slice on a Slice (#97)
* Allow slices of slices, add longerThan to Vector/Slice
2019-10-03 13:47:36 +02:00
Matthias Grob 740324cf1e Make all array constructors explicit (#99)
* Make all array constructors explicit

to avoid accidental implicit casts like e.g.
Vector3f v = 0;
assigning nullpointer content.
2019-10-03 13:38:51 +02:00
Julian Kent 7b34c1c51d Enable branch coverage 2019-10-03 08:32:05 +02:00
kamilritz f005e0ea8f Remove deprecated ev_innov_gate param 2019-09-27 10:00:45 -04:00
kritz b78429aa60 Fix print statements cast error on posix firmware builds (#647) 2019-09-25 14:34:43 +02:00
kritz 4a38f5a2f6 Add timestamp to ECL print statements, (#644)
which is helpful for EKF replay debugging.
2019-09-25 11:24:42 +02:00
kritz bb88d4ce5e Undo wrong comment change 2019-09-24 08:50:29 +10:00
Kamil Ritz 562731936a Update quaternion direction in documentation pdf 2019-09-24 08:50:29 +10:00
kamilritz 8c061fb6a4 Fixing wrong label of quaternion direction 2019-09-24 08:50:29 +10:00
Jannik Beyerstedt fe3fec413c fix #595 and add new all-in-one conversion script (PX4 only) 2019-09-24 08:20:16 +10:00
kamilritz 83eb326076 Missing posNED 2019-09-24 07:48:46 +10:00
kamilritz fd6b364c11 posNED to pos and velNED to vel and add ev vel covariances to reset 2019-09-24 07:48:46 +10:00
kamilritz 4f6ca3a74c Replace rest of spaces with tabs 2019-09-24 07:48:46 +10:00
kamilritz cea053820d Remove spaces with tabs 2019-09-24 07:48:46 +10:00
kamilritz 1e57c4bbec Fix white space 2019-09-24 07:48:46 +10:00
kamilritz 10cbd79db7 Rotate external vision info in reset function if necessary 2019-09-24 07:48:46 +10:00
kamilritz 4511b9ff5e Add missing checks for flags.ev_vel 2019-09-24 07:48:46 +10:00
kamilritz e7d927c899 Stop using bad GPS when we have vision velocity 2019-09-24 07:48:46 +10:00
kamilritz bd8f05567a set vel_pos_test_ratio to zero if no fusion happens 2019-09-24 07:48:46 +10:00
kamilritz 4b30de587f Make vel_pos innov gate variable name clearer 2019-09-24 07:48:46 +10:00
kamilritz 4237d7ccd7 Improve external vision position fusion 2019-09-24 07:48:46 +10:00
kamilritz 3e8139ff9f Enable vision velocity fusion 2019-09-24 07:48:46 +10:00
kamilritz 149233a9ab Add velocity observations to external vision interface 2019-09-24 07:48:46 +10:00
Matthias Grob 973999a4d3 Fix some template type conversions and style 2019-09-23 10:59:12 +02:00
Matthias Grob c34e8dc98f helper: consider matrices with the same NANs and INFINITYs equal
to simplify bulk checks when these values are expected
2019-09-18 09:59:50 +02:00
Matthias Grob bbaa93880b helper: consider NAN equal to NAN such that vectors can be compared exactly 2019-09-18 09:59:50 +02:00
Matthias Grob 33a629105c Matrix: add proper print function testing
Before the print function was just implicitly called somewhere
and that's why we had 100% line coverage. With this we have actual
testing of the functions.
2019-09-18 09:59:50 +02:00
Matthias Grob b0b7d7229a Multiplication test: fix division resulting in NAN 2019-09-18 09:59:50 +02:00
Matthias Grob 3747232724 LeastSquaresSolver: Fix nasty GCC compile optimization error
The original implementation with no wrapping on size_t is more readable
but the compiler errors with:
internal compiler error: in trunc_int_for_mode, at explow.c:55
I read up and it's apparently a loop optimization problem.
Inspired by https://stackoverflow.com/a/27224697/6326048
I used a far less readable implementation that works fine and
wrote a comment to explain it.
2019-09-18 09:59:50 +02:00
Matthias Grob 5844b0e46e Implement one float equality check and use it everywhere 2019-09-18 09:59:50 +02:00
Matthias Grob 1e80807e8e test: Add uncovered equality checks with NAN and INFINITE 2019-09-18 09:59:50 +02:00
Matthias Grob a374f37a54 Include helper_functions like all other library components 2019-09-18 09:59:50 +02:00
Matthias Grob 62a1e07512 ecl_EKF: Do not include SquareMatrix from Matrix library
because the template of upper_right_triangle() contains /2 and
swig fails to create a wrapper for that (suddenly)
2019-09-18 08:42:58 +02:00
Daniel Agar eddee193d1 update matrix git tag to latest 2019-09-18 08:42:58 +02:00
Julian Kent 4c4c1f2984 Use copyTo for writing to memory blocks 2019-09-18 08:42:58 +02:00
Julian Kent 8cc8db211c Fix copy_quaternion reference in code generation 2019-09-18 08:42:58 +02:00
Julian Kent 8d60f8ba8f Remove direct unsafe access to matrix internal data 2019-09-18 08:42:58 +02:00
Nico van Duijn c446ee444a EKF: fake rng if faulty on ground 2019-09-18 10:15:37 +10:00
Andreas Antener 4f19d457c4 ekf, control: make sure mag fusion doesn't start anymore when we have GPS heading fusion active 2019-09-18 09:27:24 +10:00
Jan Brehmer 93eb1266f6 EKF: reset position when stopping GPS use and EV is active 2019-09-18 08:33:40 +10:00
James Goppert 60c9c99dcc Fix type for division. 2019-09-17 11:08:00 -04:00
Julian Kent b4714e2ed2 Don't lose array sizes in copyTo 2019-09-17 15:09:12 +02:00
Julian Kent 51d2f9f0dc Remove direct access to internal data 2019-09-16 21:58:32 -04:00
Julian Kent 18218c8f9c Test non-square matrix multiplication (#91)
* Test non-square matrix multiplication
2019-09-16 17:40:25 +02:00
Julian Kent b817e8677d Add helpers based on Slice: row(), col(), xy() 2019-09-16 16:11:08 +02:00
Julian Kent 82d565f4d9 Add support for Slice to Matrix, SquareMatrix, Vector 2019-09-16 16:11:08 +02:00
Julian Kent af1378cc55 Add Slice class 2019-09-16 16:11:08 +02:00
Nico van Duijn 267195a11b EKF: remove check for faulty flag in fake rng
This removes the check for _rng_hgt_faulty in the decision of publishing
a fake range measurement. The reason for this is that some distance sensors
don't populate the quality flag, even if they are saturated. Hence, if we
are on the ground and not moving, it is safe to publish a fake measurement
of the distance sensor and overwrite the actual sensor data.
2019-09-12 17:45:37 +10:00
Nico van Duijn 933189eac0 EKF: fix rng_faulty flag when sensor is stuck 2019-09-12 17:45:37 +10:00
Nico van Duijn 640e41cba7 EKF: change rangeSample quality to int8_t 2019-09-12 17:45:37 +10:00
Nico van Duijn a12186c285 terrain_estimator: introduce quality metric in rng
This commit introduces a quality measure in the range data. It is
used to properly decide whether to initialize the HAGL estimate on
 sensor data or MIN_HGT parameter, as well as in the decision of
whether a 'fake' measurement should be published on the ground to
allow for optical flow take-offs.
2019-09-12 17:45:37 +10:00
Paul Riseborough 3e05fd552e EKF: Compensate for bad range finder data when on ground 2019-09-12 17:45:37 +10:00
Julian Kent 15865b741c Help compiler with name resolution to avoid overload mixups 2019-09-09 11:18:57 -07:00
Julian Kent 03ffd696a6 Replace pow with sqrt 2019-09-09 02:18:10 -07:00
Julian Kent 22bf63cb71 A smaller codesize wrap, since it gets inlined in many places 2019-09-05 22:31:13 +02:00
Matthias Grob 74ace7d1d5 helper test: cover wrap close to limits cases (#84) 2019-09-05 18:02:33 +02:00
Tanja Baumann 26fd962cbe fix bug in matrix wrap function (#83) 2019-09-05 11:21:41 +02:00
Julian Kent 4a4309327a better API comment
Co-Authored-By: Julian Oes <julian@oes.ch>
2019-09-05 10:19:47 +02:00
Matthias Grob 31450c407c Matrix: use existing print() if isEqual test fails 2019-09-05 10:19:47 +02:00
Matthias Grob 938274fce5 helper test: add extensive wrap tests 2019-09-05 10:19:47 +02:00
Matthias Grob 315010bae1 helper_functions: generalize wrap function to any range 2019-09-05 10:19:47 +02:00
Matthias Grob 007c7c58c4 fix math defines to have M_PI and M_TWOPI 2019-09-05 10:19:47 +02:00
bresch 3b32ee4166 Flow aiding - Reset state when flow is enabled only if it is the only
position/velocity aiding sensor.
Until now, it was alway resetting if the vehicle does not have gps or
external vision. This caused a reset/glitch at every stop (when range data gets
valid)
2019-09-03 09:58:33 +02:00
kamilritz be368f3656 Update comment 2019-08-29 08:34:10 +10:00
kamilritz c5abfe626f remove canonicalize and adapt comments 2019-08-29 08:34:10 +10:00
kamilritz 67512d88ea Update matrix library for CI 2019-08-29 08:34:10 +10:00
kamilritz a2ff415fe4 Fix get frame aligning quaternion function 2019-08-29 08:34:10 +10:00
kamilritz 53eac6e94e Canonicalize alignment quaternion 2019-08-29 08:34:10 +10:00
kamilritz 933c32c921 Enable local frame alignment also without using it 2019-08-29 08:34:10 +10:00
kamilritz ea352a6631 Dont use mag suffix for magnitude 2019-08-29 08:34:10 +10:00
kamilritz 05196db79e Fix alignment of local frame 2019-08-29 08:34:10 +10:00
Martina Rivizzigno cc084e0791 matrix: add method to check all values are nan (#82) 2019-08-26 19:27:58 +02:00
kritz 84b3da227c Canonical Quaternion with tests (#81) 2019-08-22 15:05:14 +02:00
RomanBapst 62fa464e4d WindEstimator: added support for pre-set airspeed scale factor
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-08-08 09:15:25 +02:00
Silvan Fuhrer a7d9c73d4d Wind estimator: added wind_estimator_reset state (to indicate if wind estimator was reset in last fusion-cycle)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-08 09:15:25 +02:00
Silvan Fuhrer 09f29dbb07 added option to fix airspeed scaling to 1 2019-08-08 09:15:25 +02:00
Jaeyoung-Lim d38164fc8e Fix flag for initialization 2019-07-22 10:24:51 +02:00
bresch e1751188fd EKF - Initialize _deadrekon_time_exceeded to true.
If no sample have been received, deadrekoning and local position should be invalid.
2019-06-28 10:52:52 -04:00
Paul Riseborough a036cf82cc EKF: Remove use of of quaternion self product operator and fix delta rotation sign 2019-06-17 19:24:55 +10:00
Paul Riseborough 0e946f25fd EKF: Remove use of quaternion self product operator and fix delta rotation sign error 2019-06-17 19:24:55 +10:00
CarlOlsson ad7f7af03b ekf: correct quaternion multiplication order 2019-06-17 19:24:55 +10:00
CarlOlsson d6351bd7a5 EKF: update comment 2019-06-17 19:24:55 +10:00
Paul Riseborough 7612fa40ed EKF: Don't start using GPS for height until all validity checks have passed
Consolidate intermittent data checks, improve variable and clarify usage.
2019-06-13 19:36:37 +10:00
Roman cef2ba5ab9 implemented Kahan summation algorithm for adding process noise to delta
angle- and delta velocity bias variance

- the contribution of process noise per iteration for these states can be so
small that it gets lost if using standard floating point summation

Signed-off-by: Roman <bapstroman@gmail.com>
2019-06-11 19:28:06 +10:00
RomanBapst 0f49eb34a0 fixed method which calculates validity of terrain estimate
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-05-28 19:43:13 +10:00
Daniel Agar cd34ab802d mathlib delete floorf in favor of math.h 2019-05-28 19:42:59 +10:00
Robert de Vries 340d85afc1 EKF: fix variable names in estimator_interface.h
This fixes issue #566
2019-05-27 17:39:42 -04:00
Matthias Grob 90b4c7c065 mathlib: fix floorf indentation 2019-05-24 09:56:12 +02:00
Sebastian Verling 710c52980e fixed calculation of magentic table values by using floor instead of int casting 2019-05-24 09:09:26 +02:00
Beat Küng 54ac147ae8 Ekf: add set_min_required_gps_health_time() to allow configure minimum GPS health time
This does not change the default of 10 seconds.
2019-05-15 09:00:24 +01:00
Roman 770cd3c5cc added python script for terrain flow derivation (optical flow for terrain
height estimation)

Signed-off-by: Roman <bapstroman@gmail.com>
2019-05-15 17:16:36 +10:00
Roman c085d7295d addressed review comments 2019-05-15 17:16:36 +10:00
Roman 8673ab0346 terrain estimator: constrain terrain state properly
Signed-off-by: Roman <bapstroman@gmail.com>
2019-05-15 17:16:36 +10:00
Roman fbb51147b7 implemented use of optical flow for terrain estimation
Signed-off-by: Roman <bapstroman@gmail.com>
2019-05-15 17:16:36 +10:00
Hamish Willee a27a43eafa Fix up link to EKF docs 2019-05-01 00:36:29 -05:00
Mohammed Kabir 3f691891c4 EKF: control: stop vision yaw fusion on timeout 2019-04-22 12:56:24 +10:00
Martina c4492b17c1 do not reset yaw if vehicle on ground 2019-04-09 20:50:37 +10:00
Julian Oes 14227eaf1d CMakeLists.txt: fix cmake warning
This removes the cmake warning:
  implicitly converting 'string' to 'STRING' type.
2019-04-08 09:54:47 -04:00
Paul Riseborough f97f0b6ea3 EKF: Remove unnecessary code
_flt_mag_align_start_time is set on initial alignment and will always be >0 before this check can run
2019-04-08 06:57:17 +10:00
Paul Riseborough 43b5e26fe4 EKF: Fix bug causing continual yaw reset when EKF2_MAG_TYPE = 2 2019-04-08 06:57:17 +10:00
Roman f95cd4b358 ground effect: removed dependency on local position
Signed-off-by: Roman <bapstroman@gmail.com>
2019-03-19 13:14:57 +11:00
CarlOlsson 7845ff4360 EKF: increase wind process noise scaler to 0.5
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-19 13:10:12 +11:00
CarlOlsson 32ca6f7030 ekf: scale wind process noise with low pass filtered height rate 2019-03-19 13:10:12 +11:00
CarlOlsson 938c8ad9ad EKF: use hagl estimate if valid for when to trigger yaw reset on takeoff 2019-03-19 13:04:54 +11:00
Hamish Willee 8b4ae48c69 README: Fix link to EKF/ECL tuning guide 2019-03-18 10:21:10 -04:00
Carl Olsson f0889c1760 EKF: fixed some comment typos
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-18 10:20:33 -04:00
Todd Stellanova 6e77b197c7 Add DataValidatorGroup tests, add more DataValidator tests (#592) 2019-03-15 00:09:47 -04:00
Daniel Agar a892ececf8 cmake add ECL_TESTS option only enabled in standalone build 2019-03-12 23:29:30 -04:00
Paul Riseborough fabd216ca5 EKF: Documentation edits 2019-03-13 08:14:23 +11:00
CarlOlsson 8d6e8ae078 EKF: update get_mag_decl_deg()
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-13 08:14:23 +11:00
CarlOlsson 2b17ced405 EKF: Clean up use of magnetometer declination. Before the innovation was not zero in fuseDeclination()
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-13 08:14:23 +11:00
CarlOlsson 1d91785a8e EKF: correct quaternion order 2019-03-12 19:07:55 +11:00
CarlOlsson 000aa0de5d EKF: do not update the newest attitude estimate in initialiseFilter(). Is is now done in alignOutputFilter() 2019-03-12 19:07:55 +11:00
CarlOlsson 96c5c14041 EKF: Change the EKF initialization to
1) init tilt
2) init yaw
3) init tilt uncertainty
4) init yaw uncertainty

Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-12 19:07:55 +11:00
CarlOlsson ea259d358d EKF: initialize the newest attitude estimate to a valid quaternion
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-12 19:07:55 +11:00
CarlOlsson 6cf512f103 EKF: Also update the newest and oldest quaternion estimate in
alignOutputFilter()

Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-12 19:07:55 +11:00
CarlOlsson 78122b20a6 EKF: fix the rotation direction of the buffered attitude solutions
in alignOutputFilter()

Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-12 19:07:55 +11:00
CarlOlsson 56b6b7a778 EKF: cleanup use of _mag_filt_state
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-12 19:07:55 +11:00
CarlOlsson 37339de57c EKF: remove unused variable
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-12 19:07:55 +11:00
Todd Stellanova 6c759e0e9f Initial unit tests for DataValidator (#588) 2019-03-09 14:47:13 -05:00
Nuno Marques 4e0e68e905 Ekf: add more useful methods to interface with the covariances (#543) 2019-03-09 11:57:35 -05:00
Matthias Grob 56b069956d slice test: fix trailing whitespace style 2019-03-08 20:20:08 +01:00
Oskar Weigl 5ccfa74c72 Fix const error 2019-03-08 19:17:40 +00:00
Oskar Weigl eea6b59973 Implement slice as copy loop 2019-03-08 19:17:40 +00:00
Oskar Weigl 93375fbd3c Fix copy-paste error 2019-03-08 19:17:40 +00:00
Oskar Weigl 5872bbc28c Add slicing tests that are not pure row slicing
I had a look at the implementation of `slice`, and I found it odd that it doesn't have a copy loop. The current implementation does a raw memcpy of the underlying contiguous row-major data. As far as I can tell, this could only slice along rows. Interestingly, I found that the tests only tested for slicing along rows, so this bug would go unnoticed.

I added some tests that checks slicing along columns also. I have a feeling this would break, and we need to fix the implementation of `slice`. However I could be wrong, and hence I'm submitting these tests first to verify.
2019-03-08 19:17:40 +00:00
Daniel Agar a85d3a43ed attitude_fw remove unused 2019-03-05 17:26:19 -05:00
Daniel Agar c66f7f4a09 EKF drop unused timestamp from collect_gps() and pass data by const reference 2019-03-05 17:26:19 -05:00
Freek van Tienen 78b899c72d Add Paparazzi compatibility (#580)
This adds support for the paparazzi autopilot to use this library as EKF.
The header order change has to be done in order to have std.h included to get certain defines at the start of the estimator_interface.h.
2019-03-05 12:41:21 -05:00
Daniel Agar 5cd331055f cmake standalone build pin PX4/Matrix to commit
- https://github.com/PX4/Matrix/commit/6b0777d815cd64902eb0575d56ec52f53aebb4a0
2019-03-05 12:35:37 -05:00
TSC21 ec436d5aee define FLT_EPSILON; be descriptive about upper_right_triangle() method 2019-02-24 17:14:05 +00:00
TSC21 7355a29a2a tests: use __FLT_EPSILON__ in comparisons 2019-02-24 17:14:05 +00:00
TSC21 7ab2b24e65 tests: urt: refactor 2019-02-24 17:14:05 +00:00
TSC21 4aab44fe01 Travis CI: update MacOS version to use 2019-02-24 17:14:05 +00:00
TSC21 707967d117 add test to .urt() 2019-02-24 17:14:05 +00:00
TSC21 210c76c04b add test to setNaN() 2019-02-24 17:14:05 +00:00
TSC21 96cb9ab146 add NaN value set for Matrix; add return of URT of a matrix 2019-02-24 17:14:05 +00:00
Daniel Agar 1378ec1797 EKF mag_fusion avoid unnecessary double promotion 2019-02-08 08:24:24 -05:00
Carl Olsson 54ab8191e3 EKF: add method to get the terrain variance 2019-02-06 08:49:16 -05:00
Daniel Agar c5554cae96 EKF tests update SWIG usage and use latest containers 2019-02-03 18:27:00 -05:00
Paul Riseborough dd58e69549 EKF: Ensure FW yaw alignment method is used on first in-air reset 2019-01-31 09:53:57 -05:00
Paul Riseborough 3accab1ac5 EKF: protect declination fusion from badly conditioned earth field estimates
Fusion with large initial magnetometer biases errors can result in the the NE earth field states reducing in magnitude and effectively flipping sign.

EKF: Move declination state limiting into a separate function

EKF: Limit NE mag states after each 3-axis mag fusion

EKF: Fix bug in mag field strength look-up scale factor
2019-01-31 09:53:57 -05:00
Paul Riseborough 7bddbd1cc5 EKF: Update cleaned up autocode fragment with sign error fix and missing LD 2019-01-31 09:53:57 -05:00
Paul Riseborough fe378fd761 EKF: Prevent unwanted declination fusion when re-starting 3-axis fusion 2019-01-31 09:53:57 -05:00
Paul Riseborough bd1647a7fb EKF: Rework use of fuseDeclination()
Simplify calling so that it is only called in two ways:
1) Immediately before 3-axis mag fusion if not called since the last earth field covariance reset so that the earth field declination information can be formed.
2) Immediately after 3-axis mag fusion otherwise.
2019-01-31 09:53:57 -05:00
Paul Riseborough d52f53635b EKF: Save mag field covariance data before reset 2019-01-31 09:53:57 -05:00
Paul Riseborough 82ce7a83a5 EKF: Save mag field covariance information on startup 2019-01-31 09:53:57 -05:00
Paul Riseborough 708c79eb8f EKF: Ensure mag field state covariance data is always available for re-use
Prevents use of  _saved_mag_ef_covmat and _saved_mag_bf_variance before being initialised or when stale.
2019-01-31 09:53:57 -05:00
Paul Riseborough 8839e4e1f4 EKF: Don't discard declination certainty information when resuming 3-axis fusion.
In the case where the EKF is switching between 3-axis and heading fusion, off-diagonal elements containing the correlation between N,E  components of the earth field were being lost on each switch event. These elements contained information about the declination uncertainty and should be preserved.
2019-01-31 09:53:57 -05:00
Paul Riseborough 25148e1b45 EKF: Prevent rapid changes in declination estimate after a reset
Ensures that each time the earth field covariance and variance data is reset, that the off-diagonal elements containing earth field declination angle certainty is restored.
2019-01-31 09:53:57 -05:00
CarlOlsson 6e7c119b31 EKF: limit yaw variance increase to 0.01 rad^2 to prevent a badly conditioned covariance matrix
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-01-31 09:53:57 -05:00
CarlOlsson 0896f7b9bd EKF: Also fill in lower part of covariance matrix in increaseQuatYawErrVariance()
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-01-31 09:53:57 -05:00
Paul Riseborough 4b3140e5f7 EKF: Fix rebase error 2019-01-31 09:53:57 -05:00
Paul Riseborough 911d4d8f49 EKF: Fix sign error in increaseQuatYawErrVariance function 2019-01-31 09:53:57 -05:00
Paul Riseborough a0b9cb002e EKF: Use consistent method for recording completion of in-flight yaw alignment 2019-01-31 09:53:57 -05:00
Paul Riseborough ef5a87c1d4 EKF: Rework quaternion yaw reset.
Use a new method that preserves the roll and pitch information and adds the uncertainty for yaw only.
Ensure that correlation information to non-quaternion states is removed when a reset occurs to prevent fusion of subsequent observations (e.g. GPS) causing incorrect yaw.
2019-01-31 09:53:57 -05:00
Paul Riseborough fc2a089823 EKF: Add function to un-correlate quaternion states
This is necessary after a quaternion reset to prevent incorrect attitude corrections with subsequent observation fusions.
2019-01-31 09:53:57 -05:00
Paul Riseborough bce1b96d17 EKF: Add function enabling yaw variance to be increased 2019-01-31 09:53:57 -05:00
Paul Riseborough bf1f3a224e EKF: Derive equations enabling yaw variance to be increased 2019-01-31 09:53:57 -05:00
Daniel Agar 81eabc1903 Jenkins update all containers to latest tag 2019-01-28 2019-01-31 08:06:00 +11:00
Daniel Agar a5e6191ba7 EKF add clarity brackets to avoid potential confusion
- fixes https://github.com/PX4/ecl/issues/555
2019-01-30 09:15:53 -05:00
Daniel Agar 6b0777d815 stdlib_imports cinttypes currently unavailable in NuttX toolchain (#79) 2019-01-21 09:12:36 -05:00
Anna Dai 721f5e61a5 increase optical flow buffer to imu buffer length 2019-01-17 10:23:15 +11:00
Anna Dai 44200e9649 add GPS drop out case to GPS fusion logic
EKF waits 10s after GPS signal is lost before setting GPS control status flag to false. As the position information given by the alternative position sources drifts from the last GPS position, the controller over corrects.
With this update, the time horizon until GPS control flag set to false is reduced and only alternative position source is used for estimation.

tested with optical flow as position souce

log from as is https://review.px4.io/plot_app?log=d624af5e-dde4-40ab-ba5b-a693a49f5a36

log with update https://review.px4.io/plot_app?log=13ed6dc3-22dd-43f8-b898-4add41d60439
2019-01-17 10:23:15 +11:00
CarlOlsson 8a813c57ec EKF: fix comment typo 2019-01-14 09:57:44 +11:00
CarlOlsson 472f2286b7 EKF: initialize covariances before we reset the heading in order to preserve the yaw uncertainty
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-01-14 09:57:44 +11:00
CarlOlsson 490888285d EKF: Remove flag prefix
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-01-13 23:48:46 +01:00
CarlOlsson d223680197 EKF: add flt_mag_align_complete to control_status flags
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-01-13 23:48:46 +01:00
Daniel Agar b920910483 replace <cfloat> with <float.h>
- <cfloat> isn't available in the NuttX c++ library
2019-01-06 12:09:05 -05:00
Paul Riseborough c032126745 EKF: Fix bug causing incorrect yaw variance value to be used
This bug causes the variance of the Z axis rotation vector uncertainty to not be reset to the correct value.
2019-01-04 11:01:06 +01:00
Paul Riseborough 48d83f3bcb EKF: Fix vulnerability to ground level mag anomally when using heading fusion (#544)
Previously, the reset of the yaw when climbing above 1.5m was not performed until 3-axis fusion was enabled. This could result in loss of navigation depending on the value of  EKF2_MAG_TYPE and the flight profile.
2019-01-03 09:41:55 -05:00
Matthias Grob 18fba8221c quaternion: improve comments 2018-12-16 20:16:38 +01:00
Matthias Grob a4f39c0f89 quaternion: reuse existing dot product 2018-12-16 20:16:38 +01:00
Hamish Willee 4822bf8386 Fix links to moved files in readme 2018-12-10 03:34:53 +01:00
CarlOlsson 1a969aed07 EKF: use low pass filtered mag measurements for heading initialization 2018-12-05 10:08:11 +01:00
Roman 27f7846495 optical flow: fixed sign in calculation of optical flow sensor velocity
- the velocity of the optical flow sensor relative to the IMU expressed in
body frame is the cross product of the angular velocity with the vector
from IMU to the sensor. If we use the angular velocity stored in the flow
sample struct we need to use a negative sign as that angular velocity
follows the opposite sign convention.

Signed-off-by: Roman <bapstroman@gmail.com>
2018-12-04 01:26:40 +11:00
Matthias Grob 9c0acfba36 Matrix: remove unsafe copyToRaw method
It used a pointer and could therefore not do correct type checking
for index out of bound or struct memebr order.
Has to be considered unsafe and bad practise.
We should switch to arrays as representation for vectors
inside the messages instead of foo_x, foo_y, foo_z fields.
2018-11-20 16:39:44 +00:00
Paul Riseborough c49ab760c7 EKF: Allow EKF to start without using mag data when not using earth frame data 2018-11-15 09:03:03 +11:00
Daniel Agar 572710ed27 EKF add typed Quatf getter 2018-11-14 22:50:39 +01:00
CarlOlsson 8a2e512c2d terrain_estimator: add vehicle_variance_scaler 2018-11-15 08:38:48 +11:00
Paul Riseborough acde4ebcc3 EKF: fix comment 2018-11-15 07:16:31 +11:00
Paul Riseborough df571202c5 EKF: Fix bug preventing saved declination being used for first alignment 2018-11-15 07:16:31 +11:00
Paul Riseborough 4657a9cd21 EKF: Ensure yaw gets reset when declination is set 2018-11-15 07:16:31 +11:00
Roman 68a3cbc368 addressed review comment
Signed-off-by: Roman <bapstroman@gmail.com>
2018-11-13 08:42:28 +11:00
Roman a74b7ef60b 3D only mag fusion: make sure _flt_mag_align_complete is set
- _flt_mag_align_complete was not set when choosing pure 3D mag fusion.
one effect of this was that the declination used in the filter was not
the one calculated from the magnetic field states.

Signed-off-by: Roman <bapstroman@gmail.com>
2018-11-13 08:42:28 +11:00
jie.zhang 10a0fef7b7 EKF/control: remove unnecessary yaw_align update 2018-10-17 15:50:00 -04:00
Daniel Agar 8bbaf898a5 EKF add new simple setIMUData() interface (#512) 2018-10-17 15:30:25 -04:00
Paul Riseborough e6cd6eff87 EKF: Fix bug preventing use of flow sensors without gyros
The handling of invalid flow data when on ground is performed in controlOpticalFlowFusion() where it is able to handle flow sensors that don't publish gyro data.
2018-10-11 07:12:54 +11:00
Beat Küng 0d3bff5e00 Vector2: add explicit constructor for Vector3
Initialize from the first 2 elements.
2018-10-01 10:17:16 +02:00
Beat Küng 807472bfd7 README: document how to run tests 2018-10-01 10:17:16 +02:00
Daniel Agar 2c3a064942 README.md update Jenkins build status icon and url 2018-09-18 20:16:29 -04:00
Paul Riseborough f240eaa5b0 EKF: Fix test script 2018-09-19 06:32:43 +10:00
Paul Riseborough 5cb228e1b3 EKF: Remove duplicate line 2018-09-19 06:32:43 +10:00
Paul Riseborough 0220f469b0 EKF: Use more generic variable name for bad yaw fusion flag
This flag now reports on  fusion of data that is not from a magnetometer.
2018-09-19 06:32:43 +10:00
Paul Riseborough eb52f7c410 EKF: Remove implicit conversion and use single precision trig operator
Double precision accuracy is not required for this operation.
2018-09-19 06:32:43 +10:00
Paul Riseborough 6847acb72e EKF: Add protection for undefined GPS antenna array heading offset 2018-09-19 06:32:43 +10:00
Paul Riseborough d1f3f4c916 EKF: Use #define function for isfinite check 2018-09-19 06:32:43 +10:00
Paul Riseborough 91f886cb5e EKF: Add support for use of GPS heading data.
Heading data is assumed to be from a  dual antenna array at a specified yaw angle offset in body frame, but with the heading data already corrected for antenna offset. The offset is required to apply the correct compensation for combined rotations and to determine when the yaw observation has become badly conditioned.
2018-09-19 06:32:43 +10:00
Paul Riseborough af60e6bbc8 EKF: Add derivation for for dual antenna yaw observations 2018-09-19 06:32:43 +10:00
Paul Riseborough 342c3ab202 EKF: Fix timeout parameter documentation and name
The parameter used to control the maximum dead reckoning time had 'gps' in the parameter name which was confusing because it was used for all measurement types capable of constraining horizontal velocity error growth. The parameter variable has been renamed and the documentation for it improved.
The parameter used to control the maximum time since fusing a measurement before the measurement is considered to be not contributing to aiding had misleading documentation which has been updated.
2018-09-19 06:32:43 +10:00
Bart Slinger 30d5a79432 testing float/double with Type template 2018-09-18 09:39:17 +02:00
Bart Slinger 707e288019 explicit casting 2018-09-18 09:39:17 +02:00
Bart Slinger 480c5f1f8e static assert M>=N. floats to Type, arguments as const reference 2018-09-18 09:39:17 +02:00
Bart Slinger 7495794386 test zero divisions 2018-09-18 09:39:17 +02:00
Bart Slinger 3f2d3cf58d fix a div/0 condition 2018-09-18 09:39:17 +02:00
Bart Slinger 983a3f0212 use Matrix and Vector class for A and tau 2018-09-18 09:39:17 +02:00
Bart Slinger 98b8e2d43b formatting 2018-09-18 09:39:17 +02:00
Bart Slinger 0009328257 least squares solver for MxN matrices using QR householder algorithm 2018-09-18 09:39:17 +02:00
Dion Gonano 2354c30d81 Add vision height covariance passthrough (#507)
* Add vision height covariance passthrough

* Fix hgtErr layout
2018-09-11 06:36:13 +10:00
Kabir Mohammed a7245229cb EKF : Fix divergence when optical flow is not fused for a long time (#503)
* terrain_estimator : guard against case where latest range sample is newer than IMU sample

* EKF : control : correct detection of no optical flow fusion over a time period
2018-09-03 14:26:43 +10:00
Paul Riseborough b861594d0b EKF: enable optical flow use to bootstrap 2018-09-01 14:49:45 +02:00
Daniel Agar dc3af80977 constructors use array size rather than pointers 2018-08-31 08:11:02 +02:00
Daniel Agar f1bee775a0 use default constructors and skip unnecessary initialization 2018-08-31 08:11:02 +02:00
Daniel Agar 1bcf48bd82 Quaternion from_dcm don't pass by value 2018-08-30 12:07:48 -04:00
Daniel Agar 3c74dc2ce1 ECL_Controller base needs virtual destructor 2018-08-30 12:07:25 -04:00
Daniel Agar 0d39072a6d EKF add missing header guards 2018-08-30 12:07:25 -04:00
Kabir Mohammed a6a1edbe3f EKF : Fix type of flow data navigation variable (#499) 2018-08-30 18:26:17 +10:00
Paul Riseborough a53ad9c261 EKF: Add missing optical flow ground motion protection
Motion compensated optical flow rates are supposed to be zeroed if reported flow quality is below the minimum threshold value when on ground.
The comments and logic have been amended to be consistent and make the design intent clearer.
2018-08-28 21:31:50 +02:00
dakejahl 56b8bb08a1 added a checking for range_aid to determine if we are relying on the range finder as our primary source of height observation (#491) 2018-08-24 06:42:58 +10:00
Roman aa134d5a61 l1 position controller: make sure that a NAN roll setpoint
does not keep the roll setpoint state at NAN forever

Signed-off-by: Roman <bapstroman@gmail.com>
2018-08-21 16:16:33 +02:00
Daniel Agar 34cd1366b7 Jenkins update PX4BuildBot credential usage 2018-08-12 13:38:35 -04:00
Paul Riseborough 35f628e68f EKF: Add interface to enable logging of GPS drift metrics (#490)
* EKF: Add interface to enable logging of GPS drift metrics

* EKF: Fix bug affecting rate of GPS drift publication

Also fix variable name.
2018-08-03 13:24:31 +10:00
Daniel Agar 48a17b5234 cmake ignore doxygen option when not a standalone build (#488) 2018-07-30 12:23:24 -04:00
Roman 4a8a3a4079 l1 controller: simpler way of doing slew rate limiting
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-26 07:54:38 +02:00
Roman fe4e6779f3 l1 position control: added roll angle setpoint slew rate limiting
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-26 07:54:38 +02:00
Paul Riseborough 748446b92f EKF: Use parameter for stuck range test threshold
The default has been reduced to make it suitable for low altitude optical flow navigation.
2018-07-26 07:53:39 +02:00
Paul Riseborough 628079719f EKF: Fix inconsistency in timeout for terrain validity
Terrain validity is determined solely by successful range finder fusion and terrain state initialisation.
A range finder that has been declared faulty requires continuous range finder data fusion requires  data to be continuous before the fault status _rng_hgt_faulty  can be cleared. This will enforce the requirement for continuous data before fusion can commence.
2018-07-26 07:53:39 +02:00
Paul Riseborough d1d49857f9 EKF: Prevent stuck range checks running without new data 2018-07-26 07:53:39 +02:00
dakejahl 80146273ba removed if statement that would prevent the update of the _rng_hgt_faulty flag (#480) 2018-07-26 07:53:39 +02:00
Paul Riseborough 17d40478bb EKF: Rework range height validity checking
Eliminate race condition caused by checking for data freshness using time stamps from buffer push instead than buffer pop events.
Consistent use of range data ready and range data fault flags. This achieved by ensuring that _rng_hgt_faulty is set to true for all range data faults, not just data freshness.
Include range data validity requirement in rangeAidConditionsMet() check.
2018-07-26 07:53:39 +02:00
Paul Riseborough e0bcfeb533 EKF: Add validity boolean to mag declination accessor 2018-07-26 07:51:58 +02:00
Paul Riseborough 1e610894b9 EKF: Correct documentation and function name for declination accessor
The function name and documentation are misleading given the function is only a getter.
This change makes the usage clearer.
2018-07-26 07:51:58 +02:00
Paul Riseborough 4d01883f75 EKF: Disable GPS drift checks when the vehicle is moving. 2018-07-24 07:31:45 +02:00
Roman Bapst ee85a29202 Pr opt flow (#482)
* optical flow: fixed calculation of velocity of the flow sensor relative to
the IMU

- gyroXYZ holds a delta angle and first needs to converted to a gyro rate

Signed-off-by: Roman <bapstroman@gmail.com>

* optical flow: calculate height above the ground with respect to the flow
camera
- the flow camera can be offset from the IMU which needs to be considered

Signed-off-by: Roman <bapstroman@gmail.com>

* estimator interface: fixed comment regarding optical flow sample timestamp

- the timestamp on an optical flow sample corresponds to the trailing
edge of the flow integration period

Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-16 11:41:35 +10:00
Paul Riseborough 4d59c834eb EKF: Consolidate range finder checking
This brings all the range finder data checks (excluding innovation consistency checks) into one place and eliminates the need to perform range checking external to the library.
The hard coded optical flow tilt limit is changed to use the same value as the range finder.
Variable names are changed to make a clear distinction between the max/min values calculated by the stuck range check and the max/min valid values for the sensor.
2018-07-12 18:20:50 +02:00
Kabir Mohammed e1661a92c3 EKF : allow init without external vision measurements (#464) 2018-07-12 11:36:47 +10:00
Paul Riseborough a0ed08967e EKF: Add missing range validity check 2018-07-11 14:53:37 +02:00
Daniel Agar 41953ab582 EKF angle constants in degrees for readability (#465)
* EKF angle constants in degrees for readability

* EKF make FILTER_UPDATE_PERIOD_MS static constexpr and add FILTER_UPDATE_PERIOD_S

* EKF controlOpticalFlowFusion() use constants and update comments

* EKF controlMagFusion() use angle in degrees

* EKF move earth spin rate to geo and update usage

* EKF: Fix numerical constant error and clean up comments

Comments do not need to contain numerical values when the code makes these clear.
2018-07-05 08:55:22 +10:00
Daniel Agar cebdc3d829 ekf run output predictor immediately with new IMU data (#471)
* EKF collect_imu take const imu sample and populate buffer

* EKF calculateOutputStates cleanup

* EKF add calculate_quaternion output predictor method

* EKF: update documentation

* EKF: remove unnecessary getter function

* EKF calculateOutputStates only apply dt correction to bias

* EKF pytest assert attitude validity, not update() return

* EKF: correct documentation

* EKF: Do not make attitude validity dependent on yaw alignment status

Yaw alignment could fail in flight due to temporary loss of data and yet the quaternions would still usable for stabilisation even though the absolute earth yaw angle wrt true north was uncertain.
2018-07-05 07:59:35 +10:00
Daniel Agar 114ae4116a geo get_bearing_to_next_waypoint() small optimization 2018-06-30 21:30:35 +00:00
Daniel Agar b26c2d62b8 geo get_distance_to_arc remove double promotion 2018-06-30 10:09:10 -04:00
Philipp Oettershagen b3959fab2f TECS: Do not even calculate integrator state if integrator gain is zero 2018-06-29 15:55:46 +00:00
Philipp Oettershagen ccfba49971 TECS: Set the integrator output to zero if the gain is zero. Otherwise (e.g. after a climbout) it can happen that the integrator stays at a large constant value and thus distrubs the control loop 2018-06-29 15:55:46 +00:00
Paul Riseborough 1cba257bac Merge branch 'master' into pr-ekfOptFlowGyro 2018-06-18 09:36:16 +10:00
Paul Riseborough 1a1106878d EKF: Prevent timestamp jitter failing GPS data arrival check (#462)
This fixes a error condition that occurs if _time_last_gps is greater than _time_last_imu.
By checking time stamps at the fusion time horizon, we guarantee that this cannot happen because all observations must have a time stamp smaller or equal to _imu_sample_delayed.time_us before they are retrieved from the buffers.
2018-06-15 16:03:54 +10:00
Daniel Agar 4ae8242c35 validation DataValidatorGroup::get_best() nullptr check
- fixes Coverity CID 139448
2018-06-14 08:14:53 +02:00
Daniel Agar c3e071e052 validation initialize all members
- fixes Coverity CID 260331
2018-06-14 08:14:53 +02:00
Roman c8af315aa7 flow_fusion: corrected sign of gyro data when it is taken from the ekf
gyro data

Signed-off-by: Roman <bapstroman@gmail.com>
2018-06-13 21:52:42 +02:00
Paul Riseborough c6ed2ccfcd EKF: Fix half frame offset in flow gyro compensation.
The gyro data accumulation needs to be across the same integration period as the flow sensor. The previous code didn't sample the accumulation until the midpoint of the flow data had fallen behind the fusion time horizon.

This PR changes the optical flow time stamp definition so that flow data is retrieved when the leading edge of the flow accumulation period falls behind the fusion time horizon. This enables the accumulated gyro data to be sampled at the correct time. Fusion is then delayed until the mid sample time has fallen behind the fusion time horizon.
2018-06-13 16:51:42 +10:00
Roman Bapst b815fc97c4 replace quiet_NaN() with INFINITY (#70)
- solves undefined symbols for QURT

Signed-off-by: Roman <bapstroman@gmail.com>
2018-06-12 12:24:51 -04:00
Paul Riseborough 48561b0c8a EKF: Update optical flow interface documentation 2018-06-12 16:52:26 +10:00
Paul Riseborough de7c9d85a4 EKF: Handle flow data without valid gyro data 2018-06-12 16:24:25 +10:00
elia 26dcf05d80 keep ev timeout sign always positive 2018-06-11 00:17:19 +02:00
Daniel Agar a8b73bd139 replace geo _wrap_pi with matrix::wrap_pi 2018-06-11 00:16:17 +02:00
Daniel Agar 03a3e3ad46 helper_functions add wrap_2pi 2018-06-10 10:56:45 +02:00
Daniel Agar 5c64879688 Jenkins codecov.io add flag 2018-06-09 21:12:03 -04:00
Daniel Agar abc8f82d49 travis-ci add codecov.io (#69) 2018-06-09 21:08:56 -04:00
Paul Riseborough d177e96508 EKF: Fix bug causing slow drift when high rate flow data is used
High rate optical flow data could make flow fusion to run every major update cycle, resulting in the calculation of bias errors in the body rates used to compensate flow data failing time validity checks and not running. This resulted in a slow drift of the nav solution if bias errors were present in the in the gyro data used for flow sensor motion compensation.
2018-06-09 22:23:55 +02:00
Paul Riseborough ee2dc7d790 EKF: Rework optical flow selection logic
Fixes a race condition caused by the _is_dead_reckoning test.
Only checks flow selection when flow is available.
2018-06-09 22:23:55 +02:00
Paul Riseborough e383b6a272 EKF: rework optical flow selection logic
Make use of range aiding movement check clearer.
Fix logic errors that caused rapid toggling of flow use when on ground.
2018-06-09 22:23:55 +02:00
Paul Riseborough 487e6a0901 EKF: enable user selection of auto mag free operation
Also modify check to not apply if EV yaw is being used.
2018-06-09 22:23:55 +02:00
Paul Riseborough 6bdbe032f9 EKF: Fallback to optical flow for all in-flight loss of navigation scenarios 2018-06-09 22:23:55 +02:00
Mohammed Kabir b4d2b8c57d EKF : introduce new architechture for navigation limits 2018-06-09 22:23:55 +02:00
Paul Riseborough 8a713398cb EKF: Improve ground effect compensation
Start deadline at zero so that initial rotor wash effect is rejected.
2018-06-09 22:23:55 +02:00
Paul Riseborough 39697f1196 EKF: rework optical flow switching 2018-06-09 22:23:55 +02:00
Paul Riseborough 1cfe845751 EKF: rework GPS quality check 2018-06-09 22:23:55 +02:00
Paul Riseborough 99a80387ed EKF: improve optical flow GPS quality checking 2018-06-09 22:23:55 +02:00
Paul Riseborough 7f36add241 EKF: scale GPS vertical accuracy check when using optical flow 2018-06-09 22:23:55 +02:00
Paul Riseborough fc9f532c34 EKF: relax range finder data continuity check 2018-06-09 22:23:55 +02:00
Paul Riseborough 93c456f2b8 EKF: Improve protection against badly conditioned dVel bias covariances
Reduces likelihood of Z delta velocity bias learning to wrong value.
2018-06-09 22:23:55 +02:00
Paul Riseborough 225057aaf5 EKF: Fix bug preventing use of terrain estimator 2018-06-09 22:23:55 +02:00
Paul Riseborough adb4a09beb EKF: Fix bug causing large yaw innovations when GPS is lost 2018-06-09 22:23:55 +02:00
Paul Riseborough f59cd0f5b0 EKF: Don't make detection of indoor operation dependent on optical flow
This is required because it can take several seconds for an optical flow sensor operation to be confirmed and there are also many use cases for indoor operation where no optical flow is used.
2018-06-09 22:23:55 +02:00
Paul Riseborough 1562a82dc2 EKF: Add parameter to adjust on-ground movement detector sensitivity 2018-06-09 22:23:55 +02:00
Paul Riseborough ea9e8246ed EKF: Improve detection of indoor flight condition 2018-06-09 22:23:55 +02:00
Paul Riseborough 565f99254c EKF: Reduce effect of yaw gyro bias when using optical flow indoors 2018-06-09 22:23:55 +02:00
Paul Riseborough e10798bfdf EKF: Add on ground movement detector 2018-06-09 22:23:55 +02:00
Paul Riseborough 2d3b65231b EKF: Reset yaw gyro bias learning when resuming use of magnetometer
The previous lack of yaw drift constraint will also mean that the yaw gyro bias estimate is likely to be incorrect and needs to be re-learned.
2018-06-09 22:23:55 +02:00
Paul Riseborough 8191068959 EKF: Don't start using mag if optical flow use is interrupted
If magnetometer use is being inhibited because an indoor condition has been detected (optical flow and poor or no GPS) and the optical flow fusion checks fail causing the EKF to stop navigating, we do not want the EKF to start using the magnetometer.
2018-06-09 22:23:55 +02:00
Paul Riseborough 4889e8432c EKF: Don't fuse multi rotor drag if yaw angle is bad 2018-06-09 22:23:55 +02:00
Paul Riseborough 092a8d8f21 EKF: Fix GPS validity time check error 2018-06-09 22:23:55 +02:00
Paul Riseborough 0160aaa568 EKF: Don't use magnetometer with optical flow only nav if GPS checks are failing 2018-06-09 22:23:55 +02:00
Paul Riseborough 84516760c0 EKF: Use stricter GPS accuracy test when optical flow is being used
This adds some hysteresis to the automated optical flow selection and also reduces likelihood of bad GPS being used when operating indoors,
2018-06-09 22:23:55 +02:00
Daniel Agar a80b3ab610 set MODULE define for each library
- this is needed for INFO, WARN, ERR messages when used within PX4
2018-05-27 20:08:47 +02:00
Daniel Agar 50631e5d98 geo remove use of DBL_EPSILON
-this doesn't seem to be (obviously?) available on qurt
2018-05-21 10:59:40 +02:00
Daniel Agar cb63f16d48 cmake cache ECL source directory path to work with catkin (#447) 2018-05-17 12:01:30 -04:00
Bart Slinger bae4b8a5e7 remove superfluous elseif (#431)
* remove superfluous elseif

* Set ev_hgt flag false when starting on baro
2018-05-11 08:38:42 +10:00
Paul Riseborough 16976d3911 Merge branch 'pr-ekfOptFlowFixes'
* pr-ekfOptFlowFixes:
  EKF: fix bug causing height offset when GPS use stops
  EKF: Don't reject saturated flow data when it is the only aiding source
  EKF: Prevent flow motion check false positives
  EKF: Don't assume large position uncertainty when starting optical flow nav
  EKF: relax terrain update requirements for continuing optical flow use
  EKF: Relax minimum required range finder measurement rate
  EKF: relax optical flow on ground motion checks
  EKF: range finder aiding logic fixes
  EKF: Decouple range finder use criteria checking and selection
  EKF: Don't auto select range finder for height when on ground.
  EKF: Fix false triggering of optical flow bad motion checks
  EKF: update comments
  EKF: Don't use optical flow if GPS is good and the vehicle is not using range finder for height
  EKF: Stop using EV for yaw when GPS fusion starts
  EKF: Add persistence criteria to  GPS fail check
  EKF: allow GPS fallback if quality bad and alternative aiding available
  EKF: always run GPS checks
2018-05-11 08:22:14 +10:00
Paul Riseborough 75e65901ae EKF: fix bug causing height offset when GPS use stops
This bug causes the last vertical velocity observation to be continuously fused.
2018-05-10 10:55:56 +02:00
Paul Riseborough e8e9e34a73 EKF: fix bug causing height offset when GPS use stops
This bug causes the last vertical velocity observation to be continuously fused.
2018-05-10 13:45:19 +10:00
Paul Riseborough 6cadc92285 EKF: Don't reject saturated flow data when it is the only aiding source 2018-05-10 07:11:59 +10:00
Paul Riseborough bf902e5eca EKF: Prevent flow motion check false positives
The previous implementation could false trigger if there was significant vibration below 200Hz during startup.
2018-05-09 07:47:17 +10:00
Paul Riseborough bdf5b3e003 EKF: Don't assume large position uncertainty when starting optical flow nav 2018-05-08 08:43:56 +10:00
Paul Riseborough e26711af7d EKF: relax terrain update requirements for continuing optical flow use 2018-05-08 08:43:14 +10:00
Paul Riseborough 868bc01087 EKF: Relax minimum required range finder measurement rate 2018-05-08 08:43:14 +10:00
Paul Riseborough 02963a85c4 EKF: relax optical flow on ground motion checks 2018-05-08 08:43:14 +10:00
Paul Riseborough 24b005ed57 EKF: range finder aiding logic fixes 2018-05-08 08:42:29 +10:00
Paul Riseborough 0c0a6602b0 EKF: Decouple range finder use criteria checking and selection 2018-05-08 08:42:29 +10:00
Paul Riseborough 6708bec1b4 EKF: Don't auto select range finder for height when on ground. 2018-05-08 08:42:03 +10:00
Paul Riseborough 0a63052753 EKF: Fix false triggering of optical flow bad motion checks 2018-05-08 08:42:03 +10:00
Paul Riseborough f9d4934db6 EKF: update comments 2018-05-08 08:42:03 +10:00
Paul Riseborough 82de3141f0 EKF: Don't use optical flow if GPS is good and the vehicle is not using range finder for height 2018-05-08 08:42:03 +10:00
Paul Riseborough 389786ef1b EKF: Stop using EV for yaw when GPS fusion starts 2018-05-08 08:42:03 +10:00
Paul Riseborough 4ab78230e6 EKF: Add persistence criteria to GPS fail check 2018-05-08 08:41:15 +10:00
Paul Riseborough 67d71ca406 EKF: allow GPS fallback if quality bad and alternative aiding available 2018-05-08 08:41:15 +10:00
Paul Riseborough bd59e381db EKF: always run GPS checks 2018-05-08 08:40:31 +10:00
Daniel Agar b227aca4a8 geo_lookup fix table bounds 2018-05-06 03:13:00 +02:00
Daniel Agar e494a4e634 Jenkins set git username and email with environment variables 2018-05-05 18:11:28 -04:00
Daniel Agar 3639087ac6 cmake and Jenkins add basic address santiizer test buld 2018-05-05 16:11:04 -04:00
Daniel Agar 1fba622a80 travis-ci basic build script 2018-05-05 15:25:54 -04:00
Daniel Agar cde2ee9b6f cmake ignore missing-field-initializers 2018-05-05 15:25:54 -04:00
Daniel Agar 2100127304 geo: zeroing static unnecessary 2018-05-05 15:25:54 -04:00
Daniel Agar 0f12db5b2c travis-ci enable coverity_scan 2018-05-05 15:25:54 -04:00
Daniel Agar aceab8c82c Jenkins upload coverage to codecov.io 2018-05-05 15:13:52 -04:00
Daniel Agar 5780cd3c6b Jenkins create PX4/Firmware test branch and push (#436) 2018-05-05 14:40:15 -04:00
Daniel Agar cf957b5831 code coverage cmake and Jenkins support 2018-05-04 01:40:23 -04:00
Daniel Agar 4e0cd45676 doxygen cmake and Jenkins support 2018-05-04 01:22:10 -04:00
Daniel Agar 372f9f430b EKF pytest save plots to pdf 2018-05-03 22:25:36 -04:00
Daniel Agar d6a3110918 visual studio build compatibility 2018-05-03 22:25:36 -04:00
Daniel Agar 3a61035ac2 fix and re-enable EKF pytests 2018-05-03 22:25:36 -04:00
Daniel Agar 4dabf7a1a8 Jenkins add OSX build 2018-05-03 22:25:36 -04:00
Daniel Agar c5b2f59f57 PX4 style fixes (excluding EKF generated code) 2018-05-03 22:25:36 -04:00
Daniel Agar e5952fadaf cmake standalone build 2018-05-03 22:25:36 -04:00
Daniel Agar eec71d1a10 EKF get_ekf_soln_status() fix pred_pos_horiz_abs 2018-05-03 00:12:23 -04:00
Paul Riseborough 1bd1809d6e EKF: Fix bug causing simultaneous range and baro height fusion (#429) 2018-05-03 13:24:33 +10:00
Daniel Agar a14434d6dc EKF always fill position and velocity accuracy (#425) 2018-04-23 21:15:29 +10:00
Paul Riseborough 6e3403ce28 EKF: prevent race condition between global position validity and eph reporting 2018-04-21 13:04:04 -04:00
Paul Riseborough fdabb9277f EKF: Use consistent validity definition for global position reporting 2018-04-21 13:04:04 -04:00
Paul Riseborough 31142c0322 EKF: tighten wind variance growth check 2018-04-21 13:04:04 -04:00
Paul Riseborough ae069b12d6 EKF: Fix bug preventing wind relative dead reckoning 2018-04-21 13:04:04 -04:00
Paul Riseborough 9747dc778d EKF: Rework nav validity reporting
Remove duplicate checking for dead reckoning and consolidate into a single function.
Use separate timers to check for start of dead reckoning and check when dead reckoning has been performed for too long for the nav solution to be valid.
Allow the timeout for validity reporting to be adjusted externally.
Separate external reporting of dead reckoning from internal checks.
2018-04-21 13:04:04 -04:00
Daniel Agar bd72f3c521 geo std pressure constants and update usage 2018-04-19 08:57:38 +02:00
Daniel Agar 02e319431b cmake remove embedded vim settings 2018-04-11 20:50:30 -04:00
Daniel Agar 91b5bfe2bb attitude_fw remove unused perf include 2018-04-11 20:50:30 -04:00
Paul Riseborough 02055acee2 EKF: Fix non GPS aiding data reset logic (#418)
* EKF: Move optical flow specific state reset to helper functions

* EKF: Ensure loss of optical flow aiding is handled correctly

If data is only source of aiding and has been rejected for too long - reset using flow data as a velocity reference.
If flow data is unavailable for too long - declare optical flow use stopped.
Use consistent time periods for all resets

* EKF: Ensure loss of external vision aiding is handled correctly

If data is only source of aiding and has been rejected for too long - reset using data as a position.
Don't reset velocity if there is another source of aiding constraining it.
If data is unavailable for too long, declare external vision use stopped.
Use consistent time periods for all resets.

* EKF: Update parameter documentation

Make the distinction between the no_gps_timeout_max and no_aid_timeout_max parameters clearer

* EKF: make class variable units consistent with documentation

* EKF: Don't reset states when optical flow use commences if using external vision

* EKF: Stop optical flow fusion when on ground if excessive movement is detected.

* EKF: fix terrain estimator vulnerabilities

Reset estimate to sensor value if rejected for 10 seconds
Protect against user motion when on ground.
Fix unnecessary duplication of terrain validity check and separate validity update and reporting.

* EKF: remove unnecessary Info console prints

Optical flow use information can be obtained from the estimator_status.control_mode_flags message

* EKF: fix inaccurate comment

* EKF: remove duplicate calculation from terrain validity accessor function
2018-04-09 18:35:15 +10:00
Daniel Agar 21d47424c6 Quaternion mark const helpers const 2018-04-01 17:02:20 -04:00
Daniel Agar ba2b9dfdd9 update matrix lib usage 2018-03-28 17:57:51 -04:00
James Goppert e7c95fa027 Fix README/cmake format. 2018-03-28 00:11:03 -04:00
James Goppert d142ac234c Fix coverage and bug in matrix equal test. 2018-03-28 00:09:01 -04:00
Daniel Agar 50446a55c8 Matrix add == and != operators 2018-03-27 15:05:22 -04:00
Daniel Agar 39b69af9bf geo_lookup: Update geomagnetism tables.
Update declination table to use latest IGRF data
Add lookups for inclination and field strength
2018-03-26 21:52:11 -04:00
Daniel Agar cd12f049fe move geo and geo_lookup from PX4 Firmware to ECL 2018-03-26 21:52:11 -04:00
Paul Riseborough 1bb4c17c0e EKF: Allow use of large GPS position observation noise when using other aiding sources (#403) 2018-03-27 11:31:37 +11:00
Paul Riseborough 8a012436f9 EKF: Fix reversion from GPS to no-aiding mode (#412)
* EKF: Do not delay reversion to no-aiding mode if parameter initiated

* EKF: Move no-aid reversion resets to helper functions

* EKF: Prevent unwanted fusion of velocity data during no aiding mode
2018-03-22 22:39:00 +11:00
Roman Bapst 95c4777b35 added airdata module which contains wind & airspeed scale estimator (#405)
* added airdata module which contains wind & airspeed scale estimator

* airdata: support gate sizes for innovation consistency checks
2018-03-21 13:06:00 -04:00
Carl Olsson f6d23cc621 added rng_stuck to filter control status flags (#392) 2018-03-21 11:46:27 +11:00
Roman Bapst 7964820412 tecs.cpp: tecs initialisation fixes (#411)
- zero thrust integrator on initialisation, we already have a cruise throttle
variable
- if initialising from in_air condition set last throttle setpoint to
cruise throttle (_in_air ? throttle_cruise : 0.0f);
2018-03-21 11:25:15 +11:00
Daniel Agar 61af508755 helper_functions include required px4_defines header 2018-03-19 02:24:38 -04:00
Daniel Agar 35bc2cfcd9 tecs and l1 switch to matrix math library (#409) 2018-03-18 21:59:41 -04:00
Daniel Agar 1bc7378414 EKF decrease synthetic sideslip interval 1s -> 150ms (#407) 2018-03-15 23:09:42 -04:00
Daniel Agar 341f8962d2 EKF interface add get_wind_status() (#406) 2018-03-14 16:41:09 -04:00
Thomas Stastny 041886a289 attitude_fw: move angular rate limits to body angular rates (#404) 2018-03-08 22:19:19 -05:00
Paul Riseborough 78e983073a EKF: Fix bug in use of gps velocity noise parameter (#401)
This fixes a bug introduced by an earlier feature request PR. The parameter is supposed to define the lower limit on the observation noise.
2018-02-28 11:48:53 +11:00
ChristophTobler cdc6efc5d6 EKF: fix rot vec calc from quat by using matrix lib 2018-02-08 10:22:55 +01:00
ChristophTobler 9238e2f1a2 EKF: fix spike handling in ev rotation calculation 2018-02-08 10:20:59 +01:00
Paul Riseborough db5264e45c EKF: Add missing reset for output observer vertical position derivative
Required to prevent large transients in value returned by get_pos_d_deriv accessor following a vertical state reset event.
2018-01-31 08:43:39 +01:00
Beat Küng d078d68f64 Reverse the linked list of data_validator_group #2 (#389)
* Reverse the linked list of data_validator_group and maintain a first node
for search from index 0

Fixes issue PX4/Firmware#8644

* fix code style

* validator: fix shadowing of 'sibling' argument
2018-01-30 09:11:01 +11:00
ChristophTobler 337cdcc59a init height using baro when set to ev height (#388)
this also makes sure the _baro_hgt_offset is being initialized correctly
2018-01-30 07:33:28 +11:00
Paul Riseborough a2d6a4dded EKF: fix indexing bug (#387)
Should use index 9 for vertical position.
2018-01-29 08:09:55 +11:00
Paul Riseborough 1ddd94f237 tecs: Remove redundant code
The if() statement was there as provision to do something different with the speed demand derivative limits if an abnormal condition was present, however we have no basis for assigning different limits at this point in time.
2018-01-28 22:01:28 +01:00
Paul Riseborough f016e66ff8 Revert "EKF: Release flow speed limit with altitude gained" (#382)
* Revert "EKF: Release flow speed limit with altitude gained"

This reverts commit e70206f74b.

* Revert "fix code style"

This reverts commit 76bf70121c.

* Revert "Reverse the linked list of data_validator_group and maintain a first node"

This reverts commit 32482e7644.
2018-01-24 20:46:48 +11:00
jay 76bf70121c fix code style 2018-01-19 11:53:36 +01:00
lijie 32482e7644 Reverse the linked list of data_validator_group and maintain a first node
for search from index 0

Fixes issue PX4/Firmware#8644
2018-01-19 11:53:36 +01:00
ChristophTobler cdbca91e79 EV height reset (#379)
* fix typo

* EKF: use baro if it was reset to baro from ev

* EKF: set vert_pos_reset if resetting to ev hgt

otherwise the position controller will not reset the setpoint -> leading to unwanted altitude changes
2018-01-15 20:15:56 +11:00
Andreas Antener 9e16e51d3a attitude_fw: constrain integrator properly to prevent building it up over the specified maximum 2018-01-13 16:17:01 +01:00
Daniel Agar c8ab806120 EKF pytest temporarily disable 2018-01-05 02:39:02 -05:00
Daniel Agar ae641020dd EKF run pytest quick and plot 2018-01-05 02:39:02 -05:00
Daniel Agar ec0d907d5a update README build badge (travis-ci -> jenkins) 2018-01-05 02:39:02 -05:00
Daniel Agar 7df4e0f8eb reenable pytest with px4-dev-ecl 2018-01-05 02:39:02 -05:00
Daniel Agar f407954207 initial jenkins configuration 2018-01-05 02:39:02 -05:00
Lorenz Meier dd9ea86fd6 Update README.md
Added link to tuning guide.
2018-01-04 08:50:34 +01:00
Paul Riseborough 76763adb5c Merge pull request #374 from PX4/pr-ekfInitFix
EKF: Prevent possible /0 due to incorrect initial values
2018-01-04 08:15:08 +11:00
Paul Riseborough 0f047504d4 EKF: Prevent possible div 0 due to incorrect initial values
Gate size class variables should not be initialised to zero, because it will cause a /0 error if fuseVelPosHeight() is called before they are set to their respective parameter values.
2018-01-04 07:47:03 +11:00
Daniel Agar f0862210c7 EKF initialize _hvelInnovGate
- fixes CID 139550
2018-01-03 08:07:28 +01:00
Paul Riseborough bdbc05cf91 Merge pull request #372 from PX4/pr-tecs_init
TECS initialize throttle integrator at cruise if in air
2017-12-28 09:09:14 +11:00
Paul Riseborough a39c376c26 Merge pull request #371 from CarlOlsson/pr-push_beta_test_ratio
ekf: return beta test ratio in get_innovation_test_status
2017-12-28 08:29:15 +11:00
Daniel Agar 8320c8ba14 TECS initialize throttle integrator at cruise if in air 2017-12-21 16:29:14 -05:00
CarlOlsson 5c8b22b43f ekf: return beta test ratio in get_innovation_test_status
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2017-12-18 15:48:36 +01:00
Paul Riseborough e70206f74b EKF: Release flow speed limit with altitude gained
When GPS use is gained whilst flying using optical flow data, the sudden release of the speed limit is unannounced to  the operator and can cause unexpected acceleration.
This patch releases the speed limit as height is gained, but does not reduce it when the vehicle descends, unless GPS use is lost.
2017-12-12 01:26:44 +00:00
CarlOlsson dea0c8bb6a tecs: fixed some typos 2017-12-08 00:31:12 -05:00
Daniel Agar 41a1cc7583 LICENSE minor changes to template 2017-12-05 10:56:04 -05:00
Matthias Grob f835d39017 Quaternion/Vector: Small refactor for review: put more comments, switched type conversions, took out default destination vector because confusing 2017-12-04 15:34:13 +01:00
Matthias Grob af2610ec04 Test: added check for quaternion vector to vector rotation constructor
including all the parallel vector corner cases
2017-12-04 15:34:13 +01:00
Matthias Grob 84cd7483ae Quaternion: added constructor which generates the shortest rotation that maps one vector to another
including tedious corner case handling for parallel vectors with 180 degree rotations
2017-12-04 15:34:13 +01:00
Matthias Grob d513c94f85 Test: added check for Vector.norm_squared() 2017-12-04 15:34:13 +01:00
Matthias Grob 5130da206a Vector: added norm_squared() because sometimes you can safe the sqrt operation 2017-12-04 15:34:13 +01:00
Paul Riseborough 83b765f707 EKF: Don't print navigation lost message on startup 2017-12-03 23:02:02 +00:00
Daniel Agar e3da71c89d Ekf initialize all fields 2017-11-26 16:50:16 -05:00
Andreas Antener ee57908911 Provide access to FW integrators 2017-11-26 15:33:34 +01:00
Paul Riseborough 22a6abbca2 Merge pull request #365 from PX4/pr-ekfBugFix
EKF: Fix vel pos innovation handling bug
2017-11-24 14:46:11 +11:00
Paul Riseborough 89be63d6c2 EKF: Fix vel pos innovation logging bug 2017-11-24 14:25:44 +11:00
Paul Riseborough 882f4d44e5 Merge pull request #362 from PX4/pr-ekfAuxVelFuse
EKF: Add additional velocity interface to use landing beacon data
2017-11-21 11:55:43 +11:00
Paul Riseborough b0ad8269a5 EKF: enable separate monitoring of aux velocity innovations 2017-11-21 11:18:09 +11:00
Paul Riseborough 2a57fd858d EKF: clean up reset of fusion flags 2017-11-21 11:18:09 +11:00
Paul Riseborough 8e30c2666d EKF: Add support auxiliary velocity observation
This enables the EKF to use an additional NE velocity measurement. This can be used to improve position hold stability when landing using a beacon system for positioning by fusing the beacon velocity estimates.
2017-11-21 11:18:09 +11:00
Paul Riseborough bd8f30752a Merge pull request #351 from PX4/ekfGndEffectComp-wip
EKF: Protect against ground effect induced static pressure rise
2017-11-20 09:14:26 +11:00
Paul Riseborough a2b24fa960 EKF: Protect against ground effect induced static pressure rise during landing and takeoff.
Apply a dead-zone to the vertical position innovation if using baro for height and if in the ground effect region during and just after takeoff.
Method needs to be activated externally.
Turns off automatically after 10 seconds or if specified height gained.
2017-11-17 21:41:31 +11:00
Matthias Grob 41ad2bdea5 Matrix: added copyToRaw method to allow copying to a pointer
because most uORB messages still contain all components of a vector one by one after each other
2017-11-17 09:30:56 +01:00
Paul Riseborough c8d459eecd Merge pull request #360 from dagar/pr-ekfObsBufAlloc
EKF RingBuffer allocation minor improvements + print memory usage
2017-11-17 08:38:57 +11:00
Paul Riseborough 3479542ae5 Merge pull request #359 from PX4/pr-ekfObsBufAlloc
EKF: Reduce memory usage
2017-11-17 08:09:37 +11:00
Daniel Agar d9c8af54bd EKF add print_status() with memory usage 2017-11-16 14:11:34 -05:00
Daniel Agar 75d1ed894c EKF simplify RingBuffer allocation check 2017-11-16 13:09:17 -05:00
Paul Riseborough af7004ef01 EKF: report observation buffer allocation errors 2017-11-16 20:04:46 +11:00
Paul Riseborough d785a19c0a EKF: delay final allocation of observation buffers until required 2017-11-16 19:47:04 +11:00
Matthias Grob 308a6c91cb Test: added copyTo tests for Vector3, Quaternion and Matrix including clolumn-major order 2017-11-16 04:42:54 +01:00
Matthias Grob 1dffd5930b Matrix: add copyTo copying data to an array and copyToColumnMajor which does the same but with column-major order
same functionality explicitly for quaternions can be deleted
2017-11-16 04:42:54 +01:00
Paul Riseborough f54f1d467f Merge pull request #358 from PX4/pr-ringbuffer_copies
EKF RingBuffer avoid unnecessary copying
2017-11-16 13:37:36 +11:00
Paul Riseborough 7c8fcf7628 EKF: Clarify use of *= operator for quaternions 2017-11-16 11:52:19 +11:00
Daniel Agar ed9a394029 EKF RingBuffer avoid copying 2017-11-15 18:08:51 -05:00
Paul Riseborough 44eaa076db Merge pull request #356 from PX4/pr-ekfMiscUpdate
EKF: Remove redundant code
2017-11-16 07:05:18 +11:00
Paul Riseborough 2b20c52c4d EKF: Remove redundant code 2017-11-15 22:03:17 +11:00
Paul Riseborough cfdab732d1 EKF: Update parameter description 2017-11-15 21:28:11 +11:00
Paul Riseborough 16154423c8 matlab: update optical flow derivation
Support use of sensors with arbitrary orientation in body frame
2017-11-15 11:16:19 +11:00
Paul Riseborough cc651ac472 Merge pull request #354 from PX4/ekfMagYawReset-wip
Prevent loss of navigation accuracy after in-flight mag yaw alignment
2017-11-13 07:32:23 +11:00
Paul Riseborough 72a7ab2c25 EKF: Improve resistance to bad initial mag offset
When magnetic field states have been reset in-flight using a single sample, the magnetic field states are not used to constrain heading drift for a period after the reset. This period has been shortened from 10 to 5 seconds which is enough time to average out the effects of measurement noise (the original concern). The shorter time has enabled the previous practice for RW vehicles of using magnetic heading in that time period to constrain yaw drift to be discontinued. This is necessary becasue while magnetic heading is being used, it fights the yaw corrections obtained from GPs observations and lengthens the time required to recover from a bad mag calibration.
2017-11-13 07:05:56 +11:00
Paul Riseborough df9f48d2d3 EKF: Fix build error 2017-11-13 07:05:56 +11:00
Paul Riseborough 44c50ab2df EKF: Correct magnetic yaw measurement using learned mag biases
Don't apply bias corrections when biases are being learned to avoid possible circular data dependency.
2017-11-13 07:05:56 +11:00
Paul Riseborough c70363c501 EKF: Don't fuse heading if FW and waiting for mag states to stabilise
Doing so is a bad idea because bad mag data can drag the yaw angle away from the reset value and lead to rejection of GPS.
2017-11-13 07:05:56 +11:00
Paul Riseborough 279fc836f7 EKF: Always reset covariance matrix terms when doing vel pos state reset
If state errors were large before the reset, then failure to reset the covariance matrix terms can result in incorrect fusion of position and velocity measurements after the reset due to inconsistencies in the covariance matrix.
2017-11-13 07:05:56 +11:00
Paul Riseborough 141264fe63 EKF: Add method to set diagonals in covariance matrix 2017-11-13 07:05:56 +11:00
Paul Riseborough 32de90b9ef EKF: Add method to zero covariance terms 2017-11-13 07:05:56 +11:00
Paul Riseborough f3e34eddc9 EKF: do not attempt to align FW yaw using GPS method if on ground 2017-11-13 07:05:56 +11:00
Paul Riseborough 8f27d3fc54 EKF: don't reset quaternion states unnecessarily
When performing the initial in-flight mag yaw reset for RW vehicle, do not reset the quaternion states and corresponding variances unless there has been a change in yaw angle large enough to cause problems with navigation.
This is because the state estimates after a reset are more vulnerable to transient sensor errors, so a reset should be avoided if possible.
2017-11-13 07:05:56 +11:00
Paul Riseborough 9e47b6e1b6 EKF: don't reset quaternions unnecessarily
When performing the initial in-flight magnetic field reset for fixed wing vehicles, resetting the quaternion states and their corresponding covariances should be avoided unless yaw errors are large, because state estimates are vulnerable to transient sensor errors immediately following a reset.
2017-11-13 06:55:02 +11:00
Paul Riseborough 29d383edbf EKF: Allow mag field estimates to stabilise before use 2017-11-13 06:55:02 +11:00
Paul Riseborough 363edf5eb9 EKF: Fix yaw reset for fixed wing
Ensures that a complete reset of velocity and position states will always be performed if yaw has had to be reset using GPS velocity.
Ensures that the yaw_align status cannot be set to false once the filter has aligned.
2017-11-13 06:55:02 +11:00
Paul Riseborough 7852c0ed03 Merge pull request #312 from PX4/pr-ekfExtVisQuat
EKF: Enable operation with arbitrary External Vision reference frame
2017-11-12 08:35:39 +11:00
Paul Riseborough 5fd006ca48 EKF: remove redundant code 2017-11-11 07:06:01 +11:00
ChristophTobler 368248fe6d Merge pull request #353 from PX4/pr-expo_int_cast
EKF: use uint64_t cast for XeY to avoid float casting of variables
2017-11-08 11:54:39 +01:00
ChristophTobler e388e59f32 EKF: use uint64_t cast for XeY to avoid float casting of variables
The default type for XeY is float
2017-11-08 11:40:26 +01:00
Matthias Grob 3bd94fcd6f Test vector: structured & commented, added normalize and unit_or_zero tests, removed duplicate data preparation 2017-11-06 17:58:52 +01:00
Matthias Grob 9e59691e43 Vector: Additional normalization with check for zero norm because it occurs so many times in applications 2017-11-06 17:58:52 +01:00
Paul Riseborough bba3f70a0e EKF: reduce prediction time step from 12 to 8 sec
Reduces susceptibility to incorrect estimation of acceleration bias during sustained yaw rate.
Requires an increase in RAM allocation of 837 Bytes to allow for the longer IMU and output predictor buffers that can be created.
2017-11-02 09:27:33 +01:00
Paul Riseborough 01d68ef67c EKF: Enable use of rotated external nav estimates 2017-11-01 08:33:57 +11:00
Paul Riseborough f921b2de5c Merge pull request #348 from PX4/pr-ekfAddImuBiasReset
EKF: Add method to enable the IMU bias states to be reset externally
2017-10-30 15:55:52 +11:00
Paul Riseborough 063533afae EKF: Add method to enable the IMU bias states to be reset externally 2017-10-26 10:41:39 +11:00
Paul Riseborough cd2ca57ec2 Merge pull request #339 from PX4/ekfPosCtrlLimits-wip
Ekf pos ctrl limits wip
2017-10-23 06:57:23 +11:00
Daniel Agar 22a51c6afd PX4_ISFINITE -> ISFINITE 2017-10-22 20:37:40 +02:00
Daniel Agar 9e13a2cb21 tecs move initialization 2017-10-22 20:37:40 +02:00
Daniel Agar 31a8e047d7 tecs one line setters and group 2017-10-22 20:37:40 +02:00
Daniel Agar 4f2d571c89 tecs fix code style 2017-10-22 20:37:40 +02:00
Paul Riseborough 79995b2c15 Create total energy control system implementation
This is a new, clean and streamlined variant of the mathematical derivation I created a few years ago.
2017-10-22 20:37:40 +02:00
Daniel Agar 9eb860fabd travis-ci fix gcc and clang compilation jobs (#344)
- allow the python testing to fail without failing the entire build
2017-10-22 12:19:11 -04:00
Paul Riseborough e10ec59058 EKF: Use consistent test for navigation validity reporting
This will enable controller to take advantage of non-inertial dead reckoning.
2017-10-20 14:44:38 +11:00
Paul Riseborough 19074fdd9e EKF: Use consistent time limit for inertial dead reckoning test 2017-10-20 14:44:38 +11:00
Paul Riseborough 55a2dc94df EKF: handle air data fusion covariance reset consistently
Both the sideslip and airspeed fusion should not be resetting covariances for states they do not modify.
2017-10-20 14:44:37 +11:00
Paul Riseborough 0d32128701 EKF: Use dead-reckoning status to determine if air data should modify non-wind states 2017-10-20 14:44:37 +11:00
Paul Riseborough e4ffe199ed EKF: fix bug in sideslip fusion activation 2017-10-20 14:44:37 +11:00
Paul Riseborough 59f1c3e19e EKF: Update dead-reckoning definition
Use of air data to navigate should be classified as dead-reckoning because neither ground relative velocity or position is observed directly and errors grow faster.
2017-10-20 14:44:37 +11:00
Paul Riseborough a2dcd5b9b6 EKF: Consolidate no aiding reset logic 2017-10-20 14:44:37 +11:00
Paul Riseborough 929c5c2b37 EKF: enable gps fusion flag to be false while fusing air data 2017-10-20 14:44:37 +11:00
Paul Riseborough 204a218ee6 EKF: Allow dead-reckoning using air data 2017-10-20 14:22:06 +11:00
ChristophTobler f5fd90533a fix gps and flow flag handling
gps flag was not turning false if there was flow

only reset states if we were relying on that sensor only
2017-10-20 14:22:06 +11:00
Paul Riseborough 9857fb9eb6 EKF: publish control limits for optical flow navigation 2017-10-20 14:22:06 +11:00
Paul Riseborough afa8844eb7 Merge pull request #341 from CarlOlsson/fix/fw_yaw_align2
EKF: If aligning yaw for fw with low GPS velocity, use mag
2017-10-20 14:05:52 +11:00
CarlOlsson 2e03084d34 EKF: If aligning yaw for fw with low GPS velocity, use mag 2017-10-19 16:49:54 +02:00
Paul Riseborough 61e0c04811 Merge pull request #338 from CarlOlsson/fix/fw_pos_reset
EKF: Fix bug when resetting position and velocities for fw due to som…
2017-10-18 07:02:34 +11:00
Matthias Grob f4243160e2 Quaternion: changed comments because of typos and unclear inconsistent indexing 2017-10-17 17:37:23 +02:00
Matthias Grob d259ab2108 Test: add Quaternion rotate() test that catches non-commutating rotations 2017-10-17 17:37:23 +02:00
Matthias Grob ee2219b836 Quaternion: replace conversion in rotate() with AxisAngle call 2017-10-17 17:37:23 +02:00
Matthias Grob b241cf5c95 Quaternion: Adjusted rotate() to the Hamilton convention (which we switched to)
Note: This error was not caught by a test because the test included only trivial cases which do not explore non-commuting quaternions.
2017-10-17 17:37:23 +02:00
Matthias Grob 6b1fea76d0 Quaternion: added and adjusted comments to further explain conjugation and derivative functionality 2017-10-17 17:37:23 +02:00
Matthias Grob 0527471a52 Matrix: adjust buffer size calculation to account for additional characters
Note: If the buffer is too small there's no memory corruption because of the snprintf limit but part of the output gets missing.
2017-10-17 17:37:23 +02:00
CarlOlsson c81cdfa1ce EKF: Fix bug when resetting position and velocities for fw due to something else than bad yaw estimate
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2017-10-17 15:08:09 +02:00
Paul Riseborough 410697cb0c Merge pull request #337 from CarlOlsson/fix/comment
EKF: fixed comment
2017-10-17 21:15:06 +11:00
CarlOlsson 8c83167857 EKF: fixed comment
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2017-10-17 11:41:55 +02:00
Paul Riseborough 32b795ee10 EKF: Add readme file to EKF documentation directory 2017-10-13 21:46:41 +11:00
Paul Riseborough 8dd4800a2c EKF: Add preliminary documentation for filter mathematics 2017-10-13 21:34:49 +11:00
Paul Riseborough a34bba87fc Merge pull request #322 from PX4/pr-ekfMagFusionMode
EKF Add mag fusion mode for VTOL
2017-10-13 07:27:54 +11:00
Paul Riseborough dbff89fbcb EKF: Fix error preventing selection of MAG_FUSE_TYPE_AUTOFW 2017-10-12 19:54:35 +11:00
Paul Riseborough 6f7f05fdc0 EKF: Move MAG_FUSE_TYPE_AUTOFW control to the expected place 2017-10-12 14:50:23 +11:00
Paul Riseborough e834522f62 EKF: Use fixed wing status flag in MAG_FUSE_TYPE_AUTOFW logic 2017-10-12 14:50:23 +11:00
Paul Riseborough 7b4c957ad4 ekf2: Add new mag fusion mode
Adds a mode where mag fusion is only used update the field estimates
2017-10-12 14:50:23 +11:00
Paul Riseborough 9c65968c3d Merge pull request #334 from PX4/pr-ekf_minor_flow_fix
ekf: fix optical flow bugs
2017-10-12 09:14:29 +11:00
Paul Riseborough 68bad48598 Merge pull request #330 from CarlOlsson/pr-add_get_wind_vel_var
EKF: added get_wind_velocity_var function
2017-10-12 09:12:54 +11:00
Paul Riseborough 4db23b7b2e EKF: Don't report terrain estimate invalid immediately when HAGL observations fail checks 2017-10-12 08:26:04 +11:00
Paul Riseborough 1119a9b0ac EKF: Enable optical flow reversion to work if flow data is lost
Also improve reporting.
2017-10-12 08:02:54 +11:00
ChristophTobler cdf6e6cd36 EKF: use delta_time to avoid division by zero 2017-10-11 15:15:06 +02:00
Paul Riseborough d293c4231d EKF: Protect against divide by zero caused by invalid optical flow 2017-10-11 21:54:47 +11:00
Paul Riseborough ab9b8e1964 EKF: Prevent bad optical flow quality causing loss of aiding when on ground 2017-10-11 21:22:33 +11:00
ChristophTobler b7e589b98a EKF: only fuse optical flow if terrain is valid 2017-10-10 17:51:56 +02:00
ChristophTobler 81a64c0479 ekf: fix flow direction when on ground 2017-10-10 14:39:44 +02:00
ChristophTobler 6cb99ce8a8 ekf: add function to get in air status 2017-10-03 22:36:33 +02:00
CarlOlsson 8200e4b218 EKF: added get_wind_velocity_var function
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2017-10-02 14:47:56 +02:00
Paul Riseborough 705f93d0bf Merge pull request #327 from CarlOlsson/parameterize_max_rng_tilt
EKF: Parameterize maximum angle for rng fusion
2017-10-02 17:08:34 +11:00
CarlOlsson 0a7c3ecbc6 EKF: Parameterize maximum angle for rng fusion 2017-09-26 20:53:48 +02:00
Matthias Grob 0a772f59dd Quaternion: added direct efficient body z-axis calculation with test 2017-09-26 11:20:56 +02:00
Matthias Grob 976461eb0f Dcm: more efficient conversion from quaternion, extend reuse of multiplications 2017-09-26 11:20:56 +02:00
Matthias Grob baf54ad29f quaternion: correcting comments
^(-1) went missing and some phrase was inprecise
2017-09-25 12:18:10 +01:00
Paul Riseborough 160e4d69c1 Merge pull request #323 from PX4/pr-ekfQuatMultOrder
EKF: use hamiltonian convention for quaternion multiplication order
2017-09-21 07:49:35 +10:00
Paul Riseborough 4411c7fd1c Merge pull request #325 from PX4/pr-ekfFlowGyroBias
EKF: Fix bug in accumulation of IMU data for flow sensor gyro bias
2017-09-14 18:47:46 +10:00
Paul Riseborough 1d3e8edc46 EKF: Fix bug in accumulation of IMU data for flow sensor gyro bias calculation 2017-09-14 18:34:11 +10:00
Paul Riseborough 3b3326e250 Merge pull request #326 from TSC21/fix_travis
travis: install python3.5 for trusty in order to run pip3
2017-09-14 18:32:31 +10:00
TSC21 571a0f7da7 travis: use pyenv in order to force pip3 version 2017-09-14 09:22:09 +01:00
TSC21 7affb42f22 travis: install python3.5 for trusty in order to run pip3 2017-09-14 09:08:11 +01:00
Paul Riseborough dd5b8525c3 EKF: Use hamiltonian convention for quaternion product order 2017-08-31 11:14:02 +02:00
Paul Riseborough b57b5e869d matrix: Use hamiltonian convention for quaternion product 2017-08-31 11:14:01 +02:00
James Goppert e595ebb9a7 Switch to Hamilton quaternions and add Cholesky decomposition. 2017-08-31 11:09:20 +02:00
Paul Riseborough b0300b9723 Revert "attitude_fw delete unused and cleanup"
This reverts commit 25bd3ac5e6.
2017-08-30 16:23:40 +02:00
Paul Riseborough 1531269f92 Merge pull request #319 from PX4/pr-attitude_fw-cleanup
attitude_fw delete unused and cleanup
2017-08-28 09:48:49 +02:00
Daniel Agar 25bd3ac5e6 attitude_fw delete unused and cleanup 2017-08-26 17:44:24 -04:00
Paul Riseborough fac292fef9 Merge pull request #321 from dagar/pr-ekf_formatting
EKF trivial code style cleanup
2017-08-26 18:17:23 +10:00
Daniel Agar 99ba1c3745 EKF trivial code style cleanup 2017-08-25 10:09:11 -04:00
ChristophTobler 89236ef275 Merge pull request #314 from PX4/pr-check_stuck_rng
Pr check stuck rng
2017-08-21 07:54:06 +02:00
Peter Dürr 305a95aef9 Integrate Python-based tests and benchmark into Travis
* Unfortunately, due to the SWIG dependency, we need sudo to install on
  Travis (conflicts when adding with debian-sid source prevent using addons)
  which means we cannot use the container-based infrastructure anymore.
* Building the Python bindings requires g++5 (at least with -Werr set).
* When building the Python bindings on Travis, the numpy includes are not found
  by cmake, so they have to be added separately by running a Python process with
  `numpy.get_include()`
* The build script now (somewhat clumsily) depends on the RUN_PYTEST environment
  variable. If it is set to anything other than "", it will make the tests and
  run tests and benchmarks
2017-08-14 12:02:03 +02:00
Peter Dürr 15c8c24418 Fix time units on plots
* Time in plots was of by a factor of 1e3 due to wrong conversion from us.
2017-08-14 12:02:03 +02:00
Peter Dürr b29067a188 Better handle Python dependencies
* Add requirements.txt file with required Python packages
* Read requirements.txt from CMakeLists.txt to check dependencies and alert the
  user if necessary.
2017-08-14 12:02:03 +02:00
Peter Dürr bb5719a0da Add Python wrapper to ecl and use it to test functionality
* Add SWIG interface definition (and external numpy interface) to ecl classes
* Add section in CMakeLists.txt to build Python bindings and execute
  Python-based tests
* Write (property-based) tests that show the basic functionality of the Python
  bindings and the EKF (using pytest and hypothesis libraries)
* Write minimal benchmark for the EKF update (using benchmark plugin for pytest)
* Add plotting utilities to analyze tests
* Add lint script to keep the Python scripts clean
2017-08-14 12:02:03 +02:00
Peter Dürr 5988900044 Add getters for a few private variables of the EstimatorInterface
* For testing it is useful to have access to more internal states
* For the same reason I also promote the const FILTER_UPDATE_PERIOD_MS to
  public
2017-08-14 12:02:03 +02:00
Peter Dürr a2ed0a76f9 Make the destructor of EstimatorInterface virtual
* This is a sane choice (and should arguably always be done for classes with
  virtual methods to avoid undefined behavior)
* It is required for wrapping the EstimatorInterface with SWIG (without virtual
  destructor, deriving from the EstimatorInterface leads to
  -Werror=delete-non-virtual-dtor).
2017-08-14 12:02:03 +02:00
Paul Riseborough 9cf0948bcf matlab: add derivation for air data error equations 2017-08-12 20:59:41 +10:00
Paul Riseborough 3983ac23fa Merge pull request #316 from PX4/pr-ekfTrueAirspeed
EKF: Add true airspeed accessor
2017-08-11 08:18:04 +10:00
Paul Riseborough 967720a9d7 Merge pull request #313 from PX4/pr-ekfYawReset
EKF: Improve in-flight mag error detection, recovery and isolation for fixed wing
2017-08-08 20:59:49 +10:00
Paul Riseborough 35ffd55481 EKF: Fix incorrect use of double precision operation 2017-08-07 10:34:19 +10:00
Paul Riseborough cc5db74d1b EKF: Add true airspeed accessor 2017-08-07 09:19:48 +10:00
ChristophTobler 8ecec58292 Check for stuck range finder measurements in terrain estimator 2017-07-31 17:59:44 +02:00
ChristophTobler 7252284628 Add check for stuck range finder measurements 2017-07-31 17:59:16 +02:00
ChristophTobler 41f4b62cdb fix indentation 2017-07-31 17:58:03 +02:00
Paul Riseborough 596b8220e2 EKF: Output mag sensor isolation warning first time only 2017-07-31 19:39:07 +10:00
Paul Riseborough ce806768b7 EKF: Improve in-flight mag error detection, recovery and isolation for fixed wing 2017-07-31 19:39:07 +10:00
Paul Riseborough c230663b68 Merge pull request #309 from PX4/pr-ekfYawFusion
EKF: Improve efficiency of yaw fusion for External Vision
2017-07-31 19:37:15 +10:00
Paul Riseborough ba5de96fcb Merge pull request #311 from PX4/pr-ekfExtVis
EKF: Add ability to use EV and GPS data together
2017-07-29 16:29:53 +10:00
Paul Riseborough 3ee6898710 EKF: Enable origin to be maintained when starting aiding using EV only
When starting aiding using EV only and commencing GPS aiding later, this change means that the GPS origin is set to the local position 0,0 point rather than the current vehicle position. This avoids large changes in local position when GPs aiding starts.
2017-07-29 15:31:34 +10:00
Paul Riseborough e08da1c599 EKF: Add ability to use EV and GPS data together
Fuse external vision data using a relative position odometry method when GPS data is also being used and enable both GPOS and EV data to be fused on the same time step.
2017-07-26 18:06:18 +10:00
Paul Riseborough 74d1955dfa Merge pull request #310 from PX4/pr-ekfFixComments
EKF: Correct units in comments
2017-07-26 16:28:44 +10:00
Paul Riseborough f3909244f0 EKF: Correct units in comments 2017-07-25 09:17:18 +10:00
Paul Riseborough 33e8d5923f matlab: Allow replay to handle late start GPS data in log
Also minor fix to comments.
2017-07-24 16:34:50 +10:00
Paul Riseborough e18f92d9c2 matlab: Improve conversion of APM log data
Allow file conversion to work with unequal length GPS and GPA data.
Allow file conversion to work if range, flow and odometry data is not present.
2017-07-24 16:33:12 +10:00
Paul Riseborough 20584ee997 EKF: Improve efficiency of heading fusion calculations when using EV heading
Moves calculation only required for mag heading fusion into the if (_control_status.flags.mag_hdg) branch
When using EV yaw, the observed yaw angle is calculated directly from the EV quaternions using derived expressions from references in code comments.
2017-07-21 10:56:14 +10:00
Paul Riseborough df34b43c00 Merge pull request #308 from PX4/pr-ekfDoxygen
EKF: Update documentation and make compatible with Doxygen
2017-07-21 10:55:18 +10:00
Paul Riseborough 5aeeebf7ac matlab: Fix derivation for 321 Euler rotation sequence 2017-07-21 10:48:54 +10:00
Paul Riseborough 26b5f26891 matlab: Add scripts to calculate rotation conversions for 321 or 312 Euler sequences 2017-07-21 10:22:17 +10:00
Paul Riseborough aec01ce59c EKF: Update class variable documentation and make compatible with Doxygen 2017-07-20 20:16:42 +10:00
Paul Riseborough 627f8184b3 Merge pull request #307 from PX4/pr-constrain_vpos
constrain _terrain_vpos to be a minimum of _params.rng_gnd_clearance …
2017-07-20 17:35:35 +10:00
ChristophTobler 61a7991693 constrain _terrain_vpos to be a minimum of _params.rng_gnd_clearance larger than _state.pos(2) 2017-07-20 08:29:11 +02:00
Paul Riseborough 9b6e1ab2a7 Merge pull request #306 from PX4/revert-305-revert-303-pr-get_terr_valid
Revert "Revert "Split get_terrain_vert_pos() into valid and get_vpos""
2017-07-19 17:54:18 +10:00
Paul Riseborough e1fe5b2229 Revert "Revert "Split get_terrain_vert_pos() into valid and get_vpos"" 2017-07-19 17:52:35 +10:00
Paul Riseborough 13f8d949bd Merge pull request #305 from PX4/revert-303-pr-get_terr_valid
Revert "Split get_terrain_vert_pos() into valid and get_vpos"
2017-07-19 17:34:03 +10:00
Paul Riseborough c887b02f21 Revert "Split get_terrain_vert_pos() into valid and get_vpos" 2017-07-19 17:33:48 +10:00
ChristophTobler a59cf894d2 Merge pull request #303 from PX4/pr-get_terr_valid
Split get_terrain_vert_pos() into valid and get_vpos
2017-07-17 17:29:20 +02:00
ChristophTobler e429ecab17 check if terrain valid instead of initialized 2017-07-17 16:43:23 +02:00
ChristophTobler eae0522dc2 split into get_terrain_valid and get_terrain_vert_pos 2017-07-17 16:42:42 +02:00
ChristophTobler c42f820072 Merge pull request #295 from PX4/pr-rng_aid_hagl_hyst
rng aid: use hysteresis with lower hagl check
2017-07-17 16:05:45 +02:00
ChristophTobler 517fe8a71f rng aid: use hysteresis with lower hagl check 2017-07-17 13:36:51 +02:00
ChristophTobler 9da9aa632d Merge pull request #298 from PX4/pr-fix_rng_offset
init rng offset with ground clearance param when on ground to avoid n…
2017-07-17 13:33:10 +02:00
Paul Riseborough 18e81eba31 Merge pull request #300 from nicolaerosia/ekf2-dt
sensor_combined stores deltas in usec instead of seconds
2017-07-17 07:25:27 +10:00
Nicolae Rosia 5277141166 sensor_combined stores deltas in usec instead of seconds
Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
2017-07-16 20:50:16 +03:00
Paul Riseborough e2a5e57e14 matlab: Update replay scripts
Miscellaneous fixes and tuning changes.
Add plotting of Euler angle uncertainties.
2017-07-16 12:56:02 +10:00
ChristophTobler 8ed61ac052 init rng offset with ground clearance param when on ground to avoid noisy init 2017-07-13 17:43:19 +02:00
ChristophTobler 667517a9b6 Merge pull request #301 from PX4/pr-fix_hagl_valid
return hagl valid false if update was rejected
2017-07-13 17:28:53 +02:00
ChristophTobler d2945abd85 return hagl valid false if update was rejected 2017-07-13 14:17:48 +02:00
Paul Riseborough d69cc3d7c8 Merge pull request #293 from PX4/pr-fixExtVisionFallback
EKF: Allow fallback to non-aiding mode if external vision fusion is lost
2017-07-13 20:45:24 +09:00
Paul Riseborough 9ee35e38df EKF: Don't fallback when optical flow is lost if external vision data is being used 2017-07-13 20:21:41 +09:00
Paul Riseborough 1bb576c197 EKF: Allow fallback to non-aiding mode if external vision is lost. 2017-07-13 20:21:41 +09:00
Paul Riseborough 7a17f74910 Merge pull request #297 from ursa-drone/vispos_fix
Fixed vision position fusion bug
2017-07-12 22:15:54 +09:00
Isaac f96685267e Fixed vision position fusion bug 2017-07-10 13:44:51 +10:00
Paul Riseborough ec2b54fde7 EKF: Ensure normal yaw alignment using mag is performed if GPS method is not 2017-07-08 11:13:40 +02:00
Paul Riseborough d446f66105 EKF: Add a fixed wing mode with setter function 2017-07-08 11:13:40 +02:00
Paul Riseborough f064915889 EKF: Enable planes to recover from bad mag data at start of flight
Adjusts yaw by the amount of the error between GPS and EKF course if innovations are large.
2017-07-08 11:13:40 +02:00
Paul Riseborough 48a42dfb5b Merge pull request #288 from PX4/pr-ekfDelVelBiasFix
EKF: Improve protection against covariance instability in delta velocity bias states
2017-07-04 08:57:32 +10:00
Paul Riseborough 929f205a00 EKF: Changes arising from code review 2017-07-04 08:12:15 +10:00
Paul Riseborough 7b5f55303a EKF: Prevent covariance instability in delta velocity bias state estimation 2017-07-03 21:04:07 +10:00
Paul Riseborough eb1e73ec81 Merge pull request #283 from PX4/ekf_matrix_cleanup
EKF matrix typedef cleanup
2017-07-03 21:02:24 +10:00
Paul Riseborough ae118940b1 Merge pull request #292 from PX4/pr-use_baro_align
use baro for the ekf alignment if range finder is primary height source
2017-07-03 20:31:16 +10:00
Paul Riseborough dfbc9de48e Merge pull request #291 from PX4/pr-ekfWindEstBugFix
EKF: Fix bug affecting wind estimation for planes
2017-07-01 11:06:58 +10:00
ChristophTobler ed8fa16678 use baro for the ekf alignment if range finder is primary height source 2017-06-30 10:28:57 +02:00
Paul Riseborough 73ef95b37f Merge pull request #289 from PX4/pr-height_fixes
Pr height fixes
2017-06-30 12:31:26 +10:00
Paul Riseborough 59edccca4a EKF: Fix bug in wind estimation for fixed wing 2017-06-30 10:32:54 +10:00
Paul Riseborough ba4a311771 EKF: Update comments for wind estimation logic 2017-06-30 10:32:23 +10:00
Paul Riseborough 8e0cd1bc39 EKF: Add parameter to set initial and max allowed wind uncertainty
This enables the initial uncertainty to be set based on application and also ensures that the max allowed growth in wind state variance is consistent with the initial uncertainty specified.
2017-06-30 10:31:16 +10:00
ChristophTobler e1274ad28a move faultiness check above pop_first_older_than() and check independent of range aid to switch back to original sensor if available 2017-06-29 17:07:58 +02:00
ChristophTobler 0d9e535acb Use baro if reset to baro from gps and vice versa 2017-06-29 17:07:42 +02:00
ChristophTobler 4a4b0fa604 remove setting rng faulty in ev mode because not checked 2017-06-29 10:01:16 +02:00
ChristophTobler 066c641d61 range aid: switch to baro/gps even if rng aid conditions met and rng faulty 2017-06-29 09:47:02 +02:00
ChristophTobler 2f382c8e0e if hgt mode is range, switch to baro if range is faulty 2017-06-29 09:47:02 +02:00
ChristophTobler e4f36215cb if in range aid mode, check faultiness that otherwise would never change back 2017-06-29 09:47:02 +02:00
ChristophTobler e800de88b6 remove duplicate 2017-06-29 09:47:02 +02:00
Paul Riseborough 42b2469a46 matlab: fix comment error in file conversion utility 2017-06-29 10:41:42 +10:00
Paul Riseborough 70ece4df17 matlab: Add references for coning and skulling correction method 2017-06-28 15:27:59 +10:00
Paul Riseborough 8ccc45b26b matlab: Fix bug in replay plotting 2017-06-27 16:41:26 +10:00
Paul Riseborough 3e99898d47 matlab: Update readme file for the replay and improve optical flow tuning 2017-06-26 15:23:30 +10:00
Paul Riseborough c1829d8e9a matlab: fix bugs and add replay of PX4 optical flow test data 2017-06-26 14:48:03 +10:00
Paul Riseborough 233c4b49c5 matlab: Add derivation of observation Jacobians used by the terrain estimator 2017-06-20 16:01:30 +10:00
Daniel Agar c44488fdb8 EKF matrix typedef cleanup 2017-06-19 11:10:01 -04:00
Paul Riseborough 9303db85eb matlab: remove project specific code from mag cal comparison script 2017-06-17 17:35:07 +10:00
Paul Riseborough edeed770b7 matlab: fix alignment bugs 2017-06-17 11:46:36 +10:00
Paul Riseborough 7f1cca5b28 Merge pull request #244 from PX4/pr-rangeAid
Pr range aid
2017-06-16 17:47:21 +10:00
ChristophTobler 6f5cffafec fix type of range_aid parameter: int -> int32_t 2017-06-15 10:14:59 +02:00
ChristophTobler 1fed209804 fix formatting 2017-06-15 09:10:43 +02:00
Roman 5036967343 barometer does not special height sensor offset because a barometer
offset from the local origin is calculated if the primary source for
height is not baro

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman c5d464b821 make range sensor height offset computation more robust
- when switching to range finder use the current terrain estimate as
height sensor offset, otherwise spikes in the range measurements could lead
to a wrong offset

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman 182ea43445 fixed baro offset calculation
- do not subtract the height sensor offset variable when computing the
baro offset from the local origin. The baro height offset is calculated
when baro is not fused and so the height sensor offset used in that case
is associated to another sensor and has nothing to do with the baro.

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman 39983a7d55 range aid: added hysteresis for switching in and out of range aid
- prevents rapid switching
- added innovation consistency check for using range aid

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman 1b92c9b5b3 ekf_helper: fixed resetting height using range finder
- take range sensor offset wrt to IMU into account
- use projection to earth Z axis

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman 3778f0921a ekf: enable range finder to be used for estimating height even if it's not
the primary height source

- moved height control into single function in order to decide which sensor
should be used for estimating height
- under certain conditions allow to use the range finder to estimate height
even if it's not the primary height source
- fixed a bug where the delta time for the baro offset calculation was always
zero
- use methods to set height control flags to reduce code duplication and
to prevent bugs

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman 36bffd2571 ekf: calculate the delta time between consecutive baro measurments
(used for calculating filtered baro offset when primary height source
is not baro)

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman a0ab5cf0d7 ekf vel_pos_fusion: added height sensor offset to range innovation calculation
Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman a1e67396f4 ekf: added methods for setting control height flags
Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Paul Riseborough d6decb3c84 Merge pull request #277 from PX4/pr-ekfBufferParam
EKF: Add a parameter to enable setting of a minimum buffer length
2017-06-15 07:34:21 +10:00
Paul Riseborough c48b879843 Merge pull request #276 from CarlOlsson/feature/only_update_mag_states
EKF: Add feature to use the mag to only update the mag states
2017-06-14 11:04:14 +10:00
CarlOlsson b255d4a53a fixed typos 2017-06-12 18:13:22 +02:00
Paul Riseborough 97eb17a62f Merge pull request #265 from PX4/pr-ekfOutputObserver
EKF: add option to output velocity as time derivative of position
2017-06-12 19:01:54 +10:00
Paul Riseborough fed4a9bc5a EKF: add vertical position derivative output
Add calculation of a vertical position derivative to the output predictor. This will have degraded tracking relative to the EKF states, but the velocity will be closer to the first derivative of the position and reduce the effect inertial prediction errors on control loops that are operating in a pure velocity feedback mode.
Move calculation of IMU offset angular rate correction out of velocity accessor and into output predictor.
Provide separate accessor for vertical position derivative.
2017-06-12 10:45:46 +10:00
Paul Riseborough 16c7041f4a EKF: Add a parameter to enable setting of a minimum buffer length to handle large sensor timing jitter 2017-06-12 09:33:34 +10:00
Paul Riseborough a17879ab91 matlab: miscellaneous EKF replay script file improvements
Save APM and PX4 data into separate directories and level plots accordingly
2017-06-10 13:29:20 +10:00
Paul Riseborough 3a7a66d360 matlab: improve EKF simulation fusion control
Add ability to start before GPS checks pass.
Add ability to turn GPS fusion off and on during replay.
Add ability to turn Optical Flow fusion off and on during replay.
Add ability to turn Visual Odometry fusion off and on during replay.
Convert miscellaneous constants to parameters
2017-06-10 13:02:42 +10:00
Paul Riseborough dabf129daf matlab: Update EKF replay script files
Add automatic save of output results
2017-06-05 20:53:16 +10:00
Julien Lecoeur d0b4f1e225 Use binary operator~ instead of logical operator! 2017-06-05 01:07:52 +08:00
Julien Lecoeur c323b64742 Fix -Werror=int-in-bool-context on GCC 7 2017-06-05 01:07:52 +08:00
Daniel Agar 3e197fdded EKF tests remove extra semicolon 2017-06-05 01:06:41 +08:00
Daniel Agar e7ed32fb82 attitude_fw remove extra semicolons 2017-06-05 01:06:41 +08:00
Daniel Agar 6ed8512ff4 EKF parameters use int32_t (#279) 2017-06-03 17:16:29 -04:00
Paul Riseborough 8351e13c70 Matlab: update readme file and provide link to sample data set 2017-06-03 13:22:08 +10:00
Paul Riseborough 9f61622044 Matlab: Improve efficiency of odometry derivation 2017-06-03 12:39:24 +10:00
Paul Riseborough 510b8763ea Matlab: Add basic implementation of EKF to support development testing 2017-06-03 12:39:24 +10:00
CarlOlsson 871ebb251b EKF: Changed get_control_mode to coyp 32 bits 2017-06-01 11:02:56 +02:00
CarlOlsson a1308482fd EKF: Reset the mag states to the field state variance when switching from the inhibit mag mode to standard mode 2017-05-31 10:18:40 +02:00
CarlOlsson be16406b35 EKF: Add feature to use the mag to only update the mag states 2017-05-26 11:29:21 +02:00
Paul Riseborough 05c3c46f83 ekf2: changes arising from code review 2017-05-17 08:59:01 +02:00
Paul Riseborough 394dd95cba EKF: Don't do magnetic field estimation without earth frame measurements
Use horizontal acceleration to check if yaw is observable independent of the magnetometer.
Use rotation about the vertical to check if mag raises are observable.
If neither yaw of mag biases are observable, save the magnetic field variances and switch to magnetic yaw fusion.
Use the last learned declination when using magnetic yaw fusion so that the yaw reference remains consistent.
When yaw or biases become observable, reinstate the saved variances and switch back to 3D mag fusion.
2017-05-17 08:59:01 +02:00
Paul Riseborough 20db74eca8 Revert "EKF: Add parameter control of individual IMU axis delta velocity bias estimation"
This reverts commit 9c31632e2b.
2017-05-15 16:38:17 +10:00
ChristophTobler 47973a4820 run terrain estimator after control fusion modes. Otherwise _range_data_ready will never be true and fuseHagl() will never run 2017-05-15 07:42:51 +02:00
Paul Riseborough 9c31632e2b EKF: Add parameter control of individual IMU axis delta velocity bias estimation
Add a bitmask parameter to control bias learning for individual axes. This is achieved by setting the disabled states to zero together with their corresponding covariances.
Minor cleanup of the covariance prediction comments.
Removal of unnecessary variable copy operations.
Replace index operations to initialise covariance to zero with the more efficient memset.
2017-05-11 07:51:37 +02:00
Daniel Agar 87fdee440b EKF estimator_interface coverity fix 139419 2017-04-29 11:48:15 +02:00
Daniel Agar b3f8fd19e0 EKF estimator_interface coverity fix 140490, 140491 2017-04-29 11:48:15 +02:00
Paul Riseborough 5ee0ed5a0d EKF: Increase sensitivity and add tuning of bad accel checks 2017-04-29 11:47:38 +02:00
Paul Riseborough e35921534d EKF: fix reporting of optical flow fusion errors 2017-04-29 11:46:39 +02:00
Paul Riseborough 5112ffca90 EKF: Adjust default time delay params and clean up formatting 2017-04-27 07:34:42 +02:00
Paul Riseborough 8a2c5c1ad2 Merge pull request #266 from dagar/valgrind
ekf2 initialization fixes
2017-04-25 17:38:17 +10:00
Daniel Agar 3919d60f66 ekf2 initialization fixes 2017-04-24 18:56:50 -04:00
Paul Riseborough c62bdcbdb2 Merge pull request #264 from PX4/pr-ekfBuildErrorFix
EKF: remove clang build error message
2017-04-18 19:29:16 +10:00
Paul Riseborough c3f966f53e EKF: remove clang build error message 2017-04-18 19:22:59 +10:00
Paul Riseborough d47c372872 Merge pull request #263 from PX4/pr-ekfBuildErrorFix
EKF: Fix travis clang build error
2017-04-18 17:12:51 +10:00
Paul Riseborough 1e393530ed EKF: Fix travis clang build error 2017-04-18 17:06:31 +10:00
Paul Riseborough c607941e2f EKF: Allow external setting of air density for multi-rotor drag fusion 2017-04-16 13:07:12 +02:00
Paul Riseborough 3758c5a09d EKF: down-sample drag specific force data 2017-04-16 13:07:12 +02:00
Paul Riseborough 9f48c0505b EKF: improve covariance stability when estimating wind 2017-04-16 13:07:12 +02:00
Paul Riseborough 5cf31e439d EKF: Add specific drag fusion tuning parameters 2017-04-16 13:07:12 +02:00
Paul Riseborough 465b145929 EKF: Add multi-rotor drag model for wind estimation 2017-04-16 13:07:12 +02:00
Paul Riseborough b07acd8cf3 Merge pull request #254 from PX4/pr-ekfAccelErrorHandling
EKF: improve recovery from bad IMU accel data
2017-04-12 21:39:14 +10:00
Paul Riseborough 0d7e7e9d81 EKF: Don't use EKF origin in GPS drift check calculation
The GPS drift calculations need to be able to run independently of the EKF origin.
2017-04-12 13:11:34 +02:00
Paul Riseborough 7b996c5972 EKF: Increase measurement error allowance for accelerometer clipping 2017-04-07 16:37:27 +10:00
Paul Riseborough f0bbbc8dc6 EKF: Add reporting of bad accel status 2017-04-07 08:47:13 +10:00
Paul Riseborough 2f2ac5be43 EKF: Improve protection against severe IMU accel errors
Use vertical velocity and position innovation failure to detect bad accelerometer data caused by clipping or aliasing which can cause large vertical acceleration errors and loss of height estimation. When bad accel data is detected:

1) Inhibit accelerometer bias learning
2) Force fusion of vertical velocity and height data
3) Increase accelerometer process noise
2017-04-07 08:47:13 +10:00
Paul Riseborough a1a5734443 Merge pull request #259 from PX4/pr-ekfBugFix
EKF: Protect against covariance prediction and update errors
2017-04-06 16:30:07 +10:00
Paul Riseborough bef7325884 EKF: protect covariance prediction from delta time errors
Allow time step to vary by a factor of 2 to allow for jitter.
2017-04-06 13:34:37 +10:00
Paul Riseborough fa07536314 EKF: Prevent rounding errors causing bad conditioned covariance matrix
The previous practice of relying on the off-diagonals being zero caused problems with conditioning of the magnetometer fusion on one flight. By storing the variances when the learning inhibit becomes active and ensuring that the rows and columns in the covariance matrix for the inhibited states are always zero, the observed numerical conditioning error has been eliminated for replay of the problem flight log .
2017-04-06 13:34:37 +10:00
Paul Riseborough 8f6c51e10e Merge pull request #257 from PX4/pr-ekfBugFix
EKF: Do not move EKF origin when performing GPS checks
2017-04-01 08:07:49 +10:00
Paul Riseborough 710b2bcb9f EKF: Do not move EKF origin when performing GPS checks
Doing so can casue large jumps in GPS position and innovation check errors after landing and also reduces the effectiveness of pre-flight innovation consistency checks.
2017-03-31 16:19:30 +11:00
Nate Weibley 471e96ff6f Provide const dataptr access 2017-03-23 20:22:45 -07:00
Nate Weibley 2ad3ec46b9 Mark simple min, max, abs methods as const 2017-03-23 20:22:45 -07:00
Nate Weibley 66e1b406b8 Remove artifical need to virtualize dtors 2017-03-23 20:22:45 -07:00
Paul Riseborough 6d9b556b04 Merge pull request #255 from PX4/pr-ekfBugFix
EKF: fix bugs preventing preflight checks passing
2017-03-21 07:27:43 +10:00
Paul Riseborough a1ff219380 EKF: Extend range of conditions over which we run GPS quality checks
Previously GPS quality checks were only run until the EKF origin was set. This meant that they could not be used by other pre-flight checks.
This change ensures that checks will always be run when the vehicle on-ground or not using GPS to enable use by external preflight checks.
2017-03-21 07:57:23 +11:00
Paul Riseborough ed2938c8a4 EKF: fix bug causing bad accel bias status to latch 2017-03-21 07:57:23 +11:00
Paul Riseborough 2426f1dd3a EKF: remove use of memset to initialise variable
When using a union of flags and integer value it is safer to initialise the value to 0 rather than memset the flags because the flags may not define all bits in the integer.
2017-03-21 07:57:23 +11:00
Pavel Kirienko 499b897e5f Style fix 2017-03-17 12:18:39 -04:00
Pavel Kirienko 99b44c0242 NuttX math lib workaround 2017-03-17 12:18:39 -04:00
Pavel Kirienko 8dbe4a7531 NuttX workaround 2017-03-17 12:18:39 -04:00
Pavel Kirienko 23def31d21 Fixed stdlib imports 2017-03-17 12:18:39 -04:00
Pavel Kirienko e09cf12e2e Removed all uses of C library from tests 2017-03-17 12:18:39 -04:00
Pavel Kirienko 9ebf5f89db Removed all use of C library from the matrix namespace 2017-03-17 12:18:39 -04:00
Pavel Kirienko 552dad40a1 Fixed inclusions in matrix/ 2017-03-17 12:18:39 -04:00
Pavel Kirienko b74749fb61 Un-poisoned fabs 2017-03-17 12:18:39 -04:00
Pavel Kirienko 8af7b8c130 Poisoned the C library identifiers 2017-03-17 12:18:39 -04:00
Paul Riseborough 9ddfd66d01 EKF: Fix bug in accelerometer bias learning inhibit
This bug caused X and Y delta velocity bias state variance to be reset to the same value as the Z axis when learning was inhibited.
Documentation has also been updated.
2017-03-16 09:34:05 +01:00
Paul Riseborough 040639837e EKF: Use common timeout test for reporting deadreckoning
Use a parameter to set the time-out threshold
Use a class variable for the time-out flag
Clean up comments
2017-03-15 07:57:38 +01:00
Paul Riseborough 6ac7e2f807 EKF: report conservative position errors when failing innovation checks 2017-03-15 07:57:38 +01:00
Paul Riseborough 21e7734149 EKF: fix compile error 2017-03-14 13:00:54 +01:00
Paul Riseborough f7cae7f3ab EKF: improve compatibility with ARM cross compiler
This change removes the following compiler error when building using the ARM cross compiler.

/Users/paul/src/Firmware/src/lib/ecl/EKF/ekf_helper.cpp:45:12: error: 'std::abs' has not been declared
 using std::abs;
2017-03-12 22:55:23 +01:00
Paul Riseborough 9bb54ccc08 EKF: don't accept GPS data without a 3D lock 2017-03-10 10:15:53 +01:00
Paul Riseborough 588b27bde7 EKF: inhibit accelerometer bias learning if manoeuvre levels are excessive
This prevents bad scale factors and other errors associated with rapid manoeuvres corrupting the accelerometer bias estimates.
2017-03-10 10:14:06 +01:00
Paul Riseborough 5fb24c3032 EKF: Reduce EKF prediction delta time jitter
Make the target EKF rate an integer multiple of the IMU rate. This slightly increases the average prediction time step for the EKF from just over 10msec to 12msec, but the variation reduces significantly which makes filter tuning more deterministic.
Improve the algorithm used to adjust the collection time criteria to reduce jitter in the correction.
2017-03-10 10:14:06 +01:00
Paul Riseborough 324fe3b0c7 EKF: Add accel bias estimation fault to reporting 2017-03-10 10:14:06 +01:00
Paul Riseborough b51abf4aff EKF: Add console notification for accel bias covariance reset 2017-03-10 10:14:06 +01:00
Paul Riseborough 8511754094 EKF - detect and fix badly conditioned accel bias covariance values. 2017-03-10 10:14:06 +01:00
Paul Riseborough cf31945038 EKF: Fix use of incorrect timestamp
This was incorrectly using the IMU (1/250 sec) timestamp instead of the EKF (1/100 sec) value.
The corresponding accelerometer limit has been made a parameter and adjusted to match previous behaviour.
2017-03-10 10:14:06 +01:00
Paul Riseborough 879ad1fd2c Merge pull request #231 from pickledgator/ev_hgt_counter_fix
height counter update for ev primary height source
2017-03-10 14:18:35 +11:00
Paul Riseborough 092cc52838 EKF: Remove out of date comment 2017-03-10 14:18:13 +11:00
Paul Riseborough e4a4427991 Revert "EKF: fix compile error"
This reverts commit 6db552717d.
2017-03-10 07:38:02 +11:00
Paul Riseborough 6db552717d EKF: fix compile error 2017-03-07 21:13:45 +11:00
Paul Riseborough a02a046f5e EKF: Clean up auto-code files for body frame velocity measurements 2017-03-06 09:01:46 +11:00
Paul Riseborough e569578cf9 EKF: add derivation for body frame velocity measurements 2017-03-04 15:32:10 +11:00
Daniel Agar eb4f5ecbb9 cmake add all EKF sources (#243)
- trivial cmake cleanup
 - travis-ci build with both gcc and clang
 - update matrix to latest (matches PX4)
 - closes #240
2017-02-27 00:46:48 -05:00
Daniel Agar 507f48a147 geo NULL to nullptr (#242) 2017-02-25 15:27:00 -05:00
Paul Riseborough 0d77470efc EKF: Use conservative reporting of velocity errors when aiding is lost 2017-02-25 21:17:01 +01:00
Paul Riseborough 8070691aa4 EKF: Add accessor function for velocity accuracy 2017-02-25 21:17:01 +01:00
Paul Riseborough d6abf3f2e4 EKF: add accessor function for local position accuracy 2017-02-25 21:17:01 +01:00
Paul Riseborough b7d0b3c4d0 EKF: Improve naming of WGS-84 accuracy accessor function 2017-02-25 21:17:01 +01:00
Paul Riseborough d22599b440 EKF: Add reporting of inertial dead-reckoning status 2017-02-25 21:17:01 +01:00
Daniel Agar cf924956d7 test vector3 using matrix::isEqual 2017-02-24 20:47:41 -05:00
Daniel Agar d81ddb0f37 travis-ci only check formatting once 2017-02-24 20:47:41 -05:00
Daniel Agar de3517a5c7 cmake add asan and ubsan 2017-02-24 20:47:41 -05:00
Daniel Agar cfa68c2196 clang-tidy trivial cleanup 2017-02-24 20:47:41 -05:00
Daniel Agar 5f2f6f0308 rename cmake "Profile" to "Coverage" and add builds 2017-02-24 20:47:41 -05:00
Daniel Agar fb87165051 cmake add check 2017-02-24 20:47:41 -05:00
Daniel Agar f00edc9442 update to astyle 2.06 and fix formatting 2017-02-24 20:47:41 -05:00
Daniel Agar 68c7cc5bfd Quaternion add copyTo 2017-02-24 20:47:41 -05:00
Roman 7e2597ec28 update range sensor angle parameters in case they have changed
Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-22 14:12:05 +01:00
Roman aa53f45f15 terrain estimator: removed unused hrt dependancy
Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-22 14:12:05 +01:00
Roman 6480fcc3d5 terrain estimator: fixed computation of filtered time since last range update
- do not use hrt to compute delta time
- limit filter state
- do not use static variables

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-22 14:12:05 +01:00
Paul Riseborough 6561edb9a5 EKF: Clean up terrain estimation functionality.
This is a functionally equivalent. It moves all of the code for the terrain estimator into a single function call from the main filter update, making it clear that it is independent of the main filter.
2017-02-22 14:12:05 +01:00
devbharat 8004e9fe7e EKF: Make range finder data continuous check more robust
Use a filtered arrival time delta to determine if range data is continuous
2017-02-22 14:12:05 +01:00
Paul Riseborough d94068b88a EKF: Simplify calculation of height above terrain observation variance
The tilt compensation being applied previously was based on a flat earth geometric model assuming perfect tilt knowledge which reduces the effect of range errors on height error as the vehicle tilts. however in the real world, variations in terrain gradient and uncertainty in vehicle tilt and sensor alignment tend to increase height error with tilt, so the adjustment of observation variance with tilt has been removed given we do not have a valid mathematical model on which to base it.
2017-02-22 14:12:05 +01:00
Paul Riseborough 3dadc98b43 EKF: enable scaling of range observation variance with height 2017-02-22 14:12:05 +01:00
Paul Riseborough cf9c8de167 EKF: Add arbitrary pitch offset for range sensor 2017-02-22 14:12:05 +01:00
devbharat d9688fae7d EKF: Simplify terrain position validity check
Remove the relative accuracy check that was false triggering close to ground
2017-02-22 14:12:05 +01:00
Paul Riseborough af26ade1ce EKF: Use norm for vector length everywhere 2017-02-22 14:12:05 +01:00
Paul Riseborough 6e5a9aabe1 Merge pull request #234 from PX4/pr-optFlowUpdates
EKF: optical flow improvements
2017-02-22 09:00:48 +11:00
Daniel Agar e2211c5867 QuRT use __builtin_isfinite 2017-02-15 19:30:19 -05:00
Andreas Antener 66b8f7ec5b Removed obsolete fields from ECL control data 2017-02-12 11:40:14 +01:00
Andreas Antener 5363e8d307 Wheel controller: use library function to wrap pi 2017-02-12 11:40:14 +01:00
Daniel Agar 674ab3f81b attitude_fw fix style 2017-02-12 11:40:14 +01:00
Roman f22ad30ef3 removed turn compensation flag form control data since it's obsolete
Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman e1f9874c82 wheel controller: fix computation and scaling of integrator
Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman c4cc02b3f2 yaw controller: fix bug where roll for turn coordination was constrained
wrongly

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman 391b6dfd00 yaw controller: for now do not do turn compensation when inverted and use
the roll setpoint as limit for turn compensation

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman 66b7773059 yaw controller: deactivate lateral acceleration control for now but
put comment of how to do it properly

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman f300877db4 yaw controller: computed desired yaw rate based on coordinated turn constraint
Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman 4057defa53 pitch controller: removed turn offset compensation form pitch controller
- turn compensation is included in the desired yawrate

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman 55401ec1b0 fw attitude control: compute integrator correctly
- I gain was applied wrongly, such that the integrator value was depending
direcly on the I gain. This made the integrator value jump when the gain
was changed

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman ac7fc30ea7 fw attitude controllers: restructuring in order to allow acro flight mode
- split rate control into body rate control and euler rate control
- this allows standard attitude control but also direct rate control
of all three axes
- allow activation/deactivation of turn compensation

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Daniel Agar 2750961be6 c++11 initialization cleanup (#237) 2017-02-05 13:05:10 -05:00
Lorenz Meier 2283e6946a Matrix inversion: Ensure that null check is done against the same type 2017-02-04 10:42:10 +01:00
James Goppert 843be9418b Rename isfinite to is_finite to avoid name conflicts. 2017-02-03 18:15:43 -05:00
James Goppert 63aea23f9e Add cholesky decomp, Closes #30, and dynamic print buf 2017-02-03 17:54:16 -05:00
James Goppert a154e14439 Fix coverage for inverse. 2017-02-03 17:24:15 -05:00
James Goppert db6dfeafbe Add helper_functions include for inverse and in general header 2017-02-03 16:56:33 -05:00
James Goppert 230e84702a Fix unit test, create matrix isfinite. 2017-02-03 16:25:55 -05:00
Siddharth Bharat Purohit 7e3eff7b2d remove unnecessary duplicate matrices from inverse 2017-02-03 16:12:17 -05:00
Daniel Agar 7883085e4a clang-tidy readability-simplify-boolean-expr (#235) 2017-02-02 00:17:43 -05:00
Daniel Agar 47b8ef258b clang-tidy performance-type-promotion-in-math-fn (#236) 2017-02-02 00:17:08 -05:00
Paul Riseborough bcf7cac5d9 EKF: remove hardcoded limit on optical flow time delta
Allow for up to 50% lost data.
2017-01-18 06:06:45 +11:00
Paul Riseborough 3fb7effb0c EKF: Allow optical flow use when on-ground with poor data quality 2017-01-18 06:06:45 +11:00
Paul Riseborough 21270bb06a EKF: Use last known position when resuming OF aiding 2017-01-17 08:58:01 +11:00
Lorenz Meier 453bde73f8 ECL: Simplify / correct estimator interface 2017-01-15 10:17:41 +01:00
Roman c5a55d97aa initialise data members properly
- dot not use memset for struct with non POD types

Signed-off-by: Roman <bapstroman@gmail.com>
2017-01-15 10:02:31 +01:00
Paul Riseborough 1465adca2f EKF: Improve use of memcpy
Changes made to remove Coverity scan errors
2017-01-15 10:02:31 +01:00
Paul Riseborough 26a06567bb EKF: add missing initialisation for class variables 2017-01-15 10:02:31 +01:00
Paul Riseborough f999729d70 EKF: fix incorrect use of memcpy 2017-01-15 10:02:31 +01:00
Paul Riseborough b536382ae1 EKF: remove dead code 2017-01-15 10:02:31 +01:00
Paul Riseborough 6358bbd257 EKF: remove self assignment 2017-01-15 10:02:31 +01:00
Paul Riseborough 3b61528f0f EKF3: initialise default value for EV fusion gate 2017-01-15 10:02:31 +01:00
Paul Riseborough 9ddcba3ed0 EKF: remove un-used variable 2017-01-15 10:02:31 +01:00
Daniel Agar d668a2d798 clang-tidy performance-unnecessary-value-param 2017-01-14 16:26:25 -08:00
Daniel Agar a7cdef6c5c clang-tidy modernize-redundant-void-arg 2017-01-14 16:24:45 -08:00
Nic ec1a14bc6b height counter needs to be updated with ev counter value when our primary height source is set to ev 2017-01-05 21:47:13 -08:00
Paul Riseborough 3c4c09593f EKF: Rationalise console messages
Combine the observation action buffer and alignment messages
Ensure all data timeout messages are warnings.
Use consistent terminology.
2016-12-28 10:39:47 +01:00
Paul Riseborough 934890c2df EKF: Add validity flag to ekf origin reporting
Flag is false until the origin has been initialised
2016-12-28 00:56:09 +01:00
Dennis Mannhart b154ce9c33 Fixed include for snapdragon 2016-12-23 10:22:25 +01:00
Lorenz Meier 9618adb542 Simplify switch logic for validator 2016-12-21 08:10:08 +01:00
Lorenz Meier 6f78ef4084 Update validator to provide correct response for single sensor usage 2016-12-17 20:44:46 +01:00
Lorenz Meier aad3a2b751 Validator: Trim down printing and do not reset init state 2016-12-17 17:39:55 +01:00
Lorenz Meier 75520641a5 Make the equal value threshold configurable 2016-12-17 15:25:29 +01:00
Lorenz Meier 00dbffe11d Validator whitespace fixes 2016-12-17 13:45:28 +01:00
Lorenz Meier bf8a9a3d09 EKF: Whitespace fixes 2016-12-17 13:45:28 +01:00
Lorenz Meier 6282c72d2e Validation: Whitespace fixes 2016-12-17 13:45:28 +01:00
Lorenz Meier 10c6ae77ae Attitude fw yaw: Initialize yaw rate properly 2016-12-17 13:45:28 +01:00
Matthias Grob 47c0a93140 Quaternion: added tests for the corner cases of Dcm to quaternion conversion 2016-12-14 18:25:06 +01:00
Matthias Grob 2f4427a923 Quaternion: Implemented the largest pivot element method for conversion from Dcm to Quaternion to avoid numerical problems 2016-12-14 17:55:05 +01:00
Matthias Grob bb1a321639 Changed Dcm to inherit from SquareMatrix because it is square and we can use the trace method 2016-12-14 17:42:45 +01:00
James Goppert 7eff04742c Fix for zero check on quat from dcm ctor. 2016-12-13 10:21:55 -05:00
James Goppert 74a120f554 Handle some divide by zero edge cases on init. 2016-11-30 01:27:48 -05:00
James Goppert 945edbc58c Ensure direction is always defined for axis angle. 2016-11-30 00:40:55 -05:00
James Goppert 8a94f0f8ac Fix axis angle fabsf usage. 2016-11-28 10:43:29 -05:00
Daniel Agar 983c44088f fw att fix pitch feedforward constrained roll 2016-11-27 12:34:12 +01:00
Paul Riseborough a776b2c549 EKF: Fix bug preventing reset to GPS position when using optical flow 2016-11-26 10:28:58 +01:00
Paul Riseborough 460c9e5250 EKF: Don't try to fuse air data if not in normal aiding mode
Taking off before passing GPS checks would cause airspeed or sideslip to be fused when the filter was still using a constant position assumption. This would cause large airspeed innovations, invalid wind estimates and degrade filter performance after GPS was gained and position and velocity was reset.
2016-11-26 10:28:58 +01:00
James Goppert bf69be7f17 Fix formatting. 2016-11-22 10:07:08 -05:00
James Goppert f3e478cbff Fix matrix inverse pivotting logic. 2016-11-22 10:04:45 -05:00
Paul Riseborough 5ad329b641 EKF: Fix variable names to match convention 2016-11-07 22:23:12 +11:00
Paul Riseborough afd6e54b2a EKF: Allow for worst case timing jitter when setting observation buffer length 2016-11-07 11:50:16 +11:00
Paul Riseborough 403424d55d EKF: fix cross compiler build errors 2016-11-07 09:38:44 +11:00
Paul Riseborough d5b398ddb1 EKF: Minimise data buffer lengths
Saves RAM and reduces output predictor errors by using the smallest data buffer length that meets time delay and update rate requirements.
2016-11-07 09:06:45 +11:00
Paul Riseborough 750a8874c1 EKF: Improve recovery and reporting for badly conditioned sideslip fusion
Do not reset the entire covariance matrix if we are only using sideslip fusion to update wind states.
Improve reporting.
2016-11-05 12:19:01 +01:00
Paul Riseborough 6c7703d485 EKF: Update tuning for synthetic sideslip fusion
Used value that worked well for replay of flight logs
2016-11-05 12:19:01 +01:00
Paul Riseborough f76a2a5ff7 EKF: fix bug in sideslip fusion and reduce RAM usage
The bug meant the  Y velocity (state index 5)  covariance was not being updated correctly when sideslip was being used to constrain velocity drift (extended GPS loss).
The rework of the covariance update to reduce RAM follows the same pattern as adopted for other fusion processes
2016-11-05 12:19:01 +01:00
Paul Riseborough 951c8b77af EKF: Improve wind state reset logic
Enables wind estimation without an airspeed sensor and enables synthetic sideslip to be used with an airspeed sensor for improved wind state estimation.
Wind states and covariances are reset differently depending on whether airspeed is available.
2016-11-05 12:19:01 +01:00
Paul Riseborough 2fedbc8a18 EKF: Refresh sideslip fusion auto-code and improve covariance update efficiency 2016-11-05 12:19:01 +01:00
Paul Riseborough 352b4ca177 EKF: Allow sideslip fusion with airspeed fusion 2016-11-05 12:19:01 +01:00
Paul Riseborough fb6f4be453 EKF: don't allow sideslip fusion to affect non-airspeed states if not deae-reckoning 2016-11-05 12:19:01 +01:00
CarlOlsson a9182259a5 fixed bug in beta fusion 2016-11-05 12:19:01 +01:00
CarlOlsson 0e3ae4b323 fixed issue with the covariance update in synthetic sideslip fusion 2016-11-05 12:19:01 +01:00
CarlOlsson e1d9d503e3 updated logic of when to fuse beta. Now synthetic sideslip measurements are fused after 5 seconds of cruise flight with airspeed sensor activated 2016-11-05 12:19:01 +01:00
CarlOlsson dec686afd7 updated parameters 2016-11-05 12:19:01 +01:00
CarlOlsson 5205a8198b added function to control when to fuse beta 2016-11-05 12:19:01 +01:00
CarlOlsson f5d0228cd5 include ecl.h 2016-11-05 12:19:01 +01:00
CarlOlsson beb90f008d adopted code for upstream changes 2016-11-05 12:19:01 +01:00
CarlOlsson b7a4a1358f added sidelip_fusion.cpp 2016-11-05 12:19:01 +01:00
CarlOlsson 12aeaafbd3 adopted estimator_interface.h 2016-11-05 12:19:01 +01:00
CarlOlsson c8e3c24150 adopted ekf_helper.cpp 2016-11-05 12:19:01 +01:00
CarlOlsson 8f6c75bb0b adopted ekf.h 2016-11-05 12:19:01 +01:00
CarlOlsson 15768f6f93 adopted ekf.cpp 2016-11-05 12:19:01 +01:00
CarlOlsson 738414d36e adopted common.h 2016-11-05 12:19:01 +01:00
CarlOlsson 6c9cc5691c adopted EKF/CMakeLists 2016-11-05 12:19:01 +01:00
CarlOlsson daf44dcd67 adopted CMakeLists 2016-11-05 12:19:01 +01:00
Paul Riseborough 283c328c23 Merge pull request #212 from PX4/pr-ekfCriticalBugFix
EKF: Fix bug causing repeated resets if GPS sensor disconnected
2016-11-05 09:43:24 +11:00
Paul Riseborough 8aee45dd96 EKF: Fix bug causing repeated resets if GPS sensor disconnected 2016-11-05 09:36:06 +11:00
Paul Riseborough 2bc50489fd Merge pull request #210 from PX4/remove_KH
EKF: reduce KH to only the elements that are really needed, and merge the loops
2016-11-05 09:24:13 +11:00
James Goppert 34fccdd680 add renormalize method (#32) 2016-11-02 12:10:30 -04:00
Beat Küng 07c6aabd98 EKF: reduce KH to only the elements that are really needed, and merge the loops 2016-11-02 10:26:40 +01:00
Paul Riseborough 1b59a89a18 EKF: save some stack memory 2016-11-02 09:06:06 +01:00
Beat Küng f472324ae8 DataValidatorGroup: remove the assert
(avoid crashes in flight)
2016-11-01 22:49:20 +01:00
Beat Küng 25cb400da9 EKF: remove Ekf::KHP and move KHP to the methods where it's used
Everywhere where KHP is used, it is first completely reset, thus making
it unnecessary to keep it as a class member.

This saves 2.3KB RAM.

Stack sizes don't need changing, since there is already a function
Ekf::predictCovariance(), which needs around 3KB of stack and is called
close to where the fuse* functions are called.
2016-11-01 22:49:20 +01:00
Beat Küng 227938d263 DataValidatorGroup: add add_new_validator() to dynamically add new validators 2016-11-01 22:49:20 +01:00
Beat Küng ded3b1a690 DataValidatorGroup: fix memory leak, delete all DataValidator's in destructor 2016-11-01 22:49:20 +01:00
Beat Küng b870f92e1c DataValidator: use 32bit timeout instead of 64bit, saves memory 2016-11-01 22:49:20 +01:00
Paul Riseborough d07692e87e Merge pull request #204 from PX4/pr-gpsReset
ekf reset: more granular reset / timeout strategy for gps fusion
2016-10-26 06:52:10 +11:00
Paul Riseborough 79df7e8889 EKF: Reduce effect of bad airspeed when other aiding data available 2016-10-25 08:34:41 +02:00
Paul Riseborough 968cfae632 EKF: Fix bug preventing fallback from GPS mode if GPS is lost 2016-10-25 08:32:01 +11:00
Roman 63cf3d50be ekf gps reset: do not bother checking for need of reset if gps is not
available

Signed-off-by: Roman <bapstroman@gmail.com>
2016-10-24 11:45:36 +02:00
Roman c5f750dcca ekf reset: more granular reset / timeout strategy for gps fusion
- if both gps position and velocity measurements are rejected for 7 seconds
do a reset
- if only gps position measurements are rejected then wait for 14 seconds
as we still have velocity measurements to constrain the drift in position
- introduced ecl internal parameter for the timeout

Signed-off-by: Roman <bapstroman@gmail.com>
2016-10-24 11:40:12 +02:00
Roman Bapst 65de4962b5 Merge pull request #203 from PX4/pr-ekfVibeReporting
EKF: Add IMU vibration calculation and reporting
2016-10-19 13:32:53 +02:00
Paul Riseborough b10b0184c5 EKF: Add IMU vibration calculation and reporting
Add calculation and reporting of IMU delta angle and velocity coning and high frequency vibration
2016-10-19 21:46:55 +11:00
Roman 17c195d1cd ekf2 height reset: do not apply height change to height state twice (bug)
Signed-off-by: Roman <bapstroman@gmail.com>
2016-10-18 07:58:19 +02:00
Paul Riseborough 1093e6d789 EKF: fix documentation error 2016-10-13 22:37:14 +02:00
Roman f80b3481a4 reset the newest output sample for all possible resets
Signed-off-by: Roman <bapstroman@gmail.com>
2016-10-12 08:54:38 +02:00
Roman 238d947239 proper handling of position and velocity reset
- position reset method was returning before the actual delta values
were written and applied to the output buffer
- apply reset delta also to the output sample which was already taken out
from the output buffer, otherwise the complementary filter solution is
offset from the ekf solution

Signed-off-by: Roman <bapstroman@gmail.com>
2016-10-12 08:54:38 +02:00
Paul Riseborough 79b1d3018d EKF: Fix magnetometer innovation test ratio reporting bug 2016-10-12 08:51:45 +02:00
Lorenz Meier 394bfdc935 Update README.md
Fix prerequisites.
2016-10-08 11:00:52 +02:00
Daniel Agar 0d02bb2612 ecl attitude_fw fix excessive body fixed turn offset
-limit body fixed turn offset contrained roll to possible
roll setpoint range
-fixes #181
2016-10-06 09:03:48 +02:00
James Goppert 7dbb43f2cd Update matrix. 2016-10-06 09:03:10 +02:00
Paul Riseborough 352750e5d1 EKF: publish ekf solution status summary data 2016-10-06 09:02:29 +02:00
Paul Riseborough 007e73379f EKF: Improve reporting of position error 2016-10-06 09:02:29 +02:00
Paul Riseborough 744b79c1b2 EKF: Publish innovation test ratios 2016-10-06 09:02:29 +02:00
Paul Riseborough 5ab90048e1 Merge pull request #184 from PX4/pr-rngDelayFix
fixed computation of range measurement timestamp
2016-10-04 09:13:19 +11:00
Paul Riseborough b29174d86b Merge pull request #193 from PX4/pr-haglInit
Pr hagl init
2016-10-04 08:21:15 +11:00
Paul Riseborough 5702c2d51b Merge pull request #186 from priseborough/pr-ekfOutputPredictor
EKF: Improve Output Predictor Tracking
2016-10-04 07:47:34 +11:00
Paul Riseborough b5ba4f280f EKF: reduce output predictor velocity time constant 2016-10-03 14:13:07 +11:00
Paul Riseborough 65762e5998 EKF: publish output predictor tracking errors 2016-10-03 14:13:07 +11:00
Paul Riseborough c81f9f1dba EKF: Reduce output predictor tracking errors
Implements a PI tracking loop
2016-10-03 14:13:07 +11:00
Julian Oes 4fefe5c6c6 cmake: stack size args cleanup 2016-09-28 08:23:18 +02:00
Julian Oes 616aeb9ad7 ekf_helper: fix forgotten return value 2016-09-27 16:36:29 +02:00
Julian Oes fd403b733d CMakeLists: don't always optimize for size
Going forward the optimization flags should be set for a platform,
rather than for each individual module.
2016-09-27 16:35:35 +02:00
Roman c6e1d97176 terrain estimator: initialise with projection
Signed-off-by: Roman <bapstroman@gmail.com>
2016-09-20 14:09:42 +02:00
Roman cc05db4985 terrain estimator: pass initialisation return value correctly
Signed-off-by: Roman <bapstroman@gmail.com>
2016-09-20 14:07:50 +02:00
Roman d53f532079 fixed computation of range measurement timestamp
Signed-off-by: Roman <bapstroman@gmail.com>
2016-09-17 11:41:12 +02:00
Paul Riseborough 7240fc78fe Merge pull request #183 from CarlOlsson/cont_wind_estimation
Fix wind state  and wind variance initialization
2016-08-23 19:55:22 +10:00
James Goppert db4374882b Fix attitude tests. 2016-08-18 16:54:43 -04:00
James Goppert 3aeb099249 Revert "Use Hamilton quaternion definition."
This reverts commit 19554c4470.
2016-08-18 16:51:00 -04:00
James Goppert eab57b0187 Merge pull request #189 from PX4/revert-188-matrix_update
Revert "Update matrix."
2016-08-18 12:29:41 -04:00
James Goppert e5b74f511f Revert "Update matrix." 2016-08-18 12:29:31 -04:00
James Goppert 90f6bd7f3d Merge pull request #188 from PX4/matrix_update
Update matrix.
2016-08-18 12:06:20 -04:00
James Goppert 1daea6c1a3 Update matrix. 2016-08-18 11:58:31 -04:00
James Goppert 4653626d92 Format. 2016-08-16 19:04:23 -04:00
James Goppert 0eb8aa0c0b Support more of mathlib function for easier swap in px4. 2016-08-16 19:03:54 -04:00
James Goppert 558777f34c Fix formatting. 2016-08-16 12:43:42 -04:00
James Goppert 262a715d90 Fix some when building in px4. 2016-08-16 12:37:41 -04:00
James Goppert 4be23552c5 Bump version. 2016-08-16 12:13:26 -04:00
James Goppert 9af58f7e08 Coverage fix. 2016-08-16 12:00:37 -04:00
James Goppert 6197515a51 Fix shadow warnings. 2016-08-16 11:50:46 -04:00
James Goppert f02fb37265 Add Testing to git ignore. 2016-08-16 11:40:14 -04:00
James Goppert 37b00b0880 Added check or consistency of dcm and quaternion product. 2016-08-16 11:37:45 -04:00
James Goppert 1a87564b85 Added dcm quat prod consistency check. 2016-08-16 11:33:56 -04:00
James Goppert 4f13809420 Added axis angle accessors, removed == operator. 2016-08-16 11:05:01 -04:00
James Goppert 19554c4470 Use Hamilton quaternion definition. 2016-08-16 03:59:06 -04:00
James Goppert e6a6b4680c Use quaternion multiplaction for quaternion derivative. 2016-08-16 01:03:23 -04:00
CarlOlsson 8d60da1442 removed old wind initialization 2016-08-11 15:26:21 +02:00
CarlOlsson 51c8715638 fixed issue with airspeed never fused 2016-08-11 15:26:21 +02:00
Paul Riseborough d1d56d9e5e EKF: Add logic to to control wind state estimation 2016-08-11 15:26:21 +02:00
Paul Riseborough 75bec44b94 EKF: add function to initialise wind states 2016-08-11 15:26:21 +02:00
Paul Riseborough 6dff2df28e EKF: Add method to reset wind state covariances
Set variances in polar coordinates and rotate into cartesian frame
2016-08-11 15:26:21 +02:00
Paul Riseborough eff9af549f scripts: derive conversion from polar to cartesian wind state covariance 2016-08-11 15:26:21 +02:00
Paul Riseborough a9894d7e8c EKF: improve efficiency of airspeed fusion
Don't compute array entries where the result will be zero
2016-08-11 15:26:21 +02:00
Roman Bapst df0f8fed45 fixed wrong condition on which gps height would be fused (#180)
- this solves the issue where height innovations would jump
between two regimes

Signed-off-by: Roman <bapstroman@gmail.com>
2016-08-05 14:45:48 +02:00
Youssef Demitri 168d9add76 added getter function for wind states 2016-07-22 12:33:41 +02:00
Beat Küng 73b8ac954d ekf_helper.cpp: remove unused includes
This fixes a compile error with GCC 5.2.0 and cross-compilation:
/usr/arm-none-eabi/include/c++/5.2.0/arm-none-eabi/armv7e-m/fpu/bits/error_constants.h:122:27: error: 'ENOTSUP' was not declared in this scope
       not_supported =     ENOTSUP,

The problem was that the #include <iomanip> was taken from the host system,
which conflicts with includes from NuttX (NuttX has only basic C++ STL
support)
2016-07-15 12:50:11 +02:00
Lucas De Marchi 2240eb6b4f Move __STDC_FORMAT_MACROS to build system (#174)
__STDC_FORMAT_MACROS changes the behavior of inttypes.h to allow
defining format macros for printf-like functions. It needs to be defined
before any include is done, otherwise due to include chains and header
guards it may not take effect.

Instead of defining it everywhere it is used, let the PX4 build system
to deal with it.
2016-07-10 16:29:51 +02:00
georgehines 4f8ffb3420 promote to float (for internal representation) before scaling by format multiplier (#175) 2016-07-10 11:13:18 +02:00
Paul Riseborough a2d866520a EKF: perform innovation check in all axes before fusing 3D mag data (#171)
Perform the innovation consistency check on all axes first and exit if any axis fails. Reduces the likelihood of bad magnetometer data corrupting the attitude estimates.
2016-07-07 16:46:30 +02:00
James Goppert c563c41cd4 Fix cmake version. 2016-07-06 01:56:24 -04:00
James Goppert cbb7e06a1f Replace float with Type in kalman. 2016-07-06 01:39:06 -04:00
James Goppert 9353e4cb64 Fix bugs in axis angle. 2016-07-06 01:37:50 -04:00
James Goppert 7b7297b674 Fix for ctor comments on axis angle. 2016-07-05 21:30:22 -04:00
James Goppert fdf00d163c Small fix to README. 2016-07-05 21:27:42 -04:00
James Goppert 0b1bed6b00 Added deprecation warnings in source code. 2016-07-05 21:16:17 -04:00
James Goppert b78e124b73 Fix for README. 2016-07-05 21:08:12 -04:00
James Goppert 298e037f3a Added AxisAngle to README. 2016-07-05 21:06:48 -04:00
James Goppert 0f41af271a Added axis angle attitude representation. (#25) 2016-07-05 20:59:42 -04:00
James Goppert 3320d57f63 Fix format.sh user message. 2016-07-05 17:13:41 -04:00
Beat Küng 42eadb2656 format.sh: better inform the user what to do on style issues (#24) 2016-07-05 17:09:25 -04:00
Beat Küng b1f76782f6 Euler, Quaternion: fix compiler errors for GCC 6.1.1 (#23)
* Euler, Quaternion: fix compiler errors for GCC 6.1.1

GCC output:
error: implicit conversion from ‘float’ to ‘double’ to match other operand
of binary expression [-Werror=double-promotion]

* astyle: fix formatting for Euler.hpp & Quaternion.hpp
2016-07-05 17:00:35 -04:00
Beat Küng 5e0a229ee8 data_validator cleanup: use dimensions variable, use static for some constants (#167) 2016-06-30 13:28:01 +02:00
Paul Riseborough 0cc0008927 Merge pull request #166 from georgehines/matlab-log-import
add double support
2016-06-30 17:21:37 +10:00
Paul Riseborough eaae95fdc4 Merge pull request #160 from priseborough/pr-ekf2Improvements
EKF: clean up fusion control logic
2016-06-30 17:18:14 +10:00
Paul Riseborough f5e9ea1626 EKF: Prevent potential divide by zero 2016-06-30 17:06:32 +10:00
Paul Riseborough eb2afc522d EKF: fix bug preventing use of baro as a backup height source 2016-06-30 17:06:32 +10:00
Paul Riseborough 573f252b73 EKF: fix bug preventing GPS use as a backup height source 2016-06-30 17:06:32 +10:00
Paul Riseborough 5f9752cac8 EKF: Improve function names 2016-06-30 17:06:32 +10:00
Paul Riseborough 7bc9217f00 EKF: Clean up control of observation fusion
All the decision for a sensor are made within a specific function for that sensor and when there is data to process at the fusion time horizon.
Information and warning messages are improved.
2016-06-30 17:06:32 +10:00
Beat Küng 9a95898414 gps_message: remove time_usec_vel from struct (unused) 2016-06-27 10:12:23 +02:00
George Hines f467e714bd add double support 2016-06-23 09:24:11 -07:00
Roman Bapst 1b394460a3 fix comment about filter bias states
Signed-off-by: Roman Bapst <roman@px4.io>
2016-06-21 14:13:47 +02:00
Roman Bapst bec1a6831e added method to get gyro bias
Signed-off-by: Roman Bapst <roman@px4.io>
2016-06-21 14:13:47 +02:00
Lorenz Meier 74a77b45b2 Add DOI 2016-06-12 11:51:54 +02:00
Paul Riseborough 16bdbebdc6 Merge pull request #161 from PX4/pr-resetFix
do not return early in velocity reset method
2016-06-08 17:23:09 +10:00
Roman 703fb4e31b do not return early in velocity reset method otherwise
some code will not be executed
2016-06-08 07:51:18 +02:00
Paul Riseborough 928a7dd059 Merge pull request #157 from PX4/pr-ekf2ResetInterface
Change state reset information interface
2016-06-08 14:18:31 +10:00
Paul Riseborough 2024252d65 Merge pull request #158 from CarlOlsson/act_ars_off_by_default
activate tas fusion, off by default
2016-06-08 14:17:31 +10:00
Paul Riseborough e72788bd0f Merge pull request #159 from priseborough/pr-ekf2MagBugFix
EKF: Fix critical bugs in mag fusion and yaw reset
2016-06-08 14:11:47 +10:00
Paul Riseborough f26aca55a1 EKF: Fix bug in quaternion covariance initialisation function
The covariances between quaternion and non-quaternion states were not being updated
2016-06-08 13:23:30 +10:00
Paul Riseborough b3baab64f2 EKF: Updates to 3-axis mag fusion auto-code
The code fragments for the magnetometer fusion have been refreshed from the auto-coder.
Explicit floating point types used for constants.
The 3x24 observation Jacobian has been replaced with a 1x24 that is updated each axis iteration to save memory.
2016-06-08 12:56:59 +10:00
Paul Riseborough 21168f9929 EKF: fix bug in 3-axis mag fusion innovation test
The fault flag was not being set after an innovation test failure resulting in fusion of the failed measurement
2016-06-08 11:58:33 +10:00
Paul Riseborough 99b34f0df4 EKF: Only reset necessary terms when mag fusion covariance reset required
Only the quaternion and mag fusion state covariances are used in the mag fusion calculations.
2016-06-08 11:58:33 +10:00
Paul Riseborough 381d99aed6 EKF: Inform console of serious fusion numerical errors 2016-06-08 11:58:33 +10:00
Paul Riseborough dbfe8c0242 EKF: remove approximation in mag fusion innovation variance calculation
The covariance was not being updated with the observation from one axis before the innovation variance was calculated for the next axis. This results in greater weighting on measurements for subsequent axes.
2016-06-08 11:58:33 +10:00
Paul Riseborough 79228352e9 EKF: Reset mag and wind state variances to 'reasonable' values
If an in-flight reset is required, we do not want these variances going to zero as that will significantly delay recovery
2016-06-08 11:58:33 +10:00
Paul Riseborough 34ffffa021 EKF: Prevent use of non time-stamped invalid data during initialisation
Fixes bad height initialisation seen intermittently with snapdragon
2016-06-08 11:56:07 +10:00
CarlOlsson eded0a8f7e activate tas fusion, off by default 2016-06-07 13:49:17 +02:00
Paul Riseborough 3c84d37175 Merge pull request #156 from PX4/fix_printfs
EKF: use ECL printfs everywhere
2016-06-07 09:45:00 +10:00
Paul Riseborough 081e17729c EKF: delay commencement of 3D mag fusion until clear of ground
Wait until enough height has been gained to be clear of ground based magnetic anomalies. Failure to do so can result in incorrect earth field initialisation.
2016-06-06 21:59:46 +10:00
Roman Bapst 670c6ca019 change state reset information interface for more convenient handling
on firmware side
2016-06-06 13:22:20 +02:00
Paul Riseborough f08aee0a7d EKF: Fix covariance index bug 2016-06-04 00:36:07 +10:00
Julian Oes ab0ac05b47 ecl.h: guard PX4 defines with ifdef 2016-06-02 16:29:55 +01:00
Julian Oes b8e2f79005 EKF: correct include paths 2016-06-02 16:29:22 +01:00
Julian Oes ecfd8c867a EKF: use ECL printfs everywhere
- Changes all printfs to ECL printfs
- Add ECL_ERR.
- Include ecl.h where needed.
- Add forgotten pragma once.
2016-06-02 16:07:26 +01:00
Paul Riseborough 8bfdb0430c Merge pull request #150 from PX4/pr-ekf2StatusReporting
EKF: Publish full reset and innovation consistency check status data
2016-06-02 07:17:49 +10:00
Paul Riseborough 6a55d908c5 EKF: replace reset event times with event counters
Using a 64bit integer was unnecessary given it was only being used to detect a new reset event.
2016-06-01 17:13:00 +10:00
Paul Riseborough 70f76e1a6c EKF: publish innovation consistency check fail status 2016-06-01 17:13:00 +10:00
Paul Riseborough e371a303a9 EKF: publish the quaternion reset event 2016-06-01 17:13:00 +10:00
Paul Riseborough 81ca167da8 EKF: align output observer to EKF states on startup 2016-06-01 17:13:00 +10:00
Paul Riseborough 3ec9221c18 EKF: update output observer and capture reset event for EV yaw resets 2016-06-01 17:13:00 +10:00
Paul Riseborough 9ec09f5f4e EKF: update output observer and capture reset event for magnetic heading resets 2016-06-01 17:13:00 +10:00
Paul Riseborough 2b0d5c28f0 EKF: capture full quaternion change for reset events 2016-06-01 17:13:00 +10:00
Paul Riseborough b2e432e211 EKF: publish position and velocity reset data 2016-06-01 17:13:00 +10:00
Paul Riseborough 733862f649 EKF: move the reset status struct to the Ekf class
This protects it from being modified externally
2016-06-01 17:13:00 +10:00
Paul Riseborough aca0336392 EKF: update vertical position and velocity reset capture
Use reset event struct members instead of separate variables
2016-06-01 17:13:00 +10:00
Paul Riseborough 0605c88ecc EKF: capture horizontal position reset events 2016-06-01 17:13:00 +10:00
Paul Riseborough e3a1b4a3b3 EKF: capture velocity reset events 2016-06-01 17:13:00 +10:00
Paul Riseborough 4237269fab EKF: add struct to capture state reset events 2016-06-01 17:13:00 +10:00
Paul Riseborough 65da9173b9 EKF: capture innovation checks and reset events in separate variables
rename the innovation check status class variable and remove the reset flags from it.
2016-06-01 17:13:00 +10:00
Paul Riseborough 79705da7e6 EKF: make output predictor states consistent with position reset 2016-06-01 17:13:00 +10:00
Paul Riseborough 54d90261d5 EKF: make output predictor states consistent with velocity reset 2016-06-01 17:13:00 +10:00
Paul Riseborough 52229da089 EKF: capture optical flow innovation test failures 2016-06-01 17:13:00 +10:00
Paul Riseborough d80e71a499 EKF: capture HAGL innovation test failures 2016-06-01 17:13:00 +10:00
Paul Riseborough 8125717bf5 EKF: remove un-used airspeed health class variable
Airspeed rejection now is captured in _sensor_fault_status
2016-06-01 17:13:00 +10:00
Paul Riseborough 388e500180 EKF: remove un-used magnetometer health class variable
replaced by _sensor_health_status
2016-06-01 17:13:00 +10:00
Paul Riseborough cf489f4248 EKF: capture airspeed innovation test failures 2016-06-01 17:13:00 +10:00
Paul Riseborough e7690bd8f8 EKF: capture magnetometer innovation test failures 2016-06-01 17:13:00 +10:00
Paul Riseborough 3fb449295e EKF: capture yaw innovation test failures 2016-06-01 17:13:00 +10:00
Paul Riseborough 52f6eea52b EKF: capture position and velocity innovation test failures 2016-06-01 17:13:00 +10:00
Paul Riseborough aea827aa8a EKF: ensure filter fault status is initialised 2016-06-01 17:13:00 +10:00
Paul Riseborough 106482b078 EKF: add structure to capture innovation test failures and state resets 2016-06-01 17:13:00 +10:00
Paul Riseborough 654093cae1 Merge pull request #155 from PX4/pr-ekf2AlignmentNoiseFilterInit
EKF: Initialise alignment noise filters using valid data
2016-05-28 09:12:15 +10:00
Paul Riseborough 70c40d695d EKF: Initialise alignment noise filters using valid data
Don't initialise the states for the alignment data noise filters until the buffers have been flushed
2016-05-28 09:04:26 +10:00
Paul Riseborough 35bb6cc6e9 Merge pull request #154 from PX4/pr-ekf2AlignmentBufferFlush
EKF: Ensure bad initial data is flushed from buffers before use
2016-05-28 08:41:24 +10:00
Paul Riseborough c905684c12 EKF: Ensure bad initial data is flushed from buffers before using data to perform alignment 2016-05-28 08:28:57 +10:00
Paul Riseborough 9557f64248 Merge pull request #153 from PX4/pr-ekf2ExternalVision
EKF: external vision bug fixes
2016-05-27 18:57:41 +10:00
Paul Riseborough ad02818b3d EKF: Improve height reset for external vision
reset to measurement closest in time to fusion time horizon
2016-05-27 14:00:50 +10:00
Paul Riseborough 98c0b74a71 EKF: Initialise height correctly when using external vision data
If EV height selected ensure switch to correct height mode as soon as EV data is received
The 0 height datum is not at the initialisation position, so the height state needs to be reset to the measurement on startup
2016-05-27 13:59:14 +10:00
Paul Riseborough 9f81b8f09e EKF: provide reset protection for external vision height 2016-05-27 13:15:53 +10:00
Paul Riseborough 1b6c5bbafd EKF: Enable height source to be selected independent of EV aiding 2016-05-27 13:14:52 +10:00
Paul Riseborough 00bada8f25 EKF: Clean up logic for horizontal position fusion
Remove reference to optical flow fusion mode
Simplify logic flow for selection of observation noise
Remove unnecessary conditional statement
2016-05-27 11:29:10 +10:00
Paul Riseborough 6f412a73b4 EKF: Use correct height gate when using external vision 2016-05-27 11:24:53 +10:00
Paul Riseborough e41524ac9d EKF: remove unused variables 2016-05-27 11:21:04 +10:00
Paul Riseborough 53030b9297 Merge pull request #152 from PX4/pr-ekf2FixObsDataHandling
EKF: Fix vulnerability to loss of observations due to high input data rates
2016-05-26 21:44:10 +10:00
Paul Riseborough 7dd123094f EKF: correct documentation 2016-05-26 21:42:56 +10:00
Paul Riseborough d5b5cb5899 EKF: improvements to observation collection
Remove unnecessary function calls
Remove un-used functions
Apply a consistent maximum safe data rate check for all observation inputs
2016-05-26 13:27:08 +10:00
Roman Bapst 3c87ae78ff added two more examples to the README 2016-05-25 15:24:35 +02:00
Paul Riseborough e2d9e19a5d Merge pull request #148 from PX4/pr-ekf2OutputPredictor
EKF2 provide alternative output velocity prediction
2016-05-24 08:46:33 +10:00
Paul Riseborough 9f0b9909e7 Merge pull request #149 from PX4/pr-ekf2FixUnwantedGpsUse
EKF: prevent unwanted GPS use
2016-05-24 08:45:18 +10:00
Paul Riseborough 5a40aa2c1a EKF: prevent unwanted GPS use 2016-05-24 07:55:09 +10:00
Paul Riseborough 90d65071c1 EKF: Add output predictor processing option
Setting the velocity tracking tine constant to a negative number causes the output predictor to use a different method of correcting the velocity which provides a velocity output that is kinematically consistent with the position output.

This may improve height controller performance under some circumstances
2016-05-23 07:47:10 +10:00
Paul Riseborough 30917430e2 EKF: inline ring buffer functions used repeatedly
These functions get called 30 times each per output prediction cycle
2016-05-23 07:43:59 +10:00
Paul Riseborough c8c2d6d963 Merge pull request #145 from CarlOlsson/small_fix
Deleted second update of transformation matrix
2016-05-23 07:40:58 +10:00
Carl Olsson 0fafc49a49 fixed typos (#147) 2016-05-22 17:40:43 +02:00
Carl Olsson dbe2513d48 updated logic of calculation of body field variance (#146) 2016-05-22 17:39:25 +02:00
CarlOlsson eb70aca2e8 deleted second update of transformation matrix 2016-05-22 16:03:30 +02:00
Paul Riseborough 4c5252269c Merge pull request #142 from PX4/pr-ekf2ImproveHeadingReset
EKF: Improved heading reset
2016-05-21 22:38:26 +10:00
Paul Riseborough ae5071f668 EKF: Improve heading reset
Improves reset of quaternion covariance matrix after a heading reset by preserving variance in roll and pitch and resetting yaw variance to the measurement variance.
2016-05-21 19:30:15 +10:00
Paul Riseborough 4b279a8836 Merge pull request #144 from waltjohnson/master
Addressed C99 compiler issues of initializing variables in header and…
2016-05-20 07:37:24 +10:00
waltjohnson a9ca8c294c Generalized isfinite() in similar form as done in ekf.cpp https://github.com/PX4/ecl/blob/e3b9800cac459e7c279395c18191a872f465f848/EKF/ekf.cpp#L45-L52 2016-05-19 10:34:16 -06:00
waltjohnson 6eaa00e3f9 isfinite() is not part of the math class, rather the math.h header file. 2016-05-19 10:07:45 -06:00
waltjohnson 7c158aa59b Addressed C99 compiler issues of initializing variables in header and unused included statements. 2016-05-19 09:58:18 -06:00
Paul Riseborough f5e2dabc2b Create CONTRIBUTING.md 2016-05-19 18:14:33 +10:00
Paul Riseborough e3b9800cac Merge pull request #138 from pickledgator/evTesting
EV testing
2016-05-19 12:56:41 +10:00
Paul Riseborough 867bc8c601 Merge pull request #139 from PX4/pr-ekf2Alignment
EKF: Improve angular alignment consistency
2016-05-18 21:23:31 +10:00
Paul Riseborough c1b02eaa91 EKF: Don't use 3-axis magnetometer fusion until the tilt is aligned 2016-05-18 21:06:45 +10:00
Paul Riseborough aaac867da8 EKF: Adjust tilt alignment threshold 2016-05-18 20:34:12 +10:00
Paul Riseborough e272d5f003 EKF: Use consistent position noise values during alignment 2016-05-18 20:11:08 +10:00
Paul Riseborough b9a3712ccb EKF: record yaw alignment event during initialisation to allow heading fusion to start early
This ensures bad yaw gyro biases are compensated for early, rather than waiting for the tilt alignment to fully converge before fusing heading.
2016-05-18 19:25:19 +10:00
Paul Riseborough 94a63ec9d5 EKF: don't interfere with quaternion covariances during tilt alignment 2016-05-18 19:25:19 +10:00
Paul Riseborough 22fba0fc6e EKF: don't initialise filter without EV data if we are relying on it 2016-05-18 19:25:19 +10:00
Nic 1b16f3575a added ev_pos flag check to valid_lpos, disable fake gps when ev_pos is valid 2016-05-17 21:07:04 -07:00
Paul Riseborough 50ba26a434 Merge pull request #134 from PX4/pr-ekf2Alignment
EKF: Improved tilt alignment control
2016-05-18 12:34:22 +10:00
Paul Riseborough e4b2e9c93d EKF: Improve yaw alignment
Uses best conditioned of 321 or 312 Euler sequence to calculate initial yaw angle.
Allows alignment of yaw angle using external vision data
2016-05-18 12:16:16 +10:00
Roman eeb595d1db applied formatting 2016-05-17 08:27:35 +02:00
Paul Riseborough 57b2a256f7 EKF: Improve initialisation of quaternion covariances
Convert uncertainty in initial rotate vector into quaternion covariances using symbolic toolbox derived expressions.
Enable setting of initial angle uncertainty via a parameter
2016-05-17 12:47:20 +10:00
Paul Riseborough a4728bc748 EKF: derive auto-code for quaternion state covariance initialisation 2016-05-17 12:28:58 +10:00
Paul Riseborough 88860d0307 EKF: Enable tuning for IMU switch on bias errors 2016-05-17 11:17:24 +10:00
Paul Riseborough 1540e937b1 EKF: Improve tilt alignment monitoring
Convert quaternion covariances into an angular alignment variance vector and discard the z component so that yaw uncertainty does not affect the result.
2016-05-17 11:17:24 +10:00
Paul Riseborough 6ca8a36782 EKF: Add matlab derivation for calculation of rotation vector variance 2016-05-17 10:56:19 +10:00
Roman f4e2b21608 - better description for quaternion class
- revert conversion functions to constructor
2016-05-16 09:21:44 +02:00
Paul Riseborough d5046b078e Merge pull request #106 from PX4/pr-visionSupport
EKF: add support for external vision data
2016-05-16 07:32:46 +10:00
Andreas Bircher 81eacb0cfa removing body and intertial frame expressions and establishing consistency 2016-05-15 18:42:21 +02:00
Roman 4a405e7f60 make it clear that we are using right hand rotation convention 2016-05-15 18:42:21 +02:00
Roman 10c1b49bde fix typo 2016-05-15 18:42:21 +02:00
Roman 1033e145a5 fix some typos and better explanation of quaternion ordering 2016-05-15 18:42:21 +02:00
Roman 2b3bdb523d better description for quaternion class 2016-05-15 18:42:21 +02:00
Roman 3152d3d6cf better function descriptions for rotation classes:
- do not talk specifically about body or earth frame, just use frame 1 and frame 2
2016-05-15 18:42:21 +02:00
Andreas Bircher e3a1d67444 adding detailed comments on rotation classes 2016-05-15 18:42:21 +02:00
Andreas Bircher af2e6d952e correcting comments 2016-05-15 18:42:21 +02:00
Andreas Bircher 34e6e2a941 refactoring rotation classes and adding initial description 2016-05-15 18:42:21 +02:00
Paul Riseborough c955bfbf93 EKF: fix previous merge error 2016-05-15 20:36:51 +10:00
Paul Riseborough 920d83d68c EKF: Fix bugs preventing use of external vision yaw data 2016-05-14 21:56:41 +10:00
Paul Riseborough 13c3a95bc1 EKF: Add missing line returns 2016-05-14 21:17:30 +10:00
Paul Riseborough 59eb9eb3db EKF: fix shadow declaration arising from rebase 2016-05-14 21:17:30 +10:00
Paul Riseborough 172f4be594 EKF: Fix bug in calculation of terrain observation variance 2016-05-14 21:17:29 +10:00
Paul Riseborough b985e58333 EKF: clean up control function
With the addition of new observation types, the control function has become too large and needed be broken up into separate functions
2016-05-14 21:17:29 +10:00
Paul Riseborough f4a0f69f6e EKF: print to console when starting EV fusion 2016-05-14 21:17:29 +10:00
Paul Riseborough 349c731375 EKF: remove PX4 dependant text output 2016-05-14 21:17:29 +10:00
Paul Riseborough ac9b7a3df6 EKF: Ensure use of EV aiding inhibits use of other height sources 2016-05-14 21:17:29 +10:00
devbharat cf1df5861a Undid hack in ecl. Handled yaw missalignment on the vision side. 2016-05-14 21:17:29 +10:00
devbharat d16f413b55 Hack to fix external vision pos offset compensation 2016-05-14 21:17:29 +10:00
devbharat d3bad9fdb0 Correct height fusion flag when using sensor other than baro 2016-05-14 21:17:29 +10:00
devbharat 6d20a426e0 Reset time_last_ext_vision 2016-05-14 21:17:29 +10:00
devbharat b681c9a5d0 Added external vision noise parameters etc and position offset 2016-05-14 21:17:29 +10:00
devbharat ff8f03b5dd Added compensation for VI sensor offset. Check sign. 2016-05-14 21:17:29 +10:00
Paul Riseborough e917d6c7f2 EKF: Add fusion of external yaw data 2016-05-14 21:17:29 +10:00
Paul Riseborough 37a09c61bc EKF: Don't use delayed data to start EV aiding 2016-05-14 21:17:29 +10:00
Paul Riseborough 25f1d1d766 EKF: Add fusion of external vision 3D pos data 2016-05-14 21:17:29 +10:00
Paul Riseborough 81469d6621 EKF: Add position, height and velocity reset for EV aiding 2016-05-14 21:17:29 +10:00
Paul Riseborough 3a0fcd03d7 EKF: Add interfaces and variables to use ext vision data 2016-05-14 21:17:29 +10:00
Paul Riseborough 7afd015b49 Merge pull request #129 from PX4/pr-ekf2OutputFilterTracking
EKF:  Improve output observer position and velocity tracking
2016-05-14 15:53:19 +09:30
Paul Riseborough c7e225124c EKF: Improve output observer position and velocity tracking
Replace the delayed time feedback mechanism used by the translational states with a direct feedback method.
Time constants for velocity and position convergence can be separately adjusted with tunable parameters
The method is more computationally more expensive because it requires modification of the output buffer history but is acceptable because it only requires 6 FLOP per buffer index for a total of 30*6 = 180 FLOP
The method was not applied to the attitude states because the quaternion operations required at each buffer index would have been computationally prohibitive.
2016-05-14 12:45:29 +09:30
Paul Riseborough 627d08ecc9 Revert "EKF: Fix bug in output observer"
This reverts commit 03f3df7415.
2016-05-14 12:26:46 +09:30
Paul Riseborough 03f3df7415 EKF: Fix bug in output observer
Bug was causing output observer state history to be stored at the the EKF, not IMU output rate and resulted in degraded tracking performance
2016-05-14 08:33:05 +09:30
Lorenz Meier d595596c42 Merge pull request #114 from PX4/fix_linux_build
CMakeLists: use find_package Eigen3
2016-05-12 12:55:40 +02:00
Carl Olsson 5217b73df1 added bad_airspeed reporting (#123) 2016-05-12 10:06:04 +02:00
Carl Olsson b126921894 changed airspeed innovation gate to 5 (#119) 2016-05-12 10:05:26 +02:00
Julian Oes b8ccc58887 cmake: ignore more eigen warnings 2016-05-12 08:38:37 +02:00
Julian Oes b74114a573 cmake: ignore deprecated warnings of Eigen 2016-05-12 08:27:59 +02:00
jaredkw 3509329f30 Define M_PI float, change logical and to && 2016-05-11 18:35:05 -04:00
Julian Oes 07ecffc963 cmake: another try to get the module path right 2016-05-10 17:59:01 +02:00
Julian Oes 001433c660 cmake: debug output for path 2016-05-10 17:59:01 +02:00
Julian Oes d242bb78b9 cmake: try to provide path to FindEigen3 2016-05-10 17:59:01 +02:00
Julian Oes dcd191d734 cmake: include FindEIgen3.cmake for older cmake 2016-05-10 17:59:01 +02:00
Julian Oes 798cdfe675 build.sh: if cmake fails, don't continue with make 2016-05-10 17:59:01 +02:00
Julian Oes 37b73c7d85 README: updated build instructions, prerequisites 2016-05-10 17:59:01 +02:00
Julian Oes fc47684942 build.sh: get path right for travis build 2016-05-10 17:59:01 +02:00
Julian Oes 54e62f1495 travis: just use libeigen3-dev 2016-05-10 17:59:01 +02:00
Julian Oes 3d28f7ecca CMakeLists: use find_package Eigen3
Instead of hardcoding the Eigen3 path which only works on Mac, use
find_package(Eigen3).
2016-05-10 17:59:01 +02:00
Paul Riseborough e91a934f07 Merge pull request #124 from PX4/pr-removeVehicleArmStatus
Remove reliance on vehicle arm status
2016-05-10 10:54:32 +10:00
Paul Riseborough 1a24ec5f50 EKF: remove unused flag from control status message 2016-05-10 10:45:06 +10:00
Paul Riseborough 481c624975 EKF: Remove use of vehicle arm status
Use single externally set in-air status for all decisions
2016-05-10 10:23:08 +10:00
James Goppert 4d33092bcb Removed lcov testing from travis. 2016-05-09 12:19:26 -04:00
James Goppert dd8ff8db12 Made coverage html output optional. 2016-05-09 12:13:00 -04:00
James Goppert 061609322a Added command line output for coverage. 2016-05-09 12:01:20 -04:00
James Goppert 32ad3989f2 Fix lcov install on travis. 2016-05-09 11:55:45 -04:00
James Goppert f4902fafb9 Added lcov package for coverage test. 2016-05-09 11:53:18 -04:00
James Goppert 155202f6b0 Found a few coverage gaps with local coverage testing. 2016-05-09 11:49:45 -04:00
James Goppert 6efa3c1cb5 Added make coverage to travis. 2016-05-09 11:34:26 -04:00
James Goppert 3f77991388 Merge branch 'MaEtUgR-maetugr-fix2' 2016-05-09 11:24:55 -04:00
James Goppert 8b7eae3b4a Merge branch 'maetugr-fix2' of https://github.com/MaEtUgR/Matrix into MaEtUgR-maetugr-fix2 2016-05-09 11:24:28 -04:00
James Goppert bd8420fcf6 Added example of assignment to already created object. 2016-05-09 11:12:06 -04:00
Paul Riseborough 3cdf56e57c Merge pull request #122 from CarlOlsson/airspeed_fix
fixed_airspeed_healthy_bug
2016-05-09 10:24:22 +10:00
Paul Riseborough e06c0f41d7 Merge pull request #117 from PX4/ekf2AccuracyImprovement
EKF: Accuracy Improvements
2016-05-09 09:24:44 +10:00
CarlOlsson ee7d7aeb8a fixed_airspeed_healthy_bug 2016-05-08 18:30:37 +02:00
Paul Riseborough 175723f690 EKF: Allow for larger accel bias offsets on startup 2016-05-08 18:03:58 +10:00
Paul Riseborough 161ac2e051 EKF: ensure position co-variances are reset
When transitioning into optical flow nav  from a non-aiding condition during ground operation, ensure position covariances are reset as they could be invalid.
2016-05-08 18:03:09 +10:00
Paul Riseborough feb4db6347 EKF: protect against large IMU errors during initial tilt alignment
Turn off innovation consistency checks for height and synthetic position measurements until the tilt as aligned
2016-05-08 17:54:45 +10:00
Paul Riseborough 00973d6215 EKF: fix pos/vel fusion innovation variance bug 2016-05-08 17:51:47 +10:00
Paul Riseborough 2144a40a3c EKF: redefine accelerometer bias state inhibit switch bit location 2016-05-08 16:03:21 +10:00
Paul Riseborough 724280fd1f EKF: move calculation of optical flow observation variance into a function
Allows it to be used when calculating initial state variance
2016-05-08 15:40:06 +10:00
Paul Riseborough 25682dce91 EKF: Prevent badly conditioned covariance calculation when starting or resetting to optical flow 2016-05-08 10:30:40 +10:00
Paul Riseborough c66ed7b662 EKF: Add interface method for filter fault status 2016-05-07 21:18:00 +10:00
Paul Riseborough 020b87933e EKF: replace fault status struct with a union to facilitate logging 2016-05-07 21:11:16 +10:00
Paul Riseborough 7f5669fb2d EKF: consolidate covariance corrections
Combines the forced symmetry, variance limiting and zeroing of covariances for unwanted states in the one function.
This ensures a consistent correction is applied after every covariance prediction or correction.
2016-05-07 20:29:50 +10:00
Paul Riseborough 0c6a367e1b EKF: fix Travis build error 2016-05-07 17:45:49 +10:00
Paul Riseborough 22f0f52bf1 EKF: fix travis build error 2016-05-07 17:06:45 +10:00
Paul Riseborough 9e53ff2f80 EKF: Improve protection against bad optical flow fusion 2016-05-07 14:23:56 +10:00
Paul Riseborough 1126048a93 EKF: Improve protection against bad airspeed fusion 2016-05-07 14:23:38 +10:00
Paul Riseborough c8d95586e7 EKF: Improve protection against bad magnetometer fusion 2016-05-07 14:23:20 +10:00
Paul Riseborough 310bd97080 EKF: Improve protection against bad pos vel fusion 2016-05-07 14:22:59 +10:00
Paul Riseborough da9d894441 EKF: Improvements to covariance reset 2016-05-07 12:57:41 +10:00
Lorenz Meier 199c423f1f Attitude fw: Remove builtin perf counters 2016-05-05 20:06:01 +02:00
Paul Riseborough d9aeace6ac EKF: tuning update 2016-05-05 21:23:03 +10:00
Paul Riseborough f1b7e7714e EKF: Make average update rate of EKF closer to target
With the EKF, the average update rate is more important than the instantaneous value as it affects tuning. This patch ensures that the EKF prediction cycle will be performed early if the previous one was late in an attempt to maintain the target update rate.
2016-05-05 21:23:03 +10:00
Paul Riseborough 1daa6c7866 EKF: update tuning defaults 2016-05-05 21:23:03 +10:00
Paul Riseborough fc6c0c7ebf EKF: Update covariance prediction
Refresh auto generated code
Make 3-axis accel fusion the default and no accel fusion the option
2016-05-05 21:23:03 +10:00
Paul Riseborough ecaffe63af EKF: update tuning defaults 2016-05-05 21:23:03 +10:00
Paul Riseborough 7a74d58591 EKF: reduce initial accel bias uncertainty 2016-05-05 21:23:03 +10:00
Paul Riseborough a7d08d08fc EKF: Relax tilt alignment check 2016-05-05 21:23:03 +10:00
Paul Riseborough 5523a4f225 EKF: Fix IMU bias compensation scale error in output filter
Delta angle and velocities are calculated assuming data is at the filter update rate, not the IMU update rate
2016-05-05 21:23:03 +10:00
Paul Riseborough fd109b00ab EKF: replace in-line code with existing function 2016-05-05 21:23:03 +10:00
Paul Riseborough 727a43764f EKF: update initial angle alignment check 2016-05-05 21:23:03 +10:00
Paul Riseborough bc34b14779 EKF: Initialise height state variance to a value compatible with the measurement
A large height state variance and small measurement variance can destabilise the filter in the first few seconds after alignment
2016-05-05 21:23:03 +10:00
Paul Riseborough 29a361d3a3 EKF: Use intuitive units for gyro and accel bias process noise
This also makes the tuning less sensitive to changes in the EKF update rate.
2016-05-05 21:23:03 +10:00
Paul Riseborough 799865c934 EKF: update default tuning parameters 2016-05-05 21:23:03 +10:00
Paul Riseborough f01f4ae4b1 EKF: tidy up mag declination fusion 2016-05-05 21:23:03 +10:00
Paul Riseborough 0d31aad33a EKF: Fix bad limit on magnetometer noise parameter 2016-05-05 21:23:03 +10:00
Paul Riseborough 7069fb7a04 EKF: refresh auto code for mag fusion 2016-05-05 21:23:03 +10:00
Paul Riseborough ffea65e1a4 EKF: fix bug in state prediction 2016-05-05 21:23:03 +10:00
Paul Riseborough 63f093a10a EKF: Update upper limits for state variances
This limiting is a  last resort measure and the limiting for normal operation should be achieved by modification in the covariance prediction
2016-05-05 21:23:03 +10:00
Paul Riseborough 26a51c667d EKF: Improve robustness to initial gyro bias errors
Allows for ~6 deg/sec of startup bias
2016-05-05 21:23:03 +10:00
Paul Riseborough 7530e30012 EKF: Improve IMU data collection
Use IMU driver published delta angle integration time to determine when enough data has been accumulated.
Perform basic first order sculling corrections on delta velocity data
Comment steps to make make method clearer
2016-05-05 21:23:03 +10:00
Paul Riseborough f23f0b1035 EKF: fix bugs in stationary process model covariance prediction
Noise variance for stationary states was  being overwritten by the covariance prediction operations for the kinematic states
Unwanted states could end up with non-zero covariance values
The forced symmetry operation was being applied too late to be effective
2016-05-05 21:23:03 +10:00
Paul Riseborough a373ada858 EKF: explicitly define floating point type in hardcoded constants 2016-05-05 21:23:03 +10:00
Paul Riseborough a189c60d33 EKF: update code fragment text files 2016-05-05 21:23:03 +10:00
Paul Riseborough f4e84a2234 EKF: fix axis label error in comments 2016-05-05 21:23:03 +10:00
Paul Riseborough 57d3036ee7 EKF: update derivation files 2016-05-05 21:23:03 +10:00
Paul Riseborough 82da832816 EKF: tidy up Kalman gain calculations
Inhibiting of states is controlled via zeroing rows and columns in the covariance prediction so conditional logic in gain calculations is unnecessary.
2016-05-05 21:23:03 +10:00
Paul Riseborough 311d046a26 EKF: Enable optional activation of XY delta velocity bias estimation 2016-05-05 21:23:03 +10:00
Paul Riseborough 572c2280bd EKF: tidy up covariance prediction 2016-05-05 21:23:03 +10:00
Paul Riseborough 54e713969d EKF: Fix rebase error 2016-05-05 21:23:03 +10:00
Paul Riseborough 67d23948b5 EKF: preliminary re-tune 2016-05-05 21:23:03 +10:00
Paul Riseborough 03c35266ef EKF: remove unused parameter 2016-05-05 21:23:03 +10:00
Paul Riseborough fe9f88a8b4 EKF: test new derivation
Use direct attitude parameterisation
Discard scale factors
Add accel bias
2016-05-05 21:23:03 +10:00
MaEtUgR b2eb4d13d8 Matrix.setCol off by one bug fixed
The Column Vector you are copying from, only has one Column and it is indexed by 0 not 1.
I also completed the unit test stub that would have found this bug.
2016-05-05 13:18:51 +02:00
Daniel Agar 22d18d638c enable Wshadow 2016-05-04 19:45:40 -04:00
Paul Riseborough c6775b5bf2 Merge pull request #118 from PX4/fix_member_init
ekf: initialize _terrain_var
2016-05-03 10:26:48 +10:00
Beat Küng f2dda3c183 ekf: initialize _terrain_var, fixes access to uninitialized value
in PX4 Firmware, Ekf::get_terrain_vert_pos depends on it. This is the
valgrind output:
==15439== Thread 14 ekf2:
==15439== Conditional jump or move depends on uninitialised value(s)
==15439==    at 0x5610087: sqrtf (in /usr/lib64/libm-2.22.so)
==15439==    by 0x4D1AF0: Ekf::get_terrain_vert_pos(float*) (terrain_estimator.cpp:135)
==15439==    by 0x46641F: Ekf2::task_main() (ekf2_main.cpp:655)
==15439==    by 0x42BF3D: entry_adapter(void*) (px4_posix_tasks.cpp:103)
==15439==    by 0x4E3C609: start_thread (in /usr/lib64/libpthread-2.22.so)
==15439==    by 0x5BF7A4C: clone (in /usr/lib64/libc-2.22.so)
2016-05-02 17:35:42 +02:00
Paul Riseborough 0a6d95c6c2 Merge pull request #116 from PX4/pr-covReset
after a height reset zero the cross covariances for height and vertical
2016-05-01 21:44:38 +10:00
Roman 0c77ebf6bd EKF: Reduce likelihood of bad covariance values after height resets
The cross terms (covariances) are now reset before the variance variance is set.

The vertical velocity state variance following a reset without GPS has been reduced.
2016-05-01 21:39:56 +10:00
Paul Riseborough 6c57bea1c3 EKF: fix bug in IMU error application timing patch 2016-04-30 15:11:12 +10:00
Paul Riseborough 6ecbefd7e4 EKF: add matlab script to test complementary filter gains 2016-04-30 11:05:03 +10:00
Paul Riseborough 15df20831a EKF: improve output complementary filter tracking
Optimise for height tracking and adjust gains automatically with changes in time delay.
2016-04-30 11:03:45 +10:00
Paul Riseborough 4fa1e9c651 EKF: Fix timing errors in state prediction
IMU corrections were being applied at the wrong time horizon to the EKF states
IMU downsampling rotates the delta velocities into the orientation produced by the last delta angle, but this wasn't consistent with the way the state prediction was using the delta velocity data.
2016-04-30 11:02:19 +10:00
Paul Riseborough 4c9c102597 Merge pull request #115 from PX4/fix_isfinite_again
ekf: another stab at fixing isfinite for all
2016-04-29 09:12:59 +10:00
Matthias Grob 65679fbcbb Features and fixes
* added the trace function for a SquareMatrix

* added Vector3.hat() and it's counterpart Dcm.vee()
for skewsymskew symmetric matrix operations in relation to the cross product
see https://en.wikipedia.org/wiki/Hat_operator

* Matrix::write_string produced runtime errors when I used it in PX4 posix simulation, i simplified it

* a Matrix3f is a SquareMatrix

* added tests for SquareMatrix.trace, Vector3.hat and Dcm.vee

* added a test for quaternion initialisation from array

* preventing buffer overflows in Matrix.write_string method
2016-04-28 15:16:36 -04:00
Julian Oes f8a48f9cc5 ekf: now it should even compile for NuttX 2016-04-28 16:30:49 +02:00
Julian Oes 12f4d6f703 ekf: another stab at fixing isfinite for all
The previous solution did not work for Snapdragon, so I needed to copy
what is used in px4_defines.h.
2016-04-28 16:09:12 +02:00
Paul Riseborough 22ad87599c Merge pull request #112 from PX4/fix_ubuntu1604_2
ekf: compile fix for Ubuntu 16.04
2016-04-27 21:21:04 +10:00
Julian Oes 46e207106b ekf: use std::isfinite instead of isnan 2016-04-27 12:58:22 +02:00
Lorenz Meier 7b702ee37e Merge pull request #105 from georgehines/matlab-log-import
fix a field name that I missed last time
2016-04-26 10:03:37 +02:00
Lorenz Meier 7c7945961e Merge pull request #107 from dagar/l1_init
L1 initialize everything
2016-04-26 10:01:27 +02:00
Daniel Agar fe5a337c99 l1 initialize everything 2016-04-25 14:39:11 -04:00
George Hines 9994aa7fdb fix a field name that I missed last time 2016-04-22 17:21:47 -07:00
Paul Riseborough 42635903cd Merge pull request #102 from priseborough/pr-ekf2HeightReset
EKF: Improve height reset behaviour
2016-04-23 10:04:13 +10:00
Paul Riseborough 4fcbfb5d42 EKF: correct error in comment 2016-04-23 07:55:25 +10:00
Paul Riseborough 13814681d7 Merge pull request #104 from georgehines/matlab-log-import
Matlab log import
2016-04-23 07:50:07 +10:00
Paul Riseborough 3e81b86280 EKF: improve height reset logic
Don't use failed sensors unless necessary and handle case where not height sensor is available for reset
2016-04-22 10:50:53 +10:00
Paul Riseborough 874558d194 EKF: improve detection of bad vert accel data
Improve ability to detect if bad vertical accel data has caused loss of height accuracy by using historical data.
2016-04-22 09:24:04 +10:00
Paul Riseborough 469a7d1711 EKF: rework height reset
calculate and save the amount that the vertical states have changed and the time of the change
apply the change delta to the output observer states and buffer
2016-04-22 08:43:56 +10:00
Paul Riseborough e3365525c2 EKF: rework height reset logic 2016-04-22 08:39:24 +10:00
Paul Riseborough 421703c267 EKF: rework initialisation of height state and offsets 2016-04-22 08:38:41 +10:00
Paul Riseborough a7417657c3 EKF: ensure fusion timeout counters are reset when required 2016-04-22 08:33:11 +10:00
Paul Riseborough 10bf05e9a6 EKF: publish the vertical position offset 2016-04-22 08:30:46 +10:00
Paul Riseborough 0de15b1b20 EKF: Add variables to monitor vertical position and height offset 2016-04-22 08:28:56 +10:00
Paul Riseborough 62c6d40f1f EKF: Add methods to ring buffer to access specific indices 2016-04-22 08:21:36 +10:00
George Hines 59df1a3552 rename log GUI consistent with its assumptions 2016-04-21 10:58:28 -07:00
George Hines 62bdcf3e9b supports APM dataflash logs 2016-04-21 10:54:37 -07:00
Paul Riseborough b295f9050c EKF: ensure GPS check status is correctly initialised 2016-04-20 21:53:15 +10:00
Lorenz Meier 9487eac505 Merge pull request #98 from priseborough/pr-ekf2StatusReporting
EKF: improve reporting of filter status
2016-04-20 11:44:02 +02:00
Roman Bapst 6344fa0e8c limit maximum rates of all measurement at which they are stored into the buffers 2016-04-19 12:47:57 +02:00
Roman Bapst 00c8821006 disable airspeed fusion for now. Needs more testing and implementation of side slip fusion 2016-04-19 11:18:45 +02:00
Paul Riseborough 2fa8a11a29 EKF: replace unnecessary memcopy 2016-04-19 19:10:41 +10:00
Roman Bapst 99fc61c27c ekf2 airspeed fusion:
- finished logic for fusion
- fixed bug where previous control status was set in the wrong location
2016-04-19 09:53:31 +02:00
Paul Riseborough 82920da232 EKF: strengthen checking of local position status
provides immediate status reporting when dropping out of optical flow mode
2016-04-19 17:38:22 +10:00
Paul Riseborough 31bf342fc1 EKF: publish GPS check status 2016-04-19 17:38:22 +10:00
Paul Riseborough 6fa13c7806 EKF: publish control mode status 2016-04-19 17:37:27 +10:00
Roman Bapst 60abf07bee added function to return accelerometer bias 2016-04-18 17:52:16 +02:00
Roman Bapst f32303de69 added function to return accelerometer bias 2016-04-18 17:00:17 +02:00
Lorenz Meier 3455931617 EKF init: Fix initialization statement 2016-04-17 19:29:23 +02:00
Lorenz Meier e1ce948768 Merge pull request #97 from dagar/cmake_update
cmake STACK -> STACK_MAIN
2016-04-17 15:58:52 +02:00
Daniel Agar 861c13f1fe cmake STACK -> STACK_MAIN 2016-04-16 21:46:50 -04:00
Paul Riseborough 55db3d8725 Merge pull request #94 from priseborough/pr-sensorPosComp
Add compensation for EKF sensor position offsets
2016-04-14 11:45:24 +10:00
Paul Riseborough ea38aa130f EKF: update default time delay parameter values 2016-04-14 08:53:59 +10:00
Paul Riseborough 8c55e36ca9 EKF: use common value for gravity 2016-04-12 11:14:31 +10:00
Paul Riseborough 163c08a3ac EKF: Improve output observer documentation 2016-04-12 11:14:31 +10:00
Paul Riseborough 2dcc6e2053 EKF: Improve accuracy of state prediction
Use an a common estimator value for gravity
Use average orientation across update interval when rotating delta velocities
2016-04-12 11:14:31 +10:00
Paul Riseborough 5bf02517a7 EKF: Rationalise use of rotation matrices and improve efficiency 2016-04-12 11:14:31 +10:00
Paul Riseborough e10093854a EKF: correct outputs for IMU offset 2016-04-12 11:14:31 +10:00
Paul Riseborough b46053415f EKF: Compensate optical flow data for sensor position offset 2016-04-12 11:14:31 +10:00
Paul Riseborough 48b105b748 EKF: correct range finder data for sensor position offset 2016-04-12 11:14:31 +10:00
Paul Riseborough e89dbb9f63 EKF: correct GPS data for antenna position offset 2016-04-12 11:14:31 +10:00
Paul Riseborough 3580940e10 EKF: Add sensor position offset parameters 2016-04-12 11:14:31 +10:00
Paul Riseborough 64e95910c4 Merge pull request #92 from priseborough/pr-ekf2HgtResetFix
EKF: Fix vulnerability in height reset
2016-04-12 11:09:06 +10:00
Paul Riseborough 006b6b58e4 EKF: fix bug in status print statement 2016-04-12 10:38:50 +10:00
Paul Riseborough 74078cde94 EKF: reset state variance when performing a height reset
Set vertical position and velocity variances using known sensor error characteristics if we have reset the states to the sensor readings.
2016-04-11 19:40:27 +10:00
Paul Riseborough f4f108d57d EKF: Reset vertical velocity when performing a height reset 2016-04-11 19:25:24 +10:00
Paul Riseborough 61b919754d Merge pull request #90 from georgehines/matlab-log-import
version/toolbox compatibility
2016-04-11 05:23:50 +10:00
George Hines 941d3bca0a changes some graphics arguments for version compatibility, adds a viewer example to the usage samples script 2016-04-07 16:39:32 -07:00
Paul Riseborough a919088b6a Merge pull request #89 from georgehines/matlab-log-import
Matlab log import
2016-04-07 15:44:04 -07:00
George Hines 684b41494e adds estimator log viewer UI 2016-04-07 15:13:19 -07:00
George Hines 3773d5a00d removes accidentally commited px4log test file 2016-04-07 11:59:54 -07:00
George Hines eb41d25ff6 reduces update rate of progress display, stores message time (not TIME message) as floating point seconds, automatically extracts TIME message, updates usage samples accordingly 2016-04-07 11:58:51 -07:00
George Hines 2ad21bc8c7 adds function header comments and method attribution 2016-04-07 07:40:40 -07:00
George Hines f6413a1924 renames test script for clarity 2016-04-07 07:32:53 -07:00
George Hines 93fde19c25 changes some cell notation for speed 2016-04-07 07:22:21 -07:00
George Hines 0e3a6e214c completed low-overhead import script, added usage examples 2016-04-07 07:18:59 -07:00
George Hines 8c8653a1a2 initial commit of matlab px4 log importer 2016-04-06 17:12:40 -07:00
Lorenz Meier f86ef34782 EKF: Fix error message which lied 2016-04-05 19:06:35 -07:00
Paul Riseborough a352c2f4e3 EKF: Fix posix build error
Memset cannot be used on a class like this. Setting the time elements to zero achieves the desired result.
2016-04-05 18:57:21 -07:00
Lorenz Meier 6b3ad03419 Merge pull request #86 from CarlOlsson/small_airspeed_fix
Small airspeed fix
2016-04-05 16:38:37 -07:00
Roman Bapst f35e78643c Merge pull request #79 from dagar/integrator_fix
fw multiply integrator gain in loop
2016-04-05 22:33:29 +02:00
Paul Riseborough 430d4b1cf8 EKF: ensure data in buffers is zero at startup 2016-04-05 22:23:37 +02:00
Paul Riseborough c6bd93ed40 EKF: Include all output files generated by derivation script 2016-04-05 22:23:37 +02:00
Paul Riseborough 470098e182 EKF: update default tuning parameters
Parameters needed to be changed when covariance prediction error was corrected.
The magnetic earth and body field process noise now use separate parameters to help with tuning
2016-04-05 22:23:37 +02:00
Paul Riseborough eaf94935f0 EKF: Fix bug in initialisation of height and magnetic field
This prevents zero data being used to form the initial height and magnetic field.
Do not start sampling initial values until non-zero time values are retrieved from the buffer.
2016-04-05 22:23:37 +02:00
Paul Riseborough 03eac2f25e EKF: Apply covariance prediction derivation changes 2016-04-05 22:23:37 +02:00
Paul Riseborough ac71ec5d37 EKF: Fix scaling error in covariance prediction derivation
The covariance prediction derivation was using the noise 1-std value instead of the noise variance. This resulted in the values of IMU process noise required to tune not matching the observed covariance growth.
2016-04-05 22:23:37 +02:00
CarlOlsson 8678a939e2 removed reinitialization of intermediate variables 2016-04-05 14:18:47 +02:00
Roman Bapst 2632c930f7 Merge pull request #85 from CarlOlsson/add_error_reporting_tas
added fault status reporting
2016-04-04 18:52:06 +02:00
Roman Bapst 96b9674cb6 Merge pull request #84 from CarlOlsson/change_to_true_airspeed
change name to true_airspeed
2016-04-04 18:49:04 +02:00
CarlOlsson eee6f1048f Changed vtaspred threshold 2016-04-04 16:27:06 +02:00
CarlOlsson 3ad5b52aea removed comment 2016-04-04 16:26:46 +02:00
CarlOlsson 616725410d updated calculation 2016-04-04 16:26:13 +02:00
CarlOlsson ec9902d802 added fault status reporting 2016-04-04 16:21:12 +02:00
CarlOlsson 1ea26b406a change name to true_airspeed 2016-04-04 16:10:52 +02:00
Roman Bapst 068c29851c Merge pull request #80 from PX4/fuse_tas_rebased
Fuse tas rebased
2016-03-30 17:17:05 +02:00
Roman Bapst 27b894540e put airspeed fusion logic but don't actually call it yet 2016-03-30 17:01:03 +02:00
Roman Bapst 1b7115dec9 increased airspeed fusion rate to 12.5Hz 2016-03-30 17:01:03 +02:00
CarlOlsson f5a9afd278 moved init 2016-03-30 17:01:03 +02:00
CarlOlsson f990d99790 fixed bug 2016-03-30 17:01:03 +02:00
CarlOlsson 4301e1105b added commas 2016-03-30 17:01:03 +02:00
CarlOlsson 81fc086b76 adopted ekf_interface.h 2016-03-30 17:01:03 +02:00
CarlOlsson d440c883b5 adopted ekf_interface.cpp 2016-03-30 17:01:03 +02:00
CarlOlsson f8878d41dc adopted ekf_helper.cpp 2016-03-30 17:01:03 +02:00
CarlOlsson 6bb2f7638c adopted ekf.h 2016-03-30 17:01:03 +02:00
CarlOlsson 0918fa04c7 adopted ekf.cpp 2016-03-30 17:01:03 +02:00
CarlOlsson 92abf93c8f adopted common.h 2016-03-30 17:01:03 +02:00
CarlOlsson 0fb1e0578b added function for fusing airspeed 2016-03-30 17:01:03 +02:00
Daniel Agar 82cf1827d4 fw multiply integrator gain in loop 2016-03-25 17:28:39 -04:00
Paul Riseborough 0ea55e25f9 Merge pull request #78 from PX4/pr-addGpsHgtOption
EKF: Add option to use GPS for height and improve height fall-back behaviour
2016-03-23 11:19:01 -07:00
Paul Riseborough 400a6e12ba EKF: Ensure all data in buffers is initialised
This is a defensive change to prevent introduction of NaN's into the filter if data is read from the incorrect place in the buffer.
2016-03-20 15:14:16 +11:00
James Goppert 07fba8322a Fix for effective cpp. 2016-03-18 20:56:41 -04:00
Paul Riseborough 064a0e4dbc EKF: Don't use GPS to set position noise when not using GPS 2016-03-16 20:12:36 +11:00
Paul Riseborough c23d72ba29 EKF: Ensure filter control modes are correctly initialised 2016-03-16 17:22:27 +11:00
Paul Riseborough 9f3b1351f7 EKF: Don't initialise velocity to GPS on initial alignment
For initial alignment the velocity and position should start at zero
2016-03-16 17:20:57 +11:00
Paul Riseborough 687fcc70be EKF: Explicitly define type conversion for GPS height 2016-03-16 17:18:20 +11:00
Paul Riseborough e334a5dc57 EKF: Add check for NaN's on attitude states 2016-03-16 13:43:21 +11:00
Paul Riseborough 6b2e2dba90 EKF: Add GPS height option and improve height recovery 2016-03-16 10:40:51 +11:00
James Goppert 711b57d2d4 Added unit function that returns normalized vector. 2016-03-15 18:09:48 -04:00
James Goppert 0e14e11183 Added support for attitude_estimator_q functions. 2016-03-15 06:35:13 -04:00
Paul Riseborough 63b0cf4360 EKF: Fix baro height offset bug 2016-03-14 15:51:15 +11:00
Paul Riseborough 4bd79c9e5d Merge pull request #76 from PX4/pr-fixRngHgtMode
EKF: Fix bugs preventing use of range finder as primary height source

Flight testing completed and I have checked that the other pending PR #75 rebases cleanly on it.
2016-03-14 09:46:58 +11:00
Paul Riseborough 49023f3d7e EKF: fix travis build error 2016-03-13 21:56:28 +11:00
Paul Riseborough 7677a162aa EKF: Don't start the output observer before the main filter has initialised
This prevents the possibility of output transients if alignment is delayed.
2016-03-13 21:17:51 +11:00
Paul Riseborough d2407c3463 EKF: code style updates 2016-03-13 21:17:51 +11:00
Paul Riseborough c58ab3e256 EKF: Enable fallback to baro alt when using range finder for height 2016-03-13 21:17:51 +11:00
Paul Riseborough 370f643f42 EKF: Enable use of range finder for primary height source 2016-03-13 18:44:34 +11:00
Lorenz Meier 699ec17cc3 Removed spurious print in wheel controller 2016-03-12 11:23:08 +01:00
Paul Riseborough 2882c53246 Merge pull request #74 from PX4/pr-optflow-reworked
Add fusion of optical flow LOS rate measurements
2016-03-11 11:13:03 +11:00
Paul Riseborough 109e0e6dfc EKF: When commencing GPS aiding, don't reset local position and velocity if using optical flow 2016-03-11 11:03:43 +11:00
Paul Riseborough 26238bc2f5 EKF: Allow for change in position when defining the WGS-84 origin position
This allows GPS aiding to commence later in flight without step changes in local position output
2016-03-11 11:03:43 +11:00
Paul Riseborough e0fcce1463 EKF: Make position and velocity reset publish success
Some users of the position and velocity reset functions will need to know if the reset has been successful.
2016-03-11 11:03:43 +11:00
Paul Riseborough 48f980b054 EKF: Fix syntax causing posix build to fail 2016-03-11 11:03:43 +11:00
Paul Riseborough eab0ef4266 EKF: Update default process noise for terrain estimator 2016-03-11 11:03:43 +11:00
Paul Riseborough 962fd0aaf2 EKF: Adjust terrain process noise for gradient effect 2016-03-11 11:03:43 +11:00
Paul Riseborough 1a2da887ab EKF: Fix bug in calculation of terrain estimator Kalman gain 2016-03-11 11:03:43 +11:00
Paul Riseborough cc5512905a EKF: prevent optical flow, GPS and baro fusion from blocking each other 2016-03-11 11:03:43 +11:00
Paul Riseborough e9ccfdd484 EKF: Update derivation scripts and outputs
Work around limitation in Symbolic toolbox environment space by incrementally saving and clearing workspace
Remove vehicle vertical position from optical flow prediction equations (use range measurement instead) and regenerate auto-code
Remove legacy optical flow auto-code conversion method as it is not required now a work around for symbolic toolbox limitations has been developed
Fix out of date syntax
2016-03-11 11:03:43 +11:00
Paul Riseborough ffebaf384f EKF: Set initial optical flow fusion monitor outputs to zero 2016-03-11 11:03:43 +11:00
Paul Riseborough 5acd1cbac4 EKF: Make definitions of parameters clearer for external use 2016-03-11 11:03:43 +11:00
Paul Riseborough dd1d58bab5 EKF: Remove unnecessary matrix operations from optical flow fusion
The updated formulation means that H_LOS[][8] is always zero, so these operations are no longer required.
2016-03-11 11:03:43 +11:00
Paul Riseborough b3b0f1347a EKF: Make normal GPS mode the default 2016-03-11 11:03:43 +11:00
Paul Riseborough d97d308ca7 EKF: Add control of optical flow and range finder fusion 2016-03-11 11:03:43 +11:00
Paul Riseborough 836fe39070 EKF: Update external interface functions to support optical flow 2016-03-11 11:03:43 +11:00
Paul Riseborough 2ff338048d EKF: Add support for range-finder fusion as primary height reference 2016-03-11 11:03:43 +11:00
Paul Riseborough 2c2850c0ce EKF: Add functions to get position and velocity state variance 2016-03-11 11:03:43 +11:00
Paul Riseborough 32b03819ef EKF: Add function to calculate global position validity 2016-03-11 11:03:43 +11:00
Paul Riseborough 270451e17b EKF: Update height reset to support range finder height use 2016-03-11 11:03:43 +11:00
Paul Riseborough dca186c6e8 EKF: Add required declarations for optical flow 2016-03-11 11:03:43 +11:00
Paul Riseborough 75b22c95ac EKF: Add new source files to cmake 2016-03-11 11:03:43 +11:00
Paul Riseborough 122dd9c531 EKF: Add source file for optical flow LOS rate fusion 2016-03-11 11:03:43 +11:00
Paul Riseborough 82cbfafb34 EKF: Add source file for terrain vertical position estimator
Implements a single state Kalman filter to estimate terrain vertical position relative to the NED origin.
2016-03-11 11:03:43 +11:00
Paul Riseborough 829e0f1e65 Merge pull request #73 from mcsauder/master
Conversion error correction and additional function overloads to allow standalone compilation.
2016-03-11 11:02:32 +11:00
mcsauder 6a61f9ba77 Remove a define that might not be required for compilations in other scnearios outside of C99 restrictions to minimize Pull Request modifications. 2016-03-05 02:17:55 -07:00
mcsauder 115c87a0ea Remove an include that was unnecessary. 2016-03-05 02:15:04 -07:00
mcsauder 1aee1b895a Uncomment commented lines that removed Eigen namespaces and dependencies. 2016-03-05 02:12:26 -07:00
mcsauder f9be23933b Correct deg to rad conversion inversion. Add additional functionality to mathlib to allow standalone compile without Limits.cpp and Limits.hpp files from PX4. 2016-03-05 01:58:58 -07:00
Paul Riseborough b163efeae2 Merge pull request #72 from PX4/pr-MagFusionBug
Fix bug in declination fusion and standardise covariance update
2016-03-05 11:34:19 +11:00
Paul Riseborough 5242af84af EKF: Standardise covariance update and use static arrays for large matrices 2016-03-05 08:58:19 +11:00
Paul Riseborough 1414d591ce EKF: Fix bug in declination fusion indexing 2016-03-05 08:43:33 +11:00
Daniel Agar 2108466a00 initialize ECL_L1 variables 2016-03-03 11:22:07 +01:00
Roman Bapst b2744f965d use in_air flag from land detector to determine if we are on the ground 2016-03-03 10:53:39 +01:00
Paul Riseborough 569886a4fc EKF: Fix bug in velocity and position innovation consistency checks 2016-03-03 17:15:22 +11:00
mcsauder f9e3db0504 Move variable initializations from header file to constructor to allow C99 compliance. 2016-03-02 08:42:38 +01:00
Paul Riseborough d8627c6aaf EKF: Reset the vertical position states if height fusion times out 2016-03-02 08:39:07 +01:00
Paul Riseborough f7a53d69f2 EKF: Improve height reset function
Add a method to reset the vertical velocity to enable in-flight resets
Reset to GPS height if baro height is not available.
2016-03-02 08:39:07 +01:00
Paul Riseborough a6da73fa83 EKF: Add missing div0 protection 2016-03-01 18:03:35 +11:00
Paul Riseborough d5e47d21db EKF: miscellaneous comment and format changes 2016-03-01 15:35:45 +11:00
Paul Riseborough 7c83ac4b6d EKF: Use heading fusion as default for startup and ground operation 2016-03-01 15:35:17 +11:00
Paul Riseborough 57d4064d7b EKF: Increase default heading observation noise
Improves robustness when operating in a bad magnetic field environment
2016-03-01 15:28:53 +11:00
Paul Riseborough 97df006a6a EKF: Update direct heading fusion
Adds a 312 Euler rotation sequence option for magnetic heading fusion.
Switches between it and the normal 321 sequence option depending on orientation.
2016-03-01 15:25:22 +11:00
Paul Riseborough ea29e39e5b EKF: Updated derivation of Jacobians for direct heading measurement
Adds an alternative using a 312 Euler sequence.
2016-03-01 15:21:36 +11:00
Paul Riseborough 2c9a814de1 Merge pull request #64 from mcsauder/master
Additional filter variable initializations required to fully reset the filter variables
2016-02-26 23:06:56 +11:00
Paul Riseborough 78d6f6941c Merge pull request #61 from PX4/pr-ImprovedAccuracyReporting
EKF: Improve Position Accuracy Reporting
2016-02-26 22:48:44 +11:00
Paul Riseborough f058fc817f Merge pull request #63 from PX4/att_reset
Attitude reset after heading reset
2016-02-26 22:35:14 +11:00
James Goppert 6c04605531 Added conversion for scalar to vector. 2016-02-26 06:10:09 -05:00
James Goppert 2d27cd79d3 Added scalar to matrix conversion. 2016-02-26 05:56:21 -05:00
James Goppert 6974f97b1c Added scalar const conversion operator. 2016-02-26 05:47:24 -05:00
James Goppert 7b969094cb Fix for scalar type. 2016-02-26 05:33:16 -05:00
James Goppert 3917ef1992 Merge branch 'master' of github.com:PX4/Matrix 2016-02-26 03:39:28 -05:00
James Goppert 15865897d5 Added pow. 2016-02-26 03:39:04 -05:00
mcsauder 5fb48a2e7b Merge remote-tracking branch 'upstream/master' 2016-02-25 22:51:58 -07:00
mcsauder 5fec0df70d Additional initializations required to reset complimentary filter values if the state estimate ever diverges and requires re-initiailization. 2016-02-25 22:51:14 -07:00
James Goppert dd30028823 Merge pull request #14 from mcsauder/master
Matrix index correction to allow non-square matrices to evaluate properly.
2016-02-25 16:36:14 -05:00
mcsauder 46c83a8c18 Correct a few indexing copy/paste errors that likely previously only functioned properly on square matrices. 2016-02-25 18:51:28 -07:00
Roman Bapst 9192ced7bb do not reset output attitude state after heading reset to avoid jumps in attitude 2016-02-25 18:20:29 +01:00
Lorenz Meier cd5857e900 Add vibration magnitude estimation 2016-02-25 16:54:24 +01:00
Paul Riseborough cd0cac066a EKF: Calculate and publish horizontal and vertical position accuracy
This calculation takes into account the uncertainty of the origin.
Dead reckoning status is also published
2016-02-25 10:38:07 +11:00
Paul Riseborough a30830a7a9 EKF: Scale position observation noise with GPS quality
This allows the filter to adapt to variations in GPs quality.
The range of adjustment in observation noise is limited to the range between a lower limit set by the GPS observation noise parameter and an upper limit set by the no-aiding observation noise.
2016-02-25 10:16:32 +11:00
Paul Riseborough 5483e7a477 Merge pull request #60 from PX4/pr-ReduceMagModeSwitchKick
EKF: Fix Bug Causing Roll/pitch Disturbances On Mag Fusion Mode Switch
2016-02-25 09:42:18 +11:00
Paul Riseborough f55a0bff53 EKF: Fix code style 2016-02-25 08:17:50 +11:00
Paul Riseborough 5b5bddebea EKF: Always reset yaw and mag field states on entry into 3-axis mag fusion mode 2016-02-25 08:16:42 +11:00
Paul Riseborough 2d09a5f3ac EKF: Don't reset yaw and mag field states when not necessary 2016-02-25 08:16:42 +11:00
Paul Riseborough 380db7ebef EKF: Reset angle error covariance after yaw and mag field reset
The yaw angle could have changed by a significant amount making the correlations invalid.
Setting angle variances to zero prevents the initial kick in angles due to 3D fusion starting
2016-02-25 08:16:42 +11:00
Paul Riseborough e938475acc Merge pull request #59 from PX4/pr-ImprovedStartup
Improvements to EKF startup - partially replaces PR#57
2016-02-24 18:27:12 +11:00
Paul Riseborough 0ad5329caf EKF: Update comments in heading fusion to clarify calculation of magnetic heading 2016-02-24 12:06:11 +11:00
Paul Riseborough 36affe3cd8 EKF: Fix bug causing incorrect initial roll when inverted 2016-02-24 11:56:12 +11:00
Paul Riseborough 016695fc3e EKF: Reduce startup transients
Update initial state variance values
2016-02-24 11:48:42 +11:00
Siddharth Bharat Purohit 9c7a3f366c Merge pull request #54 from mcsauder/master
Address C99 compatibility issues by relocating variable initialization. - Replaces PR#50
2016-02-23 15:53:04 -08:00
mcsauder 6613335937 Added constexpr back from const var type. 2016-02-23 16:15:52 -07:00
mcsauder 342010c113 Update c style array initialization to attempt to pass Travic CI build tests. 2016-02-23 15:52:02 -07:00
mcsauder 48e80e9e3e Correct C style array initialization. 2016-02-23 15:16:40 -07:00
mcsauder f9f00fa52b Remove unnecessary include. 2016-02-23 14:00:39 -07:00
mcsauder ccb5736353 Spaces to tab. 2016-02-23 19:58:30 -07:00
mcsauder a4cecb1704 Match variable initialization order difference with upstream. 2016-02-23 19:57:27 -07:00
mcsauder 79d07c831f Convert spaces to tabs to match upstream. 2016-02-23 19:53:55 -07:00
mcsauder 6c96f45f08 Remove whitespace differences with upstream for pull request. 2016-02-23 19:49:27 -07:00
mcsauder fad1c87631 Merge upstream and resolve merge conflicts. 2016-02-23 19:29:30 -07:00
Siddharth Bharat Purohit 237ecfef1a Add travis build check badge 2016-02-22 23:49:58 -08:00
Roman Bapst 8eb63a150d Merge pull request #53 from bugobliterator/pr-sharedlib
Shared Library build
2016-02-23 08:30:46 +01:00
Paul Riseborough 35865048a2 Merge pull request #55 from PX4/pr-FixYawFusionBug
Fix bug in heading fusion and add new method for ground/indoor use
2016-02-21 09:41:18 +11:00
Paul Riseborough 70a3b91217 EKF: Update magnetometer fusion derivations 2016-02-20 20:09:15 +11:00
Paul Riseborough a711632017 EKF: Add method to fuse horizontal magnetometer data
This method is more suitable than a raw heading measurement because it works across a full range of pitch angles.
It has been made the default for ground operation.
2016-02-20 19:45:32 +11:00
mcsauder 4ce4724105 Added variable initializations back into EstimatorInterface() constructor to resolve a runtime error that occurs with uninitialized variables. 2016-02-19 23:57:06 -07:00
Paul Riseborough 6df6ac0023 EKF: Fix sign error in heading innovation calculation and clean up 2016-02-20 11:54:53 +11:00
Paul Riseborough 90e1bd3e36 EKF: wrap compass yaw estimate 2016-02-19 16:53:55 +11:00
Paul Riseborough 7d6226eb45 EKF: Improve efficiency of yaw angle fusion
Use direct calculation of Kaman gains with optimised algebra
2016-02-19 16:25:01 +11:00
Paul Riseborough 7f121e81e4 EKF: Update yaw innovation calculation to match revised derivation
The new derivation does not use magnetic field measurements in the observation model and instead fuses in a heading measurement directly.
2016-02-19 16:18:07 +11:00
mcsauder 72243c4a84 Resolve tab/space differences with upstream master. 2016-02-18 03:28:40 -07:00
mcsauder 437f6ca5fb Moved initialization to object constructors to allow C99 compiler compatibility. 2016-02-18 03:21:04 -07:00
Lorenz Meier 2b2c490382 Validator: Add function for 1D use of the 3D validator 2016-02-18 09:31:36 +01:00
bugobliterator ba7f0fc9ff EKF: add licensing information for mathlib header and src 2016-02-17 20:02:08 -08:00
bugobliterator 80632cc12c EKF: add comments and licensing information to builder files 2016-02-17 19:55:47 -08:00
bugobliterator e65c348905 EKF: add travis build 2016-02-17 18:51:40 -08:00
bugobliterator a40eb7cf37 EKF: add check for existence of matrix submodule 2016-02-17 17:51:09 -08:00
Siddharth Bharat Purohit 64a7b14171 update readme to include steps to build EKF shared object 2016-02-17 17:46:48 -08:00
bugobliterator cba5271785 add matrix submodule 2016-02-17 17:38:21 -08:00
bugobliterator 2f05f778de ignore build directory 2016-02-17 17:34:28 -08:00
bugobliterator 263c48d089 EKF: remove dependecies and allow ekf to be built as standalone shared lib 2016-02-17 17:33:18 -08:00
Paul Riseborough 96c0e18acb Merge pull request #49 from PX4/pr-fixMagCovariance
EKF: Fix magnetometer fusion and covariance handling
2016-02-18 10:22:36 +11:00
Roman Bapst 678d6f45cc Merge pull request #52 from bugobliterator/pr-airspeed-sample-fix
EKF: fix time of sample receive setting
2016-02-17 22:34:30 +01:00
bugobliterator 2096e24c06 EKF: fix time of sample receive setting 2016-02-17 13:29:12 -08:00
Paul Riseborough a679cdf1fb EKF: Change parameter default to not fuse declination when aiding
Ground and flight testing has shown declination drift to not be a problem with current tuning and realistic vehicle motion.
2016-02-17 17:22:02 +11:00
James Goppert 95e3d7d6ce Added set function. 2016-02-16 14:54:15 -05:00
James Goppert 5a01e6c939 Added slice function for matrix. 2016-02-16 12:22:08 -05:00
James Goppert 1ae114b3d2 Improved rk4 integration to allow longer time interval than 1 step. 2016-02-16 10:53:12 -05:00
Paul Riseborough abf9476853 EKF: miscellaneous formatting and typo updates 2016-02-16 11:08:30 +11:00
Paul Riseborough ffe1d30864 EKF: Set covariances to zero for un-used states 2016-02-16 11:08:30 +11:00
Paul Riseborough 294aca8609 EKF: Improve variance limiting for stationary states
Turn off the process noise if they grow too large and use the hard variance limit as a backup. This is numerically more stable than relying on a hard variance limit which does not deal with the covariances.
2016-02-16 11:08:30 +11:00
Paul Riseborough 1d40507af8 EKF: Set Kaman gains to zero for un-used states
This is a defensive programming technique. In theory this should not be necessary if the corresponding covariance entries are zero.
2016-02-16 11:08:30 +11:00
Paul Riseborough 69b8982043 EKF: Initialise variances to zero for un-used states
Setting these variances to zero makes it less likely that these states will be modified by fusion processing.
2016-02-16 11:08:30 +11:00
Paul Riseborough d9bf4e9870 EKF: Enable control mode transitions to be detected
Save the previous value of the filter control modes
2016-02-16 11:08:30 +11:00
Paul Riseborough 402206a305 EKF: Fix critical bug in fusion of yaw and declination observations
This bug was in the derivation and resulted from use of a tan instead of an atan operator. The derivations have been reworked and the updated auto-code has been imported as part of this patch.
2016-02-16 11:08:30 +11:00
Paul Riseborough d8afca5e7a EKF derivations: Correct error in direct yaw and declination angle fusion
The atan function is now being used correctly instead of the tan function. This fixes problems with large heading errors or declination values.
The simple heading fusion has been decoupled from the magnetic field measurements. This enables external yaw measurements to be used in the future.
2016-02-16 11:08:30 +11:00
Paul Riseborough 7da40a45a4 EKF: Add control mode for wind state estimation 2016-02-16 11:08:30 +11:00
Paul Riseborough de02aebafd EKF: Reset covariance matrix when doing a yaw and magnetic field reset
The correlation terms in the covariance matrix will be incorrect after a reset, so should be zeroed
2016-02-14 22:01:53 +01:00
Paul Riseborough dba58aa4c6 EKF: Add control logic for fusion modes 2016-02-14 22:01:53 +01:00
Paul Riseborough 22c177c951 EKF: Re-align yaw and magnetic field states when changing into GPS aiding mode 2016-02-14 22:01:53 +01:00
Paul Riseborough c089079321 EKF: Split tilt and yaw align 2016-02-14 22:01:53 +01:00
Paul Riseborough 020cc5978e EKF: Move calculation of declination into a separate function 2016-02-14 22:01:53 +01:00
Paul Riseborough aa58b3e98c EKF: Split angular alignment into tilt and yaw and use yaw and magnetic field alignment function 2016-02-14 22:01:53 +01:00
Paul Riseborough 2bbe7f9a1c EKF: Update magnetometer fusion to use declination from the specified source 2016-02-14 22:01:53 +01:00
Paul Riseborough 83945581ed EKF: Add function to calculate the magnetic declination to use 2016-02-14 22:01:53 +01:00
Paul Riseborough 9017e077f8 EKF: Publish the magnetic declination we wish to save for next startup 2016-02-14 22:01:53 +01:00
Paul Riseborough 0308f2f796 EKF: Add parameters to control declination source and fusion type 2016-02-14 22:01:53 +01:00
Paul Riseborough 6140d4b21f EKF: Add function to reset yaw and magnetic field states 2016-02-14 22:01:53 +01:00
Roman ad978c642f estimator interface:
added flag for in_air status of vehicle
2016-02-14 20:43:22 +01:00
Roman ce0ddc0207 -added comments
-removed unused print functions
-removed false _imu_time_last variable (correct is _time_last_imu)
2016-02-14 09:49:26 +01:00
Paul Riseborough 9d7340e187 EKF: Fix bugs in position and velocity resets
The position reset was not being compensated for velocity and measurement delay
The height was being reset with the position. It has been moved into a separate reset function
The maximum accepted GPS delay of 100msec was inadequate
The states  was being incorrectly reset to the GPS position and Baro height on initial alignment.
2016-02-14 09:49:26 +01:00
Paul Riseborough da1de2cc4d EKF: Correct for sensor noise and baro offset during alignment 2016-02-14 09:49:26 +01:00
Roman Bapst d21ce70eeb Merge pull request #45 from CarlOlsson/move_fuse_function_to_helper
moved fuse function to ekf_helper.cpp
2016-02-13 08:21:28 +01:00
CarlOlsson 1e766c7510 moved fuse function to ekf_helper.cpp 2016-02-12 15:54:32 +01:00
Lorenz Meier 0a9f7e58db Merge pull request #43 from PX4/pr-baroHeightOffset
Correct for sensor noise and baro offset during alignment
2016-02-10 08:02:48 +01:00
Paul Riseborough fff2bd50f6 EKF: Fix bugs in position and velocity resets
The position reset was not being compensated for velocity and measurement delay
The height was being reset with the position. It has been moved into a separate reset function
The maximum accepted GPS delay of 100msec was inadequate
The states  was being incorrectly reset to the GPS position and Baro height on initial alignment.
2016-02-10 15:16:05 +11:00
Paul Riseborough 40e174b81c EKF: Correct for sensor noise and baro offset during alignment 2016-02-10 10:25:27 +11:00
Paul Riseborough a6515543da Merge pull request #41 from PX4/pr-magFusionUpdates
EKF2: Prevent declination/heading drift during non-GPS operation
2016-02-09 07:57:34 +11:00
Paul Riseborough 5ea0ef39cd EKF: Update declination fusion logic
We do not need to run declination fusion if 3-axis mag fusion is not being used.
2016-02-09 07:54:24 +11:00
Paul Riseborough 47ab5ebcdd EKF: Make PR comply with project convention for indenting 2016-02-08 15:12:38 +11:00
Paul Riseborough cdc42c1de0 EKF: Add simple control logic for magnetic declination constraint 2016-02-08 14:18:43 +11:00
Paul Riseborough dbb8e12948 EKF: Add fusion method to constrain declination when unobservable
When fusing 3-axis magnetometer data without absolute external aiding leg GPS), the declination is ultimately unobservable and the declination of the  field states and the vehicle heading will slowly drift over time. To prevent this we need to fuse in a declination to constraint the NE earth field estimates.
2016-02-08 14:18:43 +11:00
Paul Riseborough 9347afe250 EKF: Use unique variable name for mag heading fusion observation Jacobian 2016-02-08 14:18:43 +11:00
Paul Riseborough 6aeccf01ff EKF: Add missing fusion health status messages 2016-02-08 14:18:43 +11:00
Paul Riseborough a22886544d EKF: Add missing Kalman gain to Declination fusion autocode 2016-02-08 14:02:08 +11:00
Paul Riseborough 2c8c6efb45 EKF: Eliminate use of power function to square numbers
Use of the power function to square a number can be very inefficient depending on processor and compiler. Replace with an inlined function  that multiplies the number by itself. This has not been put into the maths library because the use of the sq() function is peculiar to the autocode generated for the EKF and an inlined function was desired.
2016-02-08 11:11:59 +11:00
Paul Riseborough 42a943b37e EKF: Fix text errors introduced when editing optical flow fusion autocode fragment 2016-02-07 21:49:50 +11:00
Paul Riseborough f99256286b Merge pull request #40 from PX4/pr-updateOpticalFlowAutoCode
Update EKF Optical Flow Fusion Autocode Fragments
2016-02-07 19:35:38 +11:00
Paul Riseborough 384ce06110 EKF: Add alternative code fragments for optical flow fusion
These fragments were generated using the inbuilt matlab symbolic toolbox autocoder and may be more efficient than the other method
2016-02-07 19:31:13 +11:00
Paul Riseborough dba462b9f3 EKF: Improve efficiency of optical flow fusion auto generated code fragments 2016-02-07 19:29:49 +11:00
Paul Riseborough 3f81eb7d1b EKF: fix formatting 2016-02-04 17:15:03 +11:00
Paul Riseborough 9bfc11b660 EKF: Use specific position observation noise when flying without GPS
A larger position uncertainty is required when flying without GPS to reduce tilt attitude estimation errors caused by vehicle manoeuvring. This needs to be tuneable to allow optimisation for different use cases (e.g. outdoor vs indoor).
2016-02-03 18:40:32 +11:00
Paul Riseborough 7de1d39ce4 EKF: Improve use of position and velocity observation noise parameters
Fix bug where noise parameters were not being squared when calculating the observation variance.
Use GPS reported speed accuracy to set velocity observation noise and use the parameter to set the minimum.
2016-02-03 18:15:38 +11:00
Paul Riseborough 2b1e8fe910 EKF: Update tuning parameters
Set conservative defaults as a baseline for tuning
Add a missing parameter for magnetometer observation noise.
Correct error in definition of magnetic heading observations noise (previous parameter defined the variance directly, not the noise).
Scale vertical GPS noise to allow for average EPV to EPH ratio.
Update documentation and display names for consistency.
2016-02-03 17:05:45 +11:00
Lorenz Meier b21a49b3f9 EKF: Use standard C++ initializers 2016-01-31 23:24:36 +01:00
Roman b749a7557b fixed typos 2016-01-31 21:36:58 +01:00
bugobliterator d79e12dfa1 EKF: fix code style 2016-01-31 00:12:16 -08:00
bugobliterator 8200ef4d17 EKF: allocate and unallocate buffer more robustly 2016-01-31 00:12:16 -08:00
bugobliterator c6249a2825 EKF: change estimator base class name to estimation interface 2016-01-31 00:12:07 -08:00
bugobliterator 3cafedd4c1 EKF: start storing samples only when ekf is initialised 2016-01-30 12:46:01 -08:00
bugobliterator b062bd2e38 EKF: move estimator specific variables to estimator core 2016-01-30 12:45:23 -08:00
bugobliterator 287f5eb0c2 EKF: move all estimator specific types to common header 2016-01-30 12:44:19 -08:00
bugobliterator b05e2d825c EKF: move estimator specific initialisations to estimator core 2016-01-30 12:42:24 -08:00
Paul Riseborough f1b82057c0 EKF: Combine GPS velocity innovation gate parameters
Separate vertical and horizontal parameters for GPS velocity innovation gates are not required
2016-01-30 12:21:50 -08:00
Paul Riseborough 466a104534 EKF: additional GPS check logic
Improve naming of NED origin initialisation status
Add check for GPS solution type
Use GPS checks when regaining GPs in-flight
2016-01-30 12:21:39 -08:00
bugobliterator a779d45cd0 ekf2: fix bug causing faulty imu data storage 2016-01-29 23:56:24 -08:00
bugobliterator 92dc41e885 EKF: fix typo in function declaration 2016-01-29 20:05:07 -08:00
bugobliterator 3eea6cdcc5 EKF: use namespace for structure definitions
will be moved to a separate file in the future
2016-01-29 20:04:21 -08:00
bugobliterator 001d621eb1 EKF: move imu data processing code to estimator core 2016-01-29 20:03:25 -08:00
bugobliterator 251996d387 ekf: move gps checks to Ekf library from estimator_base 2016-01-29 17:15:18 -08:00
Paul Riseborough 46b0e9654c Add filter control logic 2016-01-30 09:01:48 +11:00
Paul Riseborough 9236f11c80 EKF: Add position and velocity innovation consistency checks 2016-01-28 16:33:54 +11:00
Paul Riseborough 7713cc8c20 Merge pull request #17 from priseborough/pr-addMagErrHandling
EKF: Add magnetometer fusion error handling
2016-01-28 13:43:57 +11:00
Lorenz Meier f4b2c0eecf Merge pull request #11 from mcharleb/PRIu64-fix
Fixed printf of uint64_t
2016-01-28 01:01:10 +01:00
Paul Riseborough 802129f384 EKF: Add magnetometer fusion error handling 2016-01-28 09:53:55 +11:00
Paul Riseborough 39eef3a2d7 EKF: Remove use of camel case variable names
Also fixes bug in GPS speed accuracy check that was using horizontal position accuracy variable by mistake.
2016-01-28 08:37:45 +11:00
Paul Riseborough cc50d26601 EKF: Update comments 2016-01-28 08:13:38 +11:00
Paul Riseborough 4526cb9c4f EKF: remove redundant variable 2016-01-28 07:50:45 +11:00
Paul Riseborough 6326433c47 EKF: Eliminate call to hrt_absolute_time()
This will make the library more portable
2016-01-27 19:04:31 +11:00
James Goppert ce30542dba Fix output for unit test. 2016-01-25 13:54:13 -05:00
James Goppert 1778ac199c Fixed euler wrapping. 2016-01-25 13:40:51 -05:00
Paul Riseborough 94a6644684 Add comprehensive user selectable GPS checks 2016-01-25 13:07:57 +11:00
James Goppert a92d5c1338 Removed unneeded headers. 2016-01-24 02:44:25 -05:00
James Goppert e639a3612f Fix typo. 2016-01-24 02:30:54 -05:00
James Goppert d8e397c010 Merge pull request #10 from PX4/euler_fix
fix euler calculation
2016-01-24 01:52:40 -05:00
James Goppert 5aef810e7c Fixed euler angles. 2016-01-24 01:50:34 -05:00
James Goppert 6e6033a1af Merge branch 'master' into euler_fix 2016-01-24 00:41:12 -05:00
James Goppert b98ac75452 Formatting. 2016-01-24 00:39:59 -05:00
James Goppert ffbe58ca10 Added better roundtrip euler test. 2016-01-24 00:39:21 -05:00
James Goppert b9bfadb0cc Fix for travis. 2016-01-24 00:00:22 -05:00
James Goppert faee66273b Turned back on testing flag. 2016-01-23 23:58:43 -05:00
James Goppert 20a1f902b1 Merge branch 'master' into euler_fix
Conflicts:
	.travis.yml
	test/attitude.cpp
2016-01-23 23:56:35 -05:00
James Goppert cc2804d6a6 Merge pull request #13 from PX4/testing
Testing
2016-01-23 23:38:13 -05:00
James Goppert 0969b0ae56 Removed uncessary print. 2016-01-23 23:35:44 -05:00
James Goppert d761bd3721 Fixed formatting. Made traivs more verbose. 2016-01-23 23:33:25 -05:00
James Goppert 38211e1aff Fix testing mechanism. 2016-01-23 23:26:26 -05:00
Roman 8d0022ab1e enable estimator state and innovations data logging 2016-01-22 11:31:14 +01:00
Roman 86df68e404 added interface for parameters 2016-01-22 10:45:03 +01:00
Lorenz Meier 6009709986 Merge pull request #11 from PX4/dspal_fix
Added dspal_math.h for missing constants
2016-01-21 23:23:41 +01:00
Mark Charlebois 306f0ac25d Added dspal_math.h for missing constants
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-01-21 12:45:07 -08:00
Roman Bapst 9b7afa2600 Merge pull request #12 from nickolasrossi/master
fix buffer overflow in constrain of wind velocity
2016-01-20 07:27:00 +01:00
nickolasrossi dfbbd36ff7 fix buffer overflow in constrain of wind velocity 2016-01-19 18:25:22 -08:00
Mark Charlebois 79bf35c4b3 Fixed printf of uint64_t
Must use PRIu64 to prevent compiler errors.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-01-18 22:19:10 -08:00
Lorenz Meier 48a3288753 Fix QuRT build 2016-01-18 13:39:46 -08:00
James Goppert fa31c61f2c Fix for euler. 2016-01-14 15:24:37 -05:00
Roman Bapst 2c80614e20 Merge pull request #10 from PX4/delta_ang_bias_fix
fix delta angle bias usage:
2016-01-14 17:10:47 +01:00
Roman 0b5c90574c fix delta angle bias usage:
the delta angle bias was applied to imu data which was not coming in the same
time intervall as the filter was operating. Therefore, the delta angle bias
applied to new imu data had to be scaled correctly in order to match
the imu time interval.
2016-01-14 17:06:02 +01:00
Roman Bapst a22a47fe15 fix euler calculation
Conflicts:
	matrix/Euler.hpp
2016-01-14 15:51:28 +01:00
Lorenz Meier 1d9d8e6f9b Use a slight ifdef hack to let things default to C++11 for most platforms 2016-01-12 12:14:53 +01:00
Lorenz Meier 187830164d Fix cast 2016-01-12 11:50:21 +01:00
James Goppert 67c8c8b331 Cast to float for isfinite. 2016-01-12 01:35:33 -06:00
James Goppert f1968f51d6 Fixed coverage issues. 2016-01-12 01:28:48 -06:00
James Goppert a90484362f Merge pull request #8 from PX4/cast_fix
added missing cast
2016-01-12 01:09:56 -06:00
Roman 4034c916c7 added missing cast 2016-01-12 07:51:52 +01:00
James Goppert cc800454d2 Formatting. 2016-01-11 22:05:34 -06:00
James Goppert 684a6b626d Merge branch 'quaternion'
Conflicts:
	test/attitude.cpp
2016-01-11 21:59:28 -06:00
James Goppert 0e48d2596c Merge pull request #6 from thomasgubler/pr1
scalar multiplication; std::cout support
2016-01-11 21:47:51 -06:00
Roman Bapst 749156d4aa Merge pull request #7 from PX4/ekf2_fixes
Ekf2 fixes
2016-01-08 07:09:01 +01:00
Roman 2af5856361 initialise output height with baro 2016-01-08 06:59:10 +01:00
Roman a41f75ffb1 use full mag fusion 2016-01-08 06:59:10 +01:00
Roman f8354bb5e9 - do not fake vertical gps measurement as we have baro
- formatting

Conflicts:
	EKF/ekf.cpp
2016-01-08 06:59:10 +01:00
Roman 2a88fc6cfd initialise vertical position correctly 2016-01-08 06:42:22 +01:00
Roman 5aa5f7f8c3 use correct timestamp for measurements 2016-01-08 06:42:03 +01:00
Lorenz Meier b542e2b49b Merge pull request #6 from mcharleb/hexagon_support
Added hexagon support
2016-01-08 00:37:32 +01:00
Mark Charlebois b8837b4dc6 Added hexagon support
std::to_string is not supported in the Hexagon complier

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-01-07 14:54:55 -08:00
Lorenz Meier b457709bd9 Merge pull request #4 from PX4/paul-wip
EKF: Fix 'Dizzy on Startup' behaviour
2016-01-03 02:00:23 +01:00
Paul Riseborough edfb7aefcc EKF: Fix initial alignment errors
Use the gravity vector to estimate the initial roll and pitch angle
Use the projection of the magnetic field measurement onto the earth axis horizontal plane to calculate the initial heading
2016-01-03 00:03:03 +11:00
Lorenz Meier 52cb9d02c7 EKF: Initialize all local structs and variables 2016-01-01 12:31:36 +01:00
Lorenz Meier 7537c966f9 Merge pull request #3 from PX4/paul-wip
Enable use of POSCTL mode with EKF2
2016-01-01 11:41:14 +01:00
Paul Riseborough 0cb210d045 EKF: Changes required to enter POSCTL mode 2016-01-01 11:56:38 +11:00
Thomas Gubler 45e6012818 matrix scalar pre multiplication and general scalar multiplication for
quaternions
2015-12-26 13:15:39 +01:00
Thomas Gubler 99ac532746 remove unnecessary ; 2015-12-26 12:07:12 +01:00
Thomas Gubler d999923a35 support for std::cout 2015-12-26 12:07:12 +01:00
Lorenz Meier eda69e727f Do not print states by default 2015-12-24 13:48:22 +01:00
Lorenz Meier ec0189bb3c Update README 2015-12-24 13:47:02 +01:00
Lorenz Meier 101bcdc4e1 Ignore system and temp files 2015-12-24 13:46:52 +01:00
Lorenz Meier e2e93ca100 Update README 2015-12-24 10:25:31 +01:00
Roman 457a57c6ff use simple heading fusion 2015-12-22 18:00:59 +01:00
Lorenz Meier 6b49e2495c Fix field initializers 2015-12-22 17:25:08 +01:00
Lorenz Meier 8894786752 Estimator base: Fix printf formatting 2015-12-22 17:24:58 +01:00
Lorenz Meier faf48242ed EKF: Fix ringbuffer warnings 2015-12-22 17:24:43 +01:00
Roman cc1658db15 fixed wrong type conversion 2015-12-22 11:23:18 +01:00
Roman 5e5d6f432a added static gps mode and init mag state correctly 2015-12-22 11:22:17 +01:00
Lorenz Meier 21fa17c948 Fix field initializers 2015-12-21 18:56:15 +01:00
Lorenz Meier e8273208d7 EKF: Remove excessive verbosity 2015-12-21 11:52:05 +01:00
Lorenz Meier 0da1aa54af Ignore system and temp files 2015-12-21 11:29:57 +01:00
Lorenz Meier 155ba9f796 Estimator base: Fix printf formatting 2015-12-21 11:27:11 +01:00
Lorenz Meier 2a6e48332d EKF: Fix ringbuffer warnings 2015-12-21 11:26:50 +01:00
Roman Bapst c3c6a0a9df fix euler calculation 2015-12-20 06:06:56 +01:00
Roman 10b395a782 added more quaternion methods 2015-12-19 09:47:03 +01:00
Roman f153a7cb44 added ifdef guard 2015-12-19 09:40:32 +01:00
Roman 772c1bf981 compile fw wheel controller code 2015-12-19 09:38:10 +01:00
Roman 3c7705b3f9 checked out attitude fw folder from master 2015-12-19 09:37:40 +01:00
Roman d009118437 set stack size for ecl 2015-12-19 09:16:17 +01:00
Roman dd171670ca checked out validation code from master 2015-12-19 08:53:08 +01:00
Roman Bapst c58d1df7bc fixed cmake file 2015-12-10 16:49:42 +01:00
Roman Bapst d233ca3990 added complementary filter for real time state estimation 2015-12-10 16:36:10 +01:00
Roman Bapst 67646a15b0 added full mag fusion 2015-12-10 09:07:00 +01:00
Roman 8de8b0eb76 prediction and vel pos heading fusion working 2015-12-09 17:47:52 +01:00
Roman 921df43d32 added tests for EKF ringbuffer 2015-12-07 22:41:11 +01:00
Roman d90c8fd7c2 fixed bug in covariance prediction 2015-12-07 22:41:11 +01:00
Roman cfc39bc2f9 implemented prediction of states and covariance matrix 2015-12-07 22:41:11 +01:00
Roman 16eb3b0e96 cmake: added new files for compilation 2015-12-07 22:41:11 +01:00
Roman b52e38eb9d fix 2015-12-07 22:41:11 +01:00
Roman cd5db8f494 enhance ringbuffer 2015-12-06 17:07:44 +01:00
Roman b3491bcfc3 added file with ekf helper functions 2015-12-06 13:19:25 +01:00
Roman 859502753d added file with covariance calculations 2015-12-06 13:10:49 +01:00
Roman Bapst 144aa9c461 added base class for data storage 2015-12-05 11:08:06 +01:00
jgoppert 9cd6ac3dd9 Fixed coverage. 2015-11-14 09:04:38 -05:00
jgoppert dc0eb16880 Fixed integration test. 2015-11-14 09:01:09 -05:00
jgoppert f2c0669c0d Changed rk4 to use generic matrix interface. 2015-11-14 08:55:34 -05:00
jgoppert b9924820e1 Work on kalman filter interface. 2015-11-12 16:41:07 -05:00
jgoppert 0a110a1b02 Fixed integration test. 2015-11-12 15:15:31 -05:00
jgoppert aa3a086cda Work on rk4 interface. 2015-11-12 15:13:17 -05:00
jgoppert 7656385ea1 Changed rk4 signature. 2015-11-12 10:19:30 -05:00
jgoppert 606eb1dc2b Added attitude classes to README. 2015-11-12 10:09:54 -05:00
jgoppert a334cecfa7 Forced function instantiation for coverage testing. 2015-11-12 10:07:09 -05:00
jgoppert 410bbc4c71 Added more to README. 2015-11-12 09:51:11 -05:00
jgoppert c29c44b450 Added more testing to instantiate some missing templates. 2015-11-12 09:44:30 -05:00
James Goppert 6a351ac050 Merge pull request #1 from PX4/coverage_filter
Changed root dir for coverage.
2015-11-12 01:32:08 -05:00
jgoppert e724ae4078 Set include dir. 2015-11-12 01:29:47 -05:00
jgoppert 8054180e89 Changed root dir for coverage. 2015-11-12 01:27:27 -05:00
jgoppert 10b89a2594 Switching coverage upload mechanism. 2015-11-12 01:22:40 -05:00
jgoppert 787606b6b8 Formatting. 2015-11-11 23:33:26 -05:00
jgoppert 42f2e60b24 Added runge kutta integration. 2015-11-11 23:31:43 -05:00
jgoppert 2c7a375e3d Fixed kalman correct test. 2015-11-09 19:58:00 -05:00
jgoppert e972a0a111 Made kalman filter correction function usable. 2015-11-09 19:55:20 -05:00
jgoppert 222a97e73f Merge ../Firmware/src/lib/matrix 2015-11-08 12:08:52 -05:00
jgoppert 5c573b075f Fixes for nuttx. 2015-11-08 12:08:19 -05:00
jgoppert 400a9caa47 Merge ../Firmware/src/lib/matrix 2015-11-07 14:27:41 -05:00
jgoppert 9b995e19f3 Added vector2. 2015-11-07 14:27:12 -05:00
jgoppert 1f72309520 Added some docs. 2015-11-07 12:17:45 -05:00
jgoppert 835cdd2f91 README fix. 2015-11-07 12:03:10 -05:00
jgoppert 3a2c3bdae1 README formatting. 2015-11-07 12:00:21 -05:00
jgoppert 9884a4c423 Improved README. 2015-11-07 11:59:30 -05:00
jgoppert f621f68fe1 Changed license holder to development team. 2015-11-07 11:55:24 -05:00
jgoppert ace2751715 Badge fix. 2015-11-07 11:29:08 -05:00
Lorenz Meier f6e8cdd970 First attempt at enabling coveralls 2015-11-07 17:17:37 +01:00
jgoppert b9e1ccfe00 Merge branch 'master' of github.com:PX4/Matrix 2015-11-07 11:08:33 -05:00
jgoppert 1fb0f33eb4 Removed old references to matrix.hpp. 2015-11-07 11:08:17 -05:00
Lorenz Meier 4058e32f73 Fix include path 2015-11-07 17:06:07 +01:00
Lorenz Meier 222e42f934 Re-add convenience header 2015-11-07 09:43:28 +01:00
Lorenz Meier 6abd2f782a Re-add Matrix.hpp 2015-11-07 09:42:33 +01:00
Lorenz Meier 713aee154b Remove both versions of matrix / Matrix 2015-11-07 09:41:38 +01:00
jgoppert a2696fcee4 Fix for isfinite. 2015-11-06 21:09:34 -05:00
jgoppert 7abbdcd88f License fix. 2015-11-05 20:27:03 -05:00
jgoppert 32839006f3 Implemented vector 3 cross product. 2015-11-05 20:22:17 -05:00
jgoppert 5b5cfcfeca Added more vector ctors. 2015-11-05 19:37:31 -05:00
jgoppert 44768fad35 Added vector data ctor. 2015-11-05 19:32:28 -05:00
jgoppert cefe7b3e80 Cleaned up header includes. 2015-11-05 19:25:44 -05:00
jgoppert b06c557a2a Comment fix. 2015-11-05 18:16:07 -05:00
jgoppert c70994e6a5 Formatting. 2015-11-05 18:10:06 -05:00
jgoppert 4a6369cee5 More coverage testing. 2015-11-05 18:07:05 -05:00
jgoppert 550108cf1d More testing. 2015-11-05 17:29:57 -05:00
jgoppert 75399fb15e Cleanup of printing. 2015-11-05 17:13:03 -05:00
jgoppert 455cb58ebf New tests. 2015-11-05 17:03:22 -05:00
jgoppert 6ff42b7b31 Added some more vectors tests. 2015-11-05 16:59:59 -05:00
jgoppert 7136e5b7d1 More work on gimbal lock case. 2015-11-05 16:54:19 -05:00
jgoppert d01e0a1038 Formatting. 2015-11-05 15:44:54 -05:00
jgoppert 00a0b36836 Moved inverse outside of matrix definition. 2015-11-05 15:43:36 -05:00
jgoppert 5566b3dc77 expm testing and fixes. 2015-11-05 15:39:41 -05:00
jgoppert 5517532c90 Fixed coveralls build. 2015-11-05 13:37:14 -05:00
jgoppert 6aa8a72651 Renamed coverage option. 2015-11-05 13:34:49 -05:00
jgoppert 31821a44aa Fixed formatting script. 2015-11-05 13:33:35 -05:00
jgoppert 9af1604daa Formatting. 2015-11-05 12:45:53 -05:00
jgoppert 537c683d58 More cleanup. 2015-11-05 12:34:14 -05:00
jgoppert fd64e7e93a More testing and cleanup. 2015-11-05 12:28:39 -05:00
jgoppert 9d88b0d573 Fix for gcc 4.6 2015-11-05 11:29:18 -05:00
jgoppert bb6b375390 Travis fix. 2015-11-05 11:25:47 -05:00
jgoppert 5b0ea675c3 Fixed float in square matrix. 2015-11-05 11:23:54 -05:00
jgoppert cbe8b4ef6f Travis fix. 2015-11-05 11:21:48 -05:00
jgoppert b8dc262582 Formatting. 2015-11-05 11:18:33 -05:00
jgoppert 0062cbcbe2 Added more warnings, and fixed issues. 2015-11-05 11:17:54 -05:00
jgoppert 6ba15eeaa0 Formatting. 2015-11-05 10:51:53 -05:00
jgoppert 7c4b2c590e Update for travis. 2015-11-05 10:46:22 -05:00
jgoppert f7b1c63b86 Work on testing. 2015-11-05 10:44:21 -05:00
jgoppert a703c8169e Working on formatting. 2015-11-04 23:19:20 -05:00
jgoppert f23bed6823 Explicity disabled sudo. 2015-11-04 22:54:39 -05:00
jgoppert 3fc5ec9751 Tried apt addon. 2015-11-04 22:53:45 -05:00
jgoppert 04f24310b5 Added astyle install to travis. 2015-11-04 22:51:25 -05:00
jgoppert b818774f6a Work on format testing. 2015-11-04 22:48:13 -05:00
jgoppert eddc55827a More filter testing. 2015-11-04 20:58:56 -05:00
jgoppert 76cf91c5fd Work on filter. 2015-11-04 20:56:44 -05:00
jgoppert 52956e360a Added filtering test. 2015-11-04 20:43:22 -05:00
jgoppert b2e9e1e3c7 Added kalman filter. 2015-11-04 18:58:29 -05:00
jgoppert 7ec13f6282 Updated pdf. 2015-11-04 12:22:07 -05:00
jgoppert 18f80462b7 Got coverage working for templates. 2015-11-04 12:11:32 -05:00
jgoppert bf6de4b710 Updated travis. 2015-11-04 11:39:49 -05:00
jgoppert 9e37b99d76 Added local coverage tools. 2015-11-04 11:38:55 -05:00
jgoppert edc356d0db Added coverage flag. 2015-11-04 11:02:09 -05:00
jgoppert 4bf4611087 Work on coverage. 2015-11-04 10:54:46 -05:00
jgoppert abd0ef0143 Removed test files from coverage. 2015-11-04 03:39:35 -05:00
jgoppert 88def6b54e Made instantiation actual test program. 2015-11-04 03:37:33 -05:00
jgoppert 3477ff2adb Added coverage to build. 2015-11-04 03:29:01 -05:00
jgoppert 6458c0477e Working on coverage for templates. 2015-11-04 03:16:41 -05:00
jgoppert ea66d09a8e Added coverage source. 2015-11-04 03:11:45 -05:00
jgoppert 9b90f223a4 Updated token. 2015-11-04 02:51:42 -05:00
jgoppert ce719a0fe2 Added cov sources. 2015-11-04 02:29:07 -05:00
jgoppert 8f0448eb91 Coverage fix. 2015-11-04 01:58:48 -05:00
jgoppert 35edae200f Badge placement. 2015-11-04 01:54:14 -05:00
jgoppert edd23778ca Added coverage. 2015-11-04 01:52:19 -05:00
jgoppert b1ee027f64 Working on coverage. 2015-11-04 01:50:30 -05:00
Paul Riseborough 83079e0e11 Inertial Nav EKF: add notes on use of generated code 2015-11-04 17:05:23 +11:00
jgoppert 12713105b8 Fixed quaternion unit test. 2015-11-04 00:48:59 -05:00
jgoppert c84e934909 Updated vector class. 2015-11-04 00:37:00 -05:00
jgoppert 89851a85c0 Added badge. 2015-11-03 20:31:47 -05:00
jgoppert 33e0272447 Travis fix. 2015-11-03 20:31:10 -05:00
jgoppert 7470134559 Fixed filename. 2015-11-03 20:29:34 -05:00
jgoppert ad03429ae9 Added readme. 2015-11-03 20:28:48 -05:00
jgoppert 49035ed6a9 Added mode lines for vi. 2015-11-03 20:26:42 -05:00
jgoppert b842f8d8a5 Added travis. 2015-11-03 20:17:34 -05:00
jgoppert 5369904d27 Fixed default. 2015-11-03 19:50:09 -05:00
jgoppert a36ff9f1e5 Formatting and added Scalar. 2015-11-03 19:38:31 -05:00
jgoppert 76e86cf937 Initial commit. 2015-11-03 14:46:54 -05:00
Paul Riseborough b92c99073e Update read 2015-11-03 12:29:55 +11:00
Paul Riseborough 06e9d73268 Add derivation script files for inertial nav EKF 2015-11-03 12:24:43 +11:00
Paul Riseborough b3bd09d5b9 Rename directory 2015-11-03 12:24:25 +11:00
Paul Riseborough af6a196187 Add generated code for 24 state Nav Filter 2015-11-03 12:17:02 +11:00
Lorenz Meier 363b7d8c36 Adding blank folders and instructions 2015-10-27 11:12:05 +01:00
Lorenz Meier e5743d503c Initial import 2015-10-26 16:06:30 +01:00
Lorenz Meier 86fb72d3a3 Initial commit 2015-10-26 15:41:25 +01:00
3793 changed files with 371063 additions and 99093 deletions
+43 -35
View File
@@ -9,15 +9,14 @@ pipeline {
script {
def build_nodes = [:]
def docker_images = [
armhf: "px4io/px4-dev-armhf:2020-11-18",
arm64: "px4io/px4-dev-aarch64:2020-11-18",
base: "px4io/px4-dev-base-bionic:2020-11-18",
nuttx: "px4io/px4-dev-nuttx-focal:2020-11-18",
snapdragon: "lorenzmeier/px4-dev-snapdragon:2020-04-01"
armhf: "px4io/px4-dev-armhf:2021-09-08",
arm64: "px4io/px4-dev-aarch64:2021-09-08",
base: "px4io/px4-dev-base-bionic:2021-09-08",
nuttx: "px4io/px4-dev-nuttx-focal:2021-09-08",
]
def armhf_builds = [
target: ["aerotenna_ocpoc_default", "beaglebone_blue_default", "emlid_navio2_default", "px4_raspberrypi_default", "scumaker_pilotpi_default"],
target: ["beaglebone_blue_default", "emlid_navio2_default", "px4_raspberrypi_default", "scumaker_pilotpi_default"],
image: docker_images.armhf,
archive: false
]
@@ -37,52 +36,71 @@ pipeline {
def nuttx_builds_archive = [
target: [
"airmind_mindpx-v2_default",
"ark_can-flow_canbootloader",
"ark_can-flow_default",
"ark_can-gps_canbootloader",
"ark_can-gps_default",
"ark_can-rtk-gps_canbootloader",
"ark_can-rtk-gps_default",
"atl_mantis-edu_default",
"av_x-v1_default",
"bitcraze_crazyflie_default",
"bitcraze_crazyflie21_default",
"cuav_can-gps-v1_canbootloader",
"cuav_can-gps-v1_default",
"cuav_nora_default",
"cuav_x7pro_default",
"cubepilot_cubeorange_console",
"cubepilot_cubeorange_default",
"cubepilot_cubeyellow_console",
"cubepilot_cubeyellow_default",
"freefly_can-rtk-gps_canbootloader",
"freefly_can-rtk-gps_default",
"holybro_can-gps-v1_canbootloader",
"holybro_can-gps-v1_default",
"holybro_durandal-v1_default",
"holybro_kakutef7_default",
"holybro_pix32v5_default",
"intel_aerofc-v1_default",
"matek_h743-slim",
"matek_gnss-m9n-f4_canbootloader",
"matek_gnss-m9n-f4_default",
"modalai_fc-v1_default",
"modalai_fc-v1_rtps",
"modalai_fc-v2_default",
"mro_ctrl-zero-f7_default",
"mro_ctrl-zero-f7-oem_default",
"mro_ctrl-zero-h7_default",
"mro_ctrl-zero-h7_rtps",
"mro_ctrl-zero-h7-oem_default",
"mro_ctrl-zero-h7-oem_rtps",
"mro_pixracerpro_default",
"mro_pixracerpro_rtps",
"mro_x21-777_default",
"mro_x21_default",
"nxp_fmuk66-e_default",
"nxp_fmuk66-e_rtps",
"nxp_fmuk66-e_socketcan",
"nxp_fmuk66-v3_default",
"nxp_fmuk66-v3_socketcan",
"nxp_fmuk66-v3_rtps",
"nxp_fmuk66-v3_socketcan",
"nxp_fmurt1062-v1_default",
"nxp_ucans32k146_canbootloader",
"nxp_ucans32k146_default",
"omnibus_f4sd_default",
"raspberrypi_pico_default",
"px4_fmu-v2_default",
"px4_fmu-v2_fixedwing",
"px4_fmu-v2_lpe",
"px4_fmu-v2_multicopter",
"px4_fmu-v2_rover",
"px4_fmu-v2_test",
"px4_fmu-v3_default",
"px4_fmu-v4_cannode",
"px4_fmu-v4_default",
"px4_fmu-v4_optimized",
"px4_fmu-v4pro_default",
"px4_fmu-v5_default",
"px4_fmu-v5_debug",
"px4_fmu-v5_fixedwing",
"px4_fmu-v5_multicopter",
"px4_fmu-v5_optimized",
"px4_fmu-v5_rover",
"px4_fmu-v5_default",
"px4_fmu-v5_rtps",
"px4_fmu-v5_stackcheck",
"px4_fmu-v5x_base_phy_DP83848C",
"px4_fmu-v5_uavcanv0periph",
"px4_fmu-v5_uavcanv1",
"px4_fmu-v5x_default",
"px4_fmu-v6u_default",
"px4_fmu-v6x_default",
"px4_io-v2_default",
"spracing_h7extreme_default",
@@ -92,14 +110,8 @@ pipeline {
archive: true
]
def snapdragon_builds = [
target: ["atlflight_eagle_qurt", "atlflight_eagle_default"],
image: docker_images.snapdragon,
archive: false
]
def docker_builds = [
armhf_builds, base_builds, nuttx_builds_archive//, snapdragon_builds
armhf_builds, base_builds, nuttx_builds_archive
]
for (def build_type = 0; build_type < docker_builds.size(); build_type++) {
@@ -119,7 +131,7 @@ pipeline {
// TODO: actually upload artifacts to S3
// stage('S3 Upload') {
// agent {
// docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
// docker { image 'px4io/px4-dev-base-focal:2021-09-08' }
// }
// options {
// skipDefaultCheckout()
@@ -144,18 +156,14 @@ pipeline {
}
options {
buildDiscarder(logRotator(numToKeepStr: '5', artifactDaysToKeepStr: '14'))
timeout(time: 60, unit: 'MINUTES')
timeout(time: 90, unit: 'MINUTES')
}
}
def createBuildNode(Boolean archive, String docker_image, String target) {
return {
// TODO: fix the snapdragon image
bypass_entrypoint = ''
if (docker_image == 'lorenzmeier/px4-dev-snapdragon:2020-04-01') {
bypass_entrypoint = ' --entrypoint=""'
}
node {
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_dagar') {
@@ -164,7 +172,7 @@ def createBuildNode(Boolean archive, String docker_image, String target) {
try {
sh('export')
checkout(scm)
sh('make distclean')
sh('make distclean; git clean -ff -x -d .')
sh('git fetch --tags')
sh('ccache -s')
sh('make ' + target)
@@ -181,7 +189,7 @@ def createBuildNode(Boolean archive, String docker_image, String target) {
throw (exc)
}
finally {
sh('make distclean')
sh('make distclean; git clean -ff -x -d .')
}
}
}
+644 -735
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -74,6 +74,7 @@ Checks: '*,
-modernize-deprecated-headers,
-modernize-loop-convert,
-modernize-pass-by-value,
-modernize-raw-string-literal,
-modernize-return-braced-init-list,
-modernize-use-auto,
-modernize-use-bool-literals,
@@ -81,6 +82,7 @@ Checks: '*,
-modernize-use-equals-default,
-modernize-use-equals-delete,
-modernize-use-override,
-modernize-use-trailing-return-type,
-modernize-use-using,
-performance-inefficient-string-concatenation,
-readability-avoid-const-params-in-decls,
+7
View File
@@ -0,0 +1,7 @@
FROM gcr.io/oss-fuzz-base/base-builder:v1
COPY . $SRC/PX4-Autopilot
RUN apt-get install -y libjpeg8-dev zlib1g-dev
RUN pip3 install --upgrade pip
RUN python3 -m pip install -r $SRC/PX4-Autopilot/Tools/setup/requirements.txt
WORKDIR $SRC/PX4-Autopilot
COPY ./.clusterfuzzlite/build.sh $SRC/
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash -eu
PX4_FUZZ=1 make px4_sitl
cp build/px4_sitl_default/bin/px4 $OUT/px4
+1
View File
@@ -0,0 +1 @@
language: c++
+1 -1
View File
@@ -2,7 +2,7 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/cpp
{
"name": "px4-dev-nuttx",
"image": "px4io/px4-dev-nuttx-focal:2020-11-18",
"image": "px4io/px4-dev-nuttx-focal:2021-09-08",
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
+1 -1
View File
@@ -4,7 +4,7 @@ about: Suggest an idea for this project
---
For general questions please use [PX4 Discuss](http://discuss.px4.io/) or [Slack](http://slack.px4.io/).
For general questions please use [PX4 Discuss](http://discuss.px4.io/) or Slack (you can find an invite link on this project README).
**Describe problem solved by the proposed feature**
A clear and concise description of the problem, if any, this feature will solve. E.g. I'm always frustrated when ...
+24
View File
@@ -0,0 +1,24 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="90" height="20">
<linearGradient id="smooth" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<mask id="round">
<rect width="90" height="20" rx="3" fill="#fff"/>
</mask>
<g mask="url(#round)">
<rect width="42" height="20" fill="#555"/>
<rect x="42" width="48" height="20" fill="#E01563"/>
<rect width="90" height="20" fill="url(#smooth)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="22" y="15" fill="#010101" fill-opacity=".3">slack</text>
<text x="22" y="14">slack</text>
<text x="65" y="15" fill="#010101" fill-opacity=".3">Join us!</text>
<text x="65" y="14">Join us!</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 894 B

+34
View File
@@ -0,0 +1,34 @@
name: ClusterFuzzLite batch fuzzing
on:
schedule:
- cron: '0 6 * * *' # UTC 6am every day.
permissions: read-all
jobs:
BatchFuzzing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitizer:
- address
- undefined
- memory
steps:
- name: Build Fuzzers (${{ matrix.sanitizer }})
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
sanitizer: ${{ matrix.sanitizer }}
- name: Run Fuzzers (${{ matrix.sanitizer }})
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 1800 # 30 mins
mode: 'batch'
sanitizer: ${{ matrix.sanitizer }}
# Optional but recommended: For storing certain artifacts from fuzzing.
# See later section on "Git repo for storage".
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
# storage-repo-branch: main # Optional. Defaults to "main"
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
+10 -22
View File
@@ -17,47 +17,35 @@ jobs:
check: [
"check_format",
"tests",
"tests_coverage",
"px4_fmu-v2_default stack_check",
"validate_module_configs",
"shellcheck_all",
"NO_NINJA_BUILD=1 px4_fmu-v5_default",
"NO_NINJA_BUILD=1 px4_sitl_default",
"BUILD_MICRORTPS_AGENT=1 px4_sitl_rtps",
"airframe_metadata",
"module_documentation",
"parameters_metadata",
]
container:
image: px4io/px4-dev-nuttx-focal:2020-11-18
image: px4io/px4-dev-nuttx-focal:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: tests_${{matrix.ubuntu_release}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: tests_${{matrix.ubuntu_release}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 400M" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: check environment
run: |
export
ulimit -a
- name: ${{matrix.check}}
run: make ${{matrix.check}}
- name: upload coverage
if: contains(matrix.check, 'coverage')
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
file: coverage/lcov.info
+2 -27
View File
@@ -11,36 +11,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-clang:2020-11-18
container: px4io/px4-dev-clang:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: clang-tidy-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: clang-tidy-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 400M" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: make clang-tidy-quiet
run: |
ccache -z
make clang-tidy-quiet
ccache -s
run: make clang-tidy-quiet
+3 -3
View File
@@ -11,11 +11,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-armhf:2020-11-18
container: px4io/px4-dev-armhf:2021-09-08
strategy:
matrix:
config: [
aerotenna_ocpoc_default,
beaglebone_blue_default,
emlid_navio2_default,
px4_raspberrypi_default,
@@ -44,7 +43,8 @@ jobs:
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 400M" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
+3 -2
View File
@@ -11,7 +11,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-aarch64:2020-11-18
container: px4io/px4-dev-aarch64:2021-09-08
strategy:
matrix:
config: [
@@ -40,7 +40,8 @@ jobs:
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 400M" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
+4 -2
View File
@@ -15,7 +15,8 @@ jobs:
matrix:
config: [
px4_fmu-v5_default,
tests, # includes px4_sitl
px4_sitl
#tests, # includes px4_sitl
]
steps:
- uses: actions/checkout@v1
@@ -43,7 +44,8 @@ jobs:
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 400M" >> ~/.ccache/ccache.conf
echo "max_size = 40M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
+59 -57
View File
@@ -11,61 +11,57 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-nuttx-focal:2020-11-18
container: px4io/px4-dev-nuttx-focal:2021-09-08
strategy:
fail-fast: false
matrix:
config: [
airmind_mindpx-v2_default,
av_x-v1_default,
bitcraze_crazyflie_default,
cuav_can-gps-v1_canbootloader,
cuav_can-gps-v1_default,
cuav_nora_default,
cuav_x7pro_default,
cubepilot_cubeorange_console,
cubepilot_cubeorange_default,
cubepilot_cubeyellow_console,
cubepilot_cubeyellow_default,
holybro_durandal-v1_default,
holybro_kakutef7_default,
holybro_pix32v5_default,
intel_aerofc-v1_default,
modalai_fc-v1_default,
mro_ctrl-zero-f7_default,
mro_pixracerpro_default,
mro_x21-777_default,
mro_x21_default,
nxp_fmuk66-v3_default,
nxp_fmuk66-e_default,
nxp_fmuk66-v3_socketcan,
nxp_fmuk66-v3_rtps,
nxp_fmurt1062-v1_default,
nxp_ucans32k146_default,
omnibus_f4sd_default,
px4_fmu-v2_default,
px4_fmu-v2_fixedwing,
px4_fmu-v2_lpe,
px4_fmu-v2_multicopter,
px4_fmu-v2_rover,
px4_fmu-v2_test,
px4_fmu-v3_default,
px4_fmu-v4_cannode,
px4_fmu-v4_default,
px4_fmu-v4_optimized,
px4_fmu-v4pro_default,
px4_fmu-v5_default,
px4_fmu-v5_fixedwing,
px4_fmu-v5_multicopter,
px4_fmu-v5_optimized,
px4_fmu-v5_rover,
px4_fmu-v5_rtps,
px4_fmu-v5_stackcheck,
px4_fmu-v5x_base_phy_DP83848C,
px4_fmu-v5x_default,
px4_fmu-v6x_default,
px4_io-v2_default,
spracing_h7extreme_default,
uvify_core_default
airmind_mindpx-v2,
ark_can-flow,
ark_can-gps,
ark_can-rtk-gps,
atl_mantis-edu,
av_x-v1,
bitcraze_crazyflie,
bitcraze_crazyflie21,
cuav_can-gps-v1,
cuav_nora,
cuav_x7pro,
cubepilot_cubeorange,
cubepilot_cubeyellow,
freefly_can-rtk-gps,
holybro_can-gps-v1,
holybro_durandal-v1,
holybro_kakutef7,
holybro_kakuteh7,
holybro_pix32v5,
matek_h743-slim,
matek_gnss-m9n-f4,
modalai_fc-v1,
modalai_fc-v2,
mro_ctrl-zero-f7,
mro_ctrl-zero-f7-oem,
mro_ctrl-zero-h7,
mro_ctrl-zero-h7-oem,
mro_pixracerpro,
mro_x21,
mro_x21-777,
nxp_fmuk66-e,
nxp_fmuk66-v3,
nxp_fmurt1062-v1,
nxp_ucans32k146,
omnibus_f4sd,
raspberrypi_pico,
px4_fmu-v2,
px4_fmu-v3,
px4_fmu-v4,
px4_fmu-v4pro,
px4_fmu-v5,
px4_fmu-v5x,
px4_fmu-v6u,
px4_fmu-v6x,
spracing_h7extreme,
uvify_core
]
steps:
- uses: actions/checkout@v1
@@ -90,12 +86,14 @@ jobs:
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 400M" >> ~/.ccache/ccache.conf
echo "max_size = 120M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: make ${{matrix.config}}
run: make ${{matrix.config}}
- name: make all_variants_${{matrix.config}}
run: make all_variants_${{matrix.config}}
timeout-minutes: 45
- name: make ${{matrix.config}} bloaty_compileunits
run: make ${{matrix.config}} bloaty_compileunits || true
- name: make ${{matrix.config}} bloaty_inlines
@@ -106,13 +104,17 @@ jobs:
run: make ${{matrix.config}} bloaty_symbols || true
- name: make ${{matrix.config}} bloaty_templates
run: make ${{matrix.config}} bloaty_templates || true
- name: make ${{matrix.config}} bloaty_ram
run: make ${{matrix.config}} bloaty_ram || true
- name: make ${{matrix.config}} bloaty_compare_master
run: make ${{matrix.config}} bloaty_compare_master || true
- name: ccache post-run
run: ccache -s
- name: Upload px4 package
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
with:
name: px4_package_${{matrix.config}}
path: build/${{matrix.config}}/${{matrix.config}}.px4
path: |
build/**/*.px4
build/**/*.bin
-69
View File
@@ -1,69 +0,0 @@
name: Coverage
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
container:
image: px4io/px4-dev-base-focal:2020-11-18
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
strategy:
matrix:
config: [
tests,
#python_coverage,
]
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: coverage_${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: coverage_${{matrix.config}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: make ${{matrix.config}}
env:
PX4_CMAKE_BUILD_TYPE: "Coverage"
run: make ${{matrix.config}}
# Report test coverage
- name: Upload coverage
run: |
git config --global credential.helper "" # disable the keychain credential helper
git config --global --add credential.helper store # enable the local store credential helper
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
mkdir -p coverage
lcov --directory build/px4_sitl_test --base-directory build/px4_sitl_test --gcov-tool gcov --capture -o coverage/lcov.info
- name: Upload coverage information to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{matrix.config}}
file: coverage/lcov.info
+54
View File
@@ -0,0 +1,54 @@
name: Deploy metadata for all targets
on:
push:
branches:
- 'master'
- 'release/*'
- 'pr-metadata-test'
jobs:
enumerate_targets:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- id: set-matrix
run: echo "::set-output name=matrix::$(./Tools/generate_board_targets_json.py)"
build:
runs-on: ubuntu-latest
needs: enumerate_targets
strategy:
matrix: ${{fromJson(needs.enumerate_targets.outputs.matrix)}}
container: px4io/px4-dev-${{ matrix.container }}:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- name: make ${{matrix.target}}
run: make ${{matrix.target}}
- name: parameter & events metadata
run: |
make ${{matrix.target}} ver_gen events_json actuators_json
./src/lib/version/get_git_tag_or_branch_version.sh build/${{ matrix.target }} >> $GITHUB_ENV
cd build/${{ matrix.target }}
mkdir _metadata || true
cp parameters.* events/*.xz actuators.json* _metadata
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: 'px4-travis'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: 'build/${{ matrix.target }}/_metadata/'
DEST_DIR: 'Firmware/${{ env.version }}/${{ matrix.target }}/'
@@ -0,0 +1,21 @@
name: EKF Change Indicator
on: pull_request
jobs:
unit_tests:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
- name: checkout newest version of branch
run: |
git fetch origin pull/${{github.event.pull_request.number}}/head:${{github.head_ref}}
git checkout ${GITHUB_HEAD_REF}
- name: main test
run: make tests TESTFILTER=EKF
- name: Check if there is a functional change
run: git diff --exit-code
working-directory: src/modules/ekf2/test/change_indication
@@ -0,0 +1,29 @@
name: EKF Update Change Indicator
on: push
jobs:
unit_tests:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
env:
GIT_COMMITTER_EMAIL: bot@px4.io
GIT_COMMITTER_NAME: PX4BuildBot
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
- name: main test updates change indication files
run: make tests TESTFILTER=EKF
- name: Check if there exists diff and save result in variable
run: echo "CHANGE_INDICATED=$(git diff --exit-code --output=/dev/null || echo $?)" >> $GITHUB_ENV
working-directory: src/modules/ekf2/test/change_indication
- name: auto-commit any changes to change indication
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[AUTO COMMIT] update change indication'
commit_user_name: ${GIT_COMMITTER_NAME}
commit_user_email: ${GIT_COMMITTER_EMAIL}
- if: ${{env.CHANGE_INDICATED}}
name: if there is a functional change, fail check
run: exit 1
@@ -1,131 +0,0 @@
name: MAVROS Avoidance Tests
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {test_file: "mavros_posix_test_avoidance.test", vehicle: "iris_obs_avoid", mission: "avoidance", build_type: "RelWithDebInfo"}
- {test_file: "mavros_posix_test_safe_landing.test", vehicle: "iris_obs_avoid", mission: "MC_safe_landing", build_type: "RelWithDebInfo"}
container:
image: px4io/px4-dev-ros-melodic:2020-11-18
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 400M" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: check environment
run: |
export
ulimit -a
- name: Build PX4 and sitl_gazebo
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: |
ccache -z
make px4_sitl_default
make px4_sitl_default sitl_gazebo
ccache -s
- name: Core dump settings
run: |
ulimit -c unlimited
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
- name: Run SITL tests
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: |
export
./test/rostest_avoidance_run.sh ${{matrix.config.test_file}} mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}} || true
- name: Look at core files
if: failure()
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
- name: Upload px4 coredump
if: failure()
uses: actions/upload-artifact@v2-preview
with:
name: coredump
path: px4.core
# - name: ecl EKF analysis
# if: always()
# run: ./Tools/ecl_ekf/process_logdata_ekf.py ~/.ros/log/*/*.ulg
- name: Upload logs to flight review
if: always()
run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
- name: Upload px4 binary
if: failure()
uses: actions/upload-artifact@v2
with:
name: binary
path: build/px4_sitl_default/bin/px4
- name: Store PX4 log
if: failure()
uses: actions/upload-artifact@v2
with:
name: px4_log
path: ~/.ros/log/*/*.ulg
- name: Store ROS log
if: failure()
uses: actions/upload-artifact@v2
with:
name: ros_log
path: ~/.ros/**/rostest-*.log
# Report test coverage
- name: Upload coverage
if: contains(matrix.config.build_type, 'Coverage')
run: |
git config --global credential.helper "" # disable the keychain credential helper
git config --global --add credential.helper store # enable the local store credential helper
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
mkdir -p coverage
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
- name: Upload coverage information to Codecov
if: contains(matrix.config.build_type, 'Coverage')
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: mavros_avoidance
file: coverage/lcov.info
+9 -7
View File
@@ -17,15 +17,15 @@ jobs:
config:
- {vehicle: "iris", mission: "MC_mission_box", build_type: "RelWithDebInfo"}
- {vehicle: "rover", mission: "rover_mission_1", build_type: "RelWithDebInfo"}
- {vehicle: "plane", mission: "FW_mission_1", build_type: "RelWithDebInfo"}
- {vehicle: "plane_catapult",mission: "FW_mission_1", build_type: "RelWithDebInfo"}
- {vehicle: "standard_vtol", mission: "VTOL_mission_1", build_type: "Coverage"}
- {vehicle: "standard_vtol", mission: "VTOL_mission_1", build_type: "AddressSanitizer"}
#- {vehicle: "plane", mission: "FW_mission_1", build_type: "RelWithDebInfo"}
#- {vehicle: "plane_catapult",mission: "FW_mission_1", build_type: "RelWithDebInfo"}
#- {vehicle: "standard_vtol", mission: "VTOL_mission_1", build_type: "Coverage"}
#- {vehicle: "standard_vtol", mission: "VTOL_mission_1", build_type: "AddressSanitizer"}
#- {vehicle: "tailsitter", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
- {vehicle: "tiltrotor", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
#- {vehicle: "tiltrotor", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
container:
image: px4io/px4-dev-ros-melodic:2020-11-18
image: px4io/px4-dev-ros-melodic:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
@@ -50,7 +50,8 @@ jobs:
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 400M" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
@@ -78,6 +79,7 @@ jobs:
run: |
export
./test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}}
timeout-minutes: 45
- name: Look at core files
if: failure()
+4 -2
View File
@@ -20,7 +20,7 @@ jobs:
#- {test_file: "mavros_posix_tests_offboard_rpyrt_ctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
container:
image: px4io/px4-dev-ros-melodic:2020-11-18
image: px4io/px4-dev-ros-melodic:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
@@ -45,7 +45,8 @@ jobs:
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 400M" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
@@ -73,6 +74,7 @@ jobs:
run: |
export
./test/rostest_px4_run.sh ${{matrix.config.test_file}} vehicle:=${{matrix.config.vehicle}}
timeout-minutes: 45
- name: Look at core files
if: failure()
+63 -17
View File
@@ -4,15 +4,14 @@ on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
- 'release/*'
- 'pr-metadata-test'
jobs:
airframe:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2020-11-18
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
@@ -21,13 +20,24 @@ jobs:
- name: airframe metadata
run: |
make airframe_metadata
./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV
cd build/px4_sitl_default/docs
ls -ls *
# TODO: deploy to devguide gitbook and s3
# TODO: deploy to userguide gitbook
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: 'px4-travis'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: 'build/px4_sitl_default/docs/'
DEST_DIR: 'Firmware/${{ env.version }}/_general/'
module:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2020-11-18
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
@@ -38,11 +48,11 @@ jobs:
make module_documentation
cd build/px4_sitl_default/docs
ls -ls *
# TODO: deploy to devguide gitbook and s3
# TODO: deploy to userguide gitbook and s3
parameter:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2020-11-18
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
@@ -51,13 +61,49 @@ jobs:
- name: parameter metadata
run: |
make parameters_metadata
cd build/px4_sitl_default/docs
ls -ls *
# TODO: deploy 'parameters.md, parameters.xml to S3 px4-travis:Firmware/master/
./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: 'px4-travis'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: 'build/px4_sitl_default/docs/'
DEST_DIR: 'Firmware/${{ env.version }}/_general/'
events:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: events metadata
run: |
make extract_events
./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV
cd build/px4_sitl_default
mkdir _events_full || true
cp events/all_events_full.json.xz _events_full/all_events.json.xz
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: 'px4-travis'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: 'build/px4_sitl_default/_events_full/'
DEST_DIR: 'Firmware/${{ env.version }}/_general/'
uorb_graph:
runs-on: ubuntu-latest
container: px4io/px4-dev-nuttx-focal:2020-11-18
container: px4io/px4-dev-nuttx-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
@@ -72,7 +118,7 @@ jobs:
micrortps_agent:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2020-11-18
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
@@ -86,7 +132,7 @@ jobs:
ROS_msgs:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2020-11-18
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
@@ -99,7 +145,7 @@ jobs:
ROS2_bridge:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2020-11-18
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
@@ -108,4 +154,4 @@ jobs:
- name: PX4 ROS2 bridge
run: |
git clone https://github.com/PX4/px4_ros_com.git
./msg/tools/uorb_to_ros_rtps_ids.py -i msg/tools/uorb_rtps_message_ids.yaml -o px4_ros_com/templates/uorb_rtps_message_ids.yaml
./msg/tools/uorb_to_ros_urtps_topics.py -i msg/tools/urtps_bridge_topics.yaml -o px4_ros_com/templates/urtps_bridge_topics.yaml
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
- name: Install Python3
run: sudo apt-get install python3 python3-setuptools python3-pip -y
- name: Install tools
run: pip3 install --user mypy flake8
run: pip3 install --user mypy types-requests flake8
- name: Check MAVSDK test scripts with mypy
run: $HOME/.local/bin/mypy --strict test/mavsdk_tests/*.py
- name: Check MAVSDK test scripts with flake8
+12 -13
View File
@@ -15,12 +15,13 @@ jobs:
fail-fast: false
matrix:
config:
- {latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo", model: "iris" } # Alaska
- {latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "RelWithDebInfo", model: "standard_vtol" } # Australia
- {latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo", model: "tailsitter" } # Florida
- {latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage", model: "standard_vtol" } # Zurich
- {model: "iris", latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo" } # Alaska
- {model: "standard_vtol", latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "AddressSanitizer" } # Australia
- {model: "tailsitter" , latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo" } # Florida
- {model: "standard_vtol", latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage" } # Zurich
container:
image: px4io/px4-dev-simulation-focal:2020-11-18
image: px4io/px4-dev-simulation-focal:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
@@ -28,9 +29,9 @@ jobs:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Download MAVSDK
run: wget https://github.com/mavlink/MAVSDK/releases/download/v0.33.1/mavsdk_0.33.1_ubuntu20.04_amd64.deb
run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/mavsdk_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
- name: Install MAVSDK
run: dpkg -i mavsdk_0.33.1_ubuntu20.04_amd64.deb
run: dpkg -i "mavsdk_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
@@ -50,7 +51,8 @@ jobs:
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 400M" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
@@ -94,7 +96,8 @@ jobs:
PX4_HOME_LON: ${{matrix.config.longitude}}
PX4_HOME_ALT: ${{matrix.config.altitude}}
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early --model ${{matrix.config.model}} test/mavsdk_tests/configs/sitl.json
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose
timeout-minutes: 45
- name: Look at core files
if: failure()
@@ -106,10 +109,6 @@ jobs:
name: coredump
path: px4.core
- name: Upload logs to flight review
if: failure()
run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ${GITHUB_WORKSPACE}/build/px4_sitl_default/tmp_mavsdk_tests/rootfs/log/*/*.ulg
- name: Upload px4 binary
if: failure()
uses: actions/upload-artifact@v2-preview
+1 -8
View File
@@ -101,15 +101,8 @@ msg/tmp/
msg/topics_sources/
platforms/posix/apps.cpp
platforms/posix/apps.h
src/lib/flight_tasks/FlightTasks_generated.cpp
src/lib/flight_tasks/FlightTasks_generated.hpp
src/lib/parameters/px4_parameters.c
src/lib/parameters/px4_parameters.h
src/lib/parameters/px4_parameters_public.h
src/lib/version/build_git_version.h
src/modules/simulator/simulator_config.h
src/systemcmds/topic_listener/listener_generated.cpp
# SITL
dataman
eeprom/
!src/drivers/distance_sensor/broadcom/afbrs50/Lib/*
+39 -29
View File
@@ -1,11 +1,11 @@
[submodule "mavlink/include/mavlink/v2.0"]
path = mavlink/include/mavlink/v2.0
url = https://github.com/mavlink/c_library_v2.git
[submodule "src/modules/mavlink/mavlink"]
path = src/modules/mavlink/mavlink
url = https://github.com/mavlink/mavlink.git
branch = master
[submodule "src/drivers/uavcan/libuavcan"]
path = src/drivers/uavcan/libuavcan
url = https://github.com/PX4/uavcan.git
branch = px4
url = https://github.com/dronecan/libuavcan.git
branch = main
[submodule "Tools/jMAVSim"]
path = Tools/jMAVSim
url = https://github.com/PX4/jMAVSim.git
@@ -14,43 +14,53 @@
path = Tools/sitl_gazebo
url = https://github.com/PX4/PX4-SITL_gazebo.git
branch = master
[submodule "src/lib/matrix"]
path = src/lib/matrix
url = https://github.com/PX4/PX4-Matrix
branch = master
[submodule "src/lib/ecl"]
path = src/lib/ecl
url = https://github.com/PX4/PX4-ECL
branch = master
[submodule "boards/atlflight/cmake_hexagon"]
path = boards/atlflight/cmake_hexagon
url = https://github.com/PX4/cmake_hexagon.git
branch = px4
[submodule "src/drivers/gps/devices"]
path = src/drivers/gps/devices
url = https://github.com/PX4/PX4-GPSDrivers
url = https://github.com/PX4/PX4-GPSDrivers.git
branch = master
[submodule "src/modules/micrortps_bridge/micro-CDR"]
path = src/modules/micrortps_bridge/micro-CDR
url = https://github.com/PX4/micro-CDR.git
branch = px4
url = https://github.com/PX4/Micro-CDR.git
branch = master
[submodule "platforms/nuttx/NuttX/nuttx"]
path = platforms/nuttx/NuttX/nuttx
url = https://github.com/PX4/NuttX.git
branch = px4_firmware_nuttx-10.0.0+
url = https://github.com/JacobCrabill/incubator-nuttx.git
branch = dev-h7-socketcan
[submodule "platforms/nuttx/NuttX/apps"]
path = platforms/nuttx/NuttX/apps
url = https://github.com/PX4/NuttX-apps.git
branch = px4_firmware_nuttx-10.0.0+
[submodule "platforms/qurt/dspal"]
path = platforms/qurt/dspal
url = https://github.com/ATLFlight/dspal.git
branch = px4_firmware_nuttx-10.1.0+
[submodule "Tools/flightgear_bridge"]
path = Tools/flightgear_bridge
url = https://github.com/PX4/PX4-FlightGear-Bridge.git
[submodule "Tools/jsbsim_bridge"]
path = Tools/jsbsim_bridge
url = https://github.com/PX4/px4-jsbsim-bridge.git
[submodule "src/examples/gyro_fft/CMSIS_5"]
path = src/examples/gyro_fft/CMSIS_5
url = https://github.com/ARM-software/CMSIS_5.git
[submodule "src/drivers/uavcan_v1/libcanard"]
path = src/drivers/uavcan_v1/libcanard
url = https://github.com/UAVCAN/libcanard.git
[submodule "src/drivers/uavcan_v1/public_regulated_data_types"]
path = src/drivers/uavcan_v1/public_regulated_data_types
url = https://github.com/UAVCAN/public_regulated_data_types.git
[submodule "src/drivers/uavcan_v1/legacy_data_types"]
path = src/drivers/uavcan_v1/legacy_data_types
url = https://github.com/PX4/public_regulated_data_types.git
branch = legacy
[submodule "src/lib/crypto/monocypher"]
path = src/lib/crypto/monocypher
url = https://github.com/PX4/Monocypher.git
branch = px4
[submodule "src/lib/events/libevents"]
path = src/lib/events/libevents
url = https://github.com/mavlink/libevents.git
[submodule "Tools/simulation-ignition"]
path = Tools/simulation-ignition
url = https://github.com/PX4/px4-simulation-ignition.git
[submodule "src/lib/crypto/libtomcrypt"]
path = src/lib/crypto/libtomcrypt
url = https://github.com/PX4/libtomcrypt.git
branch = px4
[submodule "src/lib/crypto/libtommath"]
path = src/lib/crypto/libtommath
url = https://github.com/PX4/libtommath.git
branch = px4
+135 -10
View File
@@ -6,6 +6,21 @@ CONFIG:
buildType: RelWithDebInfo
settings:
CONFIG: px4_sitl_default
px4_sitl_rtps:
short: px4_sitl_rtps
buildType: RelWithDebInfo
settings:
CONFIG: px4_sitl_rtps
px4_sitl_asan:
short: px4_sitl (AddressSanitizer)
buildType: AddressSanitizer
settings:
CONFIG: px4_sitl_default
px4_sitl_ubsan:
short: px4_sitl (UndefinedBehaviorSanitizer)
buildType: UndefinedBehaviorSanitizer
settings:
CONFIG: px4_sitl_default
px4_sitl_replay:
short: px4_sitl_replay
buildType: RelWithDebInfo
@@ -46,26 +61,91 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v5_default
px4_fmu-v5_debug:
short: px4_fmu-v5_debug
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v5_debug
px4_fmu-v5x_default:
short: px4_fmu-v5x
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v5x_default
px4_fmu-v6x_default:
short: px4_fmu-v6x
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v6x_default
px4_fmu-v6x_bootloader:
short: px4_fmu-v6x_bootloader
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v6x_bootloader
airmind_mindpx-v2_default:
short: airmind_mindpx-v2
buildType: MinSizeRel
settings:
CONFIG: airmind_mindpx-v2_default
ark_can-flow_default:
short: ark_can-flow_default
buildType: MinSizeRel
settings:
CONFIG: ark_can-flow_default
ark_can-flow_canbootloader:
short: ark_can-flow_canbootloader
buildType: MinSizeRel
settings:
CONFIG: ark_can-flow_canbootloader
ark_can-gps_default:
short: ark_can-gps_default
buildType: MinSizeRel
settings:
CONFIG: ark_can-gps_default
ark_can-gps_canbootloader:
short: ark_can-gps_canbootloader
buildType: MinSizeRel
settings:
CONFIG: ark_can-gps_canbootloader
ark_can-rtk-gps_default:
short: ark_can-rtk-gps_default
buildType: MinSizeRel
settings:
CONFIG: ark_can-rtk-gps_default
ark_can-rtk-gps_debug:
short: ark_can-rtk-gps_debug
buildType: MinSizeRel
settings:
CONFIG: ark_can-rtk-gps_debug
ark_can-rtk-gps_canbootloader:
short: ark_can-rtk-gps_canbootloader
buildType: MinSizeRel
settings:
CONFIG: ark_can-rtk-gps_canbootloader
atl_mantis-edu_default:
short: atl_mantis-edu
buildType: MinSizeRel
settings:
CONFIG: atl_mantis-edu_default
av_x-v1_default:
short: av_x-v1
buildType: MinSizeRel
settings:
CONFIG: av_x-v1_default
bitcraze_crazyflie_default:
short: bitcraze_crazyflie
buildType: MinSizeRel
settings:
CONFIG: bitcraze_crazyflie_default
cuav_can-gps-v1_default:
short: cuav_can-gps-v1_default
buildType: MinSizeRel
settings:
CONFIG: cuav_can-gps-v1_default
cuav_can-gps-v1_canbootloader:
short: cuav_can-gps-v1_canbootloader
buildType: MinSizeRel
settings:
CONFIG: cuav_can-gps-v1_canbootloader
cuav_nora_default:
short: cuav_nora
buildType: MinSizeRel
@@ -76,41 +156,81 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: cuav_x7pro_default
cubepilot_cubeorange_default:
cubepilot_cubeorange_test:
short: cubepilot_cubeorange
buildType: MinSizeRel
settings:
CONFIG: cubepilot_orange_default
cubepilot_cubeyellow_default:
short: cubepilot_cubeyellow
buildType: MinSizeRel
settings:
CONFIG: cubepilot_cubeyellow_default
CONFIG: cubepilot_orange_test
emlid_navio2_default:
short: emlid_navio2
buildType: MinSizeRel
settings:
CONFIG: emlid_navio2_default
freefly_can-rtk-gps_default:
short: freefly_can-rtk-gps_default
buildType: MinSizeRel
settings:
CONFIG: freefly_can-rtk-gps_default
freefly_can-rtk-gps_canbootloader:
short: freefly_can-rtk-gps_canbootloader
buildType: MinSizeRel
settings:
CONFIG: freefly_can-rtk-gps_canbootloader
holybro_can-gps-v1_canbootloader:
short: holybro_can-gps-v1_canbootloader
buildType: MinSizeRel
settings:
CONFIG: holybro_can-gps-v1_canbootloader
holybro_can-gps-v1_default:
short: holybro_can-gps-v1_default
buildType: MinSizeRel
settings:
CONFIG: holybro_can-gps-v1_default
holybro_durandal-v1_default:
short: holybro_durandal-v1
buildType: MinSizeRel
settings:
CONFIG: holybro_durandal-v1_default
intel_aerofc-v1_default:
short: intel_aerofc-v1
matek_h743-slim_default:
short: matek_h743-slim
buildType: MinSizeRel
settings:
CONFIG: intel_aerofc-v1_default
CONFIG: matek_h743-slim_default
matek_gnss-m9n-f4_canbootloader:
short: matek_gnss-m9n-f4_canbootloader
buildType: MiniSizeRel
settings:
CONFIG: matek_m9nf4can_canbootloader
matek_gnss-m9n-f4_default:
short: matek_gnss-m9n-f4_default
buildType: MiniSizeRel
settings:
CONFIG: matek_gnss-m9n-f4_default
modalai_fc-v1_default:
short: modalai_fc-v1
buildType: MinSizeRel
settings:
CONFIG: modalai_fc-v1_default
modalai_fc-v2_default:
short: modalai_fc-v2
buildType: MinSizeRel
settings:
CONFIG: modalai_fc-v2_default
mro_ctrl-zero-f7_default:
short: mro_ctrl-zero-f7
buildType: MinSizeRel
settings:
CONFIG: mro_ctrl-zero-f7_default
mro_pixracerpro_bootloader:
short: mro_pixracerpro_bootloader
buildType: MinSizeRel
settings:
CONFIG: mro_pixracerpro_bootloader
mro_pixracerpro_default:
short: mro_pixracerpro_default
buildType: MinSizeRel
settings:
CONFIG: mro_pixracerpro_default
mro_x21-777_default:
short: mro_x2.1-777
buildType: MinSizeRel
@@ -121,3 +241,8 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: nxp_fmuk66-v3_default
raspberrypi_pico_default:
short: raspberrypi_pico
buildType: MinSizeRel
settings:
CONFIG: raspberrypi_pico_default
+2 -5
View File
@@ -14,7 +14,6 @@
"C_Cpp.workspaceParsingPriority": "low",
"cmake.buildBeforeRun": true,
"cmake.buildDirectory": "${workspaceFolder}/build/${variant:CONFIG}",
"cmake.buildTask": true,
"cmake.configureOnOpen": true,
"cmake.ctest.parallelJobs": 1,
"cmake.skipConfigureIfCachePresent": true,
@@ -27,12 +26,10 @@
"cSpell.showStatus": false,
"cSpell.words": [
"acro",
"rattitude",
"nuttx",
"esc"
],
"debug.toolBarLocation": "docked",
"editor.acceptSuggestionOnEnter": "off",
"editor.defaultFormatter": "chiehyu.vscode-astyle",
"editor.dragAndDrop": false,
"editor.insertSpaces": false,
@@ -128,7 +125,6 @@
"${workspaceFolder}/build": true
},
"search.showLineNumbers": true,
"search.smartCase": true,
"telemetry.enableTelemetry": false,
"terminal.integrated.copyOnSelection": true,
"terminal.integrated.rightClickBehavior": "paste",
@@ -139,5 +135,6 @@
"workbench.settings.enableNaturalLanguageSearch": false,
"yaml.schemas": {
"${workspaceFolder}/validation/module_schema.yaml": "${workspaceFolder}/src/modules/*/module.yaml"
}
},
"cortex-debug.openocdPath": "${env:PICO_SDK_PATH}/../openocd/src/openocd" // Added for rp2040
}
+54 -29
View File
@@ -40,7 +40,7 @@
# * Common functions should be included in px_base.cmake.
#
# * OS/ board specific fucntions should be include in
# px_impl_${PX4_PLATFORM}.cmake or px4_impl_${PX4_PLATFORM}_${PX4_BOARD}.cmake.
# px_impl_${PX4_PLATFORM}.cmake
#
# Formatting
# ---------------------------------------------------------------------------
@@ -101,8 +101,8 @@
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE FILEPATH "PX4 source directory" FORCE)
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}" CACHE FILEPATH "PX4 binary directory" FORCE)
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake)
include(px4_parse_function_args)
@@ -113,7 +113,7 @@ include(px4_parse_function_args)
include(px4_git)
execute_process(
COMMAND git describe --always --tags
COMMAND git describe --exclude ext/* --always --tags
OUTPUT_VARIABLE PX4_GIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
@@ -125,10 +125,19 @@ define_property(GLOBAL PROPERTY PX4_MODULE_LIBRARIES
FULL_DOCS "List of all PX4 module libraries"
)
define_property(GLOBAL PROPERTY PX4_KERNEL_MODULE_LIBRARIES
BRIEF_DOCS "PX4 kernel side module libs"
FULL_DOCS "List of all PX4 kernel module libraries"
)
define_property(GLOBAL PROPERTY PX4_MODULE_PATHS
BRIEF_DOCS "PX4 module paths"
FULL_DOCS "List of paths to all PX4 modules"
)
define_property(GLOBAL PROPERTY PX4_SRC_FILES
BRIEF_DOCS "src files from all PX4 modules & libs"
FULL_DOCS "SRC files from px4_add_{module,library}"
)
#=============================================================================
# configuration
@@ -138,13 +147,35 @@ set(CONFIG "px4_sitl_default" CACHE STRING "desired configuration")
include(px4_add_module)
set(config_module_list)
set(config_kernel_list)
# Find Python
# If using catkin, Python 2 is found since it points
# to the Python libs installed with the ROS distro
if (NOT CATKIN_DEVEL_PREFIX)
find_package(PythonInterp 3)
# We have a custom error message to tell users how to install python3.
if (NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR "Python 3 not found. Please install Python 3:\n"
" Ubuntu: sudo apt install python3 python3-dev python3-pip\n"
" macOS: brew install python")
endif()
else()
find_package(PythonInterp REQUIRED)
endif()
option(PYTHON_COVERAGE "Python code coverage" OFF)
if(PYTHON_COVERAGE)
message(STATUS "python coverage enabled")
set(PYTHON_EXECUTABLE coverage run -p)
endif()
include(px4_config)
include(px4_add_board)
include(${PX4_CONFIG_FILE})
include(kconfig)
message(STATUS "PX4 config: ${PX4_CONFIG}")
message(STATUS "PX4 platform: ${PX4_PLATFORM}")
if(${PX4_PLATFORM} STREQUAL "posix")
if(ENABLE_LOCKSTEP_SCHEDULER)
add_definitions(-DENABLE_LOCKSTEP_SCHEDULER)
@@ -185,6 +216,8 @@ if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "Coverage")
set(MAX_CUSTOM_OPT_LEVEL -O0)
elseif(CMAKE_BUILD_TYPE MATCHES "Sanitizer")
set(MAX_CUSTOM_OPT_LEVEL -O1)
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
set(MAX_CUSTOM_OPT_LEVEL -O3)
else()
if(px4_constrained_flash_build)
set(MAX_CUSTOM_OPT_LEVEL -Os)
@@ -277,27 +310,6 @@ if (CATKIN_DEVEL_PREFIX)
endif()
endif()
# Python
# If using catkin, Python 2 is found since it points
# to the Python libs installed with the ROS distro
if (NOT CATKIN_DEVEL_PREFIX)
find_package(PythonInterp 3)
# We have a custom error message to tell users how to install python3.
if (NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR "Python 3 not found. Please install Python 3:\n"
" Ubuntu: sudo apt install python3 python3-dev python3-pip\n"
" macOS: brew install python")
endif()
else()
find_package(PythonInterp REQUIRED)
endif()
option(PYTHON_COVERAGE "Python code coverage" OFF)
if(PYTHON_COVERAGE)
message(STATUS "python coverage enabled")
set(PYTHON_EXECUTABLE coverage run -p)
endif()
#=============================================================================
# get chip and chip manufacturer
#
@@ -406,7 +418,6 @@ add_subdirectory(src/lib EXCLUDE_FROM_ALL)
add_subdirectory(platforms/${PX4_PLATFORM}/src/px4)
add_subdirectory(platforms EXCLUDE_FROM_ALL)
add_subdirectory(src/modules/uORB EXCLUDE_FROM_ALL) # TODO: platform layer
if(EXISTS "${PX4_BOARD_DIR}/CMakeLists.txt")
add_subdirectory(${PX4_BOARD_DIR})
@@ -416,6 +427,11 @@ foreach(module ${config_module_list})
add_subdirectory(src/${module})
endforeach()
# add events lib after modules and libs as it needs to know all source files (PX4_SRC_FILES)
add_subdirectory(src/lib/events EXCLUDE_FROM_ALL)
# metadata needs PX4_MODULE_CONFIG_FILES
add_subdirectory(src/lib/metadata EXCLUDE_FROM_ALL)
# must be the last module before firmware
add_subdirectory(src/lib/parameters EXCLUDE_FROM_ALL)
target_link_libraries(parameters_interface INTERFACE parameters)
@@ -435,8 +451,10 @@ endforeach()
add_custom_command(OUTPUT ${uorb_graph_config}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/uorb_graph/create.py
${graph_module_list}
${graph_module_list} --src-path src/lib
--merge-depends
--exclude-path src/examples
--exclude-path src/lib/parameters # FIXME: enable & fix
--file ${PX4_SOURCE_DIR}/Tools/uorb_graph/graph_${uorb_graph_config}
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
COMMENT "Generating uORB graph"
@@ -455,3 +473,10 @@ add_custom_target(size
WORKING_DIRECTORY ${PX4_BINARY_DIR}
USES_TERMINAL
)
# install python requirements using configured python
add_custom_target(install_python_requirements
COMMAND ${PYTHON_EXECUTABLE} -m pip install --requirement ${PX4_SOURCE_DIR}/Tools/setup/requirements.txt
DEPENDS ${PX4_SOURCE_DIR}/Tools/setup/requirements.txt
USES_TERMINAL
)
Vendored
+59 -64
View File
@@ -15,7 +15,7 @@ pipeline {
// stage('Catkin build on ROS workspace') {
// agent {
// docker {
// image 'px4io/px4-dev-ros-melodic:2020-11-18'
// image 'px4io/px4-dev-ros-melodic:2021-08-18'
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
// }
// }
@@ -56,7 +56,7 @@ pipeline {
stage('Colcon build on ROS2 workspace') {
agent {
docker {
image 'px4io/px4-dev-ros2-foxy:2020-11-18'
image 'px4io/px4-dev-ros2-foxy:2021-08-18'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
@@ -67,11 +67,9 @@ pipeline {
unset ROS_DISTRO;
mkdir -p colcon_ws/src;
cd colcon_ws;
git -C ${WORKSPACE}/colcon_ws/src/Firmware submodule update --init --recursive --force Tools/sitl_gazebo
git clone --recursive ${WORKSPACE}/colcon_ws/src/Firmware/Tools/sitl_gazebo src/mavlink_sitl_gazebo;
git -C ${WORKSPACE}/colcon_ws/src/Firmware submodule update --init --recursive --force Tools/sitl_gazebo;
git -C ${WORKSPACE}/colcon_ws/src/Firmware fetch --tags;
source /opt/ros/bouncy/setup.sh;
source /opt/ros/melodic/setup.sh;
source /opt/ros/foxy/setup.sh;
colcon build --event-handlers console_direct+ --symlink-install;
'''
}
@@ -87,10 +85,11 @@ pipeline {
stage('Airframe') {
agent {
docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
sh 'git fetch --all --tags'
sh 'make airframe_metadata'
dir('build/px4_sitl_default/docs') {
archiveArtifacts(artifacts: 'airframes.md, airframes.xml')
@@ -99,36 +98,38 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
stage('Parameter') {
agent {
docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
sh 'git fetch --all --tags'
sh 'make parameters_metadata'
dir('build/px4_sitl_default/docs') {
archiveArtifacts(artifacts: 'parameters.md, parameters.xml')
stash includes: 'parameters.md, parameters.xml', name: 'metadata_parameters'
archiveArtifacts(artifacts: 'parameters.md, parameters.xml, parameters.json.xz')
stash includes: 'parameters.md, parameters.xml, parameters.json.xz', name: 'metadata_parameters'
}
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
stage('Module') {
agent {
docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
sh 'git fetch --all --tags'
sh 'make module_documentation'
dir('build/px4_sitl_default/docs') {
archiveArtifacts(artifacts: 'modules/*.md')
@@ -137,7 +138,25 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
stage('msg file docs') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh 'mkdir -p build/msg_docs; ./msg/tools/generate_msg_docs.py -d build/msg_docs'
dir('build') {
archiveArtifacts(artifacts: 'msg_docs/*.md')
stash includes: 'msg_docs/*.md', name: 'msg_documentation'
}
}
post {
always {
sh 'make distclean; git clean -ff -x -d .'
}
}
}
@@ -145,22 +164,23 @@ pipeline {
stage('uORB graphs') {
agent {
docker {
image 'px4io/px4-dev-nuttx-focal:2020-11-18'
image 'px4io/px4-dev-nuttx-focal:2021-08-18'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
sh 'git fetch --all --tags'
sh 'make uorb_graphs'
dir('Tools/uorb_graph') {
archiveArtifacts(artifacts: 'graph_px4_sitl.json')
stash includes: 'graph_px4_sitl.json', name: 'uorb_graph'
archiveArtifacts(artifacts: 'graph_*.json')
stash includes: 'graph_*.json', name: 'uorb_graph'
}
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
@@ -172,50 +192,24 @@ pipeline {
parallel {
stage('Devguide') {
agent {
docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
}
steps {
sh('export')
unstash 'metadata_airframes'
unstash 'metadata_parameters'
unstash 'metadata_module_documentation'
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/Devguide.git')
sh('cp airframes.md Devguide/en/airframes/airframe_reference.md')
sh('cp parameters.md Devguide/en/advanced/parameter_reference.md')
sh('cp -R modules/*.md Devguide/en/middleware/')
sh('cd Devguide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
sh('cd Devguide; git push origin master || true')
sh('rm -rf Devguide')
}
}
when {
anyOf {
branch 'master'
branch 'pr-jenkins' // for testing
}
}
options {
skipDefaultCheckout()
}
}
stage('Userguide') {
agent {
docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh('export')
unstash 'metadata_airframes'
unstash 'metadata_parameters'
unstash 'metadata_module_documentation'
unstash 'msg_documentation'
unstash 'uorb_graph'
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_user_guide.git')
sh('cp airframes.md px4_user_guide/en/airframes/airframe_reference.md')
sh('cp parameters.md px4_user_guide/en/advanced_config/parameter_reference.md')
sh('cp -R modules/*.md px4_user_guide/en/modules/')
sh('cp -R graph_*.json px4_user_guide/.vuepress/public/en/middleware/')
sh('cp -R msg_docs/*.md px4_user_guide/en/msg_docs/')
sh('cd px4_user_guide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
sh('cd px4_user_guide; git push origin master || true')
sh('rm -rf px4_user_guide')
@@ -234,7 +228,7 @@ pipeline {
stage('QGroundControl') {
agent {
docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh('export')
@@ -262,12 +256,12 @@ pipeline {
stage('microRTPS agent') {
agent {
docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh('export')
sh('git fetch --all --tags')
sh('make distclean')
sh('make distclean; git clean -ff -x -d .')
sh('make px4_sitl_rtps')
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/micrortps_agent.git -b ${BRANCH_NAME}")
@@ -292,11 +286,11 @@ pipeline {
stage('PX4 ROS msgs') {
agent {
docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh('export')
sh('make distclean')
sh('make distclean; git clean -ff -x -d .')
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_msgs.git")
// 'master' branch
@@ -321,15 +315,15 @@ pipeline {
stage('PX4 ROS2 bridge') {
agent {
docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh('export')
sh('make distclean')
sh('make distclean; git clean -ff -x -d .')
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_ros_com.git -b ${BRANCH_NAME}")
// deploy uORB RTPS ID map
sh('./msg/tools/uorb_to_ros_rtps_ids.py -i msg/tools/uorb_rtps_message_ids.yaml -o px4_ros_com/templates/uorb_rtps_message_ids.yaml')
sh('./msg/tools/uorb_to_ros_urtps_topics.py -i msg/tools/urtps_bridge_topics.yaml -o px4_ros_com/templates/urtps_bridge_topics.yaml')
sh('cd px4_ros_com; git status; git add .; git commit -a -m "Update uORB RTPS ID map `date`" || true')
sh('cd px4_ros_com; git push origin ${BRANCH_NAME} || true')
// deploy uORB RTPS required tools
@@ -364,7 +358,7 @@ pipeline {
stage('S3') {
agent {
docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh('export')
@@ -374,6 +368,7 @@ pipeline {
withAWS(credentials: 'px4_aws_s3_key', region: 'us-east-1') {
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'airframes.xml', path: 'Firmware/master/')
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'parameters.xml', path: 'Firmware/master/')
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'parameters.json.xz', path: 'Firmware/master/')
}
}
when {
@@ -401,7 +396,7 @@ pipeline {
GIT_COMMITTER_NAME = "PX4BuildBot"
}
options {
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '20'))
timeout(time: 60, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
timeout(time: 90, unit: 'MINUTES')
}
}
+185
View File
@@ -0,0 +1,185 @@
# PX4 Firmware Configuration
mainmenu "PX4 Firmware Configuration"
comment "Vendor: $(VENDOR)"
comment "Model: $(MODEL)"
comment "Label: $(LABEL)"
menu "Toolchain"
choice
prompt "Platform"
default PLATFORM_NUTTX
config PLATFORM_NUTTX
bool "nuttx"
config PLATFORM_POSIX
bool "posix"
config PLATFORM_QURT
bool "qurt"
endchoice
config BOARD_PLATFORM
string
default "nuttx" if PLATFORM_NUTTX
default "posix" if PLATFORM_POSIX
default "qurt" if PLATFORM_QURT
config BOARD_LOCKSTEP
bool "Force enable lockstep"
depends on PLATFORM_POSIX
help
forces lockstep behaviour, despite REPLAY env variable
config BOARD_NOLOCKSTEP
bool "Force disable lockstep"
depends on PLATFORM_POSIX
help
forces nolockstep behaviour, despite REPLAY env variable
config BOARD_LINUX
bool "Linux OS"
depends on PLATFORM_POSIX
help
Board Platform is running the Linux operating system
config BOARD_TOOLCHAIN
string "Toolchain"
default ""
config BOARD_ARCHITECTURE
string "Architecture"
default ""
config BOARD_FULL_OPTIMIZATION
bool "Full optmization (O3)"
default n
help
Enables Cmake Release for -O3 optimization
config BOARD_ROMFSROOT
string "ROMFSROOT"
default "px4fmu_common"
help
relative path to the ROMFS root directory
config BOARD_IO
string "IO board name"
default "px4_io-v2_default"
depends on DRIVERS_PX4IO
help
name of IO board to be built and included in the ROMFS (requires a valid ROMFSROOT)
config BOARD_CONSTRAINED_FLASH
bool "Contrained flash"
help
flag to enable constrained flash options (eg limit init script status text)
config BOARD_NO_HELP
bool "No help"
help
optional condition flag to disable help text on constrained flash systems
config BOARD_CONSTRAINED_MEMORY
bool "Contrained memory"
help
flag to enable constrained memory options (eg limit maximum number of uORB publications)
config BOARD_EXTERNAL_METADATA
bool "External metadata"
help
flag to exclude metadata to reduce flash
config BOARD_LINKER_PREFIX
string "linker prefix"
help
optional to prefix on the Linker script.
config BOARD_COMPILE_DEFINITIONS
string "add custom compile definitions"
help
add custom compile defitions to this specific target
endmenu #Toolchain
config BOARD_TESTING
bool "Testing"
select SYSTEMCMDS_TESTS
help
flag to enable automatic inclusion of PX4 testing modules
config BOARD_ETHERNET
bool "Ethernet"
help
flag to indicate that ethernet is enabled
config BOARD_CRYPTO
bool "Crypto support"
help
Enable PX4 Crypto Support. Select the implementation under drivers
config BOARD_PROTECTED
bool "Memory protection"
help
Enable memory protection via MPU/MMU
menu "Serial ports"
config BOARD_SERIAL_URT6
string "URT6 tty port"
config BOARD_SERIAL_GPS1
string "GPS1 tty port"
config BOARD_SERIAL_GPS2
string "GPS2 tty port"
config BOARD_SERIAL_GPS3
string "GPS3 tty port"
config BOARD_SERIAL_GPS4
string "GPS4 tty port"
config BOARD_SERIAL_GPS5
string "GPS5 tty port"
config BOARD_SERIAL_TEL1
string "TEL1 tty port"
config BOARD_SERIAL_TEL2
string "TEL2 tty port"
config BOARD_SERIAL_TEL3
string "TEL3 tty port"
config BOARD_SERIAL_TEL4
string "TEL4 tty port"
config BOARD_SERIAL_TEL5
string "TEL5 tty port"
config BOARD_SERIAL_RC
string "RC tty port"
config BOARD_SERIAL_WIFI
string "WIFI tty port"
config BOARD_SERIAL_PPB
string "PPB (Pixhawk Payload Bus) tty port"
endmenu
menu "drivers"
source "src/drivers/Kconfig"
endmenu
menu "modules"
source "src/modules/Kconfig"
endmenu
menu "systemcmds"
source "src/systemcmds/Kconfig"
endmenu
menu "examples"
source "src/examples/Kconfig"
endmenu
+1 -1
View File
@@ -1,6 +1,6 @@
BSD 3-Clause License
Copyright (c) 2012 - 2020, PX4 Development Team
Copyright (c) 2012 - 2022, PX4 Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
+88 -39
View File
@@ -63,7 +63,7 @@ all: px4_sitl_default
space := $(subst ,, )
define make_list
$(shell cat .github/workflows/compile_${1}.yml | sed -E 's|[[:space:]]+(.*),|check_\1|g' | grep check_${2})
$(shell [ -f .github/workflows/compile_${1}.yml ] && cat .github/workflows/compile_${1}.yml | sed -E 's|[[:space:]]+(.*),|check_\1|g' | grep check_${2})
endef
# Parsing
@@ -158,6 +158,11 @@ else
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=UndefinedBehaviorSanitizer
endif
# Fuzz Testing
ifdef PX4_FUZZ
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=FuzzTesting
endif
endif
# Pick up specific Python path if set
@@ -165,15 +170,23 @@ ifdef PYTHON_EXECUTABLE
CMAKE_ARGS += -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
endif
# Check if the microRTPS agent is to be built
ifdef BUILD_MICRORTPS_AGENT
CMAKE_ARGS += -DBUILD_MICRORTPS_AGENT=ON
endif
# Functions
# --------------------------------------------------------------------
# describe how to build a cmake config
define cmake-build
$(eval CMAKE_ARGS += -DCONFIG=$(1))
@$(eval BUILD_DIR = "$(SRC_DIR)/build/$(1)")
@# check if the desired cmake configuration matches the cache then CMAKE_CACHE_CHECK stays empty
@$(call cmake-cache-check)
@# make sure to start from scratch when switching from GNU Make to Ninja
@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
@# make sure to start from scratch if ninja build file is missing
@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ ! -f $(BUILD_DIR)/build.ninja ]; then rm -rf $(BUILD_DIR); fi
@# only excplicitly configure the first build, if cache file already exists the makefile will rerun cmake automatically if necessary
@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ] || [ $(CMAKE_CACHE_CHECK) ]; then \
mkdir -p $(BUILD_DIR) \
@@ -205,8 +218,8 @@ define colorecho
+@echo -e '${COLOR_BLUE}${1} ${NO_COLOR}'
endef
# Get a list of all config targets boards/*/*.cmake
ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 ! -name '*common*' ! -name '*sdflight*' -name '*.cmake' -print | sed -e 's|boards\/||' | sed -e 's|\.cmake||' | sed -e 's|\/|_|g' | sort)
# Get a list of all config targets boards/*/*.px4board
ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 -name '*.px4board' -print | sed -e 's|boards\/||' | sed -e 's|\.px4board||' | sed -e 's|\/|_|g' | sort)
# ADD CONFIGS HERE
# --------------------------------------------------------------------
@@ -214,20 +227,19 @@ ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 ! -name '*comm
# All targets.
$(ALL_CONFIG_TARGETS):
@$(eval PX4_CONFIG = $@)
@$(eval CMAKE_ARGS += -DCONFIG=$(PX4_CONFIG))
@$(call cmake-build,$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
@$(call cmake-build,$@$(BUILD_DIR_SUFFIX))
# Filter for only default targets to allow omiting the "_default" postfix
CONFIG_TARGETS_DEFAULT := $(patsubst %_default,%,$(filter %_default,$(ALL_CONFIG_TARGETS)))
$(CONFIG_TARGETS_DEFAULT):
@$(eval PX4_CONFIG = $@_default)
@$(eval CMAKE_ARGS += -DCONFIG=$(PX4_CONFIG))
@$(call cmake-build,$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
@$(call cmake-build,$@_default$(BUILD_DIR_SUFFIX))
all_config_targets: $(ALL_CONFIG_TARGETS)
all_default_targets: $(CONFIG_TARGETS_DEFAULT)
updateconfig:
@./Tools/kconfig/updateconfig.py
# board reorganization deprecation warnings (2018-11-22)
define deprecation_warning
$(warning $(1) has been deprecated and will be removed, please use $(2)!)
@@ -236,16 +248,6 @@ endef
# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
.PHONY: all px4_sitl_default all_config_targets all_default_targets
# Multi- config targets.
eagle_default: atlflight_eagle_default atlflight_eagle_qurt
eagle_rtps: atlflight_eagle_rtps atlflight_eagle_qurt-rtps
excelsior_default: atlflight_excelsior_default atlflight_excelsior_qurt
excelsior_rtps: atlflight_excelsior_rtps atlflight_excelsior_qurt-rtps
.PHONY: eagle_default eagle_rtps
.PHONY: excelsior_default excelsior_rtps
# Other targets
# --------------------------------------------------------------------
@@ -268,11 +270,10 @@ px4fmu_firmware: \
misc_qgc_extra_firmware: \
check_nxp_fmuk66-v3_default \
check_nxp_fmurt1062-v1_default \
check_intel_aerofc-v1_default \
check_mro_x21_default \
check_bitcraze_crazyflie_default \
check_bitcraze_crazyflie21_default \
check_airmind_mindpx-v2_default \
check_px4_fmu-v2_lpe \
sizes
# builds with RTPS
@@ -300,13 +301,37 @@ check_%:
@$(MAKE) --no-print-directory $(subst check_,,$@)
@echo
all_variants_%:
@echo 'Building all $(subst all_variants_,,$@) variants:' $(filter $(subst all_variants_,,$@)_%, $(ALL_CONFIG_TARGETS))
@echo
$(foreach a,$(filter $(subst all_variants_,,$@)_%, $(ALL_CONFIG_TARGETS)), $(call cmake-build,$(a)$(BUILD_DIR_SUFFIX)))
uorb_graphs:
@./Tools/uorb_graph/create_from_startupscript.sh
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --file Tools/uorb_graph/graph_full
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --exclude-path src/lib/parameters --merge-depends --file Tools/uorb_graph/graph_full
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --exclude-path src/lib/parameters --exclude-path src/modules/mavlink --merge-depends --file Tools/uorb_graph/graph_full_no_mavlink
@$(MAKE) --no-print-directory px4_fmu-v2_default uorb_graph
@$(MAKE) --no-print-directory px4_fmu-v4_default uorb_graph
@$(MAKE) --no-print-directory px4_fmu-v5_default uorb_graph
@$(MAKE) --no-print-directory px4_sitl_default uorb_graph
px4io_update: px4_io-v2_default cubepilot_io-v2_default
# px4_io-v2_default
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/holybro/durandal-v1/extras/px4_io-v2_default.bin
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/holybro/pix32v5/extras/px4_io-v2_default.bin
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/mro/x21-777/extras/px4_io-v2_default.bin
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v2/extras/px4_io-v2_default.bin
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v3/extras/px4_io-v2_default.bin
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v4pro/extras/px4_io-v2_default.bin
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v5/extras/px4_io-v2_default.bin
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v5x/extras/px4_io-v2_default.bin
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v6x/extras/px4_io-v2_default.bin
# cubepilot_io-v2_default
cp build/cubepilot_io-v2_default/cubepilot_io-v2_default.bin boards/cubepilot/cubeorange/extras/cubepilot_io-v2_default.bin
cp build/cubepilot_io-v2_default/cubepilot_io-v2_default.bin boards/cubepilot/cubeyellow/extras/cubepilot_io-v2_default.bin
git status
bootloaders_update: cuav_nora_bootloader cuav_x7pro_bootloader cubepilot_cubeorange_bootloader holybro_durandal-v1_bootloader matek_h743-slim_bootloader modalai_fc-v2_bootloader mro_ctrl-zero-h7_bootloader mro_ctrl-zero-h7-oem_bootloader mro_pixracerpro_bootloader px4_fmu-v6u_bootloader px4_fmu-v6x_bootloader
git status
.PHONY: coverity_scan
@@ -314,18 +339,21 @@ coverity_scan: px4_sitl_default
# Documentation
# --------------------------------------------------------------------
.PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata doxygen
.PHONY: parameters_metadata airframe_metadata module_documentation extract_events px4_metadata doxygen
parameters_metadata:
@$(MAKE) --no-print-directory px4_sitl_default metadata_parameters
@$(MAKE) --no-print-directory px4_sitl_default metadata_parameters ver_gen
airframe_metadata:
@$(MAKE) --no-print-directory px4_sitl_default metadata_airframes
@$(MAKE) --no-print-directory px4_sitl_default metadata_airframes ver_gen
module_documentation:
@$(MAKE) --no-print-directory px4_sitl_default metadata_module_documentation
px4_metadata: parameters_metadata airframe_metadata module_documentation
extract_events:
@$(MAKE) --no-print-directory px4_sitl_default metadata_extract_events ver_gen
px4_metadata: parameters_metadata airframe_metadata module_documentation extract_events
doxygen:
@mkdir -p "$(SRC_DIR)"/build/doxygen
@@ -352,7 +380,6 @@ format:
.PHONY: rostest python_coverage
tests:
$(eval CMAKE_ARGS += -DCONFIG=px4_sitl_test)
$(eval CMAKE_ARGS += -DTESTFILTER=$(TESTFILTER))
$(eval ARGS += test_results)
$(eval ASAN_OPTIONS += color=always:check_initialization_order=1:detect_stack_use_after_return=1)
@@ -361,8 +388,10 @@ tests:
tests_coverage:
@$(MAKE) clean
@$(MAKE) --no-print-directory px4_sitl_default test_coverage_genhtml PX4_CMAKE_BUILD_TYPE=Coverage
@echo "Open "$(SRC_DIR)"/build/px4_sitl_default/coverage-html/index.html to see coverage"
@$(MAKE) --no-print-directory tests PX4_CMAKE_BUILD_TYPE=Coverage
@mkdir -p coverage
@lcov --directory build/px4_sitl_test --base-directory build/px4_sitl_test --gcov-tool gcov --capture -o coverage/lcov.info
rostest: px4_sitl_default
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo
@@ -458,34 +487,39 @@ shellcheck_all:
@make px4_fmu-v5_default shellcheck
validate_module_configs:
@find "$(SRC_DIR)"/src/modules "$(SRC_DIR)"/src/drivers "$(SRC_DIR)"/src/lib -name *.yaml -type f -print0 | xargs -0 "$(SRC_DIR)"/Tools/validate_yaml.py --schema-file "$(SRC_DIR)"/validation/module_schema.yaml
@find "$(SRC_DIR)"/src/modules "$(SRC_DIR)"/src/drivers "$(SRC_DIR)"/src/lib -name *.yaml -type f \
-not -path "$(SRC_DIR)/src/lib/mixer_module/*" -not -path "$(SRC_DIR)/src/lib/crypto/libtommath/*" -print0 | \
xargs -0 "$(SRC_DIR)"/Tools/validate_yaml.py --schema-file "$(SRC_DIR)"/validation/module_schema.yaml
# Cleanup
# --------------------------------------------------------------------
.PHONY: clean submodulesclean submodulesupdate gazeboclean distclean
clean:
@rm -rf "$(SRC_DIR)"/build
@[ ! -d "$(SRC_DIR)/build" ] || find "$(SRC_DIR)/build" -mindepth 1 -maxdepth 1 -type d -exec sh -c "echo {}; cmake --build {} -- clean || rm -rf {}" \; # use generated build system to clean, wipe build directory if it fails
@git submodule foreach git clean -dX --force # some submodules generate build artifacts in source
submodulesclean:
@git submodule foreach --quiet --recursive git clean -ff -x -d
@git submodule update --quiet --init --recursive --force || true
@git submodule sync --recursive
@git submodule update --init --recursive --force
@git submodule update --init --recursive --force --jobs 4
submodulesupdate:
@git submodule update --quiet --init --recursive || true
@git submodule update --quiet --init --recursive --jobs 4 || true
@git submodule sync --recursive
@git submodule update --init --recursive
@git submodule update --init --recursive --jobs 4
@git fetch --all --tags --recurse-submodules=yes --jobs=4
gazeboclean:
@rm -rf ~/.gazebo/*
distclean: gazeboclean
@git submodule deinit -f .
@git clean -ff -x -d -e ".project" -e ".cproject" -e ".idea" -e ".settings" -e ".vscode"
@git submodule deinit --force $(SRC_DIR)
@rm -rf "$(SRC_DIR)/build"
@git clean --force -X "$(SRC_DIR)/msg/" "$(SRC_DIR)/platforms/" "$(SRC_DIR)/posix-configs/" "$(SRC_DIR)/ROMFS/" "$(SRC_DIR)/src/" "$(SRC_DIR)/test/" "$(SRC_DIR)/Tools/"
# Help / Error
# Help / Error / Misc
# --------------------------------------------------------------------
# All other targets are handled by PX4_MAKE. Add a rule here to avoid printing an error.
@@ -499,7 +533,7 @@ help:
@echo "Where <target> is one of:"
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | \
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(posix|eagle|Makefile)'
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(Makefile)'
@echo
@echo "Or, $(MAKE) <config_target> [<make_target(s)>]"
@echo "Use '$(MAKE) list_config_targets' for a list of configuration targets."
@@ -519,3 +553,18 @@ check_px4: $(call make_list,nuttx,"px4") \
check_nxp: $(call make_list,nuttx,"nxp") \
sizes
ifneq ($(ROS2_WS_DIR),)
ROS2_WS_DIR := $(basename ${ROS2_WS_DIR})
else
ROS2_WS_DIR := ~/colcon_ws
endif
update_ros2_bridge:
@Tools/update_px4_ros2_bridge.sh --ws_dir ${ROS2_WS_DIR} --all
update_px4_ros_com:
@Tools/update_px4_ros2_bridge.sh --ws_dir ${ROS2_WS_DIR} --px4_ros_com
update_px4_msgs:
@Tools/update_px4_ros2_bridge.sh --ws_dir ${ROS2_WS_DIR} --px4_msgs
+40 -29
View File
@@ -4,30 +4,34 @@
[![Nuttx Targets](https://github.com/PX4/PX4-Autopilot/workflows/Nuttx%20Targets/badge.svg)](https://github.com/PX4/PX4-Autopilot/actions?query=workflow%3A%22Nuttx+Targets%22?branch=master) [![SITL Tests](https://github.com/PX4/PX4-Autopilot/workflows/SITL%20Tests/badge.svg?branch=master)](https://github.com/PX4/PX4-Autopilot/actions?query=workflow%3A%22SITL+Tests%22)
[![Slack](https://px4-slack.herokuapp.com/badge.svg)](http://slack.px4.io)
[![Slack](/.github/slack.svg)](https://join.slack.com/t/px4/shared_invite/zt-si4xo5qs-R4baYFmMjlrT4rQK5yUnaA)
This repository holds the [PX4](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/PX4-Autopilot/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
PX4 is highly portable, OS-independent and supports Linux, NuttX and MacOS out of the box.
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE](https://github.com/PX4/PX4-Autopilot/blob/master/LICENSE))
* [Supported airframes](https://docs.px4.io/master/en/airframes/airframe_reference.html) ([portfolio](http://px4.io/#airframes)):
* [Multicopters](https://docs.px4.io/master/en/airframes/airframe_reference.html#copter)
* [Fixed wing](https://docs.px4.io/master/en/airframes/airframe_reference.html#plane)
* [VTOL](https://docs.px4.io/master/en/airframes/airframe_reference.html#vtol)
* many more experimental types (Rovers, Blimps, Boats, Submarines, Autogyros, etc)
* [Multicopters](https://docs.px4.io/master/en/frames_multicopter/)
* [Fixed wing](https://docs.px4.io/master/en/frames_plane/)
* [VTOL](https://docs.px4.io/master/en/frames_vtol/)
* [Autogyro](https://docs.px4.io/master/en/frames_autogyro/)
* [Rover](https://docs.px4.io/master/en/frames_rover/)
* many more experimental types (Blimps, Boats, Submarines, High altitude balloons, etc)
* Releases: [Downloads](https://github.com/PX4/PX4-Autopilot/releases)
## PX4 Users
## Building a PX4 based drone, rover, boat or robot
The [PX4 User Guide](https://docs.px4.io/master/en/) explains how to assemble [supported vehicles](https://docs.px4.io/master/en/airframes/airframe_reference.html) and fly drones with PX4.
See the [forum and chat](https://docs.px4.io/master/en/#support) if you need help!
## PX4 Developers
## Changing code and contributing
This [Developer Guide](https://dev.px4.io/) is for software developers who want to modify the flight stack and middleware (e.g. to add new flight modes), hardware integrators who want to support new flight controller boards and peripherals, and anyone who wants to get PX4 working on a new (unsupported) airframe/vehicle.
This [Developer Guide](https://docs.px4.io/master/en/development/development.html) is for software developers who want to modify the flight stack and middleware (e.g. to add new flight modes), hardware integrators who want to support new flight controller boards and peripherals, and anyone who wants to get PX4 working on a new (unsupported) airframe/vehicle.
Developers should read the [Guide for Contributions](https://dev.px4.io/master/en/contribute/).
Developers should read the [Guide for Contributions](https://docs.px4.io/master/en/contribute/).
See the [forum and chat](https://dev.px4.io/master/en/#support) if you need help!
@@ -69,10 +73,8 @@ The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/master/en/co
* [Daniel Agar](https://github.com/dagar)
* [State Estimation](https://github.com/PX4/PX4-Autopilot/issues?q=is%3Aopen+is%3Aissue+label%3A%22state+estimation%22)
* [Paul Riseborough](https://github.com/priseborough)
* Vision based navigation
* [Julian Kent](https://github.com/jkflying)
* Obstacle Avoidance
* [Martina Rivizzigno](https://github.com/mrivi)
* Vision based navigation and Obstacle Avoidance
* [Markus Achtelik](https://github.com/markusachtelik)
* RTPS/ROS2 Interface
* [Nuno Marques](https://github.com/TSC21)
@@ -80,27 +82,36 @@ See also [maintainers list](https://px4.io/community/maintainers/) (px4.io) and
## Supported Hardware
This repository contains code supporting these boards:
* FMUv2
* [Pixhawk](https://docs.px4.io/master/en/flight_controller/pixhawk.html)
* [Pixfalcon](https://docs.px4.io/master/en/flight_controller/pixfalcon.html)
* FMUv3
This repository contains code supporting Pixhawk standard boards (best supported, best tested, recommended choice) and proprietary boards.
### Pixhawk Standard Boards
* FMUv6X and FMUv6U (STM32H7, 2021)
* Various vendors will provide FMUv6X and FMUv6U based designs Q3/2021
* FMUv5 and FMUv5X (STM32F7, 2019/20)
* [Pixhawk 4 (FMUv5)](https://docs.px4.io/master/en/flight_controller/pixhawk4.html)
* [Pixhawk 4 mini (FMUv5)](https://docs.px4.io/master/en/flight_controller/pixhawk4_mini.html)
* [CUAV V5+ (FMUv5)](https://docs.px4.io/master/en/flight_controller/cuav_v5_plus.html)
* [CUAV V5 nano (FMUv5)](https://docs.px4.io/master/en/flight_controller/cuav_v5_nano.html)
* [Auterion Skynode (FMUv5X)](https://docs.px4.io/master/en/flight_controller/auterion_skynode.html)
* FMUv4 (STM32F4, 2015)
* [Pixracer](https://docs.px4.io/master/en/flight_controller/pixracer.html)
* [Pixhawk 3 Pro](https://docs.px4.io/master/en/flight_controller/pixhawk3_pro.html)
* FMUv3 (STM32F4, 2014)
* [Pixhawk 2](https://docs.px4.io/master/en/flight_controller/pixhawk-2.html)
* [Pixhawk Mini](https://docs.px4.io/master/en/flight_controller/pixhawk_mini.html)
* [CUAV Pixhack v3](https://docs.px4.io/master/en/flight_controller/pixhack_v3.html)
* FMUv4
* [Pixracer](https://docs.px4.io/master/en/flight_controller/pixracer.html)
* [Pixhawk 3 Pro](https://docs.px4.io/master/en/flight_controller/pixhawk3_pro.html)
* FMUv5 (ARM Cortex M7)
* [Pixhawk 4](https://docs.px4.io/master/en/flight_controller/pixhawk4.html)
* [Pixhawk 4 mini](https://docs.px4.io/master/en/flight_controller/pixhawk4_mini.html)
* [CUAV V5+](https://docs.px4.io/master/en/flight_controller/cuav_v5_plus.html)
* [CUAV V5 nano](https://docs.px4.io/master/en/flight_controller/cuav_v5_nano.html)
* FMUv2 (STM32F4, 2013)
* [Pixhawk](https://docs.px4.io/master/en/flight_controller/pixhawk.html)
* [Pixfalcon](https://docs.px4.io/master/en/flight_controller/pixfalcon.html)
### Manufacturer and Community supported
* [Holybro Durandal](https://docs.px4.io/master/en/flight_controller/durandal.html)
* [Hex Cube Orange](https://docs.px4.io/master/en/flight_controller/cubepilot_cube_orange.html)
* [Hex Cube Yellow](https://docs.px4.io/master/en/flight_controller/cubepilot_cube_yellow.html)
* [Airmind MindPX V2.8](http://www.mindpx.net/assets/accessories/UserGuide_MindPX.pdf)
* [Airmind MindRacer V1.2](http://mindpx.net/assets/accessories/mindracer_user_guide_v1.2.pdf)
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/master/en/flight_controller/crazyflie2.html)
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/master/en/complete_vehicles/crazyflie2.html)
* [Omnibus F4 SD](https://docs.px4.io/master/en/flight_controller/omnibus_f4_sd.html)
* [Holybro Durandal](https://docs.px4.io/master/en/flight_controller/durandal.html)
* [Holybro Kakute F7](https://docs.px4.io/master/en/flight_controller/kakutef7.html)
* [Raspberry PI with Navio 2](https://docs.px4.io/master/en/flight_controller/raspberry_pi_navio2.html)
@@ -108,4 +119,4 @@ Additional information about supported hardware can be found in [PX4 user Guide
## Project Roadmap
A high level project roadmap is available [here](https://www.dronecode.org/roadmap/).
A high level project roadmap is available [here](https://github.com/orgs/PX4/projects/25).
+113 -13
View File
@@ -31,11 +31,12 @@
#
############################################################################
message(STATUS "ROMFS: ${config_romfs_root}")
set(romfs_src_dir ${PX4_SOURCE_DIR}/ROMFS/${config_romfs_root})
set(romfs_gen_root_dir ${PX4_BINARY_DIR}/etc)
file(RELATIVE_PATH romfs_path_relative ${PX4_SOURCE_DIR} ${romfs_src_dir})
message(STATUS "ROMFS: ${romfs_path_relative}")
set_property(GLOBAL PROPERTY PX4_ROMFS_FILES)
set_property(GLOBAL PROPERTY PX4_ROMFS_CMAKE_FILES)
@@ -81,6 +82,9 @@ file(GLOB jinja_templates ${PX4_SOURCE_DIR}/Tools/serial/*.jinja)
if (px4_constrained_flash_build)
set(added_arguments --constrained-flash)
endif()
if(PX4_ETHERNET)
set(added_arguments ${added_arguments} --ethernet)
endif()
# create list of relative romfs file names
set(romfs_copy_files_relative)
foreach(romfs_file IN LISTS romfs_copy_files)
@@ -111,10 +115,12 @@ add_custom_command(
set(romfs_extract_stamp ${CMAKE_CURRENT_BINARY_DIR}/romfs_extract.stamp)
add_custom_command(
OUTPUT ${romfs_extract_stamp}
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/*
COMMAND ${CMAKE_COMMAND} -E tar xf ${romfs_tar_file}
COMMAND ${CMAKE_COMMAND} -E touch ${romfs_extract_stamp}
WORKING_DIRECTORY ${romfs_gen_root_dir}
DEPENDS ${romfs_tar_file}
VERBATIM
)
add_custom_command(
@@ -137,24 +143,39 @@ add_custom_command(
COMMENT "ROMFS: copying, generating airframes"
)
if(EXISTS ${PX4_BOARD_DIR}/extras/${PX4_BOARD_VENDOR}_${PX4_BOARD_MODEL}_bootloader.bin)
set(BOARD_FIRMWARE_BIN "${PX4_BOARD_VENDOR}_${PX4_BOARD_MODEL}_bootloader.bin")
configure_file(${PX4_SOURCE_DIR}/platforms/nuttx/init/rc.board_bootloader_upgrade.in ${romfs_gen_root_dir}/init.d/rc.board_bootloader_upgrade @ONLY)
endif()
# copy extras into ROMFS
set(extras_dependencies)
# copy px4io binary if configured
if(config_io_board)
# optional board architecture defaults
set(board_arch_rc_file "rc.board_arch_defaults")
if(EXISTS "${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/init/${CONFIG_ARCH_CHIP}/${board_arch_rc_file}")
file(RELATIVE_PATH rc_file_relative ${PX4_SOURCE_DIR} ${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/init/${CONFIG_ARCH_CHIP}/${board_arch_rc_file})
message(STATUS "ROMFS: Adding ${rc_file_relative} -> /etc/init.d/${board_arch_rc_file}")
add_custom_command(
OUTPUT
${romfs_gen_root_dir}/init.d/${board_arch_rc_file}
${board_arch_rc_file}.stamp
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/init/${CONFIG_ARCH_CHIP}/${board_arch_rc_file} ${romfs_gen_root_dir}/init.d/${board_arch_rc_file}
COMMAND ${CMAKE_COMMAND} -E touch ${board_arch_rc_file}.stamp
DEPENDS
${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/init/${CONFIG_ARCH_CHIP}/${board_arch_rc_file}
romfs_copy.stamp
COMMENT "ROMFS: copying ${board_arch_rc_file}"
)
list(APPEND extras_dependencies
copy_px4io_bin
${fw_io_bin}
${board_arch_rc_file}.stamp
)
endif()
if(config_build_bootloader)
list(APPEND extras_dependencies
copy_bootloader_bin
${bootloader_bin}
)
endif()
# board custom init files
set(OPTIONAL_BOARD_RC)
list(APPEND OPTIONAL_BOARD_RC
rc.board_defaults
@@ -166,7 +187,8 @@ list(APPEND OPTIONAL_BOARD_RC
foreach(board_rc_file ${OPTIONAL_BOARD_RC})
if(EXISTS "${PX4_BOARD_DIR}/init/${board_rc_file}")
message(STATUS "ROMFS: Adding ${board_rc_file}")
file(RELATIVE_PATH rc_file_relative ${PX4_SOURCE_DIR} ${PX4_BOARD_DIR}/init/${board_rc_file})
message(STATUS "ROMFS: Adding ${rc_file_relative} -> /etc/init.d/${board_rc_file}")
add_custom_command(
OUTPUT
@@ -187,6 +209,84 @@ foreach(board_rc_file ${OPTIONAL_BOARD_RC})
endforeach()
# board extras
set(OPTIONAL_BOARD_EXTRAS)
file(GLOB OPTIONAL_BOARD_EXTRAS ${PX4_BOARD_DIR}/extras/*)
foreach(board_extra_file ${OPTIONAL_BOARD_EXTRAS})
if(EXISTS "${board_extra_file}")
file(RELATIVE_PATH extra_file_base_name ${PX4_BOARD_DIR}/extras/ ${board_extra_file})
file(RELATIVE_PATH extra_file_relative_source ${PX4_SOURCE_DIR} ${board_extra_file})
message(STATUS "ROMFS: Adding ${extra_file_relative_source} -> /etc/extras/${extra_file_base_name}")
add_custom_command(
OUTPUT
${romfs_gen_root_dir}/extras/${extra_file_base_name}
${extra_file_base_name}.stamp
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PX4_BOARD_DIR}/extras/${extra_file_base_name} ${romfs_gen_root_dir}/extras/${extra_file_base_name}
COMMAND ${CMAKE_COMMAND} -E touch ${extra_file_base_name}.stamp
DEPENDS
${board_extra_file}
romfs_copy.stamp
COMMENT "ROMFS: copying ${board_extra_file}"
)
list(APPEND extras_dependencies
${extra_file_base_name}.stamp
)
endif()
endforeach()
if(config_uavcan_peripheral_firmware)
include(ExternalProject)
foreach(uavcan_peripheral_config ${config_uavcan_peripheral_firmware})
# include the UAVCAN peripheral binaries in ROMFS
message(STATUS "ROMFS: Adding UAVCAN peripheral ${uavcan_peripheral_config} -> /etc/uavcan/fw/")
# ExternalProject_Add() with GIT_SUBMODULES "" initializes no submodules.
cmake_policy(SET CMP0097 NEW)
include(ExternalProject)
ExternalProject_Add(build_${uavcan_peripheral_config}
GIT_REPOSITORY ${CMAKE_SOURCE_DIR}
GIT_TAG ${PX4_GIT_TAG}
GIT_SUBMODULES ""
DOWNLOAD_NO_PROGRESS true
CMAKE_ARGS -DCONFIG=${uavcan_peripheral_config}
INSTALL_COMMAND ""
USES_TERMINAL_BUILD true
BUILD_ALWAYS 1
)
ExternalProject_Get_Property(build_${uavcan_peripheral_config} BINARY_DIR)
add_custom_command(
OUTPUT
${romfs_gen_root_dir}/uavcan/fw/_${uavcan_board_id}.bin
${uavcan_peripheral_config}.stamp
COMMAND ${CMAKE_COMMAND} -E make_directory ${romfs_gen_root_dir}/uavcan/fw/
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/deploy/*.bin ${romfs_gen_root_dir}/uavcan/fw/
COMMAND ls -lsa ${romfs_gen_root_dir}/uavcan/fw/
COMMAND ${CMAKE_COMMAND} -E touch ${uavcan_peripheral_config}.stamp
DEPENDS
build_${uavcan_peripheral_config}
COMMENT "ROMFS: copying ${uavcan_peripheral_config}"
)
list(APPEND extras_dependencies
${uavcan_peripheral_config}.stamp
)
endforeach()
endif()
list(APPEND extras_dependencies
${config_romfs_extra_dependencies}
)
+17 -29
View File
@@ -15,36 +15,22 @@ set +e
#
#------------------------------------------------------------------------------
set R /
#
# Mount the procfs.
#
mount -t procfs /proc
#
# Start CDC/ACM serial driver.
#
sercon
#
# Print full system version.
#
ver all
#
# Start the ORB (first app to start)
# tone_alarm and tune_control
# is dependent.
#
uorb start
#
# Set the parameter file if mtd starts successfully.
#
if mtd start
if mft query -q -k MTD -s MTD_PARAMETERS -v /fs/mtd_params
then
set PARAM_FILE /fs/mtd_params
fi
if mft query -q -k MTD -s MTD_PARAMETERS -v /dev/eeeprom0
then
set PARAM_FILE /dev/eeeprom0
fi
#
# Load parameters.
#
@@ -54,6 +40,17 @@ then
param reset_all
fi
#
# Optional board architecture defaults: rc.board_arch_defaults
#
set BOARD_ARCH_RC_DEFAULTS ${R}etc/init.d/rc.board_arch_defaults
if [ -f $BOARD_ARCH_RC_DEFAULTS ]
then
echo "Board architecture defaults: ${BOARD_ARCH_RC_DEFAULTS}"
. $BOARD_ARCH_RC_DEFAULTS
fi
unset BOARD_ARCH_RC_DEFAULTS
#
# Optional board defaults: rc.board_defaults
#
@@ -70,15 +67,6 @@ unset BOARD_RC_DEFAULTS
#
rgbled start -X -q
rgbled_ncp5623c start -X -q
rgbled_pwm start
if param greater -s LIGHT_EN_BLINKM 0
then
if blinkm start -X
then
blinkm systemstate
fi
fi
#
# board sensors: rc.sensors
-5
View File
@@ -1,5 +0,0 @@
px4fmuv3_bl.bin: Bootloader binary of the PX4 Bootloader
(https://github.com/PX4/Bootloader)
based on commit 184b813699a9cfd6f43a5a21556a06b4372baf5f
for the target px4fmuv3_bl
@@ -34,6 +34,10 @@
add_subdirectory(airframes)
px4_add_romfs_files(
px4-rc.mavlink
px4-rc.params
px4-rc.rtps
px4-rc.simulator
rc.replay
rcS
)
@@ -0,0 +1,37 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL
#
# @type Quadrotor Wide
#
# @maintainer Julian Oes <julian@oes.ch>
#
. ${R}etc/init.d/rc.mc_defaults
param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 0
param set-default CA_ROTOR_COUNT 4
param set-default CA_ROTOR0_PX 0.1515
param set-default CA_ROTOR0_PY 0.245
param set-default CA_ROTOR0_KM 0.05
param set-default CA_ROTOR1_PX -0.1515
param set-default CA_ROTOR1_PY -0.1875
param set-default CA_ROTOR1_KM 0.05
param set-default CA_ROTOR2_PX 0.1515
param set-default CA_ROTOR2_PY -0.245
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -0.1515
param set-default CA_ROTOR3_PY 0.1875
param set-default CA_ROTOR3_KM -0.05
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
set MIXER skip
set MIXER_AUX none
@@ -0,0 +1,11 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL (foggy_lidar)
#
# @type Quadrotor Wide
#
. ${R}etc/init.d-posix/airframes/10016_iris
param set-default EKF2_RNG_A_HMAX 10
@@ -8,10 +8,12 @@
. ${R}etc/init.d/rc.mc_defaults
if [ $AUTOCNF = yes ]
then
# EKF2: Multi GPS blending (as the model has 2 GPS's)
param set EKF2_GPS_MASK 7 # Uses speed, hpos and vpos accuracy
fi
# EKF2: Multi GPS blending (as the model has 2 GPS's)
param set-default SENS_GPS_MASK 7
param set-default TRIG_INTERFACE 3
param set-default TRIG_MODE 4
param set-default MNT_MODE_IN 4
param set-default MNT_MODE_OUT 2
param set-default MNT_DO_STAB 2
set MIXER quad_x
@@ -7,16 +7,14 @@
. ${R}etc/init.d-posix/airframes/10016_iris
if [ $AUTOCNF = yes ]
then
# EKF2
param set EKF2_AID_MASK 2
param set EKF2_EVP_NOISE 0.05
param set EKF2_EVA_NOISE 0.05
# EKF2
param set-default EKF2_AID_MASK 2
param set-default EKF2_EVP_NOISE 0.05
param set-default EKF2_EVA_NOISE 0.05
# LPE: Flow-only mode
param set LPE_FUSION 242
param set LPE_FAKE_ORIGIN 1
# LPE: Flow-only mode
param set-default LPE_FUSION 242
param set-default LPE_FAKE_ORIGIN 1
param set-default MPC_ALT_MODE 2
param set MPC_ALT_MODE 2
fi
@@ -7,12 +7,9 @@
. ${R}etc/init.d-posix/airframes/10016_iris
if [ $AUTOCNF = yes ]
then
# enable fusion of landing target velocity
param set LTEST_MODE 1
param set PLD_HACC_RAD 0.1
fi
# enable fusion of landing target velocity
param set-default LTEST_MODE 1
param set-default PLD_HACC_RAD 0.1
# Start up Landing Target Estimator module
landing_target_estimator start
@@ -7,7 +7,5 @@
. ${R}etc/init.d-posix/airframes/10016_iris
if [ $AUTOCNF = yes ]
then
param set LPE_FUSION 242
fi
param set-default LPE_FUSION 242
@@ -7,15 +7,13 @@
. ${R}etc/init.d-posix/airframes/10016_iris
if [ $AUTOCNF = yes ]
then
# EKF2: Vision position and heading
param set EKF2_AID_MASK 24
param set EKF2_EV_DELAY 5
# EKF2: Vision position and heading
param set-default EKF2_AID_MASK 24
param set-default EKF2_EV_DELAY 5
# LPE: Vision + baro
param set LPE_FUSION 132
# LPE: Vision + baro
param set-default LPE_FUSION 132
# AEQ: External heading set to use vision input
param set-default ATT_EXT_HDG_M 1
# AEQ: External heading set to use vision input
param set ATT_EXT_HDG_M 1
fi
@@ -7,10 +7,7 @@
. ${R}etc/init.d/rc.mc_defaults
if [ $AUTOCNF = yes ]
then
param set MC_PITCHRATE_P 0.1
param set MC_ROLLRATE_P 0.1
fi
param set-default MC_PITCHRATE_P 0.1
param set-default MC_ROLLRATE_P 0.05
set MIXER quad_x
@@ -7,8 +7,6 @@
. ${R}etc/init.d-posix/airframes/10016_iris
if [ $AUTOCNF = yes ]
then
param set COM_OBS_AVOID 1
param set MPC_XY_CRUISE 5.0
fi
param set-default COM_OBS_AVOID 1
param set-default MPC_XY_CRUISE 5.0
@@ -1,2 +1,2 @@
# shellcheck disable=SC2154
mavlink start -x -u 14558 -r 4000000 -m onboard -o 14541 # add mavlink stream for SDK
mavlink start -x -u 14558 -r 4000000 -m onboard -o 14541 -p # add mavlink stream for SDK
@@ -1,8 +0,0 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL (RTPS)
#
# @type Quadrotor Wide
#
. ${R}etc/init.d-posix/airframes/10016_iris
@@ -7,15 +7,12 @@
. ${R}etc/init.d-posix/airframes/10016_iris
if [ $AUTOCNF = yes ]
then
# EKF2
param set EKF2_AID_MASK 2
param set SENS_FLOW_ROT 0
# EKF2
param set-default EKF2_AID_MASK 2
param set-default SENS_FLOW_ROT 0
# LPE: Flow-only mode
param set LPE_FUSION 242
param set LPE_FAKE_ORIGIN 1
# LPE: Flow-only mode
param set-default LPE_FUSION 242
param set-default LPE_FAKE_ORIGIN 1
param set MPC_ALT_MODE 2
fi
param set-default MPC_ALT_MODE 2
@@ -7,9 +7,6 @@
. ${R}etc/init.d-posix/airframes/10016_iris
if [ $AUTOCNF = yes ]
then
# EKF2: Vision velocity and heading
param set EKF2_AID_MASK 272
param set EKF2_EV_DELAY 5
fi
# EKF2: Vision velocity and heading
param set-default EKF2_AID_MASK 272
param set-default EKF2_EV_DELAY 5
@@ -7,8 +7,5 @@
. ${R}etc/init.d-posix/airframes/10016_iris
if [ $AUTOCNF = yes ]
then
# EKF2: Multi GPS blending
param set EKF2_GPS_MASK 7 # Uses speed, hpos and vpos accuracy
fi
# EKF2: Multi GPS blending
param set-default SENS_GPS_MASK 7
@@ -5,16 +5,8 @@
. ${R}etc/init.d/rc.uuv_defaults
if [ $AUTOCNF = yes ]
then
#Set data link loss failsafe mode (0: disabled)
param set NAV_DLL_ACT 0
# disable circuit breaker for airspeed sensor
param set CBRK_AIRSPD_CHK 162128
#param set CBRK_GPSFAIL 240024
fi
# disable circuit breaker for airspeed sensor
param set-default CBRK_AIRSPD_CHK 162128
set MAV_TYPE 12
param set MAV_TYPE ${MAV_TYPE}
@@ -5,16 +5,8 @@
. ${R}etc/init.d/rc.uuv_defaults
if [ $AUTOCNF = yes ]
then
#Set data link loss failsafe mode (0: disabled)
param set NAV_DLL_ACT 0
# disable circuit breaker for airspeed sensor
param set CBRK_AIRSPD_CHK 162128
#param set CBRK_GPSFAIL 240024
fi
# disable circuit breaker for airspeed sensor
param set-default CBRK_AIRSPD_CHK 162128
set MAV_TYPE 12
param set MAV_TYPE ${MAV_TYPE}
@@ -5,16 +5,66 @@
. ${R}etc/init.d/rc.uuv_defaults
if [ $AUTOCNF = yes ]
then
#Set data link loss failsafe mode (0: disabled)
param set NAV_DLL_ACT 0
# disable circuit breaker for airspeed sensor
param set-default CBRK_AIRSPD_CHK 162128
# disable circuit breaker for airspeed sensor
param set CBRK_AIRSPD_CHK 162128
param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 7
fi
param set-default CA_ROTOR_COUNT 8
param set-default CA_R_REV 255
param set-default CA_ROTOR0_AX 1.0000
param set-default CA_ROTOR0_AY -1.0000
param set-default CA_ROTOR0_AZ 0.0000
param set-default CA_ROTOR0_KM 0.0000
param set-default CA_ROTOR0_PX 0.5000
param set-default CA_ROTOR0_PY 0.3000
param set-default CA_ROTOR0_PZ 0.2000
param set-default CA_ROTOR1_AX 1.0000
param set-default CA_ROTOR1_AY 1.0000
param set-default CA_ROTOR1_AZ 0.0000
param set-default CA_ROTOR1_KM 0.0000
param set-default CA_ROTOR1_PX 0.5000
param set-default CA_ROTOR1_PY -0.3000
param set-default CA_ROTOR1_PZ 0.2000
param set-default CA_ROTOR2_AX 1.0000
param set-default CA_ROTOR2_AY 1.0000
param set-default CA_ROTOR2_AZ 0.0000
param set-default CA_ROTOR2_KM 0.0000
param set-default CA_ROTOR2_PX -0.5000
param set-default CA_ROTOR2_PY 0.3000
param set-default CA_ROTOR2_PZ 0.2000
param set-default CA_ROTOR3_AX 1.0000
param set-default CA_ROTOR3_AY -1.0000
param set-default CA_ROTOR3_AZ 0.0000
param set-default CA_ROTOR3_KM 0.0000
param set-default CA_ROTOR3_PX -0.5000
param set-default CA_ROTOR3_PY -0.3000
param set-default CA_ROTOR3_PZ 0.2000
param set-default CA_ROTOR4_AZ -1.0000
param set-default CA_ROTOR4_KM 0.0000
param set-default CA_ROTOR4_PX 0.5000
param set-default CA_ROTOR4_PY 0.5000
param set-default CA_ROTOR5_AZ 1.0000
param set-default CA_ROTOR5_KM 0.0000
param set-default CA_ROTOR5_PX 0.5000
param set-default CA_ROTOR5_PY -0.5000
param set-default CA_ROTOR6_AZ 1.0000
param set-default CA_ROTOR6_KM 0.0000
param set-default CA_ROTOR6_PX -0.5000
param set-default CA_ROTOR6_PY 0.5000
param set-default CA_ROTOR7_KM 0.0000
param set-default CA_ROTOR7_PX -0.5000
param set-default CA_ROTOR7_PY -0.5000
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default PWM_MAIN_FUNC5 105
param set-default PWM_MAIN_FUNC6 106
param set-default PWM_MAIN_FUNC7 107
param set-default PWM_MAIN_FUNC8 108
set MIXER skip
set PWM_OUT 12345678
set MIXER_FILE etc/mixers-sitl/vectored6dof_sitl.main.mix
set MIXER custom
@@ -5,43 +5,70 @@
. ${R}etc/init.d/rc.fw_defaults
if [ $AUTOCNF = yes ]
then
param set EKF2_ARSP_THR 8
param set EKF2_FUSE_BETA 1
param set EKF2_MAG_ACCLIM 0
param set EKF2_MAG_YAWLIM 0
param set-default EKF2_MAG_ACCLIM 0
param set-default EKF2_MAG_YAWLIM 0
param set FW_LND_AIRSPD_SC 1
param set FW_LND_ANG 8
param set FW_THR_LND_MAX 0
param set-default FW_LND_AIRSPD_SC 1
param set-default FW_LND_ANG 8
param set-default FW_THR_LND_MAX 0
param set FW_L1_PERIOD 15
param set-default FW_L1_PERIOD 12
param set FW_P_TC 0.5
param set FW_PR_FF 0.40
param set FW_PR_I 0.05
param set FW_PR_P 0.05
param set-default FW_MAN_P_MAX 30
param set FW_R_TC 0.7
param set FW_RR_FF 0.20
param set FW_RR_I 0.02
param set FW_RR_P 0.22
param set-default FW_PR_P 0.9
param set-default FW_PR_FF 0.2
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set FW_L1_PERIOD 12
param set-default FW_RR_FF 0.1
param set-default FW_RR_P 0.3
param set FW_W_EN 1
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_THR_CRUISE 0.25
param set MIS_LTRMIN_ALT 30
param set MIS_TAKEOFF_ALT 30
param set-default FW_T_CLMB_MAX 8
param set-default FW_T_SINK_MAX 2.7
param set-default FW_T_SINK_MIN 2.2
param set NAV_ACC_RAD 15
param set NAV_DLL_ACT 2
param set NAV_LOITER_RAD 50
param set-default FW_W_EN 1
param set RWTO_TKOFF 1
param set-default MIS_LTRMIN_ALT 30
param set-default MIS_TAKEOFF_ALT 30
param set-default NAV_ACC_RAD 15
param set-default NAV_DLL_ACT 2
param set-default RWTO_TKOFF 1
#param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 1
param set-default CA_ROTOR_COUNT 1
param set-default CA_ROTOR0_PX 0.3
param set-default CA_SV_CS_COUNT 6
param set-default CA_SV_CS0_TRQ_R -0.5
param set-default CA_SV_CS0_TYPE 1
param set-default CA_SV_CS1_TRQ_R 0.5
param set-default CA_SV_CS1_TYPE 2
param set-default CA_SV_CS2_TRQ_P 1.0
param set-default CA_SV_CS2_TYPE 3
param set-default CA_SV_CS3_TRQ_Y 1.0
param set-default CA_SV_CS3_TYPE 4
param set-default CA_SV_CS4_TYPE 9
param set-default CA_SV_CS5_TYPE 10
param set-default PWM_MAIN_FUNC3 204
param set-default PWM_MAIN_FUNC4 205
param set-default PWM_MAIN_FUNC5 101
param set-default PWM_MAIN_FUNC6 201
param set-default PWM_MAIN_FUNC7 202
param set-default PWM_MAIN_FUNC8 203
param set-default PWM_MAIN_FUNC9 206
param set-default PWM_MAIN_REV 256
fi
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
set MIXER custom
@@ -5,10 +5,8 @@
. ${R}etc/init.d-posix/airframes/1030_plane
if [ $AUTOCNF = yes ]
then
# Camera trigger interface is MAVLink
param set TRIG_INTERFACE 3
# Distance trigger mode enabled
param set TRIG_MODE 4
fi
# Camera trigger interface is MAVLink
param set-default TRIG_INTERFACE 3
# Distance trigger mode enabled
param set-default TRIG_MODE 4
@@ -5,8 +5,5 @@
. ${R}etc/init.d-posix/airframes/1030_plane
if [ $AUTOCNF = yes ]
then
param set RWTO_TKOFF 0
param set-default RWTO_TKOFF 0
fi
@@ -5,8 +5,5 @@
. ${R}etc/init.d-posix/airframes/1030_plane
if [ $AUTOCNF = yes ]
then
param set FW_LND_USETER 1
param set-default FW_LND_USETER 1
fi
@@ -5,54 +5,44 @@
. ${R}etc/init.d/rc.fw_defaults
if [ $AUTOCNF = yes ]
then
param set EKF2_ARSP_THR 8
param set EKF2_FUSE_BETA 1
#param set EKF2_MAG_ACCLIM 0
#param set EKF2_MAG_YAWLIM 0
param set-default FW_LND_AIRSPD_SC 1.1
param set-default FW_LND_ANG 5
param set-default FW_THR_LND_MAX 0
param set-default FW_LND_HHDIST 30
param set-default FW_LND_FL_PMIN 9.5
param set-default FW_LND_FL_PMAX 20
param set-default FW_LND_FLALT 5
param set-default FW_LND_TLALT 15
param set FW_LND_AIRSPD_SC 1.1
param set FW_LND_ANG 5
param set FW_THR_LND_MAX 0
param set FW_LND_HHDIST 30
param set FW_LND_FL_PMIN 9.5
param set FW_LND_FL_PMAX 20
param set FW_LND_FLALT 5
param set FW_LND_TLALT 15
param set-default FW_L1_PERIOD 25
param set FW_L1_PERIOD 25
param set-default FW_PR_FF 0.40
param set-default FW_PR_I 0.05
param set-default FW_PR_P 0.05
param set FW_P_TC 0.4
param set FW_PR_FF 0.40
param set FW_PR_I 0.05
param set FW_PR_P 0.05
param set-default FW_R_TC 0.45
param set-default FW_RR_FF 0.40
param set-default FW_RR_I 0.132
param set-default FW_RR_P 0.085
param set FW_R_TC 0.45
param set FW_RR_FF 0.40
param set FW_RR_I 0.132
param set FW_RR_P 0.085
param set-default FW_W_EN 1
param set FW_W_EN 1
param set-default MIS_LTRMIN_ALT 30
param set-default MIS_TAKEOFF_ALT 20
param set-default MIS_DIST_1WP 2500
param set-default MIS_DIST_WPS 10000
param set MIS_LTRMIN_ALT 30
param set MIS_TAKEOFF_ALT 20
param set MIS_DIST_1WP 2500
param set MIS_DIST_WPS 10000
param set-default NAV_ACC_RAD 15
param set-default NAV_DLL_ACT 2
param set NAV_ACC_RAD 15
param set NAV_DLL_ACT 2
param set NAV_LOITER_RAD 50
param set-default RWTO_TKOFF 1
param set RWTO_TKOFF 1
#param set FW_THR_SLEW_MAX 0.3 # fix takeoff failure for JSBsim in autonomous mission mode.
param set RWTO_MAX_PITCH 20
param set RWTO_MAX_ROLL 10
#param set RWTO_MAX_THR 0.6 # fix takeoff failure for JSBsim in autonomous mission mode.
param set RWTO_PSP 8
param set RWTO_AIRSPD_SCL 1.8
param set-default RWTO_MAX_PITCH 20
param set-default RWTO_MAX_ROLL 10
param set-default RWTO_PSP 8
param set-default RWTO_AIRSPD_SCL 1.8
fi
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
set MIXER custom
@@ -5,54 +5,43 @@
. ${R}etc/init.d/rc.fw_defaults
if [ $AUTOCNF = yes ]
then
param set EKF2_ARSP_THR 8
param set EKF2_FUSE_BETA 1
#param set EKF2_MAG_ACCLIM 0
#param set EKF2_MAG_YAWLIM 0
param set-default FW_LND_AIRSPD_SC 1.1
param set-default FW_LND_ANG 5
param set-default FW_THR_LND_MAX 0
param set-default FW_LND_HHDIST 30
param set-default FW_LND_FL_PMIN 9.5
param set-default FW_LND_FL_PMAX 20
param set-default FW_LND_FLALT 5
param set-default FW_LND_TLALT 15
param set FW_LND_AIRSPD_SC 1.1
param set FW_LND_ANG 5
param set FW_THR_LND_MAX 0
param set FW_LND_HHDIST 30
param set FW_LND_FL_PMIN 9.5
param set FW_LND_FL_PMAX 20
param set FW_LND_FLALT 5
param set FW_LND_TLALT 15
param set-default FW_L1_PERIOD 25
param set FW_L1_PERIOD 25
param set-default FW_PR_FF 0.40
param set-default FW_PR_I 0.05
param set-default FW_PR_P 0.05
param set FW_P_TC 0.4
param set FW_PR_FF 0.40
param set FW_PR_I 0.05
param set FW_PR_P 0.05
param set-default FW_R_TC 0.45
param set-default FW_RR_FF 0.40
param set-default FW_RR_I 0.132
param set-default FW_RR_P 0.085
param set FW_R_TC 0.45
param set FW_RR_FF 0.40
param set FW_RR_I 0.132
param set FW_RR_P 0.085
param set-default FW_W_EN 1
param set FW_W_EN 1
param set-default MIS_LTRMIN_ALT 30
param set-default MIS_TAKEOFF_ALT 20
param set-default MIS_DIST_1WP 2500
param set-default MIS_DIST_WPS 10000
param set MIS_LTRMIN_ALT 30
param set MIS_TAKEOFF_ALT 20
param set MIS_DIST_1WP 2500
param set MIS_DIST_WPS 10000
param set-default NAV_ACC_RAD 15
param set-default NAV_DLL_ACT 2
param set NAV_ACC_RAD 15
param set NAV_DLL_ACT 2
param set NAV_LOITER_RAD 50
param set-default RWTO_TKOFF 1
param set RWTO_TKOFF 1
#param set FW_THR_SLEW_MAX 0.3 # fix takeoff failure for JSBsim in autonomous mission mode.
param set RWTO_MAX_PITCH 20
param set RWTO_MAX_ROLL 10
#param set RWTO_MAX_THR 0.6 # fix takeoff failure for JSBsim in autonomous mission mode.
param set RWTO_PSP 8
param set RWTO_AIRSPD_SCL 1.8
param set-default RWTO_MAX_PITCH 20
param set-default RWTO_MAX_ROLL 10
fi
param set-default RWTO_PSP 8
param set-default RWTO_AIRSPD_SCL 1.8
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
set MIXER custom
@@ -5,43 +5,36 @@
. ${R}etc/init.d/rc.fw_defaults
if [ $AUTOCNF = yes ]
then
param set EKF2_ARSP_THR 8
param set EKF2_FUSE_BETA 1
param set EKF2_MAG_ACCLIM 0
param set EKF2_MAG_YAWLIM 0
param set-default EKF2_MAG_ACCLIM 0
param set-default EKF2_MAG_YAWLIM 0
param set FW_LND_AIRSPD_SC 1
param set FW_LND_ANG 8
param set FW_THR_LND_MAX 0
param set-default FW_LND_AIRSPD_SC 1
param set-default FW_LND_ANG 8
param set-default FW_THR_LND_MAX 0
param set FW_L1_PERIOD 15
param set-default FW_L1_PERIOD 15
param set FW_P_TC 0.5
param set FW_PR_FF 0.40
param set FW_PR_I 0.05
param set FW_PR_P 0.05
param set-default FW_P_TC 0.5
param set-default FW_PR_FF 0.40
param set-default FW_PR_I 0.05
param set-default FW_PR_P 0.05
param set FW_R_TC 0.7
param set FW_RR_FF 0.20
param set FW_RR_I 0.02
param set FW_RR_P 0.22
param set-default FW_R_TC 0.7
param set-default FW_RR_FF 0.20
param set-default FW_RR_I 0.02
param set-default FW_RR_P 0.22
param set FW_L1_PERIOD 12
param set-default FW_L1_PERIOD 12
param set FW_W_EN 1
param set-default FW_W_EN 1
param set MIS_LTRMIN_ALT 30
param set MIS_TAKEOFF_ALT 30
param set-default MIS_LTRMIN_ALT 30
param set-default MIS_TAKEOFF_ALT 30
param set NAV_ACC_RAD 15
param set NAV_DLL_ACT 2
param set NAV_LOITER_RAD 50
param set-default NAV_ACC_RAD 15
param set-default NAV_DLL_ACT 2
param set RWTO_TKOFF 1
fi
param set-default RWTO_TKOFF 1
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
set MIXER custom
@@ -5,52 +5,41 @@
. ${R}etc/init.d/rc.fw_defaults
if [ $AUTOCNF = yes ]
then
param set EKF2_ARSP_THR 8
param set EKF2_FUSE_BETA 1
#param set EKF2_MAG_ACCLIM 0
#param set EKF2_MAG_YAWLIM 0
param set-default FW_LND_AIRSPD_SC 1.1
param set-default FW_LND_ANG 5
param set-default FW_THR_LND_MAX 0
param set-default FW_LND_HHDIST 30
param set-default FW_LND_FL_PMIN 9.5
param set-default FW_LND_FL_PMAX 20
param set-default FW_LND_FLALT 5
param set-default FW_LND_TLALT 15
param set FW_LND_AIRSPD_SC 1.1
param set FW_LND_ANG 5
param set FW_THR_LND_MAX 0
param set FW_LND_HHDIST 30
param set FW_LND_FL_PMIN 9.5
param set FW_LND_FL_PMAX 20
param set FW_LND_FLALT 5
param set FW_LND_TLALT 15
param set-default FW_L1_PERIOD 25
param set FW_L1_PERIOD 25
param set-default FW_PR_FF 0.40
param set-default FW_PR_I 0.05
param set-default FW_PR_P 0.05
param set FW_P_TC 0.4
param set FW_PR_FF 0.40
param set FW_PR_I 0.05
param set FW_PR_P 0.05
param set-default FW_R_TC 0.45
param set-default FW_RR_FF 0.40
param set-default FW_RR_I 0.132
param set-default FW_RR_P 0.085
param set FW_R_TC 0.45
param set FW_RR_FF 0.40
param set FW_RR_I 0.132
param set FW_RR_P 0.085
param set-default FW_W_EN 1
param set FW_W_EN 1
param set-default MIS_LTRMIN_ALT 30
param set-default MIS_TAKEOFF_ALT 20
param set-default MIS_DIST_1WP 2500
param set-default MIS_DIST_WPS 10000
param set MIS_LTRMIN_ALT 30
param set MIS_TAKEOFF_ALT 20
param set MIS_DIST_1WP 2500
param set MIS_DIST_WPS 10000
param set-default NAV_ACC_RAD 15
param set-default NAV_DLL_ACT 2
param set NAV_ACC_RAD 15
param set NAV_DLL_ACT 2
param set NAV_LOITER_RAD 50
param set RWTO_TKOFF 1
param set RWTO_MAX_PITCH 20
param set RWTO_MAX_ROLL 10
param set RWTO_PSP 8
param set RWTO_AIRSPD_SCL 1.8
fi
param set-default RWTO_TKOFF 1
param set-default RWTO_MAX_PITCH 20
param set-default RWTO_MAX_ROLL 10
param set-default RWTO_PSP 8
param set-default RWTO_AIRSPD_SCL 1.8
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
set MIXER custom
@@ -0,0 +1,52 @@
#!/bin/sh
#
# @name Plane SITL
#
. ${R}etc/init.d/rc.fw_defaults
param set-default EKF2_MAG_ACCLIM 0
param set-default EKF2_MAG_YAWLIM 0
param set-default FW_LND_AIRSPD_SC 1
param set-default FW_LND_ANG 8
param set-default FW_THR_LND_MAX 0
param set-default FW_L1_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_P 0.9
param set-default FW_PR_FF 0.2
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_FF 0.1
param set-default FW_RR_P 0.3
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_THR_CRUISE 0.25
param set-default FW_T_ALT_TC 2
param set-default FW_T_CLMB_MAX 8
param set-default FW_T_HRATE_FF 0.5
param set-default FW_T_SINK_MAX 2.7
param set-default FW_T_SINK_MIN 2.2
param set-default FW_T_TAS_TC 2
param set-default FW_W_EN 1
param set-default MIS_LTRMIN_ALT 30
param set-default MIS_TAKEOFF_ALT 30
param set-default NAV_ACC_RAD 15
param set-default NAV_DLL_ACT 2
param set-default FW_USE_NPFG 1
param set-default RWTO_TKOFF 1
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
set MIXER custom
@@ -0,0 +1,9 @@
#!/bin/sh
#
# @name Plane SITL with catapult
#
. ${R}etc/init.d-posix/airframes/1030_plane
param set-default FW_THR_CRUISE 0.0
param set-default RWTO_TKOFF 0
@@ -7,44 +7,78 @@
. ${R}etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MAX 25
param set FW_AIRSPD_MIN 14
param set FW_AIRSPD_TRIM 16
param set FW_L1_PERIOD 12
# param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 2
param set FW_RR_FF 0.1
param set FW_RR_P 0.01
param set-default CA_ROTOR_COUNT 5
param set-default CA_ROTOR0_PX 0.1515
param set-default CA_ROTOR0_PY 0.245
param set-default CA_ROTOR0_KM 0.05
param set-default CA_ROTOR1_PX -0.1515
param set-default CA_ROTOR1_PY -0.1875
param set-default CA_ROTOR1_KM 0.05
param set-default CA_ROTOR2_PX 0.1515
param set-default CA_ROTOR2_PY -0.245
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -0.1515
param set-default CA_ROTOR3_PY 0.1875
param set-default CA_ROTOR3_KM -0.05
param set-default CA_ROTOR4_AX 1.0
param set-default CA_ROTOR4_AZ 0.0
param set-default CA_ROTOR4_PX 0.2
param set MC_ROLLRATE_P 0.3
param set-default CA_SV_CS_COUNT 3
param set-default CA_SV_CS0_TYPE 1
param set-default CA_SV_CS0_TRQ_R -0.5
param set-default CA_SV_CS1_TYPE 2
param set-default CA_SV_CS1_TRQ_R 0.5
param set-default CA_SV_CS2_TYPE 3
param set-default CA_SV_CS2_TRQ_P 1.0
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default PWM_MAIN_FUNC5 105
param set-default PWM_MAIN_FUNC6 201
param set-default PWM_MAIN_FUNC7 202
param set-default PWM_MAIN_FUNC8 203
param set MIS_LTRMIN_ALT 10
param set MIS_TAKEOFF_ALT 10
param set MIS_YAW_TMT 10
param set-default FW_L1_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_FF 0.2
param set-default FW_PR_P 0.9
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_FF 0.1
param set-default FW_RR_P 0.3
param set-default FW_THR_CRUISE 0.25
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_T_CLMB_MAX 8
param set-default FW_T_SINK_MAX 2.7
param set-default FW_T_SINK_MIN 2.2
param set MPC_ACC_HOR_MAX 2
param set MPC_ACC_HOR_MAX 2
param set MPC_THR_HOVER 0.58
param set MPC_TKO_SPEED 1
param set MPC_XY_P 0.8
param set MPC_XY_VEL_P_ACC 3
param set MPC_XY_VEL_I_ACC 4
param set MPC_XY_VEL_D_ACC 0.1
param set MPC_Z_VEL_MAX_DN 1.5
param set-default MC_ROLLRATE_P 0.3
param set-default MC_YAW_P 1.6
param set NAV_ACC_RAD 5
param set NAV_LOITER_RAD 80
param set-default MIS_TAKEOFF_ALT 10
param set VT_F_TRANS_DUR 5
param set VT_F_TRANS_THR 0.75
param set VT_ARSP_TRANS 16
param set VT_MOT_ID 1234
param set VT_FW_MOT_OFFID 1234
param set VT_TYPE 2
param set VT_B_TRANS_DUR 8
param set-default MPC_ACC_HOR_MAX 2
param set-default MPC_XY_P 0.8
param set-default MPC_XY_VEL_P_ACC 3
param set-default MPC_XY_VEL_I_ACC 4
param set-default MPC_XY_VEL_D_ACC 0.1
fi
param set-default NAV_ACC_RAD 5
param set-default NAV_LOITER_RAD 80
param set-default VT_FWD_THRUST_EN 4
param set-default VT_F_TRANS_THR 0.75
param set-default VT_MOT_ID 1234
param set-default VT_FW_MOT_OFFID 1234
param set-default VT_B_TRANS_DUR 8
param set-default VT_TYPE 2
set MAV_TYPE 22
@@ -7,36 +7,76 @@
. ${R}etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MAX 25
param set FW_AIRSPD_MIN 14
param set FW_AIRSPD_TRIM 16
param set FW_L1_PERIOD 12
# param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 4
param set MC_ROLLRATE_P 0.3
param set-default CA_ROTOR_COUNT 4
param set-default CA_ROTOR0_PX 1
param set-default CA_ROTOR0_PY 2
param set-default CA_ROTOR0_KM 0.05
param set-default CA_ROTOR1_PX -1
param set-default CA_ROTOR1_PY -1
param set-default CA_ROTOR1_KM 0.05
param set-default CA_ROTOR2_PX 1
param set-default CA_ROTOR2_PY -1
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -1
param set-default CA_ROTOR3_PY 1
param set-default CA_ROTOR3_KM -0.05
param set MIS_YAW_TMT 10
param set-default CA_SV_CS_COUNT 2
param set-default CA_SV_CS0_TYPE 5
param set-default CA_SV_CS0_TRQ_P 0.5
param set-default CA_SV_CS0_TRQ_Y -0.5
param set-default CA_SV_CS1_TYPE 6
param set-default CA_SV_CS1_TRQ_P 0.5
param set-default CA_SV_CS1_TRQ_Y 0.5
param set MPC_ACC_HOR_MAX 2
param set MPC_ACC_HOR_MAX 2
param set MPC_THR_MIN 0.3
param set MPC_XY_P 0.15
param set MPC_XY_VEL_D_ACC 0.1
param set MPC_XY_VEL_P_ACC 1
param set MPC_Z_VEL_MAX_DN 1.5
param set MPC_Z_VEL_P_ACC 16
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default PWM_MAIN_FUNC5 0
param set-default PWM_MAIN_FUNC6 201
param set-default PWM_MAIN_FUNC7 202
param set-default PWM_MAIN_REV 96 # invert both elevons
param set NAV_ACC_RAD 5
param set NAV_LOITER_RAD 80
param set-default FW_L1_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_I 0.2
param set-default FW_PR_P 0.2
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_P 0.2
param set-default FW_THR_CRUISE 0.33
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_T_ALT_TC 2
param set-default FW_T_CLMB_MAX 8
param set-default FW_T_HRATE_FF 0.5
param set-default FW_T_SINK_MAX 2.7
param set-default FW_T_SINK_MIN 2.2
param set-default FW_T_TAS_TC 2
param set VT_F_TRANS_DUR 1.5
param set VT_F_TRANS_THR 0.7
param set VT_TYPE 0
param set-default MC_ROLLRATE_P 0.3
param set WV_EN 0
param set-default MPC_ACC_HOR_MAX 2
param set-default MPC_XY_P 0.8
param set-default MPC_XY_VEL_P_ACC 3
param set-default MPC_XY_VEL_I_ACC 4
param set-default MPC_XY_VEL_D_ACC 0.1
fi
param set-default NAV_ACC_RAD 5
param set-default NAV_LOITER_RAD 80
param set-default VT_FW_DIFTHR_EN 1
param set-default VT_FW_DIFTHR_SC 0.5
param set-default VT_F_TRANS_DUR 1.5
param set-default VT_F_TRANS_THR 0.7
param set-default VT_TYPE 0
param set-default WV_EN 0
set MAV_TYPE 20
@@ -7,37 +7,86 @@
. ${R}etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set FW_L1_PERIOD 12
param set FW_MAN_P_MAX 30
param set FW_PR_FF 0.2
param set FW_PR_I 0.4
param set FW_PR_P 0.9
param set FW_PSP_OFF 3
param set FW_RR_FF 0.1
param set FW_RR_P 0.3
# param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 3
param set MC_YAW_P 1.6
param set-default CA_ROTOR_COUNT 4
param set-default CA_ROTOR0_PX 0.1515
param set-default CA_ROTOR0_PY 0.245
param set-default CA_ROTOR0_KM 0.05
param set-default CA_ROTOR1_PX -0.1515
param set-default CA_ROTOR1_PY -0.1875
param set-default CA_ROTOR1_KM 0.05
param set-default CA_ROTOR2_PX 0.1515
param set-default CA_ROTOR2_PY -0.245
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -0.1515
param set-default CA_ROTOR3_PY 0.1875
param set-default CA_ROTOR3_KM -0.05
param set MIS_TAKEOFF_ALT 10
param set-default CA_ROTOR0_TILT 1
param set-default CA_ROTOR1_TILT 2
param set-default CA_ROTOR2_TILT 3
param set-default CA_ROTOR3_TILT 4
param set-default CA_SV_CS0_TRQ_R -0.5
param set-default CA_SV_CS0_TYPE 1
param set-default CA_SV_CS1_TRQ_R 0.5
param set-default CA_SV_CS1_TYPE 2
param set-default CA_SV_CS2_TRQ_P 1.0
param set-default CA_SV_CS2_TYPE 3
param set-default CA_SV_CS_COUNT 3
param set-default CA_SV_TL0_CT 0
param set-default CA_SV_TL1_CT 0
param set-default CA_SV_TL2_CT 0
param set-default CA_SV_TL3_CT 0
param set-default CA_SV_TL_COUNT 4
param set MPC_ACC_HOR_MAX 2
param set MPC_XY_P 0.8
param set MPC_XY_VEL_P_ACC 3
param set MPC_XY_VEL_I_ACC 4
param set MPC_XY_VEL_D_ACC 0.1
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default PWM_MAIN_FUNC5 204
param set-default PWM_MAIN_FUNC6 205
param set-default PWM_MAIN_FUNC7 206
param set-default PWM_MAIN_FUNC8 207
param set-default PWM_MAIN_FUNC9 201
param set-default PWM_MAIN_FUNC10 202
param set-default PWM_MAIN_FUNC11 203
param set NAV_LOITER_RAD 100
param set-default FW_L1_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_FF 0.2
param set-default FW_PR_P 0.9
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_FF 0.1
param set-default FW_RR_P 0.3
param set-default FW_THR_CRUISE 0.38
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_T_CLMB_MAX 8
param set-default FW_T_SINK_MAX 2.7
param set-default FW_T_SINK_MIN 2.2
param set VT_B_TRANS_DUR 8
param set VT_ELEV_MC_LOCK 0
param set VT_FWD_THRUST_EN 4
param set VT_MOT_ID 1234
param set VT_TILT_TRANS 0.6
param set VT_TYPE 1
param set-default MC_YAW_P 1.6
fi
param set-default MIS_TAKEOFF_ALT 10
param set-default MPC_ACC_HOR_MAX 2
param set-default MPC_XY_P 0.8
param set-default MPC_XY_VEL_P_ACC 3
param set-default MPC_XY_VEL_I_ACC 4
param set-default MPC_XY_VEL_D_ACC 0.1
param set-default NAV_ACC_RAD 5
param set-default NAV_LOITER_RAD 80
param set-default VT_B_TRANS_DUR 8
param set-default VT_FWD_THRUST_EN 4
param set-default VT_MOT_ID 1234
param set-default VT_TILT_TRANS 0.6
param set-default VT_TYPE 1
set MAV_TYPE 21
@@ -0,0 +1,57 @@
#!/bin/sh
#
# @name Standard VTOL
#
# @type Standard VTOL
#
. ${R}etc/init.d/rc.vtol_defaults
param set-default FW_L1_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_FF 0.2
param set-default FW_PR_P 0.9
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_FF 0.1
param set-default FW_RR_P 0.3
param set-default FW_THR_CRUISE 0.25
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_T_ALT_TC 2
param set-default FW_T_CLMB_MAX 8
param set-default FW_T_HRATE_FF 0.5
param set-default FW_T_SINK_MAX 2.7
param set-default FW_T_SINK_MIN 2.2
param set-default FW_T_TAS_TC 2
param set-default MC_ROLLRATE_P 0.3
param set-default MC_YAW_P 1.6
param set-default MIS_TAKEOFF_ALT 10
param set-default MPC_ACC_HOR_MAX 2
param set-default MPC_XY_P 0.8
param set-default MPC_XY_VEL_P_ACC 3
param set-default MPC_XY_VEL_I_ACC 4
param set-default MPC_XY_VEL_D_ACC 0.1
param set-default NAV_ACC_RAD 5
param set-default NAV_LOITER_RAD 80
param set-default VT_FWD_THRUST_EN 4
param set-default VT_F_TRANS_THR 0.75
param set-default VT_MOT_ID 1234
param set-default VT_FW_MOT_OFFID 1234
param set-default VT_B_TRANS_DUR 8
param set-default VT_TYPE 2
param set-default RC_MAP_AUX1 8
param set-default RC_MAP_AUX2 9
param set-default RC_MAP_AUX3 10
set MAV_TYPE 22
set MIXER_FILE etc/mixers-sitl/standard_vtol_sitl.main.mix
set MIXER custom
@@ -0,0 +1 @@
mixer append /dev/pwm_output0 etc/mixers-sitl/package_drop.aux.mix
@@ -5,33 +5,38 @@
. ${R}etc/init.d/rc.rover_defaults
if [ $AUTOCNF = yes ]
then
param set GND_L1_DIST 5
param set GND_SP_CTRL_MODE 1
param set GND_SPEED_D 0.001
param set GND_SPEED_I 3
param set GND_SPEED_IMAX 0.125
param set GND_SPEED_P 0.25
param set GND_SPEED_THR_SC 1
param set GND_SPEED_TRIM 4
param set GND_THR_CRUISE 0.3
param set GND_THR_IDLE 0
param set GND_THR_MAX 0.5
param set GND_THR_MIN 0
param set-default GND_L1_DIST 5
param set-default GND_L1_PERIOD 10
param set-default GND_SP_CTRL_MODE 1
param set-default GND_SPEED_D 0.001
param set-default GND_SPEED_I 3
param set-default GND_SPEED_IMAX 0.125
param set-default GND_SPEED_P 0.25
param set-default GND_SPEED_THR_SC 1
param set-default GND_SPEED_TRIM 4
param set-default GND_THR_CRUISE 0.3
param set-default GND_THR_MAX 0.5
param set-default GND_THR_MIN 0
param set MIS_LTRMIN_ALT 0.01
param set MIS_TAKEOFF_ALT 0.01
param set NAV_ACC_RAD 0.5
param set NAV_LOITER_RAD 2
param set-default MIS_LTRMIN_ALT 0.01
param set-default MIS_TAKEOFF_ALT 0.01
param set-default NAV_ACC_RAD 0.5
param set-default NAV_LOITER_RAD 2
param set CBRK_AIRSPD_CHK 162128
param set-default CBRK_AIRSPD_CHK 162128
param set GND_MAX_ANG 0.6
param set GND_WHEEL_BASE 2.0
param set-default GND_MAX_ANG 0.6
param set-default GND_WHEEL_BASE 2.0
fi
param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 5
param set-default CA_R_REV 1
param set-default PWM_MAIN_FUNC1 201
param set-default PWM_MAIN_FUNC2 201
param set-default PWM_MAIN_FUNC6 101
param set-default PWM_MAIN_FUNC7 101
set MAV_TYPE 10
set MIXER_FILE etc/mixers-sitl/rover_ackermann_sitl.main.mix
set MIXER_FILE skip
@@ -6,33 +6,37 @@
. ${R}etc/init.d/rc.rover_defaults
if [ $AUTOCNF = yes ]
then
param set GND_L1_DIST 5
param set GND_SP_CTRL_MODE 1
param set GND_SPEED_D 3
param set GND_SPEED_I 0.001
param set GND_SPEED_IMAX 0.125
param set GND_SPEED_P 0.25
param set GND_SPEED_THR_SC 1
param set GND_SPEED_TRIM 4
param set GND_THR_CRUISE 0.3
param set GND_THR_IDLE 0
param set GND_THR_MAX 0.5
param set GND_THR_MIN 0
param set-default GND_L1_DIST 5
param set-default GND_SP_CTRL_MODE 1
param set-default GND_SPEED_D 3
param set-default GND_SPEED_I 0.001
param set-default GND_SPEED_IMAX 0.125
param set-default GND_SPEED_P 0.25
param set-default GND_SPEED_THR_SC 1
param set-default GND_SPEED_TRIM 4
param set-default GND_THR_CRUISE 0.3
param set-default GND_THR_MAX 0.5
param set-default GND_THR_MIN 0
param set MIS_LTRMIN_ALT 0.01
param set MIS_TAKEOFF_ALT 0.01
param set NAV_ACC_RAD 0.5
param set NAV_LOITER_RAD 2
param set-default MIS_LTRMIN_ALT 0.01
param set-default MIS_TAKEOFF_ALT 0.01
param set-default NAV_ACC_RAD 0.5
param set-default NAV_LOITER_RAD 2
param set CBRK_AIRSPD_CHK 162128
param set-default CBRK_AIRSPD_CHK 162128
param set GND_MAX_ANG 0.6
param set GND_WHEEL_BASE 2.0
param set-default GND_MAX_ANG 0.6
param set-default GND_WHEEL_BASE 2.0
fi
param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 6
param set-default CA_R_REV 3
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 101
param set-default PWM_MAIN_FUNC6 102
param set-default PWM_MAIN_FUNC7 102
set MAV_TYPE 10
set MIXER_FILE etc/mixers-sitl/rover_diff_sitl.main.mix
set MIXER_FILE skip
@@ -10,33 +10,28 @@
. ${R}etc/init.d/rc.rover_defaults
if [ $AUTOCNF = yes ]
then
param set GND_L1_DIST 5
param set GND_SP_CTRL_MODE 1
param set GND_SPEED_D 3
param set GND_SPEED_I 0.001
param set GND_SPEED_IMAX 0.125
param set GND_SPEED_P 0.25
param set GND_SPEED_THR_SC 1
param set GND_SPEED_TRIM 15
param set GND_SPEED_MAX 25
param set GND_THR_CRUISE 0.3
param set GND_THR_IDLE 0
param set GND_THR_MAX 0.5
param set GND_THR_MIN 0
param set-default GND_L1_DIST 5
param set-default GND_SP_CTRL_MODE 1
param set-default GND_SPEED_D 3
param set-default GND_SPEED_I 0.001
param set-default GND_SPEED_IMAX 0.125
param set-default GND_SPEED_P 0.25
param set-default GND_SPEED_THR_SC 1
param set-default GND_SPEED_TRIM 15
param set-default GND_SPEED_MAX 25
param set-default GND_THR_CRUISE 0.3
param set-default GND_THR_MAX 0.5
param set-default GND_THR_MIN 0
param set MIS_LTRMIN_ALT 0.01
param set MIS_TAKEOFF_ALT 0.01
param set NAV_ACC_RAD 0.5
param set NAV_LOITER_RAD 2
param set-default MIS_LTRMIN_ALT 0.01
param set-default MIS_TAKEOFF_ALT 0.01
param set-default NAV_ACC_RAD 0.5
param set-default NAV_LOITER_RAD 2
param set CBRK_AIRSPD_CHK 162128
param set-default CBRK_AIRSPD_CHK 162128
param set GND_MAX_ANG 0.6
param set GND_WHEEL_BASE 3.0
fi
param set-default GND_MAX_ANG 0.6
param set-default GND_WHEEL_BASE 3.0
set MAV_TYPE 10
@@ -5,33 +5,48 @@
. ${R}etc/init.d/rc.boat_defaults
if [ $AUTOCNF = yes ]
then
param set GND_L1_DIST 5
param set GND_SP_CTRL_MODE 1
param set GND_SPEED_D 0.001
param set GND_SPEED_I 3
param set GND_SPEED_IMAX 0.125
param set GND_SPEED_P 0.25
param set GND_SPEED_THR_SC 1
param set GND_SPEED_TRIM 4
param set GND_THR_CRUISE 0.3
param set GND_THR_IDLE 0
param set GND_THR_MAX 0.5
param set GND_THR_MIN 0
param set-default GND_L1_DIST 5
param set-default GND_L1_PERIOD 100
param set-default GND_SP_CTRL_MODE 1
param set-default GND_SPEED_D 0.001
param set-default GND_SPEED_I 8
param set-default GND_SPEED_IMAX 0.125
param set-default GND_SPEED_P 2
param set-default GND_SPEED_THR_SC 1
param set-default GND_SPEED_TRIM 1
param set-default GND_THR_CRUISE 0.85
param set-default GND_THR_MAX 1
param set-default GND_THR_MIN 0
param set MIS_LTRMIN_ALT 0.01
param set MIS_TAKEOFF_ALT 0.01
param set NAV_ACC_RAD 0.5
param set NAV_LOITER_RAD 2
param set-default MIS_LTRMIN_ALT 0.01
param set-default MIS_TAKEOFF_ALT 0.01
param set-default NAV_ACC_RAD 0.5
param set-default NAV_LOITER_RAD 2
param set CBRK_AIRSPD_CHK 162128
param set-default CBRK_AIRSPD_CHK 162128
param set GND_MAX_ANG 0.6
param set GND_WHEEL_BASE 2.0
param set-default GND_MAX_ANG 0.6
param set-default GND_WHEEL_BASE 2.0
fi
param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 9
param set-default CA_ROTOR_COUNT 2
param set-default CA_ROTOR0_AX 1
param set-default CA_ROTOR0_AZ 0
param set-default CA_ROTOR0_KM 0
param set-default CA_ROTOR0_PX -2
param set-default CA_ROTOR0_PY -1
param set-default CA_ROTOR1_AX 1
param set-default CA_ROTOR1_AZ 0
param set-default CA_ROTOR1_KM 0
param set-default CA_ROTOR1_PX -2
param set-default CA_ROTOR1_PY 1
param set-default CA_R_REV 3
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
set MAV_TYPE 11
set MIXER_FILE etc/mixers-sitl/boat_sitl.main.mix
set MIXER skip
@@ -12,53 +12,38 @@
. ${R}etc/init.d/rc.fw_defaults
if [ $AUTOCNF = yes ]
then
param set EKF2_ARSP_THR 8
param set EKF2_FUSE_BETA 1
param set ASPD_STALL 10.0
param set-default FW_AIRSPD_STALL 8
param set FW_P_RMAX_NEG 20.0
param set FW_P_RMAX_POS 60.0
param set FW_W_RMAX 10
param set FW_W_EN 1
param set-default FW_P_RMAX_NEG 20.0
param set-default FW_W_RMAX 10
param set-default FW_W_EN 1
param set FW_PR_IMAX 0.4
param set FW_R_TC 0.4
param set FW_RR_FF 0.5
param set FW_RR_I 0.1
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.08
param set-default FW_RR_P 0.08
param set MIS_LTRMIN_ALT 50
param set MIS_TAKEOFF_ALT 3
param set-default MIS_LTRMIN_ALT 50
param set-default MIS_TAKEOFF_ALT 3
param set NAV_ACC_RAD 20
param set NAV_DLL_ACT 2
param set NAV_LOITER_RAD 100
param set-default NAV_ACC_RAD 20
param set-default NAV_DLL_ACT 2
param set-default NAV_LOITER_RAD 100
param set RWTO_TKOFF 1
param set MAV_BROADCAST 1
param set-default RWTO_TKOFF 1
param set FW_ARSP_SCALE_EN 0
param set-default FW_ARSP_SCALE_EN 0
param set FW_AIRSPD_MAX 35
param set FW_AIRSPD_MIN 7
param set FW_AIRSPD_TRIM 15
param set-default FW_AIRSPD_MAX 35
param set-default FW_AIRSPD_MIN 7
param set FW_P_LIM_MAX 25
param set FW_P_LIM_MIN -5
param set FW_R_LIM 30
param set-default FW_P_LIM_MAX 25
param set-default FW_P_LIM_MIN -5
param set-default FW_R_LIM 30
param set FW_MAN_P_MAX 30.0
param set FW_MAN_R_MAX 30.0
param set FW_THR_CRUISE 0.8
param set FW_THR_IDLE 0
param set COM_DISARM_PRFLT 0
fi
param set-default FW_MAN_P_MAX 30.0
param set-default FW_MAN_R_MAX 30.0
param set-default FW_THR_CRUISE 0.8
param set-default FW_THR_IDLE 0
param set-default COM_DISARM_PRFLT 0
set MIXER_FILE etc/mixers-sitl/autogyro_sitl.main.mix
set MIXER custom
@@ -11,5 +11,31 @@
. ${R}etc/init.d/rc.airship_defaults
set MIXER cloudship
set PWM_OUT 1234
param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 9
param set-default CA_ROTOR_COUNT 3
param set-default CA_ROTOR0_AX 1.0000
param set-default CA_ROTOR0_AZ 0.0000
param set-default CA_ROTOR0_KM 0.0000
param set-default CA_ROTOR0_PY 2.0000
param set-default CA_ROTOR1_AX 1.0000
param set-default CA_ROTOR1_AZ 0.0000
param set-default CA_ROTOR1_KM 0.0000
param set-default CA_ROTOR1_PY -2.0000
param set-default CA_ROTOR2_AY -1.0000
param set-default CA_ROTOR2_AZ 0.0000
param set-default CA_ROTOR2_KM 0.0000
param set-default CA_ROTOR2_PX -10.0000
param set-default CA_SV_CS_COUNT 1
param set-default CA_SV_CS0_TRQ_P 1.0000
param set-default CA_R_REV 7
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 201
param set-default PWM_MAIN_FUNC4 103
set MIXER skip
@@ -9,26 +9,20 @@
. ${R}etc/init.d/rc.mc_defaults
if [ $AUTOCNF = yes ]
then
param set MC_PITCHRATE_P 0.1
param set MC_PITCHRATE_I 0.05
param set MC_PITCH_P 6.0
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.1
param set MC_ROLL_P 6.0
param set MPC_XY_VEL_I_ACC 4
param set MPC_XY_VEL_P_ACC 3
param set-default MC_PITCHRATE_P 0.1
param set-default MC_PITCHRATE_I 0.05
param set-default MC_PITCH_P 6.0
param set-default MC_ROLLRATE_I 0.1
param set-default MC_ROLL_P 6.0
param set-default MPC_XY_VEL_I_ACC 4
param set-default MPC_XY_VEL_P_ACC 3
param set RTL_DESCEND_ALT 10
param set RTL_LAND_DELAY 0
param set-default RTL_DESCEND_ALT 10
param set TRIG_INTERFACE 3
param set TRIG_MODE 4
param set MNT_MODE_IN 4
param set MNT_DO_STAB 2
param set MAV_PROTO_VER 2
fi
param set-default TRIG_INTERFACE 3
param set-default TRIG_MODE 4
param set-default MNT_MODE_IN 4
param set-default MNT_DO_STAB 2
set MAV_TYPE 13
@@ -7,25 +7,24 @@
. ${R}etc/init.d/rc.mc_defaults
if [ $AUTOCNF = yes ]
then
param set MC_PITCHRATE_P 0.1
param set MC_PITCHRATE_I 0.05
param set MC_PITCH_P 6.0
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.1
param set MC_ROLL_P 6.0
param set MPC_XY_VEL_I_ACC 4
param set MPC_XY_VEL_P_ACC 3
param set-default MC_PITCHRATE_P 0.0800
param set-default MC_PITCHRATE_I 0.0400
param set-default MC_PITCHRATE_D 0.0010
param set-default MC_PITCH_P 9.0
param set-default MC_ROLLRATE_P 0.0800
param set-default MC_ROLLRATE_I 0.0400
param set-default MC_ROLLRATE_D 0.0010
param set-default MC_ROLL_P 9.0
param set-default MPC_XY_VEL_I_ACC 4
param set-default MPC_XY_VEL_P_ACC 3
param set RTL_DESCEND_ALT 10
param set RTL_LAND_DELAY 0
param set-default RTL_DESCEND_ALT 10
param set TRIG_INTERFACE 3
param set TRIG_MODE 4
param set MNT_MODE_IN 0
param set MAV_PROTO_VER 2
fi
param set-default TRIG_INTERFACE 3
param set-default TRIG_MODE 4
param set-default MNT_MODE_IN 4
param set-default MNT_MODE_OUT 2
param set-default MAV_PROTO_VER 2
set MAV_TYPE 13
@@ -1,7 +1,7 @@
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530 -p
# shellcheck disable=SC2154
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local
@@ -0,0 +1,64 @@
#!/bin/sh
#
# @name Typhoon H480 SITL
#
# @type Hexarotor x
#
. ${R}etc/init.d/rc.mc_defaults
param set-default SYS_CTRL_ALLOC 1
param set-default MC_PITCHRATE_P 0.0800
param set-default MC_PITCHRATE_I 0.0400
param set-default MC_PITCHRATE_D 0.0010
param set-default MC_PITCH_P 9.0
param set-default MC_ROLLRATE_P 0.0800
param set-default MC_ROLLRATE_I 0.0400
param set-default MC_ROLLRATE_D 0.0010
param set-default MC_ROLL_P 9.0
param set-default MPC_XY_VEL_I_ACC 4
param set-default MPC_XY_VEL_P_ACC 3
param set-default RTL_DESCEND_ALT 10
param set-default RTL_LAND_DELAY 0
param set-default TRIG_INTERFACE 3
param set-default TRIG_MODE 4
param set-default MNT_MODE_IN 0
param set-default MAV_PROTO_VER 2
param set-default CA_AIRFRAME 0
param set-default CA_ROTOR_COUNT 6
param set-default CA_ROTOR0_PX 0.0
param set-default CA_ROTOR0_PY 1.0
param set-default CA_ROTOR0_KM -0.05
param set-default CA_ROTOR1_PX 0.0
param set-default CA_ROTOR1_PY -1.0
param set-default CA_ROTOR1_KM 0.05
param set-default CA_ROTOR2_PX 0.866025
param set-default CA_ROTOR2_PY -0.5
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -0.866025
param set-default CA_ROTOR3_PY 0.5
param set-default CA_ROTOR3_KM 0.05
param set-default CA_ROTOR4_PX 0.866025
param set-default CA_ROTOR4_PY 0.5
param set-default CA_ROTOR4_KM 0.05
param set-default CA_ROTOR5_PX -0.866025
param set-default CA_ROTOR5_PY -0.5
param set-default CA_ROTOR5_KM -0.05
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default PWM_MAIN_FUNC5 105
param set-default PWM_MAIN_FUNC6 106
set MAV_TYPE 13
set MIXER skip
set MIXER_AUX none
@@ -0,0 +1,10 @@
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530 -p
# shellcheck disable=SC2154
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local
# shellcheck disable=SC2154
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_offboard_port_local
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_offboard_port_local
@@ -33,6 +33,8 @@
px4_add_romfs_files(
10016_iris
10017_iris_ctrlalloc
10018_iris_foggy_lidar
10020_if750a
10030_px4vision
1010_iris_opt_flow
@@ -44,8 +46,6 @@ px4_add_romfs_files(
1014_solo
1015_iris_obs_avoid
1015_iris_obs_avoid.post
1016_iris_rtps
1016_iris_rtps.post
1017_iris_opt_flow_mockup
1018_iris_vision_velocity
1019_iris_dual_gps
@@ -60,9 +60,13 @@ px4_add_romfs_files(
1034_rascal-electric
1035_techpod
1036_malolo
1037_believer
1038_glider
1040_standard_vtol
1041_tailsitter
1042_tiltrotor
1043_standard_vtol_drop
1043_standard_vtol_drop.post
1060_rover
1061_r1_rover
1062_tf-r1
@@ -73,4 +77,6 @@ px4_add_romfs_files(
2507_cloudship
6011_typhoon_h480
6011_typhoon_h480.post
6012_typhoon_h480_ctrlalloc
6012_typhoon_h480_ctrlalloc.post
)
@@ -0,0 +1,32 @@
#!/bin/sh
# shellcheck disable=SC2154
udp_offboard_port_local=$((14580+px4_instance))
udp_offboard_port_remote=$((14540+px4_instance))
[ $px4_instance -gt 9 ] && udp_offboard_port_remote=14549 # use the same ports for more than 10 instances to avoid port overlaps
udp_onboard_payload_port_local=$((14280+px4_instance))
udp_onboard_payload_port_remote=$((14030+px4_instance))
udp_onboard_gimbal_port_local=$((13030+px4_instance))
udp_onboard_gimbal_port_remote=$((13280+px4_instance))
udp_gcs_port_local=$((18570+px4_instance))
# GCS link
mavlink start -x -u $udp_gcs_port_local -r 4000000 -f
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
# API/Offboard link
mavlink start -x -u $udp_offboard_port_local -r 4000000 -f -m onboard -o $udp_offboard_port_remote
# Onboard link to camera
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
# Onboard link to gimbal
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -m gimbal -o $udp_onboard_gimbal_port_remote
@@ -0,0 +1,5 @@
#!/bin/sh
# shellcheck disable=SC2154
#param set-default MAV_SYS_ID $((px4_instance+1))
#param set-default IMU_INTEG_RATE 250
@@ -0,0 +1,20 @@
#!/bin/sh
# shellcheck disable=SC2154
simulator_tcp_port=$((4560+px4_instance))
# Check if PX4_SIM_HOSTNAME environment variable is empty
# If empty check if PX4_SIM_HOST_ADDR environment variable is empty
# If both are empty use localhost for simulator
if [ -z "${PX4_SIM_HOSTNAME}" ]; then
if [ -z "${PX4_SIM_HOST_ADDR}" ]; then
echo "PX4 SIM HOST: localhost"
simulator start -c $simulator_tcp_port
else
echo "PX4 SIM HOST: $PX4_SIM_HOST_ADDR"
simulator start -t $PX4_SIM_HOST_ADDR $simulator_tcp_port
fi
else
echo "PX4 SIM HOST: $PX4_SIM_HOSTNAME"
simulator start -h $PX4_SIM_HOSTNAME $simulator_tcp_port
fi
+2 -2
View File
@@ -10,7 +10,7 @@ fi
if [ ! -f replay_params.txt ]; then
echo "Creating $(pwd)/replay_params.txt"
ulog_params -i "${replay}" -d ' ' | grep -e '^EKF2' > replay_params.txt
ulog_params -i "${replay}" -l ' ' | grep -e '^EKF2' > replay_params.txt
fi
publisher_rules_file="orb_publisher.rules"
@@ -20,8 +20,8 @@ module: replay
ignore_others: false
EOF
uorb start
param set SDLOG_DIRS_MAX 7
param set SDLOG_PROFILE 3
# apply all params before ekf starts, as some params cannot be changed after startup
replay tryapplyparams
+73 -66
View File
@@ -1,11 +1,14 @@
#!/bin/sh
set -e
# PX4 commands need the 'px4-' prefix in bash.
# (px4-alias.sh is expected to be in the PATH)
# shellcheck disable=SC1091
. px4-alias.sh
SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
#search path for sourcing px4-rc.*
PATH="$PATH:${R}etc/init.d-posix"
#
# Main SITL startup script
@@ -20,13 +23,13 @@ then
fi
# initialize script variables
set AUX_MODE none
set IO_PRESENT no
set MAV_TYPE none
set MIXER none
set MIXER_AUX none
set MIXER_FILE none
set OUTPUT_MODE sim
set EXTRA_MIXER_MODE none
set PWM_OUT none
set SDCARD_MIXERS_PATH etc/mixers
set USE_IO no
@@ -43,17 +46,15 @@ else
# Find the matching Autostart ID (file name has the form: [0-9]+_${PX4_SIM_MODEL})
# TODO: unify with rc.autostart generation
# shellcheck disable=SC2012
REQUESTED_AUTOSTART=$(ls "$SCRIPT_DIR/airframes" | sed -n 's/^\([0-9][0-9]*\)_'${PX4_SIM_MODEL}'$/\1/p')
REQUESTED_AUTOSTART=$(ls "${R}etc/init.d-posix/airframes" | sed -n 's/^\([0-9][0-9]*\)_'${PX4_SIM_MODEL}'$/\1/p')
if [ -z "$REQUESTED_AUTOSTART" ]; then
echo "Error: Unknown model $PX4_SIM_MODEL (not found by name on $SCRIPT_DIR/airframes)"
echo "ERROR [init] Unknown model $PX4_SIM_MODEL (not found by name on ${R}etc/init.d-posix/airframes)"
exit 1
else
echo "Info: found model autostart file as SYS_AUTOSTART=$REQUESTED_AUTOSTART"
echo "INFO [init] found model autostart file as SYS_AUTOSTART=$REQUESTED_AUTOSTART"
fi
fi
uorb start
# Load parameters
set PARAM_FILE eeprom/parameters_"$REQUESTED_AUTOSTART"
param select $PARAM_FILE
@@ -98,67 +99,62 @@ then
set AUTOCNF yes
# Wipe out params except RC*, flight modes, total flight time, accel cal, gyro cal, next flight UUID
param reset_all SYS_AUTOSTART SYS_AUTOCONFIG RC* COM_FLTMODE* LND_FLIGHT_T_* TC_* CAL_ACC* CAL_GYRO* COM_FLIGHT_UUID
param reset_all SYS_AUTO* RC* COM_FLTMODE* LND_FLIGHT* TC_* CAL_ACC* CAL_GYRO* COM_FLIGHT*
fi
# multi-instance setup
# shellcheck disable=SC2154
param set MAV_SYS_ID $((px4_instance+1))
simulator_tcp_port=$((4560+px4_instance))
udp_offboard_port_local=$((14580+px4_instance))
udp_offboard_port_remote=$((14540+px4_instance))
[ $px4_instance -gt 9 ] && udp_offboard_port_remote=14549 # use the same ports for more than 10 instances to avoid port overlaps
udp_onboard_payload_port_local=$((14280+px4_instance))
udp_onboard_payload_port_remote=$((14030+px4_instance))
udp_gcs_port_local=$((18570+px4_instance))
if [ $AUTOCNF = yes ]
then
param set SYS_AUTOSTART $REQUESTED_AUTOSTART
param set BAT_N_CELLS 4
param set CAL_ACC0_ID 1310988 # 1310988: DRV_IMU_DEVTYPE_SIM, BUS: 1, ADDR: 1, TYPE: SIMULATION
param set CAL_ACC1_ID 1310996 # 1310996: DRV_IMU_DEVTYPE_SIM, BUS: 2, ADDR: 1, TYPE: SIMULATION
param set CAL_ACC2_ID 1311004 # 1311004: DRV_IMU_DEVTYPE_SIM, BUS: 3, ADDR: 1, TYPE: SIMULATION
param set CAL_ACC0_ID 1310988 # 1310988: DRV_IMU_DEVTYPE_SIM, BUS: 1, ADDR: 1, TYPE: SIMULATION
param set CAL_GYRO0_ID 1310988 # 1310988: DRV_IMU_DEVTYPE_SIM, BUS: 1, ADDR: 1, TYPE: SIMULATION
param set CAL_ACC1_ID 1310996 # 1310996: DRV_IMU_DEVTYPE_SIM, BUS: 2, ADDR: 1, TYPE: SIMULATION
param set CAL_GYRO1_ID 1310996 # 1310996: DRV_IMU_DEVTYPE_SIM, BUS: 2, ADDR: 1, TYPE: SIMULATION
param set CAL_ACC2_ID 1311004 # 1311004: DRV_IMU_DEVTYPE_SIM, BUS: 3, ADDR: 1, TYPE: SIMULATION
param set CAL_GYRO2_ID 1311004 # 1311004: DRV_IMU_DEVTYPE_SIM, BUS: 3, ADDR: 1, TYPE: SIMULATION
param set CAL_MAG0_ID 197388
param set CAL_MAG1_ID 197644
param set CBRK_AIRSPD_CHK 0
param set CBRK_SUPPLY_CHK 894281
# Don't require RC calibration and configuration
param set COM_RC_IN_MODE 1
# Speedup SITL startup
param set EKF2_REQ_GPS_H 0.5
# Multi-EKF
param set EKF2_MULTI_IMU 3
param set SENS_IMU_MODE 0
param set EKF2_MULTI_MAG 2
param set SENS_MAG_MODE 0
# By default log from boot until first disarm.
param set SDLOG_MODE 1
# enable default, estimator replay and vision/avoidance logging profiles
param set SDLOG_PROFILE 131
param set SDLOG_DIRS_MAX 7
param set SENS_BOARD_ROT 0
param set SENS_BOARD_X_OFF 0.000001
param set SENS_DPRES_OFF 0.001
param set SYS_RESTART_TYPE 2
param set TRIG_INTERFACE 3
fi
param set COM_CPU_MAX -1 # disable check, no CPU load reported on posix yet
param set-default BAT1_N_CELLS 4
# Simulator IMU data provided at 250 Hz
param set IMU_INTEG_RATE 250
param set-default CBRK_AIRSPD_CHK 0
param set-default CBRK_SUPPLY_CHK 894281
# disable check, no CPU load reported on posix yet
param set-default COM_CPU_MAX -1
# Don't require RC calibration and configuration
param set-default COM_RC_IN_MODE 1
# Speedup SITL startup
param set-default EKF2_REQ_GPS_H 0.5
# Multi-EKF
param set-default EKF2_MULTI_IMU 3
param set-default SENS_IMU_MODE 0
param set-default EKF2_MULTI_MAG 2
param set-default SENS_MAG_MODE 0
param set-default IMU_GYRO_FFT_EN 1
param set-default -s MC_AT_EN 1
# By default log from boot until first disarm.
param set-default SDLOG_MODE 1
# enable default, estimator replay and vision/avoidance logging profiles
param set-default SDLOG_PROFILE 131
param set-default SDLOG_DIRS_MAX 7
param set-default TRIG_INTERFACE 3
# Adapt timeout parameters if simulation runs faster or slower than realtime.
if [ -n "$PX4_SIM_SPEED_FACTOR" ]; then
@@ -173,6 +169,10 @@ if [ -n "$PX4_SIM_SPEED_FACTOR" ]; then
COM_OF_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 0.5" | bc)
echo "COM_OF_LOSS_T set to $COM_OF_LOSS_T_LONGER"
param set COM_OF_LOSS_T $COM_OF_LOSS_T_LONGER
COM_OBC_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 5.0" | bc)
echo "COM_OBC_LOSS_T set to $COM_OBC_LOSS_T_LONGER"
param set COM_OBC_LOSS_T $COM_OBC_LOSS_T_LONGER
fi
# Autostart ID
@@ -205,24 +205,36 @@ then
param set SYS_AUTOCONFIG 0
fi
# Simulator IMU data provided at 250 Hz
param set IMU_INTEG_RATE 250
#user defined params for instances can be in PATH
. px4-rc.params
dataman start
# only start the simulator if not in replay mode, as both control the lockstep time
if ! replay tryapplyparams
then
simulator start -c $simulator_tcp_port
. px4-rc.simulator
fi
load_mon start
battery_simulator start
tone_alarm start
rc_update start
manual_control start
sensors start
commander start
navigator start
# Try to start the micrortps_client with UDP transport if module exists
if px4-micrortps_client status > /dev/null 2>&1
then
. px4-rc.rtps
fi
if param greater -s MNT_MODE_IN -1
then
vmount start
gimbal start
fi
if param greater -s TRIG_MODE 0
@@ -231,29 +243,24 @@ then
camera_feedback start
fi
if param compare -s IMU_GYRO_FFT_EN 1
then
gyro_fft start
fi
if param compare -s IMU_GYRO_CAL_EN 1
then
gyro_calibration start
fi
# Configure vehicle type specific parameters.
# Note: rc.vehicle_setup is the entry point for rc.interface,
# rc.fw_apps, rc.mc_apps, rc.rover_apps, and rc.vtol_apps.
#
. ${R}etc/init.d/rc.vehicle_setup
# GCS link
mavlink start -x -u $udp_gcs_port_local -r 4000000
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
# API/Offboard link
mavlink start -x -u $udp_offboard_port_local -r 4000000 -m onboard -o $udp_offboard_port_remote
# Onboard link to camera
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
#user defined mavlink streams for instances can be in PATH
. px4-rc.mavlink
# execute autostart post script if any
[ -e "$autostart_file".post ] && . "$autostart_file".post
+2 -1
View File
@@ -36,11 +36,12 @@ add_subdirectory(airframes)
px4_add_romfs_files(
rc.airship_apps
rc.airship_defaults
rc.balloon_apps
rc.balloon_defaults
rc.boat_defaults
rc.fw_apps
rc.fw_defaults
rc.interface
rc.io
rc.logging
rc.mc_apps
rc.mc_defaults
@@ -13,39 +13,61 @@
# @output MAIN6 gear
#
# @maintainer Lorenz Meier <lorenz@px4.io>
# @board px4_fmu-v2 exclude
#
. ${R}etc/init.d/rc.fw_defaults
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 3
param set-default BAT1_N_CELLS 3
param set FW_AIRSPD_MAX 20
param set FW_AIRSPD_MIN 12
param set FW_AIRSPD_TRIM 14
param set FW_R_TC 0.3
param set FW_P_TC 0.3
param set FW_L1_DAMPING 0.74
param set FW_L1_PERIOD 16
param set FW_LND_ANG 15
param set FW_LND_FLALT 5
param set FW_LND_HHDIST 15
param set FW_LND_HVIRT 13
param set FW_LND_TLALT 5
param set FW_THR_LND_MAX 0
param set FW_PR_FF 0.35
param set FW_PR_I 0.1
param set FW_PR_IMAX 0.4
param set FW_PR_P 0.2
param set FW_RR_FF 0.6
param set FW_RR_I 0.1
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.3
param set-default FW_AIRSPD_MAX 20
param set-default FW_AIRSPD_MIN 12
param set-default FW_AIRSPD_TRIM 14
param set-default FW_R_TC 0.3
param set-default FW_P_TC 0.3
param set-default FW_L1_DAMPING 0.74
param set-default FW_L1_PERIOD 16
param set-default FW_LND_ANG 15
param set-default FW_LND_FLALT 5
param set-default FW_LND_HVIRT 13
param set-default FW_LND_TLALT 5
param set-default FW_THR_LND_MAX 0
param set-default FW_PR_FF 0.35
param set-default FW_PR_P 0.2
param set-default FW_RR_FF 0.6
param set-default FW_RR_P 0.3
param set RWTO_TKOFF 1
fi
param set-default RWTO_TKOFF 1
param set-default CA_AIRFRAME 1
param set-default CA_ROTOR_COUNT 1
param set-default CA_ROTOR0_PX 0.3
param set-default CA_SV_CS_COUNT 4
param set-default CA_SV_CS0_TRQ_R 0.5
param set-default CA_SV_CS0_TYPE 2
param set-default CA_SV_CS1_TRQ_P 1.0
param set-default CA_SV_CS1_TYPE 3
param set-default CA_SV_CS2_TRQ_Y 1.0
param set-default CA_SV_CS2_TYPE 4
param set-default CA_SV_CS3_TYPE 10
param set-default HIL_ACT_REV 2
param set-default HIL_ACT_FUNC1 201
param set-default HIL_ACT_FUNC2 202
param set-default HIL_ACT_FUNC3 203
param set-default HIL_ACT_FUNC4 101
param set-default HIL_ACT_FUNC5 204
param set-default HIL_ACT_FUNC6 400
param set SYS_HITL 1
# disable some checks to allow to fly
# - with usb
param set-default CBRK_USB_CHK 197848
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default COM_PREARM_MODE 0
param set-default CBRK_IO_SAFETY 22027
set MIXER AERT
@@ -20,28 +20,17 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board intel_aerofc-v1 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.1
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.0017
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.14
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_D 0.0025
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.28
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0
fi
param set-default MC_ROLLRATE_P 0.1
param set-default MC_ROLLRATE_I 0.05
param set-default MC_ROLLRATE_D 0.0017
param set-default MC_PITCHRATE_P 0.14
param set-default MC_PITCHRATE_I 0.1
param set-default MC_PITCHRATE_D 0.0025
param set-default MC_YAWRATE_P 0.28
set MIXER quad_w
set PWM_OUT 1234
@@ -18,32 +18,23 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board intel_aerofc-v1 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
if [ $AUTOCNF = yes ]
then
# TODO tune roll/pitch separately
param set MC_ROLL_P 7
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.004
param set MC_PITCH_P 7
param set MC_PITCHRATE_P 0.15
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_D 0.004
param set MC_YAW_P 2.5
param set MC_YAWRATE_P 0.25
param set MC_YAWRATE_I 0.25
param set MC_YAWRATE_D 0
# TODO tune roll/pitch separately
param set-default MC_ROLL_P 7
param set-default MC_ROLLRATE_I 0.05
param set-default MC_ROLLRATE_D 0.004
param set-default MC_PITCH_P 7
param set-default MC_PITCHRATE_I 0.05
param set-default MC_PITCHRATE_D 0.004
param set-default MC_YAW_P 2.5
param set-default MC_YAWRATE_P 0.25
param set-default MC_YAWRATE_I 0.25
param set BAT_V_DIV 12.27559
param set BAT_A_PER_V 15.39103
fi
param set-default BAT1_V_DIV 12.27559
param set-default BAT1_A_PER_V 15.391030303103
set MIXER quad_w
set PWM_OUT 1234
@@ -20,30 +20,20 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board intel_aerofc-v1 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 4
param set MC_ROLL_P 7
param set MC_ROLLRATE_P 0.13
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.004
param set MC_PITCH_P 7
param set MC_PITCHRATE_P 0.19
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_D 0.004
param set MC_YAW_P 4
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0
fi
param set-default BAT1_N_CELLS 4
param set-default MC_ROLL_P 7
param set-default MC_ROLLRATE_P 0.13
param set-default MC_ROLLRATE_I 0.05
param set-default MC_ROLLRATE_D 0.004
param set-default MC_PITCH_P 7
param set-default MC_PITCHRATE_P 0.19
param set-default MC_PITCHRATE_I 0.05
param set-default MC_PITCHRATE_D 0.004
param set-default MC_YAW_P 4
set MIXER quad_w
set PWM_OUT 1234
@@ -20,35 +20,24 @@
# @maintainer Simon Wilks <simon@uaventure.com>
#
# @board px4_fmu-v2 exclude
# @board intel_aerofc-v1 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 6
param set BAT_V_EMPTY 3.5
param set-default BAT1_N_CELLS 6
param set-default BAT1_V_EMPTY 3.5
param set MC_ROLL_P 7
param set MC_ROLLRATE_P 0.08
param set MC_ROLLRATE_I 0.02
param set MC_ROLLRATE_D 0.003
param set MC_PITCH_P 7
param set MC_PITCHRATE_P 0.13
param set MC_PITCHRATE_I 0.02
param set MC_PITCHRATE_D 0.005
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0
param set-default MC_ROLL_P 7
param set-default MC_ROLLRATE_P 0.08
param set-default MC_ROLLRATE_I 0.02
param set-default MC_PITCH_P 7
param set-default MC_PITCHRATE_P 0.13
param set-default MC_PITCHRATE_I 0.02
param set-default MC_PITCHRATE_D 0.005
param set MPC_XY_VEL_MAX 2
param set-default MPC_XY_VEL_MAX 2
param set PWM_MIN 1080
fi
param set-default PWM_MAIN_MIN 1080
set MIXER quad_w
set PWM_OUT 1234
@@ -6,11 +6,37 @@
# @class Copter
#
# @maintainer Lorenz Meier <lorenz@px4.io>
# @board px4_fmu-v2 exclude
#
. ${R}etc/init.d/rc.mc_defaults
set MIXER quad_x
set PWM_OUT 1234
param set SYS_HITL 1
param set-default CA_ROTOR_COUNT 4
param set-default CA_ROTOR0_PX 0.15
param set-default CA_ROTOR0_PY 0.15
param set-default CA_ROTOR1_PX -0.15
param set-default CA_ROTOR1_PY -0.15
param set-default CA_ROTOR2_PX 0.15
param set-default CA_ROTOR2_PY -0.15
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -0.15
param set-default CA_ROTOR3_PY 0.15
param set-default CA_ROTOR3_KM -0.05
param set-default HIL_ACT_FUNC1 101
param set-default HIL_ACT_FUNC2 102
param set-default HIL_ACT_FUNC3 103
param set-default HIL_ACT_FUNC4 104
# disable some checks to allow to fly
# - with usb
param set-default CBRK_USB_CHK 197848
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default COM_PREARM_MODE 0
param set-default CBRK_IO_SAFETY 22027
@@ -8,67 +8,102 @@
# @maintainer Roman Bapst <roman@auterion.com>
#
# @board px4_fmu-v2 exclude
# @board intel_aerofc-v1 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
. ${R}etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 3
param set COM_RC_IN_MODE 1
param set-default BAT1_N_CELLS 3
param set EKF2_AID_MASK 1
param set EKF2_ANGERR_INIT 0.01
param set EKF2_GBIAS_INIT 0.01
param set EKF2_HGT_MODE 0
param set EKF2_MAG_TYPE 1
param set-default COM_RC_IN_MODE 1
param set FW_AIRSPD_MAX 25
param set FW_AIRSPD_MIN 14
param set FW_AIRSPD_TRIM 16
param set-default EKF2_ANGERR_INIT 0.01
param set-default EKF2_GBIAS_INIT 0.01
param set-default EKF2_MAG_TYPE 1
param set MC_PITCH_P 6
param set MC_PITCHRATE_P 0.2
param set MC_ROLL_P 6
param set MC_ROLLRATE_P 0.3
param set MIS_LTRMIN_ALT 10
param set MIS_TAKEOFF_ALT 10
param set MIS_YAW_TMT 10
param set-default FW_AIRSPD_MAX 25
param set-default FW_AIRSPD_MIN 14
param set-default FW_AIRSPD_TRIM 16
param set MPC_ACC_HOR_MAX 2
param set MPC_ACC_HOR_MAX 2
param set MPC_THR_MIN 0.1
param set MPC_TKO_SPEED 1
param set MPC_XY_P 0.8
param set MPC_XY_VEL_D_ACC 0.1
param set MPC_XY_VEL_I_ACC 4
param set MPC_XY_VEL_P_ACC 3
param set MPC_Z_VEL_P_ACC 12
param set MPC_Z_VEL_I_ACC 3
param set MPC_Z_VEL_MAX_DN 1.5
param set-default MC_PITCH_P 6
param set-default MC_PITCHRATE_P 0.2
param set-default MC_ROLL_P 6
param set-default MC_ROLLRATE_P 0.3
param set-default MIS_LTRMIN_ALT 10
param set-default MIS_TAKEOFF_ALT 10
param set-default MIS_YAW_TMT 10
param set NAV_ACC_RAD 5
param set NAV_DLL_ACT 2
param set NAV_LOITER_RAD 80
param set-default MPC_ACC_HOR_MAX 2
param set-default MPC_ACC_HOR_MAX 2
param set-default MPC_THR_MIN 0.1
param set-default MPC_TKO_SPEED 1
param set-default MPC_XY_P 0.8
param set-default MPC_XY_VEL_D_ACC 0.1
param set-default MPC_XY_VEL_I_ACC 4
param set-default MPC_XY_VEL_P_ACC 3
param set-default MPC_Z_VEL_P_ACC 12
param set-default MPC_Z_VEL_I_ACC 3
param set-default MPC_Z_VEL_MAX_DN 1.5
param set RTL_DESCEND_ALT 10
param set RTL_LAND_DELAY 0
param set RTL_RETURN_ALT 30
param set-default NAV_ACC_RAD 5
param set-default NAV_DLL_ACT 2
param set-default NAV_LOITER_RAD 80
param set SDLOG_DIRS_MAX 7
param set SYS_RESTART_TYPE 2
param set-default RTL_DESCEND_ALT 10
param set-default RTL_RETURN_ALT 30
param set-default SDLOG_DIRS_MAX 7
param set-default VT_F_TRANS_THR 0.75
param set-default VT_MOT_ID 1234
param set-default VT_FW_MOT_OFFID 1234
param set-default VT_TYPE 2
param set-default CA_AIRFRAME 2
param set-default CA_ROTOR_COUNT 5
param set-default CA_ROTOR0_PX 0.15
param set-default CA_ROTOR0_PY 0.15
param set-default CA_ROTOR1_PX -0.15
param set-default CA_ROTOR1_PY -0.15
param set-default CA_ROTOR2_PX 0.15
param set-default CA_ROTOR2_PY -0.15
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -0.15
param set-default CA_ROTOR3_PY 0.15
param set-default CA_ROTOR3_KM -0.05
param set-default CA_ROTOR4_AX 1.0
param set-default CA_ROTOR4_AZ 0.0
param set-default CA_ROTOR4_PX 0.2
param set-default CA_SV_CS_COUNT 3
param set-default CA_SV_CS1_TRQ_R 0.5
param set-default CA_SV_CS1_TYPE 2
param set-default CA_SV_CS2_TRQ_P 1.0
param set-default CA_SV_CS2_TYPE 3
param set-default HIL_ACT_FUNC1 101
param set-default HIL_ACT_FUNC2 102
param set-default HIL_ACT_FUNC3 103
param set-default HIL_ACT_FUNC4 104
param set-default HIL_ACT_FUNC5 105
param set-default HIL_ACT_FUNC6 201
param set-default HIL_ACT_FUNC7 202
param set-default HIL_ACT_FUNC8 203
param set VT_F_TRANS_THR 0.75
param set VT_MOT_ID 1234
param set VT_FW_MOT_OFFID 1234
param set VT_TYPE 2
fi
param set SYS_HITL 1
# disable some checks to allow to fly
# - with usb
param set-default CBRK_USB_CHK 197848
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default COM_PREARM_MODE 0
param set-default CBRK_IO_SAFETY 22027
set MAV_TYPE 22
set MIXER standard_vtol_hitl
@@ -18,8 +18,8 @@
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board intel_aerofc-v1 exclude
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v2 exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -7,11 +7,43 @@
#
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
#
# @board px4_fmu-v2 exclude
#
. ${R}etc/init.d/rc.mc_defaults
set MIXER quad_x
set PWM_OUT 1234
param set UAVCAN_ENABLE 0
param set-default CA_ROTOR_COUNT 4
param set-default CA_ROTOR0_PX 0.15
param set-default CA_ROTOR0_PY 0.15
param set-default CA_ROTOR1_PX -0.15
param set-default CA_ROTOR1_PY -0.15
param set-default CA_ROTOR2_PX 0.15
param set-default CA_ROTOR2_PY -0.15
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -0.15
param set-default CA_ROTOR3_PY 0.15
param set-default CA_ROTOR3_KM -0.05
param set-default HIL_ACT_FUNC1 101
param set-default HIL_ACT_FUNC2 102
param set-default HIL_ACT_FUNC3 103
param set-default HIL_ACT_FUNC4 104
# set SYS_HITL to 2 to start the SIH and avoid sensors startup
param set SYS_HITL 2
# disable some checks to allow to fly:
# - with usb
param set-default CBRK_USB_CHK 197848
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default COM_PREARM_MODE 0
param set-default CBRK_IO_SAFETY 22027
param set SIH_VEHICLE_TYPE 0

Some files were not shown because too many files have changed in this diff Show More