92 Commits

Author SHA1 Message Date
mcsauder
3a22ee48db Correct trailing whitespaces. 2018-08-18 15:15:41 -04:00
Bob-F
2ece14bad1 Port PX4 to BeagleBone Blue Board using library librobotcontrol instead of a submodule 2018-08-06 13:32:36 +02:00
Daniel Agar
daee7a4e4e commander preflight delete individual sensor selftest 2018-08-02 08:05:52 +02:00
TSC21
ca42483794 update msgs fields from camelCase to snake_case so rosidl_generate_interfaces() is able to generate code for ROS IDL files 2018-07-30 21:40:28 +02:00
Mark Sauder
d3c169b1e0 Fix whitespaces in PreflightCheck.cpp, tilt_quad.aux.mix, and tilt_quad.main.mix 2018-06-28 20:20:32 -04:00
Daniel Agar
3399ec9e73 move systemlib/rc_check to commander (the only usage) and convert to c++ 2018-06-11 22:53:38 +02:00
Philipp Oettershagen
9f414e82f6 Subsystem_info status flags & checks: Add comment to indicate that the IMU+MAG consistency checks need to be performed AFTER the individual checks are complete 2018-06-06 18:54:24 +02:00
Philipp Oettershagen
e12b470cac Subsystem_info status flags & checks: Small fixes according to @bkueng's review 2018-06-06 18:54:24 +02:00
Philipp Oettershagen
302cb0a285 Subsystem_info status flags & checks: Moved the set_health_flags helper functions out of the /lib/ folder and into the module/commander folder because they are actually only needed there 2018-06-06 18:54:24 +02:00
Philipp Oettershagen
bd2af289f5 Subsystem_info status flags & checks: Code style fixes and cleanup to avoid strcmp() as suggested by @LorenzMeier 2018-06-06 18:54:24 +02:00
Philipp Oettershagen
e4d863b95f Subsystem_info status flags & checks: Separate the functionality to a) set the health flags inside commander and b) to publish them from external modules 2018-06-06 18:54:24 +02:00
Philipp Oettershagen
a807d34a7a Remove distance sensor checks again. These checks should be handled by EKF2 and should thus be added there later 2018-06-06 18:54:24 +02:00
Philipp Oettershagen
075009be2f Subsystem_info status flags & checks: 1) Set health flags in commander directly instead of publishing via uORB 2) move publish_subsystem_info into lib/ folder" 2018-06-06 18:54:24 +02:00
Philipp Oettershagen
f5847a4a7b Subsystem_info status flags & checks: Switch back to uORB for inter-process communication, handle GPS checks completely inside ekf2, add distance_sensor checks 2018-06-06 18:54:24 +02:00
Philipp Oettershagen
6f1f414b49 Subsystem_info status flags & checks : Initial commit, updating the health flags in a centralized way mostly in commander and the votedSensorsUpdate function. 2018-06-06 18:54:24 +02:00
Beat Küng
f2516bbf5f system_params: add SYS_HAS_MAG and SYS_HAS_BARO params
This allows to use PX4 on systems that do not have a mag or a baro,
such as the Omnibus F4 SD.
2018-05-20 11:54:17 +02:00
Jake Dahl
92f15283c1 changed int to float 2018-05-04 12:08:55 -04:00
Daniel Agar
ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00
Daniel Agar
64fb4b43b6 commander preflightCheck don't report failures during calibration 2018-04-16 20:43:33 -04:00
Daniel Agar
2271b3f127 commander preflight checks pass status and status_flags messages 2018-04-16 20:43:33 -04:00
Daniel Agar
729c98d9e2 commander move avionics rail voltage check out of state machine
- add preflight_check helper
2018-04-16 20:43:33 -04:00
Daniel Agar
c673c9f531 commander preflight sensor failure report one at a time 2018-04-16 20:43:33 -04:00
Daniel Agar
bb13b602e2 commander arming_state_transition cleanup preflight and prearm calls
- only call prearm if preflight passes
 - prearm always provide feedback
2018-04-16 20:43:33 -04:00
Daniel Agar
e73317a720 commander preflightCheck fail silently for the 2 seconds (rather than skip checks entirely) 2018-04-16 20:43:33 -04:00
Daniel Agar
4e45d7959c commander remove gps receiver checks 2018-02-19 15:28:47 +01:00
Daniel Agar
3c669a4f30
commander ekf2Check respect reportFailures (#8622)
- fixes #8621
2018-01-08 03:07:48 -05:00
Lorenz Meier
074636a8ae Commander: Check for preflight errors in order 2017-12-31 16:37:02 +01:00
Daniel Agar
344cf83549 delete unused SENSORIOCCALTEST 2017-12-31 09:47:51 -05:00
Daniel Agar
294fbc46a9 commander initial class structure 2017-12-27 02:41:10 +08:00
Paul Riseborough
afe857dfe6 commander: rework preflight GPS checks
Fix the bug allowing arming without GPS checks passed in the first 20 seconds after gaining GPS lock when COM_ARM_WO_GPS is set to 0
Allow 10 seconds after boot for EKF quality checks to pass before reporting failure to allow EKF to stabilise.
Move GPS quality checking and reporting to after all innovation and bias checks.
Make messages more informative.
Add missing GPS speed accuracy check.
2017-12-04 09:09:54 +00:00
Paul Riseborough
c09eecbab1 commander: prevent ekf checking being bypassed if GPS checking is disabled 2017-12-04 09:09:54 +00:00
Paul Riseborough
ddfe077f7c commander: strengthen pre-flight fail checking
The commander checks use instantaneous values which are vulnerable to false negatives  or positives with noisy data or transient faults.

This patch checks the estimators published pre flight check status which is based on persistent checks using filtered data.
2017-12-04 09:09:54 +00:00
Beat Küng
a2fd9ef2d0 PreflightCheck: use correct type for params (int -> int32_t) 2017-10-27 10:43:15 +02:00
Paul Riseborough
2a4336b6ef commander: EKF2 GPS requirement 20 sec after 3D lock 2017-10-06 16:22:53 -07:00
Daniel Agar
2495f8942b preflightcheck EKF2 GPS requirement after 20s 2017-10-06 16:22:53 -07:00
Daniel Agar
9a9923c517 commander simplify sensors PreflightCheck 2017-10-06 16:22:53 -07:00
Paul Riseborough
0def4ace5f commander: check magnetometers for inconsistency preflight 2017-10-05 09:30:26 -07:00
Lorenz Meier
75faf5c7bd Preflight checks: Increase accel warn limit range 2017-07-09 16:38:56 +02:00
Daniel Agar
b804616ad0 preflight check airspeed use differential_pressure 2017-07-08 21:54:04 +02:00
Jan Liphardt
d5eab23f53 airspeed error message clarification (#7497)
In day to day practice, there are two reasons for fabsf(airspeed.differential_pressure_filtered_pa) > 15.0f

1/ The sensor has not been calibrated. In this case, the sensor needs to be calibrated.
2/ It's a windy day, and the operator has powered up the system without covering the pitot tube. In that case, you need to reboot with the pitot cover in place.

The original message ('Check calibration') is ok, but why not be more direct? The user does not have to "check the calibration" - the user has to (a) either calibrate the system in the first place, or (b) not forget the pitot tube cover when powering up the system.
2017-06-28 00:28:33 -04:00
Lorenz Meier
a25330762a Commander: Adjust airspeed checks on prearm condition
The previous approach would work with old low-end sensors, but with new high-end sensors we get a lot of false alarms on the bench. Relaxing the check to only apply pre-arm will ensure its now only run when the user intents to take off, at which point the airframe should be with pitot covers off in the field.
2017-06-11 11:19:25 +02:00
davidaroyer
99799d83b1 ocpoc support: update copyright dates 2017-06-04 04:24:50 +08:00
davidaroyer
dbbe3c0863 commander: add support for Aerotenna OcPoC-Zynq hardware 2017-06-04 04:24:50 +08:00
Nicolae Rosia
a0ee07e357 commander: enable partial preflight checks on RPI
Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
2017-05-29 21:38:21 +02:00
Paul Riseborough
8421ad3dfd commander: Changes following code review 2017-05-03 08:37:14 +02:00
priseborough
8ea0b2d3c5 commander: rework posvel validity checks
Move into functions.
Reset probation time and recalculate checks if a mode change is demanded to give the operator ability to regain control as soon as possible after nav performance is regained. (+11 squashed commits)
Squashed commits:
[a4bb800] commander: enable pilot to quickly recover from loss of position accuracy
[19e16a0] commander: rework postal probation time
[f96284e] commander: rework bad pos and vel test probation time
[00d5f0c] commander: Allow EKF preflight checks to pass with moving vehicle

Separates the 'is using GPS' and the GPS quality checks.
Uses a reasonable subset of the GPS quality checks which allows checks to pass if the vehicle is moving.
[4cdfb5c] commander: remove unused variable
[349385a] commander: add EKF GPS quality checks to pre-arm checking

Only perform check if GPs checking is activated by parameter setting.
Display fault messages that makes it clear if EKF quality checks are failing or the EKF is not using GPS for another reason. We do not want to confuse this with GPS lock.
[340ae29] commander: make position invalid fail-safe more sticky

Require check to pass for 7 seconds before exiting failsafe. This is required because if GPs is failing innovation tests for a prolonged period, the EKF will periodically reset to the GPS and report good accuracy at the time of reset.
Adding this delay gives time for an underlying error condition (eg bad IMU or compass) to be re-detected.
[b04ac95] commander: Increase RAM allocation to eliminate low stack warnings
[9dca12f] commander: add missing position invalid fail-safe responses
[69f264d] commander: Update position invalid fail-safe responses

Replace separate logic for each case with a generic function
Add velocity checks.
[8e8cef1] commander: rework position validity checks

Consolidate existing checks for global and local position validity and add checking of velocity accuracy.
Enable checks to be bypassed using the CBRK_VELPOSERR parameter.
2017-05-03 08:37:14 +02:00
Nate Weibley
9038be2d83 Fix EKF velocity innovation limit preflight check 2017-04-15 01:21:10 +02:00
Beat Küng
04303dcf72 PreflightCheck: use orb_unsubscribe instead of px4_close 2017-04-06 11:48:35 +02:00
Lorenz Meier
a13082bfed commander: Widen pre-flight check for airspeed 2017-01-16 08:26:37 -08:00
Lorenz Meier
fff35fe34b Commander: Improve preflight check experience
* Loosen thresholds for gyro consistency check until temperature compensated units are the norm
  * Cut down string lengths so they make it through the MAVLink transport as a whole
2016-12-26 14:04:30 +01:00