PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8k stars 13.29k forks source link

PREFLIGHT FAIL: MAG 2 SELFTEST FAILED #12082

Closed codabat closed 4 years ago

codabat commented 5 years ago

Hi, I am facing a possible bug with one external and two internal magnetometers. The used firmware is 1.8.2 (stable) with pixhawk 3 pro (by Drotek). External compass is DP0105 (NEO-M8N GPS + LIS3MDL Magnetometer for Pixhawk 3 Pro). After calibration, I'm receiving CRITICAL error MAG2 SELFTEST CALIBRATION, and the drone is not able to arm. It seems that only way to arm is disabling CBRK_IO_SAFETY, setting this parameter to 22027. Is it risky? Moreover, is it a bug, how could I proceed to overcome such a problem? I've repeated the calibration phase more and more, but the results were always the same.

I'm sorry, I've tried to upload flight log file in https://logs.px4.io/ but the following error is returned: HTTP Error 400: Failed to parse the file. It is most likely corrupt. I try attach it here, log_68_2019-5-26-20-53-32.zip

Below the screenshot:

image

Do you have any idea of the error, or suggestion to avoid the problem? Do you have any evidence of a possible bug? Thank you so much!

Paul-DROTEK commented 5 years ago

According to commits, this SELFTEST calibration step has been removed since firmware update 1.9.0. You should git it a try.

codabat commented 5 years ago

Hello Paul, I also tried the stable 1.9.0. But I found problems on the GPS lock, and I get an invalid compass data. I will try to update to stable 1.9.0 and repeat the calibration with more care. I'll let you know. Thank you so much. Best regards.

Paul-DROTEK commented 5 years ago

Ok then ! At work I performed the calibration process using the exact same device + Pixhawk3Pro + 1.9.0 firmware version and everything was working successfully. Hopefully you will be able to get the same results. :)

If there is still something wrong, maybe you should try doing the calibration while the autopilot + gps are not on board. Sometimes the drone frame can be a source of noise.

codabat commented 5 years ago

Dear Paul, OK, I will reapet all calibation procedure tomorrow. I will inform you. Thank you!

Il giorno lun 27 mag 2019 alle ore 21:47 Paul-DROTEK < notifications@github.com> ha scritto:

Ok then ! At work I performed the calibration process using the exact same device + Pixhawk3Pro + 1.9.0 firmware version and everything was working successfully. Hopefully you will be able to get the same results. :)

If there is still something wrong, maybe you should try doing the calibration while the autopilot + gps are not on board. Sometimes the drone frame can be a source of noise.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PX4/Firmware/issues/12082?email_source=notifications&email_token=AKWMCTX2ULMUBELZP52ETPTPXQ3GTA5CNFSM4HPXUBHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWKNPLY#issuecomment-496293807, or mute the thread https://github.com/notifications/unsubscribe-auth/AKWMCTTFTJLHGQXL3N4B32TPXQ3GTANCNFSM4HPXUBHA .

-- GPG Info: Key ID: 0xF1238B3C Fingerprint: A9C7 600B 21CE 7632 F61A B4FA 88E1 E7EB F123 8B3C

ch3sn3k commented 5 years ago

Dear @codabat , we had a same issue. We had this error on at least three our units and it seems, that stable firmware 1.9.0 solved the issue.

Paul-DROTEK commented 5 years ago

Hi, Yes MAGSELFTEST has been removed since August 2018 in PX4 firmware version 1.9.0 alpha see here : https://github.com/PX4/Firmware/commit/bb9c38a4803962c074ce0d49a57b64588f7b2a36#diff-aca721e521ad24ed19d30ebf3dd39374

codabat commented 5 years ago

Hi @Paul-DROTEK, hi @ch3sn3k, hi all, thanks for your feedback I updated the firmware to version 1.9.0. I tried to recalibrate both without the eternal GPS on board. After the calibration, I get the message "Internal compass inconsistent," and I am unable to arm the drone. Moreover, I note that with the 1.9.0, the "GPS lock" occurs in very long times. The time required to carry out the "GPS lock" on same conditions seems to have returned to normal with the 1.9.0 master version (I refer to the daily May 31, 2019). I point out that the visibility conditions of the satellite constellation have always been excellent with 15-18 satellites visible from the "flight control".

Then I tried to update with the master version, I'm still receiving warnings, as "The entry is denied..." and the message suggests enabling the safety switch. Am I the only one to receive this error? Could the problem be related to the fact that Pixhawk is installed on the drone? However, I think it will always be a common situation.

I apologize in advance, I report some links with some collected logs, which maybe I can help you better understand what is happening to my flight controller.

https://logs.px4.io/plot_app?log=d33870a5-1e54-474f-aea1-388258949072 https://logs.px4.io/plot_app?log=2f5ec665-0a3f-45e8-ba13-9042b490fea0 (v1.9.0 (ea48cd49)) https://logs.px4.io/plot_app?log=b2f310be-831d-4eee-8b73-bfefff960de7 c8ea198a https://logs.px4.io/plot_app?log=0477d9b7-4607-4293-84b0-0fe2565a3788 c8ea198a

I noticed that the following trace is often shown in the logs: [rm3100] no device on bus 4 Furthermore, but this is not of fundamental importance, you can tell me why if I download the logs through the telemetry they are merged but then after uploading the files the system tells me that they are corrupt. This is a possible bug?

I am still all to thank you very much. Your help is precious, and I am a bit perplexed and desperate right now.

Thank you again!

codabat commented 5 years ago

Hello, Sorry, no idea what causes the reported problems? Not even from the logs I included can you understand?

julianoes commented 4 years ago

What's the status here? Has this been resolved?

codabat commented 4 years ago

Yes, It's resolved. Thank you.

Il mer 4 set 2019, 15:08 Julian Oes notifications@github.com ha scritto:

What's the status here? Has this been resolved?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PX4/Firmware/issues/12082?email_source=notifications&email_token=AKWMCTWZGKAUDXVP4TIOOATQH6XN3A5CNFSM4HPXUBHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD53QBOQ#issuecomment-527892666, or mute the thread https://github.com/notifications/unsubscribe-auth/AKWMCTUSH4CMOVUD2HK4ASTQH6XN3ANCNFSM4HPXUBHA .