13189 Commits

Author SHA1 Message Date
Julian Oes
4d76ed34f3 simulator: update temperature in sync with baro
This fixes the case where the baro was not rejected if stuck because the
temperature still varied.
2020-09-16 12:51:56 -04:00
Julian Oes
c31246e13a mavsdk_tests: add test for stuck mag 2020-09-16 12:51:56 -04:00
Julian Oes
afcfa2fbe0 mavsdk_tests: check for stuck baro 2020-09-16 12:51:56 -04:00
Julian Oes
a9c4f269bd simulator: use failure injection to block GPS
This uses the new failure injection system using vehicle_commands
instead of specific parameters. For now it implements GPS only.
2020-09-16 12:51:56 -04:00
Julian Oes
53b14233a2 mavlink: handle failure injection commands
This adds handling of MAVLink failure injection commands. An
additional parameter is added as a guard to prevent triggering any
failures by accident.
2020-09-16 12:51:56 -04:00
Nicolas MARTIN
504730386a fix COM_ARM_AUTH comment 2020-09-15 22:12:55 -04:00
Daniel Agar
c41f053c7b
vehicle_imu/vehicle_magnetometer add calibration indicator to message
- vehicle_imu/vehicle_magnetometer add monotonically increasing `calibration_count` field so that downstream subscribers are aware of calibration changes
2020-09-15 13:12:57 -04:00
Daniel Agar
87471a988d land_detector: use hover thrust if it was valid recently
- the hover thrust estimate will often invalidate upon ground contact, but before the land detector ground_contact triggers
 - use same time throughout call to avoid subtle timing surprises
