I have tried to use make distclean and also clear the logs, but I have been unable to find a solution. I also tried to play around with QGroundControl to see if anything there could help fix this problem to no avail.
I just encountered the same error! I had to struggle with this for a while.
In my case, I ran QGC and make px4_sitl gz_x500. And this error message popped up, not allowing for any flight including takeoff.
My remedy was to āmanually rotateā the drone model in gazebo sim. This somehow resolved the error. I believe a certain heading raises some issues in preflight check.
please check whether the groundtruth_plugin is enabled in your simulation environment.
If the groundtruth_plugin is missing or not properly configured, the estimator may not receive consistent attitude/heading reference data. This can cause the heading innovation to grow or oscillate, resulting in the āheading estimate not stableā preflight failure.