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>
This commit is contained in:
Daniel Agar
2020-10-27 10:56:11 -04:00
committed by GitHub
parent d5245a22d3
commit 0f411d6820
56 changed files with 1747 additions and 295 deletions
@@ -65,23 +65,27 @@ static constexpr wq_config_t I2C3{"wq:I2C3", 1472, -11};
static constexpr wq_config_t I2C4{"wq:I2C4", 1472, -12};
// PX4 att/pos controllers, highest priority after sensors.
static constexpr wq_config_t attitude_ctrl{"wq:attitude_ctrl", 1672, -13};
static constexpr wq_config_t nav_and_controllers{"wq:nav_and_controllers", 7200, -14};
static constexpr wq_config_t nav_and_controllers{"wq:nav_and_controllers", 1728, -13};
static constexpr wq_config_t hp_default{"wq:hp_default", 1900, -15};
static constexpr wq_config_t INS0{"wq:INS0", 7200, -14};
static constexpr wq_config_t INS1{"wq:INS1", 7200, -15};
static constexpr wq_config_t INS2{"wq:INS2", 7200, -16};
static constexpr wq_config_t INS3{"wq:INS3", 7200, -17};
static constexpr wq_config_t uavcan{"wq:uavcan", 3000, -16};
static constexpr wq_config_t hp_default{"wq:hp_default", 1900, -18};
static constexpr wq_config_t UART0{"wq:UART0", 1400, -17};
static constexpr wq_config_t UART1{"wq:UART1", 1400, -18};
static constexpr wq_config_t UART2{"wq:UART2", 1400, -19};
static constexpr wq_config_t UART3{"wq:UART3", 1400, -20};
static constexpr wq_config_t UART4{"wq:UART4", 1400, -21};
static constexpr wq_config_t UART5{"wq:UART5", 1400, -22};
static constexpr wq_config_t UART6{"wq:UART6", 1400, -23};
static constexpr wq_config_t UART7{"wq:UART7", 1400, -24};
static constexpr wq_config_t UART8{"wq:UART8", 1400, -25};
static constexpr wq_config_t UART_UNKNOWN{"wq:UART_UNKNOWN", 1400, -26};
static constexpr wq_config_t uavcan{"wq:uavcan", 3000, -19};
static constexpr wq_config_t UART0{"wq:UART0", 1400, -21};
static constexpr wq_config_t UART1{"wq:UART1", 1400, -22};
static constexpr wq_config_t UART2{"wq:UART2", 1400, -23};
static constexpr wq_config_t UART3{"wq:UART3", 1400, -24};
static constexpr wq_config_t UART4{"wq:UART4", 1400, -25};
static constexpr wq_config_t UART5{"wq:UART5", 1400, -26};
static constexpr wq_config_t UART6{"wq:UART6", 1400, -27};
static constexpr wq_config_t UART7{"wq:UART7", 1400, -28};
static constexpr wq_config_t UART8{"wq:UART8", 1400, -29};
static constexpr wq_config_t UART_UNKNOWN{"wq:UART_UNKNOWN", 1400, -30};
static constexpr wq_config_t lp_default{"wq:lp_default", 1700, -50};
@@ -129,5 +133,7 @@ const wq_config_t &device_bus_to_wq(uint32_t device_id);
*/
const wq_config_t &serial_port_to_wq(const char *serial);
const wq_config_t &ins_instance_to_wq(uint8_t instance);
} // namespace px4