PX4/Pixhawk Hexacopter Flips Over After Take-off

I have been running short experiments with Pixhawk 4 from Holybro on a Tarot X6 frame. Recently, an error led to a serious crash where the multicopter fell from 20ft. The landing legs and arms were replaced and all electronics appeared to be working after restrained ground tests.

Unfortunately, the first flight after the rebuild did not go well. Just after a stable take-off (position mode), the hexacopter flipped over at approximately 3-4 feet AGL. There were no observable oscillations or instability before the flip occurred. The pixhawk was reset to defaults and re-calibrated again. The motor/propeller configuration was triple checked. Then a second flight was attempted but the result was the same.

Unfortunately, I cannot diagnose the problem from the logs. Vibration does not seem to be a large problem. All PID values are at their nominal value under which I originally achieved stable flight before the crash. At this point I am guessing that the IMU sensors in the Pixhawk were damaged from the previous crash. Can anyone take a look at the logs and give me some ideas?

https://logs.px4.io/plot_app?log=4fafb8bd-f148-4dd6-9188-35364c4de8c4
https://logs.px4.io/plot_app?log=9137aad4-9a28-47ab-9f30-76fe5ba07c3d
https://logs.px4.io/plot_app?log=a6e72eee-980d-4747-a0ae-5f94abc0a7d3

Well, I should be publicly shamed.

The motor wiring order was not double checked during the rebuild. So the motor order according to the Airframes Reference did not match the motor order on the Tarot X6 hexacopter frame.

Interestingly enough, due to the differing numbers between the Tarot X6 frame and the PX4 Airframe Reference as well as color coded cables, it was extremely difficult to wire the motors in the correct order once. A brain twister for sure.

The beast is back in the air, a flying lawnmower that still needs some PID tuning.