EKF Falesafe after takeoff

Hello everyone!
yesterday I had an EKF Failsafe immediately after takeoff and I can’t explain the cause or need a second opinion. Maybe someone can take a look at the log file?
Thank you very much!

2019-12-12 12-18-35.log.zip (238.0 KB)

Looks like your GPS module quite working. At the same time as the Sats go to zero the enabled compass flat-lines. Canbus issue maybe?

do you have any optical flow or proximity sensor (object avoidance) ?
if you have, try to detach them then do a test flight
i think there is a module conflict

Hmm, have two benewake tf mini, one downwards and one forward as proxymity sensor… thats not good… :frowning:

Ok just try to detach them for testing
It will help to finding problem

Those are either on a UART or I2C right? And your GPS/compass module is on CAN

Yes uart, that‘s right. Does this mean i can‘t use such a configuration together or is this a bug?

As @dkemxr says it looks like the UAVCAN GPS/compass stopped working for some reason. It looks like it’s constantly losing the GPS, reconnecting, etc.

I can see that SERIAL3_PROTOCOL and SERIAL4_PROTOCOL are “9” which is for lidar and RNGFND_TYPE and RNGFND2_TYPE have been set to “20” which is for serial TFmini lidar so I think this should work. The LOG_BITMASK has been modified from the default so we sadly can’t see the logging of the rangefinders to see if they are working correctly.

@hosein_gh’s advice to simplify the setup by disabling things is generally a good idea but so far I’m not aware of any issues using a UAVCAN GPS/compass together with serial rangefinders and i definitely wouldn’t jump to the conclusion that we have a bug.

Hello,
I reproduced the error with default logging today. In the next step I will deactivate the two TF minis. But the setup works perfectly in another copter…2019-12-17 11-48-39.bin (795.6 KB)

I had Copter 4.0 RC2 on the Cube before, is it possible that there are still parameters present that negatively affect Copter 3.6.12? The error message Err: Compass-4 makes me suspicious…

or maybe I have a hardware defect somewhere… after landing I noticed again that the I2C bus was offline, both LED and OLED were off. When I do a reboot with MissionPlanner the LED and OLED are off, only when I disconnect and reconnect the power supply I2C is working again…

I have disabled both LIDAR, RNG and PRX parameters. Now it comes to no EKF failsafe anymore, but I had toiletbowl as if the Compass was not calibrated at all, but it was.

An attempt to calibrate the compass failed after a few turns, then the I2C bus was down again…