38 Commits

Author SHA1 Message Date
Daniel Agar
df2f26ebdf
rename vehicle_visual_odometry_aligned -> estimator_visual_odometry_aligned
- saves a small amount of work for the ekf2 selector in multi-EKF mode (visual_odometry_aligned now ignored)
 - helps to distinguish the origin/purpose from vehicle_odometry and vehicle_visual_odometry
2020-10-27 12:33:39 -04:00
Daniel Agar
0f411d6820
Multi-EKF support (ekf2)
- ekf2 can now run in multi-instance mode (currently up to 9 instances)
    - in multi mode all estimates are published to alternate topics (eg estimator_attitude instead of vehicle_attitude)
 - new ekf2 selector runs in multi-instance mode to monitor and compare all instances, selecting a primary (eg N x estimator_attitude => vehicle_attitude)
 - sensors module accel & gyro inconsistency checks are now relative to the mean of all instances, rather than the current primary (when active ekf2 selector is responsible for choosing primary accel & gyro)
 - existing consumers of estimator_status must check estimator_selector_status to select current primary instance status
 - ekf2 single instance mode is still fully supported and the default

Co-authored-by: Paul Riseborough <gncsolns@gmail.com>
2020-10-27 10:56:11 -04:00
Daniel Agar
d5245a22d3 logger: limit default estimator_optical_flow_vel logging 2020-10-26 14:10:25 -04:00
bresch
09cc3120e2 OpticalFlow: add optical flow velocity logging
This is important to align the flow with the IMU data and verify that
the compensation is properly done
2020-10-26 14:10:25 -04:00
Daniel Agar
8435742dd5 logger: double actuator_controls_0 and vehicle_attitude_setpoint default log rate 2020-10-26 00:36:02 -04:00
Daniel Agar
6d2f592c16 logger: add vehicle_constraints to default set 2020-10-26 00:36:02 -04:00
Daniel Agar
b08b83ba48 logger: logged topics support up to 4 accels/baros/gyros 2020-10-19 18:30:22 -04:00
Daniel Agar
d71ca37087
navigator: publish navigator mission item changes for logging
- new msg navigator_mission_item for inspecting navigator mission item processing
2020-10-13 12:12:03 -04:00
Daniel Agar
f557fa46e8
gyro_fft improve peak finding, parameterize min/max frequencies, remove debug logging
- add min/max frequency parameters for peak detection (IMU_GYRO_FFT_MIN, IMU_GYRO_FFT_MAX)
 - remove full FFT debug logging
 - fix Quinn's second estimator
 - log sensor_gyro_fft
 - fake_gyro use PX4Gyroscope
2020-10-12 15:19:39 -04:00
Silvan Fuhrer
84455ac9e3 logger: increase logging rate of airspeed_validated from 1Hz to 5Hz
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-10-06 09:31:58 +02:00
Jacob Dahl
a24488328f
Move GPS blending from ekf2 to sensors module
- new sensors work item that subscribes to N x sensor_gps and publishes vehicle_gps_position
 - blending is now configurable with SENS_GPS_MASK and SENS_GPS_TAU

