How do I monitor the state of the EKF? Specifically I want to check if it is done initializing such that we are ready to fly.
When booting the autopilot, the EKF needs some time to be ready to flight. If I try to arm it in this timespan, I get a human readable warning APM: PreArm: EKF2 still initialising. The question is then: How can I know know if the EKF is ready to arm through MAVROS? (or through Mavlink without MAVROS?)
I have tried two topics: /mavros/estimator_status seems to be empty. No received messages.
/mavros/state has a field called system_status, but that seems to be set to 3 = STANDBY even when I get the error message APM: PreArm: EKF2 still initialising.
I don’t know if it is relevant, but I am trying to do GPS denied navigation, so the EKF initialization I am waiting for is the reinitialization after setting the origin with SET_GPS_GLOBAL_ORIGIN (mavrostopic: /mavros/global_position/set_gp_origin).
I see that autotest waits for some of the fields in the ESTIMATOR_STATUS message that mavros does not seem to publish any of ( on /mavros/estimator_status). Do you know if it is sent regularly?
It is a long time since I had a look at this, but I don’t think I figured it out. I think I ended up abusing the arming functionality by repeatedly trying to arm and see if it armed.
This was a long time ago and things might have changed since then.