2020-09-15 10:17:25 -04:00
Daniel Agar
dc507ee544 sensors: add SENS_MAG_MODE to optionally publish all magnetometers 2020-09-15 10:15:39 -04:00
Daniel Agar
a04412fc1f sensors: add SENS_IMU_MODE to optionally skip IMU voting/selection 2020-09-15 10:15:39 -04:00
Mirko Denecke
5ebc4d31da CubeOrange and CubeYellow IMU heating fix 2020-09-15 10:08:58 -04:00
Ricardo Marques
c15efea429
mavlink: publish ESC_INFO and ESC_STATUS
Signed-off-by: Ricardo Marques <marques.ricardo17@gmail.com>
2020-09-14 09:38:44 -04:00
JaeyoungLim
0592f6ba6e
Support gliding setpoints for autonomous soaring (#14643)
* Enable offboard gliding position setpoints

Adds a capability to make the vehicle glide when given position setpoints.

Gliding setpoints are enabled by setting POSITION_TARGET_TYPEMASK_Z_IGNORE, POSITION_TARGET_TYPEMASK_VZ_IGNORE,  POSITION_TARGET_TYPEMASK_AZ_IGNORE on the typemask of position setpoints.
Include zero cruising throttle
Invalid setpoints with nan

* Handle nans for curise_throttle
2020-09-14 10:56:29 +02:00
Daniel Agar
13db2ebb2b
accel/gyro/mag calibration set default priority uninitialized
- this allows the default priority to be set differently for internal/external sensors
 - accel and gyro initialize default priority like mag in preparation for fully supporting external sensors
 - fixes #15652
2020-09-13 21:02:53 -04:00
Daniel Agar
d70e183f5b commander: sensor calibration check parameter save success 2020-09-13 21:00:40 -04:00
Thies Lennart Alff
531242468e fixed erroneous task_spawn 2020-09-13 18:31:02 -04:00
Morten Fyhn Amundsen
cfe4982023 mavlink_messages: Subscribe to all distance_sensor instances
This will make all distance_sensor messages be published to
mavlink. Previously, if you ran multiple distance_sensor publishers,
typically multiple distance sensors, then you'd only get one of them
on mavlink.

The modifications to MavlinkStreamDistanceSensor are based on
MavlinkStreamBatteryStatus, which already exists with multi-instance
subscription and streaming to mavlink.

Use SubscriptionMultiArray

Co-authored-by: Daniel Agar <daniel@agar.ca>
2020-09-13 12:42:07 -04:00
Quentin PERROT
9116acc431 change message critical state for arm authorization 2020-09-09 08:59:21 +02:00
Matthias Grob
f70dda12a6 failureDetectorCheck: remove string manipulation 2020-09-08 11:42:30 +02:00
Matthias Grob
5eba25d2b5 Commander: remove duplicate flag changes 2020-09-08 11:42:30 +02:00
Matthias Grob
ab17b6bad4 failureDetectorCheck: revise messageing 2020-09-08 11:42:30 +02:00
Matthias Grob
981e05c633 FailureDetector: move esc topic check into esc status update 2020-09-08 11:42:30 +02:00
Matthias Grob
c180e09b9a FailureDetector: replace resetAttitudeStatus 2020-09-08 11:42:30 +02:00
Matthias Grob
390edb770d Commander: separate failure detector cases
One case could lead to the action for the other!
2020-09-08 11:42:30 +02:00
Matthias Grob
f47bb95b26 FailureDetector: remove obsolete bit switch checks 2020-09-08 11:42:30 +02:00
Matthias Grob
c9b81eaf08 FailureDetector: simplify updated/changed check 2020-09-08 11:42:30 +02:00
Matthias Grob
2bb5917188 FailureDetector: refactor naming, member order 2020-09-08 11:42:30 +02:00
Matthias Grob
25cdb383c6 Commander: simplify main failure detector condition 2020-09-08 11:42:30 +02:00
bresch
db25f20120 ekf2: move "using" keywords to cpp 2020-09-07 09:42:56 -04:00
Daniel Agar
60d613ea04
sensors: sensor_preflight_imu -> sensors_status_imu and run continuously
- inconsistency checks now run continuously instead of only preflight
 - keep inconsistencies for all sensors
 - add per sensor data validator state as overall health flag
2020-09-06 22:06:13 -04:00
Daniel Agar
ca9b6bc137
commander: quick mag cal with fixed heading use MAV_CMD_FIXED_MAG_CAL_YAW message
- use proper Mavlink MAV_CMD_FIXED_MAG_CAL_YAW command for initiating magnetometer quick cal
 - MAV_CMD_FIXED_MAG_CAL_YAW allows specifying the yaw and optionally latitude and longitude if the vehicle doesn't have GPS
2020-09-06 19:25:11 -04:00
Daniel Agar
1ac31100cc
commander: HITL skip auto disarm if lockdown
- auto disarm when locked down was added in #14766 to prevent user confusion in regular usage, but also breaks HITL where lockdown is enabled for safety
 - fixes #15686
2020-09-06 18:38:05 -04:00
Daniel Agar
023f6d3983
NuttX cpuload monitoring optimization
- Nuttx only process all suspend & resume scheduling notes when top is running, otherwise only track IDLE
 - convert cpuload and print load to c++
 - delete unused fields from print_load struct
 - update hrt_store_absolute_time (previous unused)
2020-09-05 14:35:50 -04:00
Nicolas MARTIN
a9798454cd temperature compensation: change sensor id not found message 2020-09-05 13:27:42 -04:00
Nicolas MARTIN
4addf8ec3e thermal calibrtation: do not calibrate sensor without temperature sensor 2020-09-05 13:27:42 -04:00
Jonathan Hahn
7e5e8259f3
fw_pos_control_l1: fix swapped TECS time parameters (#15685)
Co-authored-by: Jonathan Hahn <hahn@wingcopter.com>
2020-09-04 15:11:31 -04:00
Daniel Agar
e5879f1bb6 estimator_sensor_bias: add bias variance 2020-09-04 10:48:26 -04:00
Daniel Agar
c54a0ff0c7 estimator_status: add device ids for accel/baro/gyro/mag 2020-09-04 10:48:26 -04:00
Daniel Agar
20c2fe6d28 estimator messages add explicit timestamp_sample
- timestamp is uORB publication metadata
 - this allows us to see what the system saw at publication time plus the latency in estimation
2020-09-04 10:48:26 -04:00
Daniel Agar
9215fb57a2 ekf2: advertise immediately to ensure consistent uORB instance numbering 2020-09-04 10:48:26 -04:00
Daniel Agar
9ccc1db649 estimator_status split out estimator_states 2020-09-04 10:48:26 -04:00
Daniel Agar
33a7fed240 ekf2: split out header and rename 2020-09-04 10:48:26 -04:00
Daniel Agar
4879a4e2ef ekf2: use single uORB::Subscription, but change instance 2020-09-03 15:41:33 -04:00
Daniel Agar
59e66e5be9 sensors/vehicle_acceleration: use single uORB::Subscription, but change instance 2020-09-03 15:41:33 -04:00
Daniel Agar
ee88561a33 sensors/vehicle_angular_velocity: use single uORB::Subscription, but change instance 2020-09-03 15:41:33 -04:00
Daniel Agar
94f7b50970 uORB: add Subscription method to change instance 2020-09-03 15:41:33 -04:00
Daniel Agar
19b43b5e9c uORB:: SubscriptionMultiArray fix construction argument
- uORB::SubscriptionInterval construction requires the interval THEN the instance
2020-09-03 07:49:57 +02:00
Daniel Agar
6ff361479c
uORB: introduce SubscriptionMultiArray for working with multi-instances 2020-09-02 12:46:47 -04:00
Daniel Agar
5017a7e33a
simulator: publish 2 instances of accel/baro/gyro/mag 2020-09-02 10:42:02 -04:00
Daniel Agar
e56dfe6497
rover_pos_control: revert sensor_combined purge
- sensor_combined is only used for scheduling in this module under certain circumstances and should be reviewed and replaced 
 - fixes https://github.com/PX4/Firmware/issues/15628
2020-09-01 21:09:33 -04:00