Co-authored-by: Jacob Crabill <jacob@volans-i.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2020-09-25 23:28:31 -04:00
Daniel Agar
861e06dfd7
mavlink: handle receiving GENERATOR_STATUS
- only published (ORB_ID(generator_status)) and logged for now
2020-09-25 11:36:58 -04:00
Daniel Agar
0dc8bb9c86
uORB: increase ORB_MULTI_MAX_INSTANCES 4 -> 10
- put more realistic bounds on maximum number of battery instances, gps, etc
2020-09-24 11:01:28 -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
9ccc1db649 estimator_status split out estimator_states 2020-09-04 10:48:26 -04:00
Daniel Agar
978e35478f
logger: add_topic_multi optional specify max multi-instance (#15647) 2020-09-01 09:36:32 +02:00
Daniel Agar
1d0188fc07 logger: add vehicle_acceleration to default topics 2020-08-23 17:38:27 -04:00
Daniel Agar
971b1e4b4d sensors: move mag aggregation to new VehicleMagnetometer WorkItem
- purge all reminaing magnetometer IOCTL usage
 - mag calibration add off diagonal (soft iron) scale factors
2020-08-21 10:12:13 -04:00
TSC21
56a105e322 logger: by default, log the onboard_computer_status topic 2020-08-17 13:24:12 +02:00
Daniel Agar
e4fa7597f4
logger: SDLOG_PROFILE remove estimator replay from default to minimize log rate
- log full sensor_combined by default for now
 - small decrease to input_rc rate (manual_control_setpoint is no longer filtered)
 - sensor_correction can be logged at full rate (low publication rate)
2020-07-29 15:07:42 -04:00
Daniel Agar
81f57bccb6 px4io: servorail_status -> px4io_status and log all flags 2020-07-21 09:56:13 -04:00
Daniel Agar
42493b3d59 logger: add full commander and safety logging by default
- increase battery_status rate to be useful
2020-07-17 17:27:15 -04:00
Beat Küng
d22bbde7c5 logger: fix hardfault for invalid SDLOG_PROFILE setting
If some bits are set but no topic was added, _subscriptions was null but
later accessed.

During normal use this only happens when switching between different
firmware versions with different SDLOG_PROFILE definition (with custom
config).
2020-06-29 09:49:56 -04:00
Beat Küng
0fcb873636 logger: add raw FIFO high-rate IMU logging profiles
Minimum requirement to use: set IMU_GYRO_RATEMAX to 400.

Logging rate of a single topic: ~85 KB/s. If multiple should be logged,
a really good SD card has to be used.
2020-06-09 09:58:15 -04:00
Daniel Agar
e34bdb4be9
move IMU integration out of drivers to sensors hub to handle accel/gyro sync
- IMU integration move from drivers (PX4Accelerometer/PX4Gyroscope) to sensors/vehicle_imu 
 - sensors: voted_sensors_update now consumes vehicle_imu
 - delete sensor_accel_integrated, sensor_gyro_integrated
 - merge sensor_accel_status/sensor_gyro_status into vehicle_imu_status
 - sensors status output minor improvements (ordering, whitespace, show selected sensor device id and instance)
2020-05-30 11:07:54 -04:00
Paul Riseborough
ab92b46e69
Update ecl to add ability to recover from bad magnetic yaw
* msg: Add EKF-GSF yaw estimator logging data
* ecl: update to version with EKF-GSF yaw estimator
* ekf2: Add param control and logging for EKF-GSF yaw estimator
* logger: Add logging for EKF-GSF yaw esimtator
2020-03-15 12:57:25 -04:00
Daniel Agar
093e9ba1ce
mc_rate_control: use vehicle_angular_acceleration topic instead of differentiating
* mc_rate_control: use vehicle_angular_acceleration topic
* IMU_DGYRO_CUTOFF change default to 30 Hz
* improve IMU_DGYRO_CUTOFF param documentation (updated from MC_DTERM_CUTOFF)
2020-03-12 15:07:03 -04:00
Daniel Agar
9585055e9e
uORB: add bitset for faster orb_exists check and remove uORB::Subscription lazy subscribe hack/optimization
- add PX4 bitset and atomic_bitset with testing
 - add uORB::Subscription constructor to take ORB_ID enum
 - move orb test messages into msg/
2020-03-11 09:06:33 -04:00
Roman Dvořák
e43aa4e287
logger: add RPM sensor messages 2020-03-09 18:34:06 -04:00
Beat Küng
d386591d0c logger: reduce rate_ctrl_status rate to 50 Hz for high-rate logging
The integral does not need to be logged at full rate
2020-02-25 09:59:52 +01:00
bresch
0f1c7590e9 HoverThrustEstimator: add a new single state estimator
with measurement noise auto-tuning

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

Recovery strategy:
This is required when the setpoint suddenly changes in air or that the
EKF is diverging. A lowpassed test ratio is used as a trigger for the recovery logic
Also, a lowpassed residual is used to estimate the steady-state value
and remove it when estimating the accel noise to avoid increasing the
accel noise when the redisual is caused by an offset.
2020-02-07 11:52:52 +01:00
Nicolas Martin
cfa74b9106 logger: choose logged instances by logger_topics file
new versions of logger does not allow to log multiple instances of a topic when using 'logger_topics.txt'

This commit restores the default behavior (log all instances of a topic) and ad the option to specify an instance to log
2020-01-31 09:43:29 +01:00
Daniel Agar
931a3f2684
logger: publish initial logger_status orb message 2020-01-29 17:29:30 -05:00
Daniel Agar
10410fc868 msg: rename sensor_bias -> estimator_sensor_bias 2020-01-27 09:03:27 +01:00
Daniel Agar
d1260aa28c logger: add safety (switch) at minimal rate 2020-01-20 14:30:24 -05:00
Daniel Agar
bb465ca5b7
sensor accel/gyro message cleanup
- split out integrated data into new standalone messages (sensor_accel_integrated and sensor_gyro_integrated)
 - publish sensor_gyro at full rate and remove sensor_gyro_control
 - limit sensor status publications to 10 Hz
 - remove unused accel/gyro raw ADC fields
 - add device IDs to sensor_bias and sensor_correction
    - vehicle_angular_velocity/vehicle_acceleration: check device ids before using bias and corrections
2020-01-18 01:15:00 -05:00
Daniel Agar
156cf16265
logger: log all raw sensor data at a minimal rate 2020-01-02 13:15:02 -05:00
Beat Küng
e10a4c5002 refactor logger: move subscription initialization into separate class 2019-12-17 21:22:30 -08:00