Crazy oscilations on takeoff

Hi guys. I have problem with my autopilot. I have Pixhawk 6c and generic quadrotor. Problem is I have oscilations after my drone armed and took off from the ground. First 20 cm are fine though. But after reaching 30 cm from the ground, my drone starts to wobble from side to side. And after all it flips because inner sensors goes crazy with that. Log file below:
https://logs.px4.io/plot_app?log=c137726f-575f-4e13-800f-01c5e1d87314
Also wanna add that drone weight is about 3 kg. I will glad to hear any ideas on that. Thanks!

I have a similar experience as you, you just need to lower the PID parameters, especially the D parameter. Then try flying again, the aircraft should be much more stable. Then gradually adjust the PID parameters. Or use automatic adjustment.

Is this tested indoors? Mag seems to be failing!