EKF2 Configuration

This pages outlines the parameter setup when using EKF2 estimator.

The following will be a quick overview on the configurations needed using the MoCap, more detailed information on tuning and configuration can be found in the EKF2 tuning guide.

  • First choose ekf2 as the estimator from the Systems tab by setting SYS_MC_EST_GROUP = ekf2

  • In the EKF2 parameter tab, set EKF2_AID_MASK to not use GPS or optical flow, and use vision position fusion and vision yaw fusion. This is done by setting the parameter to 26 bit. This will also select use optical flow which can be deselected (24 bit) or not as it won't be used because it is not set up. Don't use vision velocity fusion as the MoCap isn't providing velocity, only position and orientation. The onboard EKF estimates velocity.

  • It is a good idea to disable the use of the magnetometer when using the EKF for indoor flight as it may interfere with the external vision pose provided by the MoCap. This can be done by setting the EKF2_MAG_TYPE parameter to 5 bit which is none.

  • There are some delay parameters that need to be set properly because they directly affect EKF estimation. For more information see the detailed document presented before. The tuning process can be found here which is to handle the setup specific time delays. The delay parameter is set below and the methods used to approximate this can be found in a following section.

  • Choose the height mode to be vision EKF2_HGT_MODE = Vision

  • (OPTIONAL, for better accuracy). Set the position of the center of the markers (that define the rigid body in the mocap system) with respect to the center of the flight controller. +x points forward, +y right, +z down. This conversion will provide control of the Clover relative to the center rather then the focal point of the rigid body.

Last